[vlc-devel] video title

Hornsby Adrian adrian_hornsby at yahoo.co.uk
Mon Mar 29 11:41:45 CEST 2004


Ok, can someone tell me what's wrong with this following code. It never changes the value of video_title !!!
if (var_Get( p_event->p_vout, "video-title", &val ))
            {
          video_title = val.psz_string;
          }
seems not to work or to get the value given by the command line : "--video-title "bbc world" for exemple


all code event.c (directx):

case WM_VLC_CHANGE_TEXT:
            var_Create( p_event->p_vout, "video-title", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
            char * video_title = NULL;
            if (var_Get( p_event->p_vout, "video-title", &val ))
            {
          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 (video_title != NULL)
            {
            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/d4099072/attachment.html>


More information about the vlc-devel mailing list