[MPlayer-dev-eng] [PATCH] dvb input fixes

Nico nsabbi at libero.it
Sun Sep 7 00:28:00 CEST 2003


Hi,


Arpi wrote:

>Hi,
>
>  
>
>>@@ -61,14 +61,14 @@
>> #endif
>> 
>>   int res, fe_fd = -1;
>>-  
>>+
>>   fe_fd = open(dvb_frontenddev[priv->card], O_RDWR);
>>   if(fe_fd < 0)
>>   {
>>-  	mp_msg(MSGT_DEMUX, MSGL_ERR, "get_tuner_type(%d, %s), ERROR IN OPENING
>>FRONTEND DEVICE %s: %d\n", priv->card, dvb_frontenddev[priv->card], errno);
>>+  	mp_msg(MSGT_DEMUX, MSGL_ERR, "get_tuner_type(card %d), COULDN'T OPEN
>>FRONTEND DEVICE %s, ERRNO: %d\n", priv->card, dvb_frontenddev[priv->card],
>>errno);
>> 	return 0;
>>   }
>>-  
>>+
>>   res = ioctl(fe_fd, FE_GET_INFO, &fe_info);
>>   if(res < 0)
>>   {
>>@@ -86,17 +86,17 @@
>> 	case FE_QPSK:
>>       mp_msg(MSGT_DEMUX, MSGL_INFO, "TUNER TYPE SEEMS TO BE DVB-S\n");
>> 	  return TUNER_SAT;
>>-	  
>>+
>> 	case FE_QAM:
>>       mp_msg(MSGT_DEMUX, MSGL_INFO, "TUNER TYPE SEEMS TO BE DVB-C\n");
>> 	  return TUNER_CBL;
>>-	  
>>+
>>    
>>
>
>could you please leave cosmetics out??
>
>  
>
OK, sorry.

>  
>
>> 
>>+goto_enable_cache:
>> // CACHE2: initial prefill: 20%  later: 5%  (should be set by -cacheopts)
>> if(stream_cache_size>0){
>>   current_module="enable_cache";
>>@@ -1549,7 +1550,7 @@
>> 		if(dvb_step_channel(priv, dir))
>> 		{
>> 	  		uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT));
>>-			goto goto_open_demuxer;
>>+			goto goto_enable_cache;
>> 		}
>>    
>>
>
>and who the hell will close/kill/free the previous cache process???
>
>  
>

dvb_set_channel() calls cache_uninit()

 if(priv->is_on) //the fds are already open and we have to stop the demuxers
        {
                dvb_demux_stop(priv->demux_fd[0]);
                dvb_demux_stop(priv->demux_fd[1]);
                priv->retry = 1;
                while(dvb_streaming_read(stream, buf, 4096) > 0);       
//empty both the stream's and driver's
 buffers
                cache_uninit(stream);
        }


is it  the wrong place?
I call it from there because I never close the stream (except on 'q'), 
and the only other part
of mplayer that calls it is free_stream()

>A'rpi / Astral & ESP-team
>
>--
>Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu
>
>_______________________________________________
>MPlayer-dev-eng mailing list
>MPlayer-dev-eng at mplayerhq.hu
>http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
>  
>
Nico



More information about the MPlayer-dev-eng mailing list