void InputManager::UpdateVout() { if( hasInput() ) { /* Get current vout lists from input */ size_t i_vout; vout_thread_t **pp_vout; if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) ) { i_vout = 0; pp_vout = NULL; } /* */ emit voutListChanged( pp_vout, i_vout ); /* */ bool b_old_video = b_video; b_video = i_vout > 0; if( !!b_old_video != !!b_video ) emit voutChanged( b_video ); /* Release the vout list */ for( size_t i = 0; i < i_vout; i++ ) vlc_object_release( (vlc_object_t*)pp_vout[i] ); free( pp_vout ); } }
/* delete Input if it ever existed. Delete the callbacls on input p_input is released once here */ void InputManager::delInput() { if( !p_input ) return; msg_Dbg( p_intf, "IM: Deleting the input" ); /* Save time / position */ float f_pos = var_GetFloat( p_input , "position" ); int64_t i_time = var_GetTime( p_input, "time"); int i_length = var_GetTime( p_input , "length" ) / CLOCK_FREQ; if( f_pos < 0.05 || f_pos > 0.95 || i_length < 60) { i_time = -1; } RecentsMRL::getInstance( p_intf )->setTime( p_item->psz_uri, i_time ); delCallbacks(); i_old_playing_status = END_S; p_item = NULL; oldName = ""; artUrl = ""; b_video = false; timeA = 0; timeB = 0; f_rate = 0. ; if( p_input_vbi ) { vlc_object_release( p_input_vbi ); p_input_vbi = NULL; } vlc_object_release( p_input ); p_input = NULL; emit positionUpdated( -1.0, 0 ,0 ); emit rateChanged( var_InheritFloat( p_intf, "rate" ) ); emit nameChanged( "" ); emit chapterChanged( 0 ); emit titleChanged( 0 ); emit playingStatusChanged( END_S ); emit teletextPossible( false ); emit AtoBchanged( false, false ); emit voutChanged( false ); emit voutListChanged( NULL, 0 ); /* Reset all InfoPanels but stats */ emit artChanged( NULL ); emit artChanged( "" ); emit infoChanged( NULL ); emit currentMetaChanged( (input_item_t *)NULL ); emit encryptionChanged( false ); emit recordingStateChanged( false ); emit cachingChanged( 1 ); }
/* delete Input if it ever existed. Delete the callbacls on input p_input is released once here */ void InputManager::delInput() { if( !p_input ) return; msg_Dbg( p_intf, "IM: Deleting the input" ); delCallbacks(); i_old_playing_status = END_S; p_item = NULL; oldName = ""; artUrl = ""; b_video = false; timeA = 0; timeB = 0; f_rate = 0. ; if( p_input_vbi ) { vlc_object_release( p_input_vbi ); p_input_vbi = NULL; } vlc_object_release( p_input ); p_input = NULL; emit positionUpdated( -1.0, 0 ,0 ); emit rateChanged( var_InheritFloat( p_intf, "rate" ) ); emit nameChanged( "" ); emit chapterChanged( 0 ); emit titleChanged( 0 ); emit playingStatusChanged( END_S ); emit teletextPossible( false ); emit AtoBchanged( false, false ); emit voutChanged( false ); emit voutListChanged( NULL, 0 ); /* Reset all InfoPanels but stats */ emit artChanged( NULL ); emit artChanged( "" ); emit infoChanged( NULL ); emit currentMetaChanged( (input_item_t *)NULL ); emit encryptionChanged( false ); emit recordingStateChanged( false ); emit cachingChanged( 1 ); }