12 Star 20 Fork 8

cM / rtp2jpeg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mjpeg_rtp.h 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
/*************************************************************************
> File Name: mjpeg_rtp.h
> Author:
> Mail:
> Created Time: 2015年01月23日 星期五 16时47分33秒
************************************************************************/
#ifndef _MJPEG_RTP_H
#define _MJPEG_RTP_H
typedef struct {
unsigned char cc:4;
unsigned char x:1;
unsigned char p:1;
unsigned char version:2;
unsigned char pt:7;
unsigned char m:1;
unsigned short seq;
unsigned int ts;
unsigned int ssrc;
}rtp_hdr_t;
struct jpeghdr {
unsigned int tspec:8; /* type-specific field */
unsigned int off:24; /* fragment byte offset */
unsigned char type; /* id of jpeg decoder params */
unsigned char q; /* quantization factor (or table id) */
unsigned char width; /* frame width in 8 pixel blocks */
unsigned char height; /* frame height in 8 pixel blocks */
};
struct jpeghdr_rst{
unsigned short dri;
unsigned int f:1;
unsigned int l:1;
unsigned int count:14;
};
struct jpeghdr_qtable {
unsigned char mbz;
unsigned char precision;
unsigned short length;
};
#define RTP_JPEG_RESTART 0x40
#define RTP_HDR_SZ 12
#define RTP_PT_JPEG 26
void jpeg_encode_yuyv422_rtp(unsigned char *jpeg_data,int width,int hight);
void jpeg_encode_yuyv420_rtp(unsigned char *jpeg_data,int width,int hight);
/*直接采集jpeg数据传输*/
void jpeg_rtp(unsigned char *jpeg_data,int width,int height,int imagesize);
#endif
C
1
https://gitee.com/OpenWrt-X/rtp2jpeg.git
git@gitee.com:OpenWrt-X/rtp2jpeg.git
OpenWrt-X
rtp2jpeg
rtp2jpeg
master

搜索帮助