3 * author: Tahseen Mohammad
15 #define SKELETON_VERSION_MAJOR 3
16 #define SKELETON_VERSION_MINOR 0
17 #define FISHEAD_IDENTIFIER "fishead\0"
18 #define FISBONE_IDENTIFIER "fisbone\0"
19 #define FISHEAD_SIZE 64
20 #define FISBONE_SIZE 52
21 #define FISBONE_MESSAGE_HEADER_OFFSET 44
23 /* fishead_packet holds a fishead header packet. */
25 /* Start time of the presentation.
26 * For a new stream presentationtime & basetime is same. */
27 ogg_int64_t ptime_n
; /* presentation time numerator */
28 ogg_int64_t ptime_d
; /* presentation time denominator */
29 ogg_int64_t btime_n
; /* basetime numerator */
30 ogg_int64_t btime_d
; /* basetime denominator */
31 /* will holds the time of origin of the stream, a 20 bit field. */
32 unsigned char UTC
[20];
35 /* fisbone_packet holds a fisbone header packet. */
37 ogg_uint32_t serial_no
; /* serial no of the corresponding stream */
38 ogg_uint32_t nr_header_packet
; /* number of header packets */
39 /* granule rate is the temporal resolution of the logical bitstream */
40 ogg_int64_t granule_rate_n
; /* granule rate numerator */
41 ogg_int64_t granule_rate_d
; /* granule rate denominator */
42 ogg_int64_t start_granule
; /* start granule value */
43 ogg_uint32_t preroll
; /* preroll */
44 unsigned char granule_shift
; /* 1 byte value holding the granule shift */
45 char *message_header_fields
; /* holds all the message header fields */
46 /* current total size of the message header fields, for realloc purpose, initially zero */
47 ogg_uint32_t current_header_size
;
50 extern int add_message_header_field(fisbone_packet
*fp
, char *header_key
, char *header_value
);
51 /* remember to deallocate the returned ogg_packet properly */
52 extern int ogg_from_fishead(fishead_packet
*fp
,ogg_packet
*op
);
53 extern int ogg_from_fisbone(fisbone_packet
*fp
,ogg_packet
*op
);
54 extern int add_fishead_to_stream(ogg_stream_state
*os
, fishead_packet
*fp
);
55 extern int add_fisbone_to_stream(ogg_stream_state
*os
, fisbone_packet
*fp
);
56 extern int add_eos_packet_to_stream(ogg_stream_state
*os
);
57 extern int flush_ogg_stream_to_file(ogg_stream_state
*os
, FILE *out
);
63 #endif /* _SKELETON_H */