当前位置:网站首页>[MLT] Analysis of MLT Multimedia Framework Production and Consumption Architecture (2)
[MLT] Analysis of MLT Multimedia Framework Production and Consumption Architecture (2)
2022-08-09 04:49:00 【one two three o-0-o】
MLTAnalysis of production and consumption architecture of multimedia framework
前提
通过阅读【MLT】MLTAnalysis of production and consumption architecture of multimedia framework(一)满足以下两点:
- 了解MLT的核心C++The encapsulation hierarchy
- 掌握使用MLT的Consumer(sdl)消费Producer(MP4)
What to get from this article?
本文将对【MLT】MLTAnalysis of production and consumption architecture of multimedia framework(一)How to add video filters to the producer processing link in the production and consumption process mentioned in the analysis,如下图:
核心类解析
Service+Filter
【MLT】MLTAnalysis of production and consumption architecture of multimedia framework(一)Just a simple demonstration of the producer(A video resource is initialized)被消费者(初始化为SDL)Simple process of consumption.如上图所示,Two new encapsulations have been introduced to the process of producer processing:Service(Service abstract base class)+ Filter(Filter abstract service class).This section only briefly introduces the method we are about to use,These two packages will be fully analyzed later.
// Service abstract base class
/** * @brief attach Method for registering filter service * @param filter The filter service to register * @return Returns the registered error code */
int attach( Filter &filter );
/** * @brief detach The method to unregister the filter service * @param filter Filter service to unregister * @return Returns the unregistered error code */
int detach( Filter &filter );
Add filters for producers
// Create mosaic filters
Mlt::Filter *filter = new Mlt::Filter(profile, "frei0r.pixeliz0r");
// 使用从父类ServiceAdds a filter to the subscription ability inherited from
producer.attach(*filter);
Demon展示
为Producer(MP4)添加Filter(马赛克)效果
代码
Profile profile; // defaults to dv_pal
Producer producer(profile, filename);
Consumer consumer(profile); // defaults to sdl
Mlt::Filter *filter = new Mlt::Filter(profile, "frei0r.pixeliz0r");
producer.attach(*filter);
// Prevent scaling to the profile size.
// Let the sdl consumer do all scaling.
consumer.set("rescale", "none");
// Automatically exit at end of file.
consumer.set("terminate_on_pause", 1);
consumer.connect(producer);
consumer.run();
consumer.stop();
Affiliate code download link
参考资料
【1】MLT github链接
边栏推荐
- 360 评估反馈问题的示范案例
- [OpenCV] - Find and draw contours
- 学习笔记--文件夹处理--代码学习
- ceph create pool, map, delete exercises
- 【HMS Core】【FAQ】【AR Engine】AR Engine FAQ
- Efficient review of deep learning DL, CV, NLP
- 在快手工作是一种什么体验
- 2022-08-08 mysql慢SQL-Q18-10GB数据量-mysql/innodb测试
- Understanding ML Cross Validation Fast
- 杰理之ANC OFF语音没有作用【篇】
猜你喜欢
Harmony OS ets ArkUI 】 【 】 development create a view and building layout
阿里云天池大赛赛题(机器学习)——O2O优惠券预测(完整代码)
抖音直播带货的4个技巧,提升直播间转化率!
阿里云天池大赛赛题(机器学习)——天猫用户重复购买预测(完整代码)
LN论文、五种归一化原理和实现
Faced with risk control, what should Amazon do when evaluating self-supporting accounts?
钉钉与RStudio快捷方式冲突--钉钉快捷键设置
【HMS core】【Ads Kit】Huawei Advertising——Overseas applications are tested in China. Official advertisements cannot be displayed
Dingding conflicts with RStudio shortcuts--Dingding shortcut settings
通讯录(文件版)(C语言)(VS)
随机推荐
pytorch implementation of Poly1CrossEntropyLoss
Understanding ML Cross Validation Fast
Improve the user experience and add a small detail to your modal popup
`英语` 2022/8/8
数量遗传学遗传力计算1:亲子回归方法
【Harmony OS】【ARK UI】ETS 上下文基本操作
抖音直播间带货最新玩法和运营技巧
Alibaba Cloud Tianchi Contest Question (Machine Learning) - Repeat Purchase Prediction of Tmall Users (Complete Code)
GraalVM安装
Cluster deployment using ceph-deploycep with 3 disks as dedicated osd
LeetCode - remove consecutive nodes with a sum of zero from a linked list
杰理之开关降噪语音识别没有用【篇】
【UNR #6 A】面基之路(最短路)
[OpenCV] - Find and draw contours
ddr系统检验
存储系统架构演变
php使用phpoffice/phpspreadsheet导入导出excel表格
杰理之SD卡切回蓝牙没有作用【篇】
equals and ==
uboot中board_init bi_arch_number在哪