【修改说明】地址传递逻辑修改

Signed-off-by: yangjunhui10 <yangjunhui10@huawei.com>
This commit is contained in:
yangjunhui10 2023-04-03 09:34:53 +08:00
parent 5174d28a76
commit 76565db4f8
3 changed files with 7 additions and 1 deletions

View File

@ -25,6 +25,11 @@ namespace OHOS {
namespace AVCodec{
namespace Plugin {
namespace Ffmpeg {
FFmpegDemuxerPlugin::FFmpegDemuxerPlugin(size_t sourceAttr)
{
formatContext_ = (AVFormatContext*)sourceAttr;
}
Status FFmpegDemuxerPlugin::AddSourceTrackByID(uint32_t trackId)
{
CHECK_AND_RETURN_RET_LOG(formatContext_ != nullptr,

View File

@ -31,7 +31,7 @@ namespace Plugin{
namespace FFmpeg{
class FFmpegDemuxerPlugin : public DemuxerPlugin{
public:
FFmpegDemuxerPlugin(Source source);
FFmpegDemuxerPlugin(size_t sourceAttr);
~FFmpegDemuxerPlugin() override;
Status AddSourceTrackByID(uint32_t index) override;

View File

@ -30,6 +30,7 @@ public:
virtual int32_t Destroy() = 0;
virtual int32_t SetParameter(const Format &param, uint32_t trackId) = 0;
virtual int32_t GetTrackFormat(Format &format, uint32_t trackId) = 0;
virtual size_t GetSourceAttr() = 0;
private:
std::shared_ptr<AVFormatContext> formatContext_;