mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 09:29:29 +00:00
new stream field: size
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2653 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
74baf8a5bd
commit
65c962ce6d
@ -28,6 +28,7 @@ aviwrite_stream_t* aviwrite_new_stream(aviwrite_t *muxer,int type){
|
||||
s->type=type;
|
||||
s->id=muxer->avih.dwStreams;
|
||||
s->timer=0.0;
|
||||
s->size=0;
|
||||
switch(type){
|
||||
case AVIWRITE_TYPE_VIDEO:
|
||||
s->ckid=mmioFOURCC(('0'+s->id/10),('0'+(s->id%10)),'d','c');
|
||||
@ -103,6 +104,7 @@ void aviwrite_write_chunk(aviwrite_t *muxer,aviwrite_stream_t *s, FILE *f,int le
|
||||
s->h.dwLength++;
|
||||
}
|
||||
s->timer=(double)s->h.dwLength*s->h.dwScale/s->h.dwRate;
|
||||
s->size+=len;
|
||||
if(len>s->h.dwSuggestedBufferSize) s->h.dwSuggestedBufferSize=len;
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ typedef struct {
|
||||
int id; // stream no
|
||||
unsigned int ckid; // chunk id (00dc 01wb etc)
|
||||
double timer;
|
||||
unsigned int size;
|
||||
// buffering:
|
||||
unsigned char *buffer;
|
||||
unsigned int buffer_size;
|
||||
|
Loading…
Reference in New Issue
Block a user