]> git.sesse.net Git - vlc/blobdiff - src/input/input.c
input: set OSD message when changing rate via hotkeys to display the current rate...
[vlc] / src / input / input.c
index 8498bf29bd5a250532bd2630edf30113e2919209..759664008132ab97c85cf52cf00638bd81156d1d 100644 (file)
@@ -110,9 +110,6 @@ static void SubtitleAdd( input_thread_t *p_input, char *psz_subtitle, bool b_for
 
 static void input_ChangeState( input_thread_t *p_input, int i_state ); /* TODO fix name */
 
-/* Do not let a pts_delay from access/demux go beyong 60s */
-#define INPUT_PTS_DELAY_MAX INT64_C(60000000)
-
 #undef input_Create
 /**
  * Create a new input_thread_t.
@@ -1142,7 +1139,7 @@ static void UpdatePtsDelay( input_thread_t *p_input )
     /* */
     es_out_SetDelay( p_input->p->p_es_out_display, AUDIO_ES, i_audio_delay );
     es_out_SetDelay( p_input->p->p_es_out_display, SPU_ES, i_spu_delay );
-    es_out_SetJitter( p_input->p->p_es_out, i_pts_delay, i_cr_average );
+    es_out_SetJitter( p_input->p->p_es_out, i_pts_delay, 0, i_cr_average );
 }
 
 static void InitPrograms( input_thread_t * p_input )
@@ -1773,63 +1770,10 @@ static bool Control( input_thread_t *p_input,
             break;
 
         case INPUT_CONTROL_SET_RATE:
-        case INPUT_CONTROL_SET_RATE_SLOWER:
-        case INPUT_CONTROL_SET_RATE_FASTER:
         {
-            int i_rate;
-            int i_rate_sign;
-
             /* Get rate and direction */
-            if( i_type == INPUT_CONTROL_SET_RATE )
-            {
-                i_rate = abs( val.i_int );
-                i_rate_sign = val.i_int < 0 ? -1 : 1;
-            }
-            else
-            {
-                static const int ppi_factor[][2] = {
-                    {1,64}, {1,32}, {1,16}, {1,8}, {1,4}, {1,3}, {1,2}, {2,3},
-                    {1,1},
-                    {3,2}, {2,1}, {3,1}, {4,1}, {8,1}, {16,1}, {32,1}, {64,1},
-                    {0,0}
-                };
-                int i_error;
-                int i_idx;
-                int i;
-
-                i_rate_sign = p_input->p->i_rate < 0 ? -1 : 1;
-
-                i_error = INT_MAX;
-                i_idx = -1;
-                for( i = 0; ppi_factor[i][0] != 0; i++ )
-                {
-                    const int i_test_r = INPUT_RATE_DEFAULT * ppi_factor[i][0] / ppi_factor[i][1];
-                    const int i_test_e = abs( abs( p_input->p->i_rate ) - i_test_r );
-                    if( i_test_e < i_error )
-                    {
-                        i_idx = i;
-                        i_error = i_test_e;
-                    }
-                }
-
-                assert( i_idx >= 0 && ppi_factor[i_idx][0] != 0 );
-
-                if( i_type == INPUT_CONTROL_SET_RATE_SLOWER )
-                {
-                    if( ppi_factor[i_idx+1][0] > 0 )
-                        i_rate = INPUT_RATE_DEFAULT * ppi_factor[i_idx+1][0] / ppi_factor[i_idx+1][1];
-                    else
-                        i_rate = INPUT_RATE_MAX+1;
-                }
-                else
-                {
-                    assert( i_type == INPUT_CONTROL_SET_RATE_FASTER );
-                    if( i_idx > 0 )
-                        i_rate = INPUT_RATE_DEFAULT * ppi_factor[i_idx-1][0] / ppi_factor[i_idx-1][1];
-                    else
-                        i_rate = INPUT_RATE_MIN-1;
-                }
-            }
+            int i_rate = abs( val.i_int );
+            int i_rate_sign = val.i_int < 0 ? -1 : 1;
 
             /* Check rate bound */
             if( i_rate < INPUT_RATE_MIN )