[vlc-devel] video title 2

Hornsby Adrian adrian_hornsby at yahoo.co.uk
Mon Mar 29 13:41:23 CEST 2004


>>>>>>>Okay, even this is not working !! knowing that video-title is defined as :

add_string("video-title",NULL,NULL,VIDEO_TITLE_TEXT, VIDEO_TITLE_LONGTEXT,VLC_TRUE);
   

>>>>>>>the video_title never equal to NULL when I don't call the command --video-title <string>
>>>>>>>How could I make the "if" work ??
> >>>>>>with this code, if I give a "--video-title bbb", it changes the tilte, but the default doesn't work, it just erase the title >>>>>>>without printing anything else.

 

case WM_VLC_CHANGE_TEXT:
            var_Create( p_event->p_vout, "video-title", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
            var_Get( p_event->p_vout, "video-title", &val );
            char* video_title = val.psz_string;
       
    
     if (video_title == NULL ) /*default video Title*/
     {     
            if( p_event->p_vout->p_sys->b_using_overlay )
                SetWindowText( p_event->p_vout->p_sys->hwnd,
                    VOUT_TITLE " (hardware YUV overlay DirectX output)" );
            else if( p_event->p_vout->p_sys->b_hw_yuv )
                SetWindowText( p_event->p_vout->p_sys->hwnd,
                    VOUT_TITLE " (hardware YUV DirectX output)" );
            else SetWindowText( p_event->p_vout->p_sys->hwnd,
                    VOUT_TITLE " (software RGB DirectX output)" );
            break;
            }
            
            else
            {
            if( p_event->p_vout->p_sys->b_using_overlay )
                SetWindowText( p_event->p_vout->p_sys->hwnd,
                    video_title );
            else if( p_event->p_vout->p_sys->b_hw_yuv )
                SetWindowText( p_event->p_vout->p_sys->hwnd,
                    video_title );
            else SetWindowText( p_event->p_vout->p_sys->hwnd,
                    video_title );
                    
            break;
            }


thanks


************************************************************
HORNSBY Adrian
Teräskatu 7 D 67 
33720 Tampere
FINLAND
#Tel :+358 (0)456376712
http://www.students.tut.fi/~hornsby/
************************************************************
Tampere University of Technology -TTY
Information Technology - Tietotalo
Department of Signal Processing 
TF 314
33720 Tampere
FINLAND
************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20040329/e3cb8429/attachment.html>


More information about the vlc-devel mailing list