]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/input_manager.cpp
Qt: v4l2 control: drop v4l2.ui. auto-detect instance.
[vlc] / modules / gui / qt4 / input_manager.cpp
index c8b70874e08d0489253005e1fa5bf8a20b55b295..ebcc032612391b0ac1282d2e62601586af2f0221 100644 (file)
@@ -23,6 +23,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#define __STDC_FORMAT_MACROS 1
+
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
@@ -257,6 +259,9 @@ void InputManager::customEvent( QEvent *event )
     case ProgramChanged_Type:
         UpdateProgramEvent();
         break;
+    case EPGEvent_Type:
+        UpdateEPG();
+        break;
     default:
         msg_Warn( p_intf, "This shouldn't happen: %i", i_type );
         assert(0);
@@ -361,6 +366,11 @@ static int InputEvent( vlc_object_t *p_this, const char *,
         event = new IMEvent( ProgramChanged_Type );
         break;
 
+    case INPUT_EVENT_ITEM_EPG:
+        /* EPG data changed */
+        event = new IMEvent( EPGEvent_Type );
+        break;
+
     case INPUT_EVENT_SIGNAL:
         /* This is for capture-card signals */
         /* event = new IMEvent( SignalChanged_Type );
@@ -409,11 +419,11 @@ void InputManager::UpdateNavigation()
     if( val.i_int > 0 )
     {
         emit titleChanged( true );
-        msg_Dbg( p_intf, "Title %i", val.i_int );
+        msg_Dbg( p_intf, "Title %"PRId64, val.i_int );
         /* p_input != NULL since val.i_int != 0 */
         var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val2, NULL );
         emit chapterChanged( (val2.i_int > 1) || ( val2.i_int > 0 && val.i_int > 1 ) );
-        msg_Dbg( p_intf, "Chapter: %i", val2.i_int );
+        msg_Dbg( p_intf, "Chapter: %"PRId64, val2.i_int );
     }
     else
         emit titleChanged( false );
@@ -547,12 +557,20 @@ void InputManager::UpdateTeletext()
     }
 }
 
+void InputManager::UpdateEPG()
+{
+    if( hasInput() )
+    {
+       emit epgChanged();
+    }
+}
+
 void InputManager::UpdateVout()
 {
     if( hasInput() )
     {
         /* Get current vout lists from input */
-        int i_vout;
+        size_t i_vout;
         vout_thread_t **pp_vout;
         if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) )
         {
@@ -625,7 +643,10 @@ const QString InputManager::decodeArtURL( input_item_t *p_item )
     /* Taglib seems to define a attachment://, It won't work yet */
     url = url.replace( "attachment://", "" );
 #endif
-    return qfu( psz_art ? psz_art : "" );
+
+    QString path = qfu( psz_art ? psz_art : "" );
+    free( psz_art );
+    return path;
 }
 
 void InputManager::UpdateArt()