Davinci encode分析(dm355)
来源:互联网 发布:淘宝全球嘉年华 编辑:程序博客网 时间:2024/05/02 19:13
对视频和音频进行编码
音频算法是G.711
视频算法是mpeg4和H.264
这些算法符合xDM界面。
6个线程:控制线程、视频线程、显示线程、写线程、语音线程、采集线程。
主线程—--->视频线程video thread、语音线程Speech Thread、采集线程、写线程
主线程-à控制线程
注:视频文件存在则创建视频线程、采集线程、写线程、显示线程
完成以上线程的创建后控制线程变为控制线程。
至少存在一个文件,因此系统中最少有2个线程,最多有6个线程。
用法
Usage: encode [options]
writer线程分析
1. Open the output video file: outputFp = fopen(envp->videoFile, "w");
2. 等待汇集:
3. 进入循环
4. Get an encoded buffer from the video thread.
5. Is the video thread flushing the pipe?
6. Store the encoded frame to disk.
7. Send back the buffer to the video thread. (the encoded buffer)
8. goto
video线程分析
视频线程所用管道
1. Open Codec Engine, Reset, load, and start DSP Engine.
2. Create video encoder ,/* Allocate and initialize video encoder on the engine;
3. Allocate buffers for encoded data and prime the writer thread.
Memory_contigAlloc() 分配连续的缓冲区
写到管道envp->hWriterInFifo中(注:该管道在创建线程之前,已打开)。
有用吗?buffer中的数据是什么?
4. Allocate buffers for interacting with the capture thread
采集线程的缓冲队列中。
5. 等待汇集;
6. 当不需要退出时,执行下列步骤:
7. 测试等待状态,按要求决定是否继续。
8.
9. 视频线程从写线程读回数据。àwe
10. 对ce编码并送到we中。
11. 视频线程将已编码的数据写到管道,由写线程写文件
12. 视频线程将原数据送给采集线程。ce
13. goto 6.
pause
Pause_open
Pause_test 如果在暂停中则等待,否则继续。
Pause_on
Pause_off
Pause_close
Pause的应用
退出时:Pause_off(envp->hPause);
语音线程:
退出时:Pause_off(envp->hPause);
采集线程:
退出时:Pause_off(envp->hPause);
写线程:
控制线程:
退出时:Pause_off(envp->hPause);
fifoutil
FifoUtil_open
static inline int FifoUtil_open(FifoUtil_Handle hFifo, size_t size);
brief Opens the fifo. Must be called before other API:s on a fifo.
摘要:打开fifo管道。
@param hFifo Pointer to the fifo object to open.
@param size Size in bytes of the messages to be passed through this fifo.
@return FIFOUTIL_SUCCESS for success or FIFOUTIL_FAILURE for failure.
使用管道。
FifoUtil_close
static inline int FifoUtil_close(FifoUtil_Handle hFifo);
brief Closes the fifo. No API calls can be made on this fifo after this.
param hFifo Pointer to the fifo object to close.
return FIFOUTIL_SUCCESS for success or FIFOUTIL_FAILURE for failure.
FifoUtil_get 读管道
FifoUtil_get(FifoUtil_Handle hFifo, void *buffer);
brief Blocking call to get a message from a fifo.
param hFifo Pointer to a previously opened fifo object.
param buffer A pointer to the buffer which will be copied to the fifo.
return FIFOUTIL_SUCCESS for success or FIFOUTIL_FAILURE for failure.
读管道。
static inline int FifoUtil_get(FifoUtil_Handle hFifo, void *buffer)
{
}
FifoUtil_put 写管道
FifoUtil_put(FifoUtil_Handle hFifo, void *buffer)
@brief Put a message on the fifo.
@param hFifo Pointer to a previously opened fifo object.
@param buffer A pointer to the buffer which will be copied from the fifo.
@return FIFOUTIL_SUCCESS for success or FIFOUTIL_FAILURE for failure.
static inline int FifoUtil_put(FifoUtil_Handle hFifo, void *buffer)
{
}
- Davinci encode分析(DM355)
- Davinci encode分析(DM355)
- Davinci encode分析(dm355)
- Davinci encode分析(dm355)
- Davinci encode分析(dm365)
- Davinci encode分析
- Davinci DM355 update uImage step using DHCP
- DM355通过串口下载程序方法步骤 ,davinci,串口
- 面向便携高清视频应用DaVinci DM355处理器
- dm355
- dm355
- Davinci demos 2.10 encode 管道数据流
- Davinci demos 2.10 encode 管道数据流
- TI DaVinci GPIO分析
- i2c-davinci.c分析
- Davinci VFPE的框架分析
- DAVINCI
- Davinci V4L2视频采集框架分析
- 05____线程池(Executors)
- 2013蓝桥杯【初赛试题】前缀判断
- getCurrentSession 与 openSession() 的区别及hibernate lazy加载异常
- ZOJ 3710 Friends 暴力
- Binary Tree Level Order Traversal
- Davinci encode分析(dm355)
- git的使用
- (CF)B. Sereja and Contests
- 计算两个日期的天数之差
- 第5条:避免创建不必要的对象
- 关于“用VS2010的C++导入ADO导入不了,提示无法打开源文件msado15.tlh”的问题
- javascript的switch语句与c#有所不同
- BUPT OJ177 Android key
- 产品相关群体