]> git.sesse.net Git - vlc/commitdiff
input/stream: add STREAM_GET_SIGNAL (fixes #8414)
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 17 Apr 2013 21:00:10 +0000 (00:00 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 17 Apr 2013 21:11:25 +0000 (00:11 +0300)
include/vlc_stream.h
src/input/input.c
src/input/stream.c
src/input/stream_demux.c
src/input/stream_memory.c

index 400a75f2abf77f2fdb0dea5466bfe00391e78e31..f77a843dc28d2731404f1d8d2dafc71c095bbea6 100644 (file)
@@ -112,6 +112,7 @@ enum stream_query_e
     STREAM_GET_TITLE_INFO = 0x102, /**< arg1=input_title_t*** arg2=int* res=can fail */
     STREAM_GET_META,        /**< arg1= vlc_meta_t **       res=can fail */
     STREAM_GET_CONTENT_TYPE,    /**< arg1= char **         res=can fail */
+    STREAM_GET_SIGNAL,      /**< arg1=double *pf_quality, arg2=double *pf_strength   res=can fail */
 
     STREAM_SET_PAUSE_STATE = 0x200, /**< arg1= bool        res=can fail */
     STREAM_SET_TITLE,       /**< arg1= int          res=can fail */
index 37f57e6570c71ef72b3c06e51d39c30ff98729e2..be1959ae216c5135379ad1fcf8cc768b11f3b852 100644 (file)
@@ -2287,7 +2287,7 @@ static void UpdateGenericFromAccess( input_thread_t *p_input )
         double f_quality;
         double f_strength;
 
-        if( access_Control( p_access, ACCESS_GET_SIGNAL, &f_quality, &f_strength ) )
+        if( stream_Control( p_stream, STREAM_GET_SIGNAL, &f_quality, &f_strength ) )
             f_quality = f_strength = -1;
 
         input_SendEventSignal( p_input, f_quality, f_strength );
index 2f5022df4b657f37f2230309bcd65ef1879ede72..4718f70a1e6c34e179445daa2b54fa0f1544b815 100644 (file)
@@ -616,6 +616,8 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
             return access_vaControl( p_access, ACCESS_GET_META, args );
         case STREAM_GET_CONTENT_TYPE:
             return access_vaControl( p_access, ACCESS_GET_CONTENT_TYPE, args );
+        case STREAM_GET_SIGNAL:
+            return access_vaControl( p_access, ACCESS_GET_SIGNAL, args );
 
         case STREAM_SET_PAUSE_STATE:
             return access_vaControl( p_access, ACCESS_SET_PAUSE_STATE, args );
index 12882f634ce585f51d76a8748ebc2a7e8c6103bf..01d251c83950047237756942da8e6ea39b89895e 100644 (file)
@@ -300,6 +300,7 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
         case STREAM_GET_TITLE_INFO:
         case STREAM_GET_META:
         case STREAM_GET_CONTENT_TYPE:
+        case STREAM_GET_SIGNAL:
         case STREAM_SET_PAUSE_STATE:
         case STREAM_SET_TITLE:
         case STREAM_SET_SEEKPOINT:
index fed59a716e0e4d55bcfe5f53e38301760a115f5c..87b7f1bb6863ae87b3e13c7e4dda24f636897d56 100644 (file)
@@ -125,6 +125,7 @@ static int Control( stream_t *s, int i_query, va_list args )
         case STREAM_GET_TITLE_INFO:
         case STREAM_GET_META:
         case STREAM_GET_CONTENT_TYPE:
+        case STREAM_GET_SIGNAL:
         case STREAM_SET_TITLE:
         case STREAM_SET_SEEKPOINT:
             return VLC_EGENERIC;