-
Notifications
You must be signed in to change notification settings - Fork 2
/
Mp4_Save.h
executable file
·33 lines (25 loc) · 981 Bytes
/
Mp4_Save.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// H264_Save.h
// iFrameExtractor
//
// Created by Liao KuoHsun on 13/5/24.
//
//
#ifndef H264_Save_h
#define H264_Save_h
// TODO: when PTS_DTS_IS_CORRECT==1, it should ok??
#define PTS_DTS_IS_CORRECT 0
extern int h264_file_create(const char *pFilePath, AVFormatContext *fc, AVCodecContext *pCodecCtx,AVCodecContext *pAudioCodecCtx, double fps, void *p, int len );
extern void h264_file_write_frame(AVFormatContext *fc, int vStreamId, const void* p, int len, int64_t dts, int64_t pts);
extern void h264_file_write_audio_frame(AVFormatContext *fc, AVCodecContext *pAudioCodecContext,int vStreamIdx, const void* p, int len, int64_t dts, int64_t pts );
extern void h264_file_close(AVFormatContext *fc);
extern void h264_file_write_frame2(AVFormatContext *fc, int vStreamIdx, AVPacket *pkt );
extern int MoveMP4MoovToHeader(char *pSrc, char *pDst);
typedef enum
{
eH264RecIdle = 0,
eH264RecInit,
eH264RecActive,
eH264RecClose
} eH264RecordState;
#endif