X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_vout_osd.h;h=bdf78cab168f30ad531a7a0ebe9e71d8434a4da1;hb=c60652e38ac6afd74bd8225e9dae5406f13aaa4f;hp=c35b722919271f3b3f9356b480bf56392d9d1c9a;hpb=021bda3e79ed68f105180730223a86ee4e97ff32;p=vlc diff --git a/include/vlc_vout_osd.h b/include/vlc_vout_osd.h index c35b722919..bdf78cab16 100644 --- a/include/vlc_vout_osd.h +++ b/include/vlc_vout_osd.h @@ -35,13 +35,17 @@ extern "C" { /** * OSD menu position and picture type defines */ -#define OSD_HOR_SLIDER 1 -#define OSD_VERT_SLIDER 2 - -#define OSD_PLAY_ICON 1 -#define OSD_PAUSE_ICON 2 -#define OSD_SPEAKER_ICON 3 -#define OSD_MUTE_ICON 4 +enum +{ + /* Icons */ + OSD_PLAY_ICON = 1, + OSD_PAUSE_ICON, + OSD_SPEAKER_ICON, + OSD_MUTE_ICON, + /* Sliders */ + OSD_HOR_SLIDER, + OSD_VERT_SLIDER, +}; /********************************************************************** * Vout text and widget overlays @@ -49,16 +53,25 @@ extern "C" { VLC_EXPORT( int, vout_OSDEpg, ( vout_thread_t *, input_item_t * ) ); /** - * Write an informative message at the default location, - * for the default duration and only if the OSD option is enabled. - * \param p_caller The object that called the function. - * \param i_channel Subpicture channel - * \param psz_format printf style formatting - **/ -VLC_EXPORT( void, vout_OSDMessage, ( vlc_object_t *, int, const char *, ... ) LIBVLC_FORMAT( 3, 4 ) ); + * \brief Write an informative message if the OSD option is enabled. + * \param vout The vout on which the message will be displayed + * \param channel Subpicture channel + * \param position Position of the text + * \param duration Duration of the text being displayed + * \param text Text to be displayed + */ +VLC_EXPORT( void, vout_OSDText, ( vout_thread_t *vout, int channel, int position, mtime_t duration, const char *text ) ); -#define vout_OSDMessage( obj, chan, ...) \ - vout_OSDMessage( VLC_OBJECT(obj), chan, __VA_ARGS__ ) +/** + * \brief Write an informative message at the default location, + * for the default duration and only if the OSD option is enabled. + * \param vout The vout on which the message will be displayed + * \param channel Subpicture channel + * \param format printf style formatting + * + * Provided for convenience. + */ +VLC_EXPORT( void, vout_OSDMessage, ( vout_thread_t *, int, const char *, ... ) LIBVLC_FORMAT( 3, 4 ) ); /** * Display a slider on the video output. @@ -66,18 +79,16 @@ VLC_EXPORT( void, vout_OSDMessage, ( vlc_object_t *, int, const char *, ... ) L * \param i_channel Subpicture channel * \param i_postion Current position in the slider * \param i_type Types are: OSD_HOR_SLIDER and OSD_VERT_SLIDER. - * @see vlc_osd.h */ -VLC_EXPORT( void, vout_OSDSlider, ( vlc_object_t *, int, int , short ) ); +VLC_EXPORT( void, vout_OSDSlider, ( vout_thread_t *, int, int , short ) ); /** * Display an Icon on the video output. * \param p_this The object that called the function. * \param i_channel Subpicture channel * \param i_type Types are: OSD_PLAY_ICON, OSD_PAUSE_ICON, OSD_SPEAKER_ICON, OSD_MUTE_ICON - * @see vlc_osd.h */ -VLC_EXPORT( void, vout_OSDIcon, ( vlc_object_t *, int, short ) ); +VLC_EXPORT( void, vout_OSDIcon, ( vout_thread_t *, int, short ) ); #ifdef __cplusplus }