forked from ML-Cai/IPcam
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathencoder.h
More file actions
23 lines (21 loc) · 713 Bytes
/
encoder.h
File metadata and controls
23 lines (21 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef ENCODER_H
#define ENCODER_H
/* ----------------------------------------------------------- */
struct encoder_struct
{
struct AVCodec *codec;
struct AVCodecContext *c_context;
struct AVFrame *frame_YUV420P;
struct AVPacket pkt;
struct SwsContext *img_convert_ctx;
unsigned char *buffer ;
int buffer_size;
unsigned char *picture_buf;;
};
/* ----------------------------------------------------------- */
void video_encoder_init(int width, int hegiht, int pixel_fmt);
void video_encoder_release();
//int video_encoder(unsigned char *raw_buf ,unsigned char **ret_buf);
struct AVPacket *video_encoder(unsigned char *raw_buf);
/* ----------------------------------------------------------- */
#endif