QVisu
Qt-based visualization for smart homes
|
Modules | |
LibVLC video controls | |
LibVLC audio controls | |
Classes | |
struct | libvlc_track_description_t |
struct | libvlc_audio_output_t |
struct | libvlc_audio_output_device_t |
struct | libvlc_rectangle_t |
Typedefs | |
typedef struct libvlc_media_player_t | libvlc_media_player_t |
typedef struct libvlc_track_description_t | libvlc_track_description_t |
typedef struct libvlc_audio_output_t | libvlc_audio_output_t |
typedef struct libvlc_audio_output_device_t | libvlc_audio_output_device_t |
typedef struct libvlc_rectangle_t | libvlc_rectangle_t |
typedef enum libvlc_video_marquee_option_t | libvlc_video_marquee_option_t |
typedef enum libvlc_navigate_mode_t | libvlc_navigate_mode_t |
typedef enum libvlc_position_t | libvlc_position_t |
typedef void *(* | libvlc_video_lock_cb )(void *opaque, void **planes) |
typedef void(* | libvlc_video_unlock_cb )(void *opaque, void *picture, void *const *planes) |
typedef void(* | libvlc_video_display_cb )(void *opaque, void *picture) |
typedef unsigned(* | libvlc_video_format_cb )(void **opaque, char *chroma, unsigned *width, unsigned *height, unsigned *pitches, unsigned *lines) |
typedef void(* | libvlc_video_cleanup_cb )(void *opaque) |
typedef void(* | libvlc_audio_play_cb )(void *data, const void *samples, unsigned count, int64_t pts) |
typedef void(* | libvlc_audio_pause_cb )(void *data, int64_t pts) |
typedef void(* | libvlc_audio_resume_cb )(void *data, int64_t pts) |
typedef void(* | libvlc_audio_flush_cb )(void *data, int64_t pts) |
typedef void(* | libvlc_audio_drain_cb )(void *data) |
typedef void(* | libvlc_audio_set_volume_cb )(void *data, float volume, bool mute) |
typedef int(* | libvlc_audio_setup_cb )(void **data, char *format, unsigned *rate, unsigned *channels) |
typedef void(* | libvlc_audio_cleanup_cb )(void *data) |
Enumerations | |
enum | libvlc_video_marquee_option_t { libvlc_marquee_Enable = 0, libvlc_marquee_Text, libvlc_marquee_Color, libvlc_marquee_Opacity, libvlc_marquee_Position, libvlc_marquee_Refresh, libvlc_marquee_Size, libvlc_marquee_Timeout, libvlc_marquee_X, libvlc_marquee_Y } |
enum | libvlc_navigate_mode_t { libvlc_navigate_activate = 0, libvlc_navigate_up, libvlc_navigate_down, libvlc_navigate_left, libvlc_navigate_right } |
enum | libvlc_position_t { libvlc_position_disable =-1, libvlc_position_center, libvlc_position_left, libvlc_position_right, libvlc_position_top, libvlc_position_top_left, libvlc_position_top_right, libvlc_position_bottom, libvlc_position_bottom_left, libvlc_position_bottom_right } |
Functions | |
LIBVLC_API libvlc_media_player_t * | libvlc_media_player_new (libvlc_instance_t *p_libvlc_instance) |
LIBVLC_API libvlc_media_player_t * | libvlc_media_player_new_from_media (libvlc_media_t *p_md) |
LIBVLC_API void | libvlc_media_player_release (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_retain (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_set_media (libvlc_media_player_t *p_mi, libvlc_media_t *p_md) |
LIBVLC_API libvlc_media_t * | libvlc_media_player_get_media (libvlc_media_player_t *p_mi) |
LIBVLC_API libvlc_event_manager_t * | libvlc_media_player_event_manager (libvlc_media_player_t *p_mi) |
LIBVLC_API int | libvlc_media_player_is_playing (libvlc_media_player_t *p_mi) |
LIBVLC_API int | libvlc_media_player_play (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_set_pause (libvlc_media_player_t *mp, int do_pause) |
LIBVLC_API void | libvlc_media_player_pause (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_stop (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_video_set_callbacks (libvlc_media_player_t *mp, libvlc_video_lock_cb lock, libvlc_video_unlock_cb unlock, libvlc_video_display_cb display, void *opaque) |
LIBVLC_API void | libvlc_video_set_format (libvlc_media_player_t *mp, const char *chroma, unsigned width, unsigned height, unsigned pitch) |
LIBVLC_API void | libvlc_video_set_format_callbacks (libvlc_media_player_t *mp, libvlc_video_format_cb setup, libvlc_video_cleanup_cb cleanup) |
LIBVLC_API void | libvlc_media_player_set_nsobject (libvlc_media_player_t *p_mi, void *drawable) |
LIBVLC_API void * | libvlc_media_player_get_nsobject (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_set_agl (libvlc_media_player_t *p_mi, uint32_t drawable) |
LIBVLC_API uint32_t | libvlc_media_player_get_agl (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_set_xwindow (libvlc_media_player_t *p_mi, uint32_t drawable) |
LIBVLC_API uint32_t | libvlc_media_player_get_xwindow (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_set_hwnd (libvlc_media_player_t *p_mi, void *drawable) |
LIBVLC_API void * | libvlc_media_player_get_hwnd (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_audio_set_callbacks (libvlc_media_player_t *mp, libvlc_audio_play_cb play, libvlc_audio_pause_cb pause, libvlc_audio_resume_cb resume, libvlc_audio_flush_cb flush, libvlc_audio_drain_cb drain, void *opaque) |
LIBVLC_API void | libvlc_audio_set_volume_callback (libvlc_media_player_t *mp, libvlc_audio_set_volume_cb set_volume) |
LIBVLC_API void | libvlc_audio_set_format_callbacks (libvlc_media_player_t *mp, libvlc_audio_setup_cb setup, libvlc_audio_cleanup_cb cleanup) |
LIBVLC_API void | libvlc_audio_set_format (libvlc_media_player_t *mp, const char *format, unsigned rate, unsigned channels) |
LIBVLC_API libvlc_time_t | libvlc_media_player_get_length (libvlc_media_player_t *p_mi) |
LIBVLC_API libvlc_time_t | libvlc_media_player_get_time (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_set_time (libvlc_media_player_t *p_mi, libvlc_time_t i_time) |
LIBVLC_API float | libvlc_media_player_get_position (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_set_position (libvlc_media_player_t *p_mi, float f_pos) |
LIBVLC_API void | libvlc_media_player_set_chapter (libvlc_media_player_t *p_mi, int i_chapter) |
LIBVLC_API int | libvlc_media_player_get_chapter (libvlc_media_player_t *p_mi) |
LIBVLC_API int | libvlc_media_player_get_chapter_count (libvlc_media_player_t *p_mi) |
LIBVLC_API int | libvlc_media_player_will_play (libvlc_media_player_t *p_mi) |
LIBVLC_API int | libvlc_media_player_get_chapter_count_for_title (libvlc_media_player_t *p_mi, int i_title) |
LIBVLC_API void | libvlc_media_player_set_title (libvlc_media_player_t *p_mi, int i_title) |
LIBVLC_API int | libvlc_media_player_get_title (libvlc_media_player_t *p_mi) |
LIBVLC_API int | libvlc_media_player_get_title_count (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_previous_chapter (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_next_chapter (libvlc_media_player_t *p_mi) |
LIBVLC_API float | libvlc_media_player_get_rate (libvlc_media_player_t *p_mi) |
LIBVLC_API int | libvlc_media_player_set_rate (libvlc_media_player_t *p_mi, float rate) |
LIBVLC_API libvlc_state_t | libvlc_media_player_get_state (libvlc_media_player_t *p_mi) |
LIBVLC_API float | libvlc_media_player_get_fps (libvlc_media_player_t *p_mi) |
LIBVLC_API unsigned | libvlc_media_player_has_vout (libvlc_media_player_t *p_mi) |
LIBVLC_API int | libvlc_media_player_is_seekable (libvlc_media_player_t *p_mi) |
LIBVLC_API int | libvlc_media_player_can_pause (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_next_frame (libvlc_media_player_t *p_mi) |
LIBVLC_API void | libvlc_media_player_navigate (libvlc_media_player_t *p_mi, unsigned navigate) |
LIBVLC_API void | libvlc_media_player_set_video_title_display (libvlc_media_player_t *p_mi, libvlc_position_t position, unsigned int timeout) |
LIBVLC_API void | libvlc_track_description_list_release (libvlc_track_description_t *p_track_description) |
LIBVLC_DEPRECATED LIBVLC_API void | libvlc_track_description_release (libvlc_track_description_t *p_track_description) |
A LibVLC media player plays one media (usually in a custom drawable).
typedef void(* libvlc_audio_cleanup_cb)(void *data) |
Callback prototype for audio playback cleanup. This is called when the media player no longer needs an audio output.
opaque | data pointer as passed to libvlc_audio_set_callbacks() [IN] |
typedef void(* libvlc_audio_drain_cb)(void *data) |
Callback prototype for audio buffer drain (i.e. wait for pending buffers to be played).
data | data pointer as passed to libvlc_audio_set_callbacks() [IN] |
typedef void(* libvlc_audio_flush_cb)(void *data, int64_t pts) |
Callback prototype for audio buffer flush (i.e. discard all pending buffers and stop playback as soon as possible).
data | data pointer as passed to libvlc_audio_set_callbacks() [IN] |
typedef struct libvlc_audio_output_device_t libvlc_audio_output_device_t |
Description for audio output device.
typedef struct libvlc_audio_output_t libvlc_audio_output_t |
Description for audio output. It contains name, description and pointer to next record.
typedef void(* libvlc_audio_pause_cb)(void *data, int64_t pts) |
Callback prototype for audio pause.
data | data pointer as passed to libvlc_audio_set_callbacks() [IN] |
pts | time stamp of the pause request (should be elapsed already) |
typedef void(* libvlc_audio_play_cb)(void *data, const void *samples, unsigned count, int64_t pts) |
Callback prototype for audio playback.
data | data pointer as passed to libvlc_audio_set_callbacks() [IN] |
samples | pointer to the first audio sample to play back [IN] |
count | number of audio samples to play back |
pts | expected play time stamp (see libvlc_delay()) |
typedef void(* libvlc_audio_resume_cb)(void *data, int64_t pts) |
Callback prototype for audio resumption (i.e. restart from pause).
data | data pointer as passed to libvlc_audio_set_callbacks() [IN] |
pts | time stamp of the resumption request (should be elapsed already) |
typedef void(* libvlc_audio_set_volume_cb)(void *data, float volume, bool mute) |
Callback prototype for audio volume change.
data | data pointer as passed to libvlc_audio_set_callbacks() [IN] |
volume | software volume (1. = nominal, 0. = mute) |
mute | muted flag |
typedef int(* libvlc_audio_setup_cb)(void **data, char *format, unsigned *rate, unsigned *channels) |
Callback prototype to setup the audio playback. This is called when the media player needs to create a new audio output.
opaque | pointer to the data pointer passed to libvlc_audio_set_callbacks() [IN/OUT] |
format | 4 bytes sample format [IN/OUT] |
rate | sample rate [IN/OUT] |
channels | channels count [IN/OUT] |
typedef enum libvlc_navigate_mode_t libvlc_navigate_mode_t |
Navigation mode
typedef enum libvlc_position_t libvlc_position_t |
Enumeration of values used to set position (e.g. of video title).
typedef struct libvlc_rectangle_t libvlc_rectangle_t |
Rectangle type for video geometry
typedef struct libvlc_track_description_t libvlc_track_description_t |
Description for video, audio tracks and subtitles. It contains id, name (description string) and pointer to next record.
typedef void(* libvlc_video_cleanup_cb)(void *opaque) |
Callback prototype to configure picture buffers format.
opaque | private pointer as passed to libvlc_video_set_callbacks() (and possibly modified by libvlc_video_format_cb) [IN] |
typedef void(* libvlc_video_display_cb)(void *opaque, void *picture) |
Callback prototype to display a picture.
When the video frame needs to be shown, as determined by the media playback clock, the display callback is invoked.
opaque | private pointer as passed to libvlc_video_set_callbacks() [IN] |
picture | private pointer returned from the libvlc_video_lock_cb callback [IN] |
typedef unsigned(* libvlc_video_format_cb)(void **opaque, char *chroma, unsigned *width, unsigned *height, unsigned *pitches, unsigned *lines) |
Callback prototype to configure picture buffers format. This callback gets the format of the video as output by the video decoder and the chain of video filters (if any). It can opt to change any parameter as it needs. In that case, LibVLC will attempt to convert the video format (rescaling and chroma conversion) but these operations can be CPU intensive.
opaque | pointer to the private pointer passed to libvlc_video_set_callbacks() [IN/OUT] |
chroma | pointer to the 4 bytes video format identifier [IN/OUT] |
width | pointer to the pixel width [IN/OUT] |
height | pointer to the pixel height [IN/OUT] |
pitches | table of scanline pitches in bytes for each pixel plane (the table is allocated by LibVLC) [OUT] |
lines | table of scanlines count for each plane [OUT] |
typedef void*(* libvlc_video_lock_cb)(void *opaque, void **planes) |
Callback prototype to allocate and lock a picture buffer.
Whenever a new video frame needs to be decoded, the lock callback is invoked. Depending on the video chroma, one or three pixel planes of adequate dimensions must be returned via the second parameter. Those planes must be aligned on 32-bytes boundaries.
opaque | private pointer as passed to libvlc_video_set_callbacks() [IN] |
planes | start address of the pixel planes (LibVLC allocates the array of void pointers, this callback must initialize the array) [OUT] |
Marq options definition
typedef void(* libvlc_video_unlock_cb)(void *opaque, void *picture, void *const *planes) |
Callback prototype to unlock a picture buffer.
When the video frame decoding is complete, the unlock callback is invoked. This callback might not be needed at all. It is only an indication that the application can now read the pixel values if it needs to.
opaque | private pointer as passed to libvlc_video_set_callbacks() [IN] |
picture | private pointer returned from the libvlc_video_lock_cb callback [IN] |
planes | pixel planes as defined by the libvlc_video_lock_cb callback (this parameter is only for convenience) [IN] |
Navigation mode
enum libvlc_position_t |
Enumeration of values used to set position (e.g. of video title).
LIBVLC_API void libvlc_audio_set_callbacks | ( | libvlc_media_player_t * | mp, |
libvlc_audio_play_cb | play, | ||
libvlc_audio_pause_cb | pause, | ||
libvlc_audio_resume_cb | resume, | ||
libvlc_audio_flush_cb | flush, | ||
libvlc_audio_drain_cb | drain, | ||
void * | opaque | ||
) |
Set callbacks and private data for decoded audio. Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks() to configure the decoded audio format.
mp | the media player |
play | callback to play audio samples (must not be NULL) |
pause | callback to pause playback (or NULL to ignore) |
resume | callback to resume playback (or NULL to ignore) |
flush | callback to flush audio buffers (or NULL to ignore) |
drain | callback to drain audio buffers (or NULL to ignore) |
opaque | private pointer for the audio callbacks (as first parameter) |
LIBVLC_API void libvlc_audio_set_format | ( | libvlc_media_player_t * | mp, |
const char * | format, | ||
unsigned | rate, | ||
unsigned | channels | ||
) |
Set decoded audio format. This only works in combination with libvlc_audio_set_callbacks(), and is mutually exclusive with libvlc_audio_set_format_callbacks().
mp | the media player |
format | a four-characters string identifying the sample format (e.g. "S16N" or "FL32") |
rate | sample rate (expressed in Hz) |
channels | channels count |
LIBVLC_API void libvlc_audio_set_format_callbacks | ( | libvlc_media_player_t * | mp, |
libvlc_audio_setup_cb | setup, | ||
libvlc_audio_cleanup_cb | cleanup | ||
) |
Set decoded audio format. This only works in combination with libvlc_audio_set_callbacks().
mp | the media player |
setup | callback to select the audio format (cannot be NULL) |
cleanup | callback to release any allocated resources (or NULL) |
LIBVLC_API void libvlc_audio_set_volume_callback | ( | libvlc_media_player_t * | mp, |
libvlc_audio_set_volume_cb | set_volume | ||
) |
Set callbacks and private data for decoded audio. Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks() to configure the decoded audio format.
mp | the media player |
set_volume | callback to apply audio volume, or NULL to apply volume in software |
LIBVLC_API int libvlc_media_player_can_pause | ( | libvlc_media_player_t * | p_mi | ) |
Can this media player be paused?
p_mi | the media player |
LIBVLC_API libvlc_event_manager_t* libvlc_media_player_event_manager | ( | libvlc_media_player_t * | p_mi | ) |
Get the Event Manager from which the media player send event.
p_mi | the Media Player |
LIBVLC_API uint32_t libvlc_media_player_get_agl | ( | libvlc_media_player_t * | p_mi | ) |
Get the agl handler previously set with libvlc_media_player_set_agl().
p_mi | the Media Player |
LIBVLC_API int libvlc_media_player_get_chapter | ( | libvlc_media_player_t * | p_mi | ) |
Get movie chapter.
p_mi | the Media Player |
LIBVLC_API int libvlc_media_player_get_chapter_count | ( | libvlc_media_player_t * | p_mi | ) |
Get movie chapter count
p_mi | the Media Player |
LIBVLC_API int libvlc_media_player_get_chapter_count_for_title | ( | libvlc_media_player_t * | p_mi, |
int | i_title | ||
) |
Get title chapter count
p_mi | the Media Player |
i_title | title |
LIBVLC_API float libvlc_media_player_get_fps | ( | libvlc_media_player_t * | p_mi | ) |
Get movie fps rate
p_mi | the Media Player |
LIBVLC_API void* libvlc_media_player_get_hwnd | ( | libvlc_media_player_t * | p_mi | ) |
Get the Windows API window handle (HWND) previously set with libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC is not currently outputting any video to it.
p_mi | the Media Player |
LIBVLC_API libvlc_time_t libvlc_media_player_get_length | ( | libvlc_media_player_t * | p_mi | ) |
Get the current movie length (in ms).
p_mi | the Media Player |
LIBVLC_API libvlc_media_t* libvlc_media_player_get_media | ( | libvlc_media_player_t * | p_mi | ) |
Get the media used by the media_player.
p_mi | the Media Player |
LIBVLC_API void* libvlc_media_player_get_nsobject | ( | libvlc_media_player_t * | p_mi | ) |
Get the NSView handler previously set with libvlc_media_player_set_nsobject().
p_mi | the Media Player |
LIBVLC_API float libvlc_media_player_get_position | ( | libvlc_media_player_t * | p_mi | ) |
Get movie position as percentage between 0.0 and 1.0.
p_mi | the Media Player |
LIBVLC_API float libvlc_media_player_get_rate | ( | libvlc_media_player_t * | p_mi | ) |
Get the requested movie play rate.
p_mi | the Media Player |
LIBVLC_API libvlc_state_t libvlc_media_player_get_state | ( | libvlc_media_player_t * | p_mi | ) |
Get current movie state
p_mi | the Media Player |
LIBVLC_API libvlc_time_t libvlc_media_player_get_time | ( | libvlc_media_player_t * | p_mi | ) |
Get the current movie time (in ms).
p_mi | the Media Player |
LIBVLC_API int libvlc_media_player_get_title | ( | libvlc_media_player_t * | p_mi | ) |
Get movie title
p_mi | the Media Player |
LIBVLC_API int libvlc_media_player_get_title_count | ( | libvlc_media_player_t * | p_mi | ) |
Get movie title count
p_mi | the Media Player |
LIBVLC_API uint32_t libvlc_media_player_get_xwindow | ( | libvlc_media_player_t * | p_mi | ) |
Get the X Window System window identifier previously set with libvlc_media_player_set_xwindow(). Note that this will return the identifier even if VLC is not currently using it (for instance if it is playing an audio-only input).
p_mi | the Media Player |
LIBVLC_API unsigned libvlc_media_player_has_vout | ( | libvlc_media_player_t * | p_mi | ) |
end bug How many video outputs does this media player have?
p_mi | the media player |
LIBVLC_API int libvlc_media_player_is_playing | ( | libvlc_media_player_t * | p_mi | ) |
is_playing
p_mi | the Media Player |
LIBVLC_API int libvlc_media_player_is_seekable | ( | libvlc_media_player_t * | p_mi | ) |
Is this media player seekable?
p_mi | the media player |
LIBVLC_API void libvlc_media_player_navigate | ( | libvlc_media_player_t * | p_mi, |
unsigned | navigate | ||
) |
Navigate through DVD Menu
p_mi | the Media Player |
navigate | the Navigation mode |
LIBVLC_API libvlc_media_player_t* libvlc_media_player_new | ( | libvlc_instance_t * | p_libvlc_instance | ) |
Create an empty Media Player object
p_libvlc_instance | the libvlc instance in which the Media Player should be created. |
LIBVLC_API libvlc_media_player_t* libvlc_media_player_new_from_media | ( | libvlc_media_t * | p_md | ) |
Create a Media Player object from a Media
p_md | the media. Afterwards the p_md can be safely destroyed. |
LIBVLC_API void libvlc_media_player_next_chapter | ( | libvlc_media_player_t * | p_mi | ) |
Set next chapter (if applicable)
p_mi | the Media Player |
LIBVLC_API void libvlc_media_player_next_frame | ( | libvlc_media_player_t * | p_mi | ) |
Display the next frame (if supported)
p_mi | the media player |
LIBVLC_API void libvlc_media_player_pause | ( | libvlc_media_player_t * | p_mi | ) |
Toggle pause (no effect if there is no media)
p_mi | the Media Player |
LIBVLC_API int libvlc_media_player_play | ( | libvlc_media_player_t * | p_mi | ) |
Play
p_mi | the Media Player |
LIBVLC_API void libvlc_media_player_previous_chapter | ( | libvlc_media_player_t * | p_mi | ) |
Set previous chapter (if applicable)
p_mi | the Media Player |
LIBVLC_API void libvlc_media_player_release | ( | libvlc_media_player_t * | p_mi | ) |
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.
p_mi | the Media Player to free |
LIBVLC_API void libvlc_media_player_retain | ( | libvlc_media_player_t * | p_mi | ) |
Retain a reference to a media player object. Use libvlc_media_player_release() to decrement reference count.
p_mi | media player object |
LIBVLC_API void libvlc_media_player_set_agl | ( | libvlc_media_player_t * | p_mi, |
uint32_t | drawable | ||
) |
Set the agl handler where the media player should render its video output.
p_mi | the Media Player |
drawable | the agl handler |
LIBVLC_API void libvlc_media_player_set_chapter | ( | libvlc_media_player_t * | p_mi, |
int | i_chapter | ||
) |
Set movie chapter (if applicable).
p_mi | the Media Player |
i_chapter | chapter number to play |
LIBVLC_API void libvlc_media_player_set_hwnd | ( | libvlc_media_player_t * | p_mi, |
void * | drawable | ||
) |
Set a Win32/Win64 API window handle (HWND) where the media player should render its video output. If LibVLC was built without Win32/Win64 API output support, then this has no effects.
p_mi | the Media Player |
drawable | windows handle of the drawable |
LIBVLC_API void libvlc_media_player_set_media | ( | libvlc_media_player_t * | p_mi, |
libvlc_media_t * | p_md | ||
) |
Set the media that will be used by the media_player. If any, previous md will be released.
p_mi | the Media Player |
p_md | the Media. Afterwards the p_md can be safely destroyed. |
LIBVLC_API void libvlc_media_player_set_nsobject | ( | libvlc_media_player_t * | p_mi, |
void * | drawable | ||
) |
Set the NSView handler where the media player should render its video output.
Use the vout called "macosx".
The drawable is an NSObject that follow the VLCOpenGLVideoViewEmbedding protocol:
@protocol VLCOpenGLVideoViewEmbedding <NSObject>
Or it can be an NSView object.
If you want to use it along with Qt4 see the QMacCocoaViewContainer. Then the following code should work: { NSView *video = [[NSView alloc] init]; QMacCocoaViewContainer *container = new QMacCocoaViewContainer(video, parent); libvlc_media_player_set_nsobject(mp, video); [video release]; }
You can find a live example in VLCVideoView in VLCKit.framework.
p_mi | the Media Player |
drawable | the drawable that is either an NSView or an object following the VLCOpenGLVideoViewEmbedding protocol. |
LIBVLC_API void libvlc_media_player_set_pause | ( | libvlc_media_player_t * | mp, |
int | do_pause | ||
) |
Pause or resume (no effect if there is no media)
mp | the Media Player |
do_pause | play/resume if zero, pause if non-zero |
LIBVLC_API void libvlc_media_player_set_position | ( | libvlc_media_player_t * | p_mi, |
float | f_pos | ||
) |
Set movie position as percentage between 0.0 and 1.0. This has no effect if playback is not enabled. This might not work depending on the underlying input format and protocol.
p_mi | the Media Player |
f_pos | the position |
LIBVLC_API int libvlc_media_player_set_rate | ( | libvlc_media_player_t * | p_mi, |
float | rate | ||
) |
Set movie play rate
p_mi | the Media Player |
rate | movie play rate to set |
LIBVLC_API void libvlc_media_player_set_time | ( | libvlc_media_player_t * | p_mi, |
libvlc_time_t | i_time | ||
) |
Set the movie time (in ms). This has no effect if no media is being played. Not all formats and protocols support this.
p_mi | the Media Player |
i_time | the movie time (in ms). |
LIBVLC_API void libvlc_media_player_set_title | ( | libvlc_media_player_t * | p_mi, |
int | i_title | ||
) |
Set movie title
p_mi | the Media Player |
i_title | title number to play |
LIBVLC_API void libvlc_media_player_set_video_title_display | ( | libvlc_media_player_t * | p_mi, |
libvlc_position_t | position, | ||
unsigned int | timeout | ||
) |
Set if, and how, the video title will be shown when media is played.
p_mi | the media player |
position | position at which to display the title, or libvlc_position_disable to prevent the title from being displayed |
timeout | title display timeout in milliseconds (ignored if libvlc_position_disable) |
LIBVLC_API void libvlc_media_player_set_xwindow | ( | libvlc_media_player_t * | p_mi, |
uint32_t | drawable | ||
) |
Set an X Window System drawable where the media player should render its video output. If LibVLC was built without X11 output support, then this has no effects.
The specified identifier must correspond to an existing Input/Output class X11 window. Pixmaps are not supported. The caller shall ensure that the X11 server is the same as the one the VLC instance has been configured with. This function must be called before video playback is started; otherwise it will only take effect after playback stop and restart.
p_mi | the Media Player |
drawable | the ID of the X window |
LIBVLC_API void libvlc_media_player_stop | ( | libvlc_media_player_t * | p_mi | ) |
Stop (no effect if there is no media)
p_mi | the Media Player |
LIBVLC_API int libvlc_media_player_will_play | ( | libvlc_media_player_t * | p_mi | ) |
Is the player able to play
p_mi | the Media Player |
LIBVLC_API void libvlc_track_description_list_release | ( | libvlc_track_description_t * | p_track_description | ) |
Release (free) libvlc_track_description_t
p_track_description | the structure to release |
LIBVLC_DEPRECATED LIBVLC_API void libvlc_track_description_release | ( | libvlc_track_description_t * | p_track_description | ) |
LIBVLC_API void libvlc_video_set_callbacks | ( | libvlc_media_player_t * | mp, |
libvlc_video_lock_cb | lock, | ||
libvlc_video_unlock_cb | unlock, | ||
libvlc_video_display_cb | display, | ||
void * | opaque | ||
) |
Set callbacks and private data to render decoded video to a custom area in memory. Use libvlc_video_set_format() or libvlc_video_set_format_callbacks() to configure the decoded format.
mp | the media player |
lock | callback to lock video memory (must not be NULL) |
unlock | callback to unlock video memory (or NULL if not needed) |
display | callback to display video (or NULL if not needed) |
opaque | private pointer for the three callbacks (as first parameter) |
LIBVLC_API void libvlc_video_set_format | ( | libvlc_media_player_t * | mp, |
const char * | chroma, | ||
unsigned | width, | ||
unsigned | height, | ||
unsigned | pitch | ||
) |
Set decoded video chroma and dimensions. This only works in combination with libvlc_video_set_callbacks(), and is mutually exclusive with libvlc_video_set_format_callbacks().
mp | the media player |
chroma | a four-characters string identifying the chroma (e.g. "RV32" or "YUYV") |
width | pixel width |
height | pixel height |
pitch | line pitch (in bytes) |
LIBVLC_API void libvlc_video_set_format_callbacks | ( | libvlc_media_player_t * | mp, |
libvlc_video_format_cb | setup, | ||
libvlc_video_cleanup_cb | cleanup | ||
) |
Set decoded video chroma and dimensions. This only works in combination with libvlc_video_set_callbacks().
mp | the media player |
setup | callback to select the video format (cannot be NULL) |
cleanup | callback to release any allocated resources (or NULL) |