!164 fix:eventbus modify

Merge pull request !164 from chen0088/master
This commit is contained in:
openharmony_ci
2022-07-18 08:20:09 +00:00
committed by Gitee
7 changed files with 7 additions and 7 deletions
@@ -248,7 +248,7 @@ int32_t DCameraSinkController::Init(std::vector<DCameraIndex>& indexs)
}
channel_ = std::make_shared<DCameraChannelSinkImpl>();
eventBus_ = std::make_shared<EventBus>();
eventBus_ = std::make_shared<EventBus>("SinkCtlHandler");
DCameraFrameTriggerEvent triggerEvent(*this);
DCameraPostAuthorizationEvent authEvent(*this);
eventBus_->AddHandler<DCameraFrameTriggerEvent>(triggerEvent.GetType(), *this);
@@ -29,7 +29,7 @@ DCameraSinkDataProcess::DCameraSinkDataProcess(const std::string& dhId, std::sha
: dhId_(dhId), channel_(channel)
{
DHLOGI("DCameraSinkDataProcess Constructor dhId: %s", GetAnonyString(dhId_).c_str());
eventBus_ = std::make_shared<EventBus>();
eventBus_ = std::make_shared<EventBus>("SinkDPHandler");
DCameraPhotoOutputEvent photoEvent(*this);
DCameraVideoOutputEvent videoEvent(*this);
eventBus_->AddHandler<DCameraPhotoOutputEvent>(photoEvent.GetType(), *this);
@@ -29,7 +29,7 @@ DCameraSinkDataProcess::DCameraSinkDataProcess(const std::string& dhId, std::sha
: dhId_(dhId), channel_(channel)
{
DHLOGI("DCameraSinkDataProcess Constructor dhId: %s", GetAnonyString(dhId_).c_str());
eventBus_ = std::make_shared<EventBus>();
eventBus_ = std::make_shared<EventBus>("SinkDPHandler");
DCameraPhotoOutputEvent photoEvent(*this);
DCameraVideoOutputEvent videoEvent(*this);
eventBus_->AddHandler<DCameraPhotoOutputEvent>(photoEvent.GetType(), *this);
@@ -76,7 +76,7 @@ int32_t DCameraSourceDev::InitDCameraSourceDev()
{
DHLOGI("DCameraSourceDev InitDCameraSourceDev devId %s dhId %s", GetAnonyString(devId_).c_str(),
GetAnonyString(dhId_).c_str());
eventBus_ = std::make_shared<EventBus>();
eventBus_ = std::make_shared<EventBus>("SrcDevHandler");
DCameraSourceEvent event(*this);
eventBus_->AddHandler<DCameraSourceEvent>(event.GetType(), *this);
auto cameraSourceDev = std::shared_ptr<DCameraSourceDev>(shared_from_this());
@@ -83,7 +83,7 @@ bool DCameraPipelineSource::IsInRange(const VideoConfigParams& curConfig)
void DCameraPipelineSource::InitDCameraPipEvent()
{
DHLOGD("Init source DCamera pipeline event to asynchronously process data.");
eventBusSource_ = std::make_shared<EventBus>();
eventBusSource_ = std::make_shared<EventBus>("PipelineSrcHandler");
DCameraPipelineEvent pipelineEvent(*this, std::make_shared<PipelineConfig>());
eventBusSource_->AddHandler<DCameraPipelineEvent>(pipelineEvent.GetType(), *this);
}
@@ -91,7 +91,7 @@ bool DecodeDataProcess::IsConvertible(const VideoConfigParams& sourceConfig, con
void DecodeDataProcess::InitCodecEvent()
{
DHLOGD("Init DecodeNode eventBus, and add handler for it.");
eventBusDecode_ = std::make_shared<EventBus>();
eventBusDecode_ = std::make_shared<EventBus>("DeDtProcHandler");
DCameraCodecEvent codecEvent(*this, std::make_shared<CodecPacket>());
eventBusRegHandleDecode_ = eventBusDecode_->AddHandler<DCameraCodecEvent>(codecEvent.GetType(), *this);
@@ -91,7 +91,7 @@ bool DecodeDataProcess::IsConvertible(const VideoConfigParams& sourceConfig, con
void DecodeDataProcess::InitCodecEvent()
{
DHLOGD("Common Init DecodeNode eventBus, and add handler for it.");
eventBusDecode_ = std::make_shared<EventBus>();
eventBusDecode_ = std::make_shared<EventBus>("DeDtProcHandler");
DCameraCodecEvent codecEvent(*this, std::make_shared<CodecPacket>());
eventBusRegHandleDecode_ = eventBusDecode_->AddHandler<DCameraCodecEvent>(codecEvent.GetType(), *this);