📄 libvlc.h
字号:
/** * Get current video aspect ratio. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer * \return the video aspect ratio */VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );/** * Set new video aspect ratio. * * \param p_mediaplayer the media player * \param psz_aspect new video aspect-ratio * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, char *, libvlc_exception_t * );/** * Get current video subtitle. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer * \return the video subtitle selected */VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );/** * Get the number of available video subtitles. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer * \return the number of available video subtitles */VLC_PUBLIC_API int libvlc_video_get_spu_count( libvlc_media_player_t *, libvlc_exception_t * );/** * Get the description of available video subtitles. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer * \return list containing description of available video subtitles */VLC_PUBLIC_API libvlc_track_description_t * libvlc_video_get_spu_description( libvlc_media_player_t *, libvlc_exception_t * );/** * Set new video subtitle. * * \param p_mediaplayer the media player * \param i_spu new video subtitle to select * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );/** * Set new video subtitle file. * * \param p_mediaplayer the media player * \param psz_subtitle new video subtitle file * \param p_e an initialized exception pointer * \return the success status (boolean) */VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, char *, libvlc_exception_t * );/** * Get the description of available titles. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer * \return list containing description of available titles */VLC_PUBLIC_API libvlc_track_description_t * libvlc_video_get_title_description( libvlc_media_player_t *, libvlc_exception_t * );/** * Get the description of available chapters for specific title. * * \param p_mediaplayer the media player * \param i_title selected title * \param p_e an initialized exception pointer * \return list containing description of available chapter for title i_title */VLC_PUBLIC_API libvlc_track_description_t * libvlc_video_get_chapter_description( libvlc_media_player_t *, int, libvlc_exception_t * );/** * Get current crop filter geometry. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer * \return the crop filter geometry */VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );/** * Set new crop filter geometry. * * \param p_mediaplayer the media player * \param psz_geometry new crop filter geometry * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, char *, libvlc_exception_t * );/** * Toggle teletext transparent status on video output. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );/** * Get current teletext page requested. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer * \return the current teletext page requested. */VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_player_t *, libvlc_exception_t * );/** * Set new teletext page to retrieve. * * \param p_mediaplayer the media player * \param i_page teletex page number requested * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_player_t *, int, libvlc_exception_t * );/** * Get number of available video tracks. * * \param p_mi media player * \param p_e an initialized exception * \return the number of available video tracks (int) */VLC_PUBLIC_API int libvlc_video_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );/** * Get the description of available video tracks. * * \param p_mi media player * \param p_e an initialized exception * \return list with description of available video tracks */VLC_PUBLIC_API libvlc_track_description_t * libvlc_video_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );/** * Get current video track. * * \param p_mi media player * \param p_e an initialized exception pointer * \return the video track (int) */VLC_PUBLIC_API int libvlc_video_get_track( libvlc_media_player_t *, libvlc_exception_t * );/** * Set video track. * * \param p_mi media player * \param i_track the track (int) * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );/** * Take a snapshot of the current video window. * * If i_width AND i_height is 0, original size is used. * If i_width XOR i_height is 0, original aspect-ratio is preserved. * * \param p_mediaplayer the media player * \param psz_filepath the path where to save the screenshot to * \param i_width the snapshot's width * \param i_height the snapshot's height * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, char *,unsigned int, unsigned int, libvlc_exception_t * );/** * Resize the current video output window. * * \param p_instance libvlc instance * \param width new width for video output window * \param height new height for video output window * \param p_e an initialized exception pointer * \return the success status (boolean) */VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_player_t *, int, int, libvlc_exception_t *);/** * Change the parent for the current the video output. * * \param p_instance libvlc instance * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32) * \param p_e an initialized exception pointer * \return the success status (boolean) */VLC_PUBLIC_API int libvlc_video_reparent( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );/** * Tell windowless video output to redraw rectangular area (MacOS X only). * * \param p_instance libvlc instance * \param area coordinates within video drawable * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_player_t *, const libvlc_rectangle_t *, libvlc_exception_t * );/** * Set the default video output size. * * This setting will be used as default for all video outputs. * * \param p_instance libvlc instance * \param width new width for video drawable * \param height new height for video drawable * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );/** * Set the default video output viewport for a windowless video output * (MacOS X only). * * This setting will be used as default for all video outputs. * * \param p_instance libvlc instance * \param view coordinates within video drawable * \param clip coordinates within video drawable * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );/** @} video *//** \defgroup libvlc_audio libvlc_audio * \ingroup libvlc_media_player * LibVLC Audio handling * @{ *//** * Audio device types */typedef enum libvlc_audio_output_device_types_t { libvlc_AudioOutputDevice_Error = -1, libvlc_AudioOutputDevice_Mono = 1, libvlc_AudioOutputDevice_Stereo = 2, libvlc_AudioOutputDevice_2F2R = 4, libvlc_AudioOutputDevice_3F2R = 5, libvlc_AudioOutputDevice_5_1 = 6, libvlc_AudioOutputDevice_6_1 = 7, libvlc_AudioOutputDevice_7_1 = 8, libvlc_AudioOutputDevice_SPDIF = 10} libvlc_audio_output_device_types_t;/** * Audio channels */typedef enum libvlc_audio_output_channel_t { libvlc_AudioChannel_Error = -1, libvlc_AudioChannel_Stereo = 1, libvlc_AudioChannel_RStereo = 2, libvlc_AudioChannel_Left = 3, libvlc_AudioChannel_Right = 4, libvlc_AudioChannel_Dolbys = 5} libvlc_audio_output_channel_t;/** * Get the list of available audio outputs * * \param p_instance libvlc instance * \param p_e an initialized exception pointer * \return list of available audio outputs, at the end free it with* \see libvlc_audio_output_list_release \see libvlc_audio_output_t */VLC_PUBLIC_API libvlc_audio_output_t * libvlc_audio_output_list_get( libvlc_instance_t *, libvlc_exception_t * );/** * Free the list of available audio outputs * * \param p_list list with audio outputs for release */VLC_PUBLIC_API void libvlc_audio_output_list_release( libvlc_audio_output_t * );/** * Set the audio output. * Change will be applied after stop and play. * * \param p_instance libvlc instance * \param psz_name name of audio output, * use psz_name of \see libvlc_audio_output_t * \return true if function succeded */VLC_PUBLIC_API int libvlc_audio_output_set( libvlc_instance_t *, const char * );/** * Get count of devices for audio output, these devices are hardware oriented * like analor or digital output of sound card * * \param p_instance libvlc instance * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t * \return number of devices */VLC_PUBLIC_API int libvlc_audio_output_device_count( libvlc_instance_t *, const char * );/** * Get long name of device, if not available short name given * * \param p_instance libvlc instance * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t * \param i_device device index * \return long name of device */VLC_PUBLIC_API char * libvlc_audio_output_device_longname( libvlc_instance_t *, const char *, int );/** * Get id name of device * * \param p_instance libvlc instance * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t * \param i_device device index * \return id name of device, use for setting device, need to be free after use */VLC_PUBLIC_API char * libvlc_audio_output_device_id( libvlc_instance_t *, const char *, int );/** * Set device for using * * \param p_instance libvlc instance * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t * \param psz_device_id device */VLC_PUBLIC_API void libvlc_audio_output_device_set( libvlc_instance_t *, const char *, const char * );/** * Get current audio device type. Device type describes something like * character of output sound - stereo sound, 2.1, 5.1 etc * * \param p_instance vlc instance * \param p_e an initialized exception pointer * \return the audio devices type \see libvlc_audio_output_device_types_t */VLC_PUBLIC_API int libvlc_audio_output_get_device_type( libvlc_instance_t *, libvlc_exception_t * );/** * Set current audio device type. * * \param p_instance vlc instance * \param device_type the audio device type, according to \see libvlc_audio_output_device_types_t * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_audio_output_set_device_type( libvlc_instance_t *, int, libvlc_exception_t * );/** * Toggle mute status. * * \param p_instance libvlc instance * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );/** * Get current mute status. * * \param p_instance libvlc instance * \param p_e an initialized exception pointer * \return the mute status (boolean) */VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -