[vlc-devel] Re: video title 2
Sigmund Augdal
sigmunau at stud.ntnu.no
Mon Mar 29 13:45:30 CEST 2004
I don't think the config system know how to distinguish between NULL and "".
So please check both in the if.
Sigmund
On Mon, Mar 29, 2004 at 01:41:23PM +0200, Hornsby Adrian wrote:
> >>>>>>>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
> ************************************************************
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>
More information about the vlc-devel
mailing list