comparison libmpdemux/muxer.h @ 9007:12fc55eb3373

Cleanup of the muxer API, func parameters muxer & muxer_f eliminated. patch by Andriy N. Gritsenko <andrej@lucky.net>
author arpi
date Sun, 19 Jan 2003 00:33:11 +0000
parents 27da710563c2
children b82e3ecb11e0
comparison
equal deleted inserted replaced
9006:d00997f12257 9007:12fc55eb3373
32 WAVEFORMATEX *wf; 32 WAVEFORMATEX *wf;
33 BITMAPINFOHEADER *bih; // in format 33 BITMAPINFOHEADER *bih; // in format
34 // mpeg specific: 34 // mpeg specific:
35 unsigned int gop_start; // frame number of this GOP start 35 unsigned int gop_start; // frame number of this GOP start
36 size_t ipb[3]; // sizes of I/P/B frames 36 size_t ipb[3]; // sizes of I/P/B frames
37 // muxer of that stream
38 struct muxer_t *muxer;
37 } muxer_stream_t; 39 } muxer_stream_t;
38 40
39 typedef struct { 41 typedef struct {
40 uint32_t id; 42 uint32_t id;
41 char *text; 43 char *text;
55 int num_videos; // for MPEG recalculations 57 int num_videos; // for MPEG recalculations
56 unsigned int sysrate; // max rate in bytes/s 58 unsigned int sysrate; // max rate in bytes/s
57 //int num_streams; 59 //int num_streams;
58 muxer_stream_t* def_v; // default video stream (for general headers) 60 muxer_stream_t* def_v; // default video stream (for general headers)
59 muxer_stream_t* streams[MUXER_MAX_STREAMS]; 61 muxer_stream_t* streams[MUXER_MAX_STREAMS];
60 void (*cont_write_chunk)(struct muxer_t *,muxer_stream_t *,FILE *,size_t,unsigned int); 62 void (*cont_write_chunk)(muxer_stream_t *,size_t,unsigned int);
61 void (*cont_write_header)(struct muxer_t *,FILE *); 63 void (*cont_write_header)(struct muxer_t *);
62 void (*cont_write_index)(struct muxer_t *,FILE *); 64 void (*cont_write_index)(struct muxer_t *);
63 muxer_stream_t* (*cont_new_stream)(struct muxer_t *,int); 65 muxer_stream_t* (*cont_new_stream)(struct muxer_t *,int);
66 FILE* file;
64 } muxer_t; 67 } muxer_t;
65 68
66 muxer_t* muxer_new_muxer(int type); 69 muxer_t *muxer_new_muxer(int type,FILE *);
67 #define muxer_new_stream(muxer,a) muxer->cont_new_stream(muxer,a) 70 #define muxer_new_stream(muxer,a) muxer->cont_new_stream(muxer,a)
68 #define muxer_write_chunk(muxer,a,b,c,d) muxer->cont_write_chunk(muxer,a,b,c,d) 71 #define muxer_write_chunk(a,b,c) a->muxer->cont_write_chunk(a,b,c)
69 #define muxer_write_header(muxer,f) muxer->cont_write_header(muxer,f) 72 #define muxer_write_header(muxer) muxer->cont_write_header(muxer)
70 #define muxer_write_index(muxer,f) muxer->cont_write_index(muxer,f) 73 #define muxer_write_index(muxer) muxer->cont_write_index(muxer)
71 74
72 void muxer_init_muxer_avi(muxer_t *); 75 void muxer_init_muxer_avi(muxer_t *);
73 void muxer_init_muxer_mpeg(muxer_t *); 76 void muxer_init_muxer_mpeg(muxer_t *);
74 77