📄 libvlc.h
字号:
*/VLC_PUBLIC_API void libvlc_media_set_user_data( libvlc_media_t * p_md, void * p_new_user_data, libvlc_exception_t * p_e);/** * Get media descriptor's user_data. user_data is specialized data * accessed by the host application, VLC.framework uses it as a pointer to * an native object that references a libvlc_media_t pointer * * \param p_md media descriptor object * \param p_e an initialized exception object */VLC_PUBLIC_API void * libvlc_media_get_user_data( libvlc_media_t * p_md, libvlc_exception_t * p_e);/** @}*//***************************************************************************** * Media Player *****************************************************************************//** \defgroup libvlc_media_player libvlc_media_player * \ingroup libvlc * LibVLC Media Player, object that let you play a media * in a libvlc_drawable_t * @{ *//** * Create an empty Media Player object * * \param p_libvlc_instance the libvlc instance in which the Media Player * should be created. * \param p_e an initialized exception pointer */VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *, libvlc_exception_t * );/** * Create a Media Player object from a Media * * \param p_md the media. Afterwards the p_md can be safely * destroyed. * \param p_e an initialized exception pointer */VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_media_t *, libvlc_exception_t * );/** * Release a media_player after use * Decrement the reference count of a media player object. If the * reference count is 0, then libvlc_media_player_release() will * release the media player object. If the media player object * has been released, then it should not be used again. * * \param p_mi the Media Player to free */VLC_PUBLIC_API void libvlc_media_player_release( libvlc_media_player_t * );/** * Retain a reference to a media player object. Use * libvlc_media_player_release() to decrement reference count. * * \param p_mi media player object */VLC_PUBLIC_API void libvlc_media_player_retain( libvlc_media_player_t * );/** * Set the media that will be used by the media_player. If any, * previous md will be released. * * \param p_mi the Media Player * \param p_md the Media. Afterwards the p_md can be safely * destroyed. * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_media_player_set_media( libvlc_media_player_t *, libvlc_media_t *, libvlc_exception_t * );/** * Get the media used by the media_player. * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return the media associated with p_mi, or NULL if no * media is associated */VLC_PUBLIC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *, libvlc_exception_t * );/** * Get the Event Manager from which the media player send event. * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return the event manager associated with p_mi */VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *, libvlc_exception_t * );/** * Play * * \param p_mi the Media Player * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_media_player_play ( libvlc_media_player_t *, libvlc_exception_t * );/** * Pause * * \param p_mi the Media Player * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_media_player_pause ( libvlc_media_player_t *, libvlc_exception_t * );/** * Stop * * \param p_mi the Media Player * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *, libvlc_exception_t * );/** * Set the drawable where the media player should render its video output * * \param p_mi the Media Player * \param drawable the libvlc_drawable_t where the media player * should render its video * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_media_player_set_drawable ( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );/** * Get the drawable where the media player should render its video output * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return the libvlc_drawable_t where the media player * should render its video */VLC_PUBLIC_API libvlc_drawable_t libvlc_media_player_get_drawable ( libvlc_media_player_t *, libvlc_exception_t * );/** \bug This might go away ... to be replaced by a broader system *//** * Get the current movie length (in ms). * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return the movie length (in ms). */VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_length( libvlc_media_player_t *, libvlc_exception_t *);/** * Get the current movie time (in ms). * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return the movie time (in ms). */VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_time( libvlc_media_player_t *, libvlc_exception_t *);/** * Set the movie time (in ms). * * \param p_mi the Media Player * \param the movie time (in ms). * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_media_player_set_time( libvlc_media_player_t *, libvlc_time_t, libvlc_exception_t *);/** * Get movie position. * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return movie position */VLC_PUBLIC_API float libvlc_media_player_get_position( libvlc_media_player_t *, libvlc_exception_t *);/** * Set movie position. * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return movie position */VLC_PUBLIC_API void libvlc_media_player_set_position( libvlc_media_player_t *, float, libvlc_exception_t *);/** * Set movie chapter * * \param p_mi the Media Player * \param i_chapter chapter number to play * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_media_player_set_chapter( libvlc_media_player_t *, int, libvlc_exception_t *);/** * Get movie chapter * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return chapter number currently playing */VLC_PUBLIC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *, libvlc_exception_t * );/** * Get movie chapter count * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return number of chapters in movie */VLC_PUBLIC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *, libvlc_exception_t *);VLC_PUBLIC_API int libvlc_media_player_will_play ( libvlc_media_player_t *, libvlc_exception_t *);/** * Get title chapter count * * \param p_mi the Media Player * \param i_title title * \param p_e an initialized exception pointer * \return number of chapters in title */VLC_PUBLIC_API int libvlc_media_player_get_chapter_count_for_title( libvlc_media_player_t *, int, libvlc_exception_t *);/** * Set movie title * * \param p_mi the Media Player * \param i_title title number to play * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_media_player_set_title( libvlc_media_player_t *, int, libvlc_exception_t *);/** * Get movie title * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return title number currently playing */VLC_PUBLIC_API int libvlc_media_player_get_title( libvlc_media_player_t *, libvlc_exception_t *);/** * Get movie title count * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return title number count */VLC_PUBLIC_API int libvlc_media_player_get_title_count( libvlc_media_player_t *, libvlc_exception_t *);/** * Set previous chapter * * \param p_mi the Media Player * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_media_player_previous_chapter( libvlc_media_player_t *, libvlc_exception_t *);/** * Set next chapter * * \param p_mi the Media Player * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_media_player_next_chapter( libvlc_media_player_t *, libvlc_exception_t *);/** * Get movie play rate * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return movie play rate */VLC_PUBLIC_API float libvlc_media_player_get_rate( libvlc_media_player_t *, libvlc_exception_t *);/** * Set movie play rate * * \param p_mi the Media Player * \param movie play rate to set * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_media_player_set_rate( libvlc_media_player_t *, float, libvlc_exception_t *);/** * Get current movie state * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return current movie state as libvlc_state_t */VLC_PUBLIC_API libvlc_state_t libvlc_media_player_get_state( libvlc_media_player_t *, libvlc_exception_t *);/** * Get movie fps rate * * \param p_mi the Media Player * \param p_e an initialized exception pointer * \return frames per second (fps) for this playing movie */VLC_PUBLIC_API float libvlc_media_player_get_fps( libvlc_media_player_t *, libvlc_exception_t *);/** end bug *//** * Does this media player have a video output? * * \param p_md the media player * \param p_e an initialized exception pointer */VLC_PUBLIC_API int libvlc_media_player_has_vout( libvlc_media_player_t *, libvlc_exception_t *);/** * Is this media player seekable? * * \param p_input the input * \param p_e an initialized exception pointer */VLC_PUBLIC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );/** * Can this media player be paused? * * \param p_input the input * \param p_e an initialized exception pointer */VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );/** * Release (free) libvlc_track_description_t * * \param p_track_description the structure to release */VLC_PUBLIC_API void libvlc_track_description_release( libvlc_track_description_t *p_track_description );/** \defgroup libvlc_video libvlc_video * \ingroup libvlc_media_player * LibVLC Video handling * @{ *//** * Toggle fullscreen status on video output. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );/** * Enable or disable fullscreen on a video output. * * \param p_mediaplayer the media player * \param b_fullscreen boolean for fullscreen status * \param p_e an initialized exception pointer */VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );/** * Get current fullscreen status. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer * \return the fullscreen status (boolean) */VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );/** * Get current video height. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer * \return the video height */VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );/** * Get current video width. * * \param p_mediaplayer the media player * \param p_e an initialized exception pointer * \return the video width */VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -