vlc_linux/vlc-3.0.16/modules/gui/qt/input_manager.cpp
/* delete Input if it ever existed.
   Delete the callbacls on input
   p_input is released once here */
delete Input if it ever existed.
Delete the callbacls on input
p_input is released once here
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" );
    char *uri = input_item_GetURI( p_item );
    if( uri != NULL ) {
        float f_pos = var_GetFloat( p_input , "position" );
        int64_t i_time = -1;
        if( f_pos >= 0.05f && f_pos <= 0.95f
         && var_GetInteger( p_input, "length" ) >= 60 * CLOCK_FREQ )
            i_time = var_GetInteger( p_input, "time");
        RecentsMRL::getInstance( p_intf )->setTime( qfu(uri), i_time );
        free(uri);
    }
    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 );
    emit artChanged( NULL );
    emit artChanged( "" );
    emit infoChanged( NULL );
    emit currentMetaChanged( (input_item_t *)NULL );
    emit encryptionChanged( false );
    emit recordingStateChanged( false );
    emit cachingChanged( 0.0 );
}
void InputManager :: delInput ( ) { if ( ! p_input ) return ; msg_Dbg ( p_intf , " " ) ; char * uri = input_item_GetURI ( p_item ) ; if ( uri != NULL ) { float f_pos = var_GetFloat ( p_input , " " ) ; int64_t i_time = -1 ; if ( f_pos >= 0.05f && f_pos <= 0.95f && var_GetInteger ( p_input , " " ) >= 60 * CLOCK_FREQ ) i_time = var_GetInteger ( p_input , " " ) ; RecentsMRL :: getInstance ( p_intf ) -> setTime ( qfu ( uri ) , i_time ) ; free ( uri ) ; } 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 , " " ) ) ; 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 ) ; emit artChanged ( NULL ) ; emit artChanged ( " " ) ; emit infoChanged ( NULL ) ; emit currentMetaChanged ( ( input_item_t * ) NULL ) ; emit encryptionChanged ( false ) ; emit recordingStateChanged ( false ) ; emit cachingChanged ( 0.0 ) ; }
delete Input if it ever existed.
delete Input if it ever existed .
/* Save time / position */ /* Reset all InfoPanels but stats */