• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024-2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "video_resize_filter.h"
17 #include "filter/filter_factory.h"
18 #include "common/media_core.h"
19 
20 #ifdef USE_VIDEO_PROCESSING_ENGINE
21 #include "detail_enhancer_video.h"
22 #include "detail_enhancer_video_common.h"
23 #endif
24 
25 namespace {
26 constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_ONLY_PRERELEASE, LOG_DOMAIN_SYSTEM_PLAYER, "VideoResizeFilter" };
27 }
28 
29 namespace OHOS {
30 namespace Media {
31 #ifdef USE_VIDEO_PROCESSING_ENGINE
32 using namespace VideoProcessingEngine;
33 constexpr int64_t VARIABLE_INCREMENT_INTERVAL = 1;
34 #endif
35 namespace Pipeline {
36 
37 static AutoRegisterFilter<VideoResizeFilter> g_registerVideoResizeFilter("builtin.transcoder.videoresize",
38     FilterType::FILTERTYPE_VIDRESIZE,
__anone42c4de90202(const std::string& name, const FilterType type) 39     [](const std::string& name, const FilterType type) {
40         return std::make_shared<VideoResizeFilter>(name, FilterType::FILTERTYPE_VIDRESIZE);
41     });
42 
43 class VideoResizeFilterLinkCallback : public FilterLinkCallback {
44 public:
VideoResizeFilterLinkCallback(std::shared_ptr<VideoResizeFilter> videoResizeFilter)45     explicit VideoResizeFilterLinkCallback(std::shared_ptr<VideoResizeFilter> videoResizeFilter)
46         : videoResizeFilter_(std::move(videoResizeFilter))
47     {
48     }
49 
50     ~VideoResizeFilterLinkCallback() = default;
51 
OnLinkedResult(const sptr<AVBufferQueueProducer> & queue,std::shared_ptr<Meta> & meta)52     void OnLinkedResult(const sptr<AVBufferQueueProducer> &queue, std::shared_ptr<Meta> &meta) override
53     {
54         if (auto resizeFilter = videoResizeFilter_.lock()) {
55             resizeFilter->OnLinkedResult(queue, meta);
56         } else {
57             MEDIA_LOG_I("invalid resizeFilter");
58         }
59     }
60 
OnUnlinkedResult(std::shared_ptr<Meta> & meta)61     void OnUnlinkedResult(std::shared_ptr<Meta> &meta) override
62     {
63         if (auto resizeFilter = videoResizeFilter_.lock()) {
64             resizeFilter->OnUnlinkedResult(meta);
65         } else {
66             MEDIA_LOG_I("invalid resizeFilter");
67         }
68     }
69 
OnUpdatedResult(std::shared_ptr<Meta> & meta)70     void OnUpdatedResult(std::shared_ptr<Meta> &meta) override
71     {
72         if (auto resizeFilter = videoResizeFilter_.lock()) {
73             resizeFilter->OnUpdatedResult(meta);
74         } else {
75             MEDIA_LOG_I("invalid resizeFilter");
76         }
77     }
78 private:
79     std::weak_ptr<VideoResizeFilter> videoResizeFilter_;
80 };
81 
82 #ifdef USE_VIDEO_PROCESSING_ENGINE
83 class ResizeDetailEnhancerVideoCallback : public DetailEnhancerVideoCallback {
84 public:
ResizeDetailEnhancerVideoCallback(std::shared_ptr<VideoResizeFilter> videoResizeFilter)85     explicit ResizeDetailEnhancerVideoCallback(std::shared_ptr<VideoResizeFilter> videoResizeFilter)
86         : videoResizeFilter_(std::move(videoResizeFilter))
87     {
88     }
89 
OnError(VPEAlgoErrCode errorCode)90     void OnError(VPEAlgoErrCode errorCode) override
91     {
92     }
93 
OnState(VPEAlgoState state)94     void OnState(VPEAlgoState state) override
95     {
96     }
97 
OnOutputBufferAvailable(uint32_t index,DetailEnhBufferFlag flag)98     void OnOutputBufferAvailable(uint32_t index, DetailEnhBufferFlag flag) override
99     {
100         if (auto videoResizeFilter = videoResizeFilter_.lock()) {
101             videoResizeFilter->OnOutputBufferAvailable(index, static_cast<uint32_t>(flag));
102             if (flag == DETAIL_ENH_BUFFER_FLAG_EOS) {
103                 videoResizeFilter->NotifyNextFilterEos();
104             }
105         } else {
106             MEDIA_LOG_I("invalid videoResizeFilter");
107         }
108     }
109 private:
110     std::weak_ptr<VideoResizeFilter> videoResizeFilter_;
111 };
112 #endif
113 
VideoResizeFilter(std::string name,FilterType type)114 VideoResizeFilter::VideoResizeFilter(std::string name, FilterType type): Filter(name, type)
115 {
116     filterType_ = type;
117     MEDIA_LOG_I("video resize filter create");
118 }
119 
~VideoResizeFilter()120 VideoResizeFilter::~VideoResizeFilter()
121 {
122     MEDIA_LOG_I("video resize filter destroy");
123 }
124 
SetCodecFormat(const std::shared_ptr<Meta> & format)125 Status VideoResizeFilter::SetCodecFormat(const std::shared_ptr<Meta> &format)
126 {
127     MEDIA_LOG_I("SetCodecFormat");
128     return Status::OK;
129 }
130 
Init(const std::shared_ptr<EventReceiver> & receiver,const std::shared_ptr<FilterCallback> & callback)131 void VideoResizeFilter::Init(const std::shared_ptr<EventReceiver> &receiver,
132     const std::shared_ptr<FilterCallback> &callback)
133 {
134     MEDIA_LOG_I("Init");
135     eventReceiver_ = receiver;
136     filterCallback_ = callback;
137 #ifdef USE_VIDEO_PROCESSING_ENGINE
138     videoEnhancer_ = DetailEnhancerVideo::Create();
139     if (videoEnhancer_ != nullptr) {
140         std::shared_ptr<DetailEnhancerVideoCallback> detailEnhancerVideoCallback =
141             std::make_shared<ResizeDetailEnhancerVideoCallback>(shared_from_this());
142         videoEnhancer_->RegisterCallback(detailEnhancerVideoCallback);
143     } else {
144         MEDIA_LOG_I("Init videoEnhancer fail");
145         if (eventReceiver_) {
146             eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
147         }
148         return;
149     }
150 #else
151     MEDIA_LOG_E("Init videoEnhancer fail, no VPE module");
152     if (eventReceiver_) {
153         eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
154     }
155     return;
156 #endif
157     if (!releaseBufferTask_) {
158         releaseBufferTask_ = std::make_shared<Task>("VideoResize");
159         releaseBufferTask_->RegisterJob([this] {
160             ReleaseBuffer();
161             return 0;
162         });
163     }
164 }
165 
Configure(const std::shared_ptr<Meta> & parameter)166 Status VideoResizeFilter::Configure(const std::shared_ptr<Meta> &parameter)
167 {
168     MEDIA_LOG_I("Configure");
169     configureParameter_ = parameter;
170 #ifdef USE_VIDEO_PROCESSING_ENGINE
171     if (videoEnhancer_ == nullptr) {
172         MEDIA_LOG_E("Configure videoEnhancer is null");
173         return Status::ERROR_NULL_POINTER;
174     }
175     const DetailEnhancerParameters parameter_ = {"", DetailEnhancerLevel::DETAIL_ENH_LEVEL_MEDIUM};
176     int32_t ret = videoEnhancer_->SetParameter(parameter_, SourceType::VIDEO);
177     if (ret != 0) {
178         MEDIA_LOG_E("videoEnhancer SetParameter fail");
179         if (eventReceiver_) {
180             eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
181         }
182         return Status::ERROR_UNKNOWN;
183     } else {
184         return Status::OK;
185     }
186 #else
187     MEDIA_LOG_E("no VPE module");
188     if (eventReceiver_) {
189         eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
190     }
191     return Status::ERROR_UNKNOWN;
192 #endif
193 }
194 
GetInputSurface()195 sptr<Surface> VideoResizeFilter::GetInputSurface()
196 {
197     MEDIA_LOG_I("GetInputSurface");
198 #ifdef USE_VIDEO_PROCESSING_ENGINE
199     if (videoEnhancer_ == nullptr) {
200         MEDIA_LOG_E("Configure videoEnhancer is null");
201         return nullptr;
202     }
203     sptr<Surface> inputSurface = videoEnhancer_->GetInputSurface();
204     if (inputSurface != nullptr) {
205         inputSurface->SetDefaultUsage(BUFFER_USAGE_CPU_READ);
206     }
207     return inputSurface;
208 #else
209     MEDIA_LOG_E("no VPE module");
210     if (eventReceiver_) {
211         eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
212     }
213     return nullptr;
214 #endif
215 }
216 
SetOutputSurface(sptr<Surface> surface,int32_t width,int32_t height)217 Status VideoResizeFilter::SetOutputSurface(sptr<Surface> surface, int32_t width, int32_t height)
218 {
219     MEDIA_LOG_I("SetOutputSurface");
220 #ifdef USE_VIDEO_PROCESSING_ENGINE
221     if (surface == nullptr) {
222         MEDIA_LOG_E("SetOutputSurface surface is null");
223         return Status::ERROR_NULL_POINTER;
224     } else {
225         surface->SetRequestWidthAndHeight(width, height);
226     }
227     if (videoEnhancer_ == nullptr) {
228         MEDIA_LOG_E("Configure videoEnhancer is null");
229         return Status::ERROR_NULL_POINTER;
230     }
231     int32_t ret = videoEnhancer_->SetOutputSurface(surface);
232     if (ret != 0) {
233         MEDIA_LOG_E("videoEnhancer SetOutputSurface fail");
234         if (eventReceiver_) {
235             eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
236         }
237         return Status::ERROR_UNKNOWN;
238     }
239     return Status::OK;
240 #else
241     MEDIA_LOG_E("no VPE module");
242     if (eventReceiver_) {
243         eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
244     }
245     return Status::ERROR_UNKNOWN;
246 #endif
247 }
248 
DoPrepare()249 Status VideoResizeFilter::DoPrepare()
250 {
251     MEDIA_LOG_I("Prepare");
252     if (filterCallback_ == nullptr) {
253         return Status::ERROR_UNKNOWN;
254     }
255     switch (filterType_) {
256         case FilterType::FILTERTYPE_VIDRESIZE:
257             filterCallback_->OnCallback(shared_from_this(), FilterCallBackCommand::NEXT_FILTER_NEEDED,
258                 StreamType::STREAMTYPE_RAW_VIDEO);
259             break;
260         default:
261             break;
262     }
263     return Status::OK;
264 }
265 
DoStart()266 Status VideoResizeFilter::DoStart()
267 {
268     MEDIA_LOG_I("Start");
269     isThreadExit_ = false;
270     if (releaseBufferTask_) {
271         releaseBufferTask_->Start();
272     }
273 #ifdef USE_VIDEO_PROCESSING_ENGINE
274     if (videoEnhancer_ == nullptr) {
275         MEDIA_LOG_E("DoStart videoEnhancer is null");
276         return Status::ERROR_NULL_POINTER;
277     }
278     int32_t ret = videoEnhancer_->Start();
279     if (ret != 0) {
280         MEDIA_LOG_E("videoEnhancer Start fail");
281         if (eventReceiver_) {
282             eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
283         }
284         return Status::ERROR_UNKNOWN;
285     }
286     return Status::OK;
287 #else
288     MEDIA_LOG_E("no VPE module");
289     if (eventReceiver_) {
290         eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
291     }
292     return Status::ERROR_UNKNOWN;
293 #endif
294 }
295 
DoPause()296 Status VideoResizeFilter::DoPause()
297 {
298     MEDIA_LOG_I("Pause");
299     return Status::OK;
300 }
301 
DoResume()302 Status VideoResizeFilter::DoResume()
303 {
304     MEDIA_LOG_I("Resume");
305     return Status::OK;
306 }
307 
DoStop()308 Status VideoResizeFilter::DoStop()
309 {
310     MEDIA_LOG_I("Stop");
311     if (releaseBufferTask_) {
312         isThreadExit_ = true;
313         releaseBufferCondition_.notify_all();
314         releaseBufferTask_->Stop();
315         MEDIA_LOG_I("releaseBufferTask_ Stop");
316     }
317 #ifdef USE_VIDEO_PROCESSING_ENGINE
318     if (!videoEnhancer_) {
319         return Status::OK;
320     }
321     int32_t ret = videoEnhancer_->Stop();
322     if (ret != 0) {
323         MEDIA_LOG_E("videoEnhancer Stop fail");
324         if (eventReceiver_) {
325             eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
326         }
327         return Status::ERROR_UNKNOWN;
328     }
329     return Status::OK;
330 #else
331     MEDIA_LOG_E("no VPE module");
332     if (eventReceiver_) {
333         eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
334     }
335     return Status::ERROR_UNKNOWN;
336 #endif
337 }
338 
DoFlush()339 Status VideoResizeFilter::DoFlush()
340 {
341     return Status::OK;
342 }
343 
DoRelease()344 Status VideoResizeFilter::DoRelease()
345 {
346     return Status::OK;
347 }
348 
NotifyNextFilterEos()349 Status VideoResizeFilter::NotifyNextFilterEos()
350 {
351     MEDIA_LOG_I("NotifyNextFilterEos");
352     for (auto iter : nextFiltersMap_) {
353         for (auto filter : iter.second) {
354             std::shared_ptr<Meta> eosMeta = std::make_shared<Meta>();
355             eosMeta->Set<Tag::MEDIA_END_OF_STREAM>(true);
356             eosMeta->Set<Tag::USER_FRAME_PTS>(eosPts_);
357             filter->SetParameter(eosMeta);
358         }
359     }
360     return Status::OK;
361 }
362 
SetParameter(const std::shared_ptr<Meta> & parameter)363 void VideoResizeFilter::SetParameter(const std::shared_ptr<Meta> &parameter)
364 {
365     MEDIA_LOG_I("SetParameter");
366     bool isEos = false;
367     if (parameter->Find(Tag::MEDIA_END_OF_STREAM) != parameter->end() &&
368         parameter->Get<Tag::MEDIA_END_OF_STREAM>(isEos) &&
369         parameter->Get<Tag::USER_FRAME_PTS>(eosPts_) &&
370         parameter->Get<Tag::USER_PUSH_DATA_TIME>(frameNum_)) {
371         if (isEos) {
372 #ifdef USE_VIDEO_PROCESSING_ENGINE
373             MEDIA_LOG_I("lastBuffer PTS: " PUBLIC_LOG_D64 " frameNum: " PUBLIC_LOG_D64,
374                 eosPts_, frameNum_);
375             if (videoEnhancer_ == nullptr) {
376                 MEDIA_LOG_E("videoEnhancer is null");
377                 return;
378             }
379             if (currentFrameNum_.load() >= frameNum_) {
380                 MEDIA_LOG_I("currentFrameNum: " PUBLIC_LOG_D64 " frameNum: " PUBLIC_LOG_D64,
381                     currentFrameNum_.load(), frameNum_);
382                 videoEnhancer_->NotifyEos();
383             }
384 #endif
385             return;
386         }
387     }
388 
389 #ifdef USE_VIDEO_PROCESSING_ENGINE
390     if (videoEnhancer_ == nullptr) {
391         MEDIA_LOG_E("videoEnhancer is null");
392         return;
393     }
394     const DetailEnhancerParameters parameter_ = {"", DetailEnhancerLevel::DETAIL_ENH_LEVEL_MEDIUM};
395     int32_t ret = videoEnhancer_->SetParameter(parameter_, SourceType::VIDEO);
396     if (ret != 0) {
397         MEDIA_LOG_E("videoEnhancer SetParameter fail");
398         if (eventReceiver_) {
399             eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR,
400                 MSERR_UNSUPPORT_VID_PARAMS});
401         }
402     }
403 #else
404     MEDIA_LOG_E("no VPE module");
405     eventReceiver_->OnEvent({"video_resize_filter", EventType::EVENT_ERROR, MSERR_UNKNOWN});
406 #endif
407 }
408 
GetParameter(std::shared_ptr<Meta> & parameter)409 void VideoResizeFilter::GetParameter(std::shared_ptr<Meta> &parameter)
410 {
411     MEDIA_LOG_I("GetParameter");
412 }
413 
LinkNext(const std::shared_ptr<Filter> & nextFilter,StreamType outType)414 Status VideoResizeFilter::LinkNext(const std::shared_ptr<Filter> &nextFilter, StreamType outType)
415 {
416     MEDIA_LOG_I("LinkNext");
417     nextFilter_ = nextFilter;
418     nextFiltersMap_[outType].push_back(nextFilter_);
419     std::shared_ptr<FilterLinkCallback> filterLinkCallback =
420         std::make_shared<VideoResizeFilterLinkCallback>(shared_from_this());
421     auto ret = nextFilter->OnLinked(outType, configureParameter_, filterLinkCallback);
422     if (ret != Status::OK && eventReceiver_) {
423         eventReceiver_->OnEvent({"VideoResizeFilter::LinkNext error", EventType::EVENT_ERROR, MSERR_UNKNOWN});
424     }
425     FALSE_RETURN_V_MSG_E(ret == Status::OK, ret, "OnLinked failed");
426     return Status::OK;
427 }
428 
UpdateNext(const std::shared_ptr<Filter> & nextFilter,StreamType outType)429 Status VideoResizeFilter::UpdateNext(const std::shared_ptr<Filter> &nextFilter, StreamType outType)
430 {
431     MEDIA_LOG_I("UpdateNext");
432     return Status::OK;
433 }
434 
UnLinkNext(const std::shared_ptr<Filter> & nextFilter,StreamType outType)435 Status VideoResizeFilter::UnLinkNext(const std::shared_ptr<Filter> &nextFilter, StreamType outType)
436 {
437     MEDIA_LOG_I("UnLinkNext");
438     return Status::OK;
439 }
440 
GetFilterType()441 FilterType VideoResizeFilter::GetFilterType()
442 {
443     MEDIA_LOG_I("GetFilterType");
444     return filterType_;
445 }
446 
OnLinked(StreamType inType,const std::shared_ptr<Meta> & meta,const std::shared_ptr<FilterLinkCallback> & callback)447 Status VideoResizeFilter::OnLinked(StreamType inType, const std::shared_ptr<Meta> &meta,
448     const std::shared_ptr<FilterLinkCallback> &callback)
449 {
450     MEDIA_LOG_I("OnLinked");
451     onLinkedResultCallback_ = callback;
452     return Status::OK;
453 }
454 
OnUpdated(StreamType inType,const std::shared_ptr<Meta> & meta,const std::shared_ptr<FilterLinkCallback> & callback)455 Status VideoResizeFilter::OnUpdated(StreamType inType, const std::shared_ptr<Meta> &meta,
456     const std::shared_ptr<FilterLinkCallback> &callback)
457 {
458     MEDIA_LOG_I("OnUpdated");
459     return Status::OK;
460 }
461 
OnUnLinked(StreamType inType,const std::shared_ptr<FilterLinkCallback> & callback)462 Status VideoResizeFilter::OnUnLinked(StreamType inType, const std::shared_ptr<FilterLinkCallback>& callback)
463 {
464     MEDIA_LOG_I("OnUnLinked");
465     return Status::OK;
466 }
467 
OnLinkedResult(const sptr<AVBufferQueueProducer> & outputBufferQueue,std::shared_ptr<Meta> & meta)468 void VideoResizeFilter::OnLinkedResult(const sptr<AVBufferQueueProducer> &outputBufferQueue,
469     std::shared_ptr<Meta> &meta)
470 {
471     MEDIA_LOG_I("OnLinkedResult enter");
472     if (onLinkedResultCallback_) {
473         onLinkedResultCallback_->OnLinkedResult(nullptr, meta);
474     }
475 }
476 
OnUpdatedResult(std::shared_ptr<Meta> & meta)477 void VideoResizeFilter::OnUpdatedResult(std::shared_ptr<Meta> &meta)
478 {
479     MEDIA_LOG_I("OnUpdatedResult");
480     (void) meta;
481 }
482 
OnUnlinkedResult(std::shared_ptr<Meta> & meta)483 void VideoResizeFilter::OnUnlinkedResult(std::shared_ptr<Meta> &meta)
484 {
485     MEDIA_LOG_I("OnUnlinkedResult");
486     (void) meta;
487 }
488 
OnOutputBufferAvailable(uint32_t index,uint32_t flag)489 void VideoResizeFilter::OnOutputBufferAvailable(uint32_t index, uint32_t flag)
490 {
491     MEDIA_LOG_D("OnOutputBufferAvailable enter. index: " PUBLIC_LOG_U32, index);
492 #ifdef USE_VIDEO_PROCESSING_ENGINE
493     {
494         std::lock_guard<std::mutex> lock(releaseBufferMutex_);
495         if (flag != static_cast<uint32_t>(DETAIL_ENH_BUFFER_FLAG_EOS)) {
496             currentFrameNum_.fetch_add(VARIABLE_INCREMENT_INTERVAL, std::memory_order_relaxed);
497             indexs_.push_back(index);
498             if (videoEnhancer_ && currentFrameNum_.load() >= frameNum_) {
499                 MEDIA_LOG_I("currentFrameNum: " PUBLIC_LOG_D64 " frameNum: " PUBLIC_LOG_D64,
500                     currentFrameNum_.load(), frameNum_);
501                 videoEnhancer_->NotifyEos();
502             }
503         }
504     }
505     releaseBufferCondition_.notify_all();
506 #endif
507 }
508 
ReleaseBuffer()509 void VideoResizeFilter::ReleaseBuffer()
510 {
511     MEDIA_LOG_I("ReleaseBuffer");
512     while (!isThreadExit_) {
513         std::vector<uint32_t> indexs;
514         {
515             std::unique_lock<std::mutex> lock(releaseBufferMutex_);
516             releaseBufferCondition_.wait(lock, [this] {
517                 return isThreadExit_ || !indexs_.empty();
518             });
519             indexs = indexs_;
520             indexs_.clear();
521         }
522 #ifdef USE_VIDEO_PROCESSING_ENGINE
523         if (videoEnhancer_) {
524             for (auto &index : indexs) {
525                 videoEnhancer_->ReleaseOutputBuffer(index, true);
526             }
527         }
528 #endif
529     }
530 }
531 
SetFaultEvent(const std::string & errMsg,int32_t ret)532 void VideoResizeFilter::SetFaultEvent(const std::string &errMsg, int32_t ret)
533 {
534     MEDIA_LOG_I("SetFaultEvent");
535 }
536 
SetFaultEvent(const std::string & errMsg)537 void VideoResizeFilter::SetFaultEvent(const std::string &errMsg)
538 {
539     MEDIA_LOG_I("SetFaultEvent");
540 }
541 
SetCallingInfo(int32_t appUid,int32_t appPid,const std::string & bundleName,uint64_t instanceId)542 void VideoResizeFilter::SetCallingInfo(int32_t appUid, int32_t appPid,
543     const std::string &bundleName, uint64_t instanceId)
544 {
545     appUid_ = appUid;
546     appPid_ = appPid;
547     bundleName_ = bundleName;
548     instanceId_ = instanceId;
549 }
550 } // namespace Pipeline
551 } // namespace MEDIA
552 } // namespace OHOS