当前位置:网站首页>[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链接
边栏推荐
- 【暑期每日一题】洛谷 P4325 [COCI2006-2007#1] Modulo
- 【Harmony OS】【ARK UI】Public Event Module
- 学习笔记--文件夹处理--代码学习
- I.MX6U-ALPHA开发板(串口实验)
- MySQL:已提交读和可重复读的实现原理 | MVCC(多版本并发控制)——笔记自用
- 通讯录(动态版)(C语言)(VS)
- Ali YunTianChi competition problem (machine learning) - ali cloud security malware detection (complete code)
- Harmony OS ets ArkUI 】 【 】 the development basic page layout and data connection
- 【暑期每日一题】洛谷 P5729 【深基5.例7】工艺品制作
- 【HMS Core】【FAQ】【AR Engine】AR Engine FAQ
猜你喜欢
阿里云天池大赛赛题(机器学习)——天猫用户重复购买预测(完整代码)
2022 Security Officer-B Certificate Exam Practice Questions and Online Mock Exam
MySQL:意向共享锁和意向排它锁 | 死锁 | 锁的优化
杰理之播歌曲前后音量大小不一样【篇】
mysql content does not exist error
杰理之手机OTG问题【篇】
Alibaba Cloud Tianchi Contest Question (Machine Learning) - Repeat Purchase Prediction of Tmall Users (Complete Code)
Masked AutoEncoder论文及实现
C进阶-C语言文件操作
LeetCode-从链表中删去总和值为零的连续结点
随机推荐
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment
MySQL:意向共享锁和意向排它锁 | 死锁 | 锁的优化
php uses phpoffice/phpspreadsheet to import and export excel tables
【开发者必看】【push kit】推送服务服务典型问题合集2
TASSEL软件导入plink格式文件报错
Introduction to JVM garbage collection mechanism
Harmony OS ets ArkUI 】 【 】 the development basic page layout and data connection
如何选型APS系统,还需明确这七大关键因素
Ali YunTianChi competition problem (machine learning) - ali cloud security malware detection (complete code)
2022 Security Officer-B Certificate Exam Practice Questions and Online Mock Exam
人类微生物组和缺失遗传力--读论文
MySQL:已提交读和可重复读的实现原理 | MVCC(多版本并发控制)——笔记自用
Ali YunTianChi competition problem (deep learning) - video enhancement (complete code)
Faced with risk control, what should Amazon do when evaluating self-supporting accounts?
uboot中board_init bi_arch_number在哪
AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline'
岭回归和LASSO回归
php将在线远程文件写入临时文件
【Harmony OS】【ARK UI】Public Event Module
Golang 常见知识点整理