当前位置:网站首页>[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链接
边栏推荐
- 【HMS Core】【FAQ】【AR Engine】AR Engine常见问题合集
- JS-全局dom对象的使用---使用htm样式和js函数动作的完全分离
- 【MLT】MLT多媒体框架生产消费架构解析(二)
- 【暑期每日一题】洛谷 P1176 路径计数2
- How to do the stability test, this article thoroughly explains it!
- Alibaba Cloud Tianchi Contest Question (Machine Learning) - Repeat Purchase Prediction of Tmall Users (Complete Code)
- 软件测试的发展趋势
- 稳定性测试怎么做,这篇文章彻底讲透了!
- MySQL:redo log日志——笔记自用
- leetcode:402. 移掉 K 位数字
猜你喜欢

MySQL:意向共享锁和意向排它锁 | 死锁 | 锁的优化
全栈代码测试覆盖率及用例发现系统的建设和实践

LeetCode-从链表中删去总和值为零的连续结点

P1163 银行贷款

mysql content does not exist error
![[Harmony OS] [ArkUI] ets development graphics and animation drawing](/img/36/f4c91f794b1321f11a24505d1617fb.png)
[Harmony OS] [ArkUI] ets development graphics and animation drawing

必须指定GDAL API版本。提供一个路径使用GDAL_CONFIG gdal-config环境

杰理之智能充电仓低电发码关机 触摸不开机【篇】

leetcode:316. 去除重复字母

EDI对接 New York & Company案例
随机推荐
通讯录(文件版)(C语言)(VS)
【暑期每日一题】洛谷 P1176 路径计数2
I.MX6U-ALPHA开发板(串口实验)
杰理之手机OTG问题【篇】
杰理之电话打入,远端听不到声音【篇】
Integer multiple series
【Harmony OS】【ArkUI】ets开发 图形与动画绘制
Example of 360 assessment feedback questions
A case of missing heritability
MySQL:意向共享锁和意向排它锁 | 死锁 | 锁的优化
什么是通用微处理器、单片机、DSP芯片、嵌入式系统?
【HMS core】【ML kit】机器学习服务常见问题FAQ
Construction and practice of full stack code test coverage and use case discovery system
php将在线远程文件写入临时文件
MySQL:redo log日志——笔记自用
OKR管理过程中,如何运用CFR实现组织的高效对话、反馈和认可?
【暑期每日一题】洛谷 P1216 [USACO1.5][IOI1994]数字三角形 Number Triangles
【暑期每日一题】洛谷 P5724 【深基4.习5】求极差 / 最大跨度值
如何选型APS系统,还需明确这七大关键因素
uboot中board_init bi_arch_number在哪