📄 libvlc.h
字号:
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 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 );/** \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 * );/** * 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 * );/** * 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 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 * );/** * 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 * );/**
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -