mirror of
https://github.com/openharmony/distributed_camera.git
synced 2026-07-19 16:43:57 -04:00
@@ -15,8 +15,6 @@
|
||||
|
||||
#include "dcamera_sink_load_callback.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "hisysevent.h"
|
||||
#include "dcamera_sink_handler.h"
|
||||
#include "distributed_hardware_log.h"
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
|
||||
#include "dcamera_source_load_callback.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "hisysevent.h"
|
||||
#include "dcamera_source_handler.h"
|
||||
#include "distributed_hardware_log.h"
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
|
||||
#include "dcamera_source_dev.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "anonymous_string.h"
|
||||
#include "hisysevent.h"
|
||||
#include "distributed_camera_constants.h"
|
||||
|
||||
@@ -211,24 +211,30 @@ int32_t DCameraSoftbusAdapter::OpenSoftbusSession(std::string mySessName, std::s
|
||||
int32_t sessionId = OpenSession(mySessName.c_str(), peerSessName.c_str(), peerDevId.c_str(), "0", &attr);
|
||||
if (sessionId < 0) {
|
||||
DHLOGE("DCameraSoftbusAdapter OpenSoftbusSession failed %d", sessionId);
|
||||
int32_t retVal = OHOS::HiviewDFX::HiSysEvent::Write(
|
||||
OHOS::HiviewDFX::HiSysEvent::Domain::DISTRIBUTED_CAMERA,
|
||||
"SOFTBUS_SESSION_ERROR",
|
||||
OHOS::HiviewDFX::HiSysEvent::EventType::FAULT,
|
||||
"PID", getpid(),
|
||||
"UID", getuid(),
|
||||
"MYSESSIONNAME", mySessName.c_str(),
|
||||
"PEERSESSIONNAME", peerSessName.c_str(),
|
||||
"PEERDEVID", peerDevId.c_str(),
|
||||
"MSG", "open softbus session failed.");
|
||||
if (retVal != DCAMERA_OK) {
|
||||
DHLOGE("Write HiSysEvent error, retVal:%d", retVal);
|
||||
}
|
||||
ReportSoftbusSessionFail(mySessName, peerSessName, peerDevId);
|
||||
return DCAMERA_BAD_OPERATE;
|
||||
}
|
||||
return DCAMERA_OK;
|
||||
}
|
||||
|
||||
void DCameraSoftbusAdapter::ReportSoftbusSessionFail(std::string mySessName,
|
||||
std::string peerSessName, std::string peerDevId)
|
||||
{
|
||||
int32_t retVal = OHOS::HiviewDFX::HiSysEvent::Write(
|
||||
OHOS::HiviewDFX::HiSysEvent::Domain::DISTRIBUTED_CAMERA,
|
||||
"SOFTBUS_SESSION_ERROR",
|
||||
OHOS::HiviewDFX::HiSysEvent::EventType::FAULT,
|
||||
"PID", getpid(),
|
||||
"UID", getuid(),
|
||||
"MYSESSIONNAME", mySessName.c_str(),
|
||||
"PEERSESSIONNAME", peerSessName.c_str(),
|
||||
"PEERDEVID", peerDevId.c_str(),
|
||||
"MSG", "open softbus session failed.");
|
||||
if (retVal != DCAMERA_OK) {
|
||||
DHLOGE("Write HiSysEvent error, retVal:%d", retVal);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t DCameraSoftbusAdapter::CloseSoftbusSession(int32_t sessionId)
|
||||
{
|
||||
DHLOGI("close softbus sessionId: %d", sessionId);
|
||||
|
||||
-2
@@ -15,8 +15,6 @@
|
||||
|
||||
#include "decode_data_process.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "hisysevent.h"
|
||||
#include "distributed_hardware_log.h"
|
||||
#include "graphic_common_c.h"
|
||||
|
||||
-2
@@ -15,8 +15,6 @@
|
||||
|
||||
#include "decode_data_process.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "hisysevent.h"
|
||||
#include "distributed_hardware_log.h"
|
||||
#include "graphic_common_c.h"
|
||||
|
||||
Reference in New Issue
Block a user