Mercurial > mplayer.hg
comparison libmpdemux/aviwrite.c @ 2652:fd279f14b9ab
new stream field: size
author | arpi |
---|---|
date | Sat, 03 Nov 2001 20:57:13 +0000 |
parents | c1e24e01601b |
children | 8cd761968f35 |
comparison
equal
deleted
inserted
replaced
2651:958d10763c34 | 2652:fd279f14b9ab |
---|---|
26 if(!s) return NULL; // no mem!? | 26 if(!s) return NULL; // no mem!? |
27 muxer->streams[muxer->avih.dwStreams]=s; | 27 muxer->streams[muxer->avih.dwStreams]=s; |
28 s->type=type; | 28 s->type=type; |
29 s->id=muxer->avih.dwStreams; | 29 s->id=muxer->avih.dwStreams; |
30 s->timer=0.0; | 30 s->timer=0.0; |
31 s->size=0; | |
31 switch(type){ | 32 switch(type){ |
32 case AVIWRITE_TYPE_VIDEO: | 33 case AVIWRITE_TYPE_VIDEO: |
33 s->ckid=mmioFOURCC(('0'+s->id/10),('0'+(s->id%10)),'d','c'); | 34 s->ckid=mmioFOURCC(('0'+s->id/10),('0'+(s->id%10)),'d','c'); |
34 s->h.fccType=streamtypeVIDEO; | 35 s->h.fccType=streamtypeVIDEO; |
35 if(!muxer->def_v) muxer->def_v=s; | 36 if(!muxer->def_v) muxer->def_v=s; |
101 } else { | 102 } else { |
102 // VBR | 103 // VBR |
103 s->h.dwLength++; | 104 s->h.dwLength++; |
104 } | 105 } |
105 s->timer=(double)s->h.dwLength*s->h.dwScale/s->h.dwRate; | 106 s->timer=(double)s->h.dwLength*s->h.dwScale/s->h.dwRate; |
107 s->size+=len; | |
106 if(len>s->h.dwSuggestedBufferSize) s->h.dwSuggestedBufferSize=len; | 108 if(len>s->h.dwSuggestedBufferSize) s->h.dwSuggestedBufferSize=len; |
107 | 109 |
108 } | 110 } |
109 | 111 |
110 static void write_avi_list(FILE *f,unsigned int id,int len){ | 112 static void write_avi_list(FILE *f,unsigned int id,int len){ |