Mercurial > mplayer.hg
comparison libmpdemux/tv.c @ 2810:1f0bcdb49910
tv update
author | alex |
---|---|
date | Sun, 11 Nov 2001 01:44:54 +0000 |
parents | 09d5c9834580 |
children | d6d88771f5ef |
comparison
equal
deleted
inserted
replaced
2809:b8e0d8204ff2 | 2810:1f0bcdb49910 |
---|---|
40 1 = successfully read a packet | 40 1 = successfully read a packet |
41 */ | 41 */ |
42 /* fill demux->video and demux->audio */ | 42 /* fill demux->video and demux->audio */ |
43 int demux_tv_fill_buffer(demuxer_t *demux, tvi_handle_t *tvh) | 43 int demux_tv_fill_buffer(demuxer_t *demux, tvi_handle_t *tvh) |
44 { | 44 { |
45 int seq = tvh->seq; | 45 int seq = tvh->seq++; |
46 demux_stream_t *ds_video = NULL; | 46 demux_stream_t *ds_video = NULL; |
47 demux_packet_t *dp_video = NULL; | 47 demux_packet_t *dp_video = NULL; |
48 demux_stream_t *ds_audio = NULL; | 48 demux_stream_t *ds_audio = NULL; |
49 demux_packet_t *dp_audio = NULL; | 49 demux_packet_t *dp_audio = NULL; |
50 int len_video, len_audio; | 50 int len_video, len_audio; |
51 | 51 |
52 printf("demux_tv_fill_buffer(sequence:%d) called!\n", seq); | 52 printf("demux_tv_fill_buffer(sequence:%d) called!\n", seq); |
53 | 53 |
54 demux->filepos = -1; | 54 demux->filepos = -1; |
55 | 55 |
56 seq++; | 56 // seq++; |
57 tvh->seq++; | 57 // tvh->seq++; |
58 | 58 |
59 /* ================== ADD VIDEO PACKET =================== */ | 59 /* ================== ADD VIDEO PACKET =================== */ |
60 len_video = tvh->functions->get_video_framesize(tvh->priv); | 60 len_video = tvh->functions->get_video_framesize(tvh->priv); |
61 ds_video = demux->video; | 61 ds_video = demux->video; |
62 | 62 |
144 sh_video->format = IMGFMT_YV12; | 144 sh_video->format = IMGFMT_YV12; |
145 funcs->control(tvh->priv, TVI_CONTROL_VID_SET_FORMAT, &sh_video->format); | 145 funcs->control(tvh->priv, TVI_CONTROL_VID_SET_FORMAT, &sh_video->format); |
146 | 146 |
147 /* get IMGFMT_ */ | 147 /* get IMGFMT_ */ |
148 funcs->control(tvh->priv, TVI_CONTROL_VID_GET_FORMAT, &sh_video->format); | 148 funcs->control(tvh->priv, TVI_CONTROL_VID_GET_FORMAT, &sh_video->format); |
149 if (IMGFMT_IS_RGB(sh_video->format) || IMGFMT_IS_BGR(sh_video->format)) | 149 // if (IMGFMT_IS_RGB(sh_video->format) || IMGFMT_IS_BGR(sh_video->format)) |
150 sh_video->format = 0x0; | 150 sh_video->format = 0x0; |
151 | 151 |
152 /* set FPS and FRAMETIME */ | 152 /* set FPS and FRAMETIME */ |
153 if(!sh_video->fps) | 153 if(!sh_video->fps) |
154 { | 154 { |