基于嵌入式Linux的视频采集系统17-----源程序----decoder.h
来源:互联网 发布:js键值对集合 编辑:程序博客网 时间:2024/04/30 04:07
本文来自:
http://blog.chinaunix.net/uid-23093301-id-86406.html
#ifndef __DECODER_H_INCLUDE
http://blog.chinaunix.net/uid-23093301-id-86406.html
#ifndef __DECODER_H_INCLUDE
#define __DECODER_H_INCLUDE
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "avcodec.h"
#include "libavutil/mathematics.h"
#include "libavformat/avformat.h"
#include "libswscale/swscale.h"
#include "libavcodec/avcodec.h"
#ifdef __cplusplus
}
#endif /* __cplusplus */
#include <iostream>
#include <string>
#include <vector>
#include<pthread.h>
using namespace std;
#define DEF_FRAME_SIZE 10844*5
typedef struct TFrameNode
{
AVPacket pkt;
void* buff[DEF_FRAME_SIZE];
int size;
}TFrameNode;
class CDecoder
{
public:
CDecoder();
~CDecoder();
void push_frame(void* img,int size);
AVPacket* pop_frame();
void try_show(AVFrame* picture,int width=320,int height=240);
char* readall_file(const string& file,int & size);
private:
AVFrame * do_alloc_picture(int pix_fmt, int width, int height);
private:
char filename [256];
vector<TFrameNode> m_frame_que;
int cur_process_pos;
int cur_append_pos;
int num_has_append;
TFrameNodem_convert_buff;
private:
//////////////////////// for thread safe
pthread_cond_t m_pthread_cond;
pthread_mutex_t m_mutex;
};
#endif
- 基于嵌入式Linux的视频采集系统17-----源程序----decoder.h
- 基于嵌入式Linux的视频采集系统18-----源程序----decoder.cpp
- 基于嵌入式Linux的视频采集系统12-----源程序----rtp_service.h
- 基于嵌入式Linux的视频采集系统14-----源程序----display.h
- 基于嵌入式Linux的视频采集系统16-----源程序----v4l_driver.h
- 基于嵌入式Linux的视频采集系统19-----源程序----v4l_driver.h
- 基于嵌入式Linux的视频采集系统13-----源程序----rtp_service.cpp
- 基于嵌入式Linux的视频采集系统15-----源程序----display.cpp
- 基于嵌入式Linux的视频采集系统20-----源程序----stlmain.cpp
- 基于嵌入式Linux系统的S3C2410的视频采集系统
- 基于嵌入式Linux的视频采集系统5--基于MJPEG编码方式的视频采集实现
- 基于嵌入式Linux的视频采集系统1
- 基于嵌入式Linux的视频采集系统9----基于JRTPLIB的视频数据接收模块实现
- 基于嵌入式Linux的视频采集系统4-----采集模块的设计方案
- 基于嵌入式Linux的视频采集系统6----视频在LCD上的实时显示
- 基于嵌入式Linux的视频采集系统7---视频图像格式转化
- 基于嵌入式Linux的视频采集系统10----实时视频显示模块
- 基于嵌入式Linux的视频采集系统8----基于RTP协议的实时传输模块
- 最近干了什么
- 基于嵌入式Linux的视频采集系统16-----源程序----v4l_driver.h
- HNU 11704 Baidu Post Bar
- 百度2011年9月面试题
- mysql 日期详细操作
- 基于嵌入式Linux的视频采集系统17-----源程序----decoder.h
- problem 11 矩阵中连续四个数的最大积
- 2011湖南省ACM大赛G题
- VC++ INI文件修改,读取键值
- 赵雅智_java 接口
- eclipse快捷键
- UVA 488 - Triangle Wave
- 基于嵌入式Linux的视频采集系统18-----源程序----decoder.cpp
- 概念--进程,进程树,队列,线性表