Mercurial > libavformat.hg
comparison ffm.h @ 3442:a6f4d53b738d libavformat
pass dts and pts through ffm, should fix streaming b frames
author | bcoudurier |
---|---|
date | Mon, 09 Jun 2008 07:43:14 +0000 |
parents | f9cf53254a61 |
children | 6facc89bece8 |
comparison
equal
deleted
inserted
replaced
3441:2d52ccde8f86 | 3442:a6f4d53b738d |
---|---|
27 /* The FFM file is made of blocks of fixed size */ | 27 /* The FFM file is made of blocks of fixed size */ |
28 #define FFM_HEADER_SIZE 14 | 28 #define FFM_HEADER_SIZE 14 |
29 #define PACKET_ID 0x666d | 29 #define PACKET_ID 0x666d |
30 | 30 |
31 /* each packet contains frames (which can span several packets */ | 31 /* each packet contains frames (which can span several packets */ |
32 #define FRAME_HEADER_SIZE 8 | 32 #define FRAME_HEADER_SIZE 16 |
33 #define FLAG_KEY_FRAME 0x01 | 33 #define FLAG_KEY_FRAME 0x01 |
34 #define FLAG_DTS 0x02 | |
34 | 35 |
35 enum { | 36 enum { |
36 READ_HEADER, | 37 READ_HEADER, |
37 READ_DATA, | 38 READ_DATA, |
38 }; | 39 }; |
39 | 40 |
40 typedef struct FFMContext { | 41 typedef struct FFMContext { |
41 /* only reading mode */ | 42 /* only reading mode */ |
42 offset_t write_index, file_size; | 43 offset_t write_index, file_size; |
43 int read_state; | 44 int read_state; |
44 uint8_t header[FRAME_HEADER_SIZE]; | 45 uint8_t header[FRAME_HEADER_SIZE+4]; |
45 | 46 |
46 /* read and write */ | 47 /* read and write */ |
47 int first_packet; /* true if first packet, needed to set the discontinuity tag */ | 48 int first_packet; /* true if first packet, needed to set the discontinuity tag */ |
48 int first_frame_in_packet; /* true if first frame in packet, needed to know if PTS information is valid */ | |
49 int packet_size; | 49 int packet_size; |
50 int frame_offset; | 50 int frame_offset; |
51 int64_t pts; | 51 int64_t pts; |
52 uint8_t *packet_ptr, *packet_end; | 52 uint8_t *packet_ptr, *packet_end; |
53 uint8_t packet[FFM_PACKET_SIZE]; | 53 uint8_t packet[FFM_PACKET_SIZE]; |