/* Define the Input used. Add the callbacks on input p_input is held once here */ void InputManager::setInput( input_thread_t *_p_input ) { delInput(); p_input = _p_input; if( p_input && !( p_input->b_dead || !vlc_object_alive (p_input) ) ) { msg_Dbg( p_intf, "IM: Setting an input" ); vlc_object_hold( p_input ); addCallbacks(); UpdateStatus(); UpdateName(); UpdateArt(); UpdateTeletext(); UpdateNavigation(); UpdateVout(); p_item = input_GetItem( p_input ); emit rateChanged( var_GetFloat( p_input, "rate" ) ); } else { p_input = NULL; p_item = NULL; assert( !p_input_vbi ); emit rateChanged( var_InheritFloat( p_intf, "rate" ) ); } }
/* Define the Input used. Add the callbacks on input p_input is held once here */ void InputManager::setInput( input_thread_t *_p_input ) { delInput(); p_input = _p_input; if( p_input != NULL ) { msg_Dbg( p_intf, "IM: Setting an input" ); vlc_object_hold( p_input ); addCallbacks(); UpdateStatus(); UpdateName(); UpdateArt(); UpdateTeletext(); UpdateNavigation(); UpdateVout(); p_item = input_GetItem( p_input ); emit rateChanged( var_GetFloat( p_input, "rate" ) ); /* Get Saved Time */ if( p_item->i_type == ITEM_TYPE_FILE ) { char *uri = input_item_GetURI( p_item ); int i_time = RecentsMRL::getInstance( p_intf )->time( qfu(uri) ); if( i_time > 0 && qfu( uri ) != lastURI && !var_GetFloat( p_input, "run-time" ) && !var_GetFloat( p_input, "start-time" ) && !var_GetFloat( p_input, "stop-time" ) ) { emit resumePlayback( (int64_t)i_time * 1000 ); } playlist_Lock( THEPL ); // Add root items only playlist_item_t* p_node = playlist_CurrentPlayingItem( THEPL ); if ( p_node != NULL && p_node->p_parent != NULL && p_node->p_parent->i_id == THEPL->p_playing->i_id ) { // Save the latest URI to avoid asking to restore the // position on the same input file. lastURI = qfu( uri ); RecentsMRL::getInstance( p_intf )->addRecent( lastURI ); } playlist_Unlock( THEPL ); free( uri ); } } else { p_item = NULL; lastURI.clear(); assert( !p_input_vbi ); emit rateChanged( var_InheritFloat( p_intf, "rate" ) ); } }
/* Define the Input used. Add the callbacks on input p_input is held once here */ void InputManager::setInput( input_thread_t *_p_input ) { delInput(); p_input = _p_input; if( p_input != NULL ) { msg_Dbg( p_intf, "IM: Setting an input" ); vlc_object_hold( p_input ); addCallbacks(); UpdateStatus(); UpdateName(); UpdateArt(); UpdateTeletext(); UpdateNavigation(); UpdateVout(); p_item = input_GetItem( p_input ); emit rateChanged( var_GetFloat( p_input, "rate" ) ); /* Get Saved Time */ if( p_item->i_type == ITEM_TYPE_FILE ) { int i_time = RecentsMRL::getInstance( p_intf )->time( p_item->psz_uri ); if( i_time > 0 && !var_GetFloat( p_input, "run-time" ) && !var_GetFloat( p_input, "start-time" ) && !var_GetFloat( p_input, "stop-time" ) ) { emit resumePlayback( (int64_t)i_time * 1000 ); } } } else { p_item = NULL; assert( !p_input_vbi ); emit rateChanged( var_InheritFloat( p_intf, "rate" ) ); } }
InputManager::~InputManager() { delete rateLimitedEventPoster; delInput(); }
InputManager::~InputManager() { delInput(); }