diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-08-11 00:02:46 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-08-11 00:02:46 +0000 |
commit | d891bc11ccbe529beb532f44c0fc837d5dbb5f3f (patch) | |
tree | 00d6baa4f49709d223730b991b0c179f27850301 /mplayer.c | |
parent | a3b1944cc63a540c05d9368ab05afc80f36da0d9 (diff) | |
download | mpv-d891bc11ccbe529beb532f44c0fc837d5dbb5f3f.tar.bz2 mpv-d891bc11ccbe529beb532f44c0fc837d5dbb5f3f.tar.xz |
this patch fixes
1) some bugs introduced in the tuner autodetection and in the channel-parsing functions,
3) retries reading when the mplayer/mencoder don't read fast enough (sooner it exited)
but especially
4) makes the stream compliant with the new, modular stream api (the one
currently in CVS is not and is totally unreachable).
[and maybe more, next time please include cvslog in patch! -- A'rpi]
patch by Nico <nsabbi@libero.it>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10561 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 58 |
1 files changed, 37 insertions, 21 deletions
@@ -100,8 +100,6 @@ static int quiet=0; #ifdef HAS_DVBIN_SUPPORT #include "libmpdemux/dvbin.h" -extern dvb_history_t dvb_prev_next; -dvb_history_t *dvb_history; #endif @@ -744,12 +742,6 @@ char *tmp; int gui_no_filename=0; -#ifdef HAS_DVBIN_SUPPORT - dvb_prev_next.prev = dvb_prev_next.next = -1; - dvb_history = &dvb_prev_next; -#endif - - srand((int) time(NULL)); @@ -1337,7 +1329,7 @@ if(stream_cache_size>0){ } //============ Open DEMUXERS --- DETECT file type ======================= - +goto_open_demuxer: current_module="demux_open"; demuxer=demux_open(stream,file_format,audio_id,video_id,dvdsub_id,filename); @@ -2808,18 +2800,29 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) } } #ifdef HAS_DVBIN_SUPPORT - if(dvbin_param_on == 1) + if((stream->type == STREAMTYPE_DVB) && stream->priv) { + dvb_priv_t *priv = (dvb_priv_t*) stream->priv; + if(priv->is_on) + { + int dir; int v = cmd->args[0].v.i; + if(v > 0) - dvb_history = dvb_step_channel((dvb_priv_t*)(demuxer->stream->priv), DVB_CHANNEL_HIGHER, dvb_history); + dir = DVB_CHANNEL_HIGHER; else - dvb_history = dvb_step_channel((dvb_priv_t*)(demuxer->stream->priv), DVB_CHANNEL_LOWER, dvb_history); - uninit_player(INITED_ALL); - goto goto_next_file; + dir = DVB_CHANNEL_LOWER; + + + if(dvb_step_channel(priv, dir)) + { + uninit_player(INITED_ALL-(INITED_STREAM)); + printf("UNINIT COMPLETE\n"); + goto goto_open_demuxer; + } + } } -#endif - +#endif break; case MP_CMD_TV_SET_CHANNEL : { if (file_format == DEMUXER_TYPE_TV) { @@ -2832,6 +2835,23 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) #endif } } break; +#ifdef HAS_DVBIN_SUPPORT + case MP_CMD_DVB_SET_CHANNEL: + { + if((stream->type == STREAMTYPE_DVB) && stream->priv) + { + dvb_priv_t *priv = (dvb_priv_t*) stream->priv; + if(priv->is_on) + { + if(dvb_set_channel(priv, cmd->args[0].v.i)) + { + uninit_player(INITED_ALL-(INITED_STREAM)); + goto goto_open_demuxer; + } + } + } + } +#endif case MP_CMD_TV_LAST_CHANNEL : { if (file_format == DEMUXER_TYPE_TV) { tv_last_channel((tvi_handle_t*)(demuxer->priv)); @@ -3574,11 +3594,7 @@ while(playtree_iter != NULL) { } #endif -if(use_gui || playtree_iter != NULL -#ifdef HAS_DVBIN_SUPPORT - || dvbin_param_on -#endif - ){ +if(use_gui || playtree_iter != NULL){ eof = 0; goto play_next_file; |