add demuxer init sysevent

Signed-off-by: zhanghongran <zhanghongran@huawei.com>
This commit is contained in:
zhanghongran 2024-06-14 15:03:35 +08:00
parent 34f67f8552
commit fe66c63fe7
4 changed files with 3 additions and 7 deletions

View File

@ -49,7 +49,5 @@ CODEC_STOP_INFO:
DEMUXER_INIT_INFO:
__BASE: {type: BEHAVIOR, level: MINOR, desc: AV_CODEC demuxer init event}
CLIENT_PID: {type: INT32, desc: Demuxer client pid}
CLIENT_TID: {type: INT32, desc: Demuxer client uid}
DOWNLOAD_SIZE: {type: INT32, desc: Demuxer download data size in Bytes}
SOURCE_TYPE: {type: STRING, desc: Demuxer source type}

View File

@ -80,11 +80,10 @@ void CodecStopEventWrite(int32_t clientPid, int32_t clientUid, int32_t codecInst
"CLIENT_PID", clientPid, "CLIENT_UID", clientUid, "CODEC_INSTANCE_ID", codecInstanceId);
}
void DemuxerInitEventWrite(int32_t clientPid, int32_t clientTid, uint32_t downloadSize, std::string sourceType)
void DemuxerInitEventWrite(uint32_t downloadSize, std::string sourceType)
{
HiSysEventWrite(HISYSEVENT_DOMAIN_AVCODEC, "DEMUXER_INIT_INFO",
OHOS::HiviewDFX::HiSysEvent::EventType::BEHAVIOR,
"CLIENT_PID", clientPid, "CLIENT_TID", clientTid,
"DOWNLOAD_SIZE", downloadSize, "SOURCE_TYPE", sourceType);
}

View File

@ -95,8 +95,7 @@ __attribute__((visibility("default"))) void ServiceStartEventWrite(uint32_t useT
__attribute__((visibility("default"))) void CodecStartEventWrite(CodecDfxInfo& codecDfxInfo);
__attribute__((visibility("default"))) void CodecStopEventWrite(int32_t clientPid, int32_t clientUid,
int32_t codecInstanceId);
__attribute__((visibility("default"))) void DemuxerInitEventWrite(int32_t clientPid, int32_t clientTid,
uint32_t downloadSize, std::string sourceType);
__attribute__((visibility("default"))) void DemuxerInitEventWrite(uint32_t downloadSize, std::string sourceType);
__attribute__((visibility("default"))) void FaultDemuxerEventWrite(DemuxerFaultInfo& demuxerFaultInfo);
__attribute__((visibility("default"))) void FaultAudioCodecEventWrite(AudioCodecFaultInfo& audioCodecFaultInfo);
__attribute__((visibility("default"))) void FaultVideoCodecEventWrite(VideoCodecFaultInfo& videoCodecFaultInfo);

View File

@ -835,7 +835,7 @@ void FFmpegDemuxerPlugin::NotifyInitializationCompleted()
ioContext_.initCompleted = true;
if (ioContext_.initDownloadDataSize >= INIT_DOWNLOADS_DATA_SIZE_THRESHOLD) {
MEDIA_LOG_I("init download data size = %{public}u.", ioContext_.initDownloadDataSize);
MediaAVCodec::DemuxerInitEventWrite(getpid(), gettid(), ioContext_.initDownloadDataSize, pluginName_);
MediaAVCodec::DemuxerInitEventWrite(ioContext_.initDownloadDataSize, pluginName_);
}
}