Davinci encode分析(dm365)
来源:互联网 发布:单词翻译软件 编辑:程序博客网 时间:2024/04/27 14:06
对视频和音频进行编码
音频算法是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分析(dm365)
- Davinci encode分析(DM355)
- Davinci encode分析(DM355)
- Davinci encode分析(dm355)
- Davinci encode分析(dm355)
- Davinci encode分析
- davinci 达芬奇 时钟驱动分析 dm365/dm368 struct clk
- Davinci demos 2.10 encode 管道数据流
- Davinci demos 2.10 encode 管道数据流
- DAVINCI DM365-DM368开发攻略——U-BOOT-2010.12
- DAVINCI DM365-368中 linux-2.6.32的移植
- davinci DM365-DM368开发攻略—linux-2.6.32移植
- TI DaVinci GPIO分析
- i2c-davinci.c分析
- DM365的UBL源码分析
- DM365的UBL源码分析
- DM365 u-boot 启动分析
- DM365 u-boot启动分析
- c语言基础学习
- matlab图像处理编程基础之读取和写入文件
- IOS开发——UIPageControl页面翻页循环
- 代码中连接数据库技巧
- google maps javascript API v3 and markerWithLabel
- Davinci encode分析(dm365)
- 求助-马踏棋盘
- 【经典排序算法】快速排序
- iOS知识点大全
- 多路数组聚集(Multiway array aggregatin)
- DM365开机与挂载flash报块问题
- 进程的状态转换
- IOS面试题--1
- 使用Xcode 5创建Cocoa Touch Static Library(静态库)