| #define VLC_CONTROL_H 1 |
| typedef struct mediacontrol_Instance mediacontrol_Instance |
mediacontrol_Instance is an opaque structure, defined in mediacontrol_internal.h.
API users do not have to mess with it.
| typedef int WINDOWHANDLE |
| void mediacontrol_display_text | ( | mediacontrol_Instance * | self, | |
| const char * | message, | |||
| const mediacontrol_Position * | begin, | |||
| const mediacontrol_Position * | end, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Displays the message string, between "begin" and "end" positions.
| self | the mediacontrol instance | |
| message | the message to display | |
| begin | the begin position | |
| end | the end position | |
| exception | an initialized exception pointer |
References DEFAULT_CHAN, input_GetVout(), mediacontrol_Position::key, libvlc_exception_init(), libvlc_get_input_thread(), mdate(), mediacontrol_exception_init(), mediacontrol_InternalException, mediacontrol_MediaTime, mediacontrol_RelativePosition, mediacontrol_showtext(), mediacontrol_Position::origin, OSD_ALIGN_BOTTOM, OSD_ALIGN_LEFT, private_mediacontrol_position2microsecond(), private_mediacontrol_unit_convert(), RAISE_VOID, self, mediacontrol_Position::value, vlc_object_release, and vout_ShowTextAbsolute().
| void mediacontrol_exception_cleanup | ( | mediacontrol_Exception * | exception | ) |
Clean up an existing exception structure after use.
| p_exception | the exception to clean up. |
References mediacontrol_Exception::message.
Referenced by mediacontrol_exception_free().
| mediacontrol_Exception* mediacontrol_exception_create | ( | void | ) |
Instanciate and initialize an exception structure.
References mediacontrol_exception_init().
| void mediacontrol_exception_free | ( | mediacontrol_Exception * | exception | ) |
Free an exception structure created with mediacontrol_exception_create().
| p_exception | the exception to free. |
References mediacontrol_exception_cleanup().
| void mediacontrol_exception_init | ( | mediacontrol_Exception * | exception | ) |
Initialize an existing exception structure.
| p_exception | the exception to initialize. |
References mediacontrol_Exception::code, and mediacontrol_Exception::message.
Referenced by mediacontrol_display_text(), mediacontrol_exception_create(), mediacontrol_get_fullscreen(), mediacontrol_get_media_position(), mediacontrol_get_mrl(), mediacontrol_get_rate(), mediacontrol_new(), mediacontrol_pause(), mediacontrol_resume(), mediacontrol_set_fullscreen(), mediacontrol_set_media_position(), mediacontrol_set_mrl(), mediacontrol_set_rate(), mediacontrol_set_visual(), mediacontrol_snapshot(), mediacontrol_sound_get_volume(), mediacontrol_sound_set_volume(), mediacontrol_start(), and mediacontrol_stop().
| void mediacontrol_exit | ( | mediacontrol_Instance * | self | ) |
| int mediacontrol_get_fullscreen | ( | mediacontrol_Instance * | self, | |
| mediacontrol_Exception * | exception | |||
| ) |
Get current fullscreen status.
| self | the mediacontrol instance | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_ZERO, libvlc_exception_init(), libvlc_get_fullscreen(), mediacontrol_exception_init(), and self.
| libvlc_instance_t* mediacontrol_get_libvlc_instance | ( | mediacontrol_Instance * | self | ) |
Get the associated libvlc instance.
| self,: | the mediacontrol instance |
| libvlc_media_player_t* mediacontrol_get_media_player | ( | mediacontrol_Instance * | self | ) |
Get the associated libvlc_media_player.
| self,: | the mediacontrol instance |
| mediacontrol_Position* mediacontrol_get_media_position | ( | mediacontrol_Instance * | self, | |
| const mediacontrol_PositionOrigin | an_origin, | |||
| const mediacontrol_PositionKey | a_key, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Get the current position.
| self | the mediacontrol instance | |
| an_origin | the position origin | |
| a_key | the position unit | |
| exception | an initialized exception pointer |
References mediacontrol_Position::key, libvlc_exception_init(), libvlc_media_player_get_time(), mediacontrol_AbsolutePosition, mediacontrol_exception_init(), mediacontrol_MediaTime, mediacontrol_PositionOriginNotSupported, mediacontrol_Position::origin, private_mediacontrol_unit_convert(), RAISE_NULL, self, and mediacontrol_Position::value.
| char* mediacontrol_get_mrl | ( | mediacontrol_Instance * | self, | |
| mediacontrol_Exception * | exception | |||
| ) |
Get the MRL to be played.
| self | the mediacontrol instance | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_NULL, libvlc_exception_init(), libvlc_media_get_mrl(), libvlc_media_player_get_media(), mediacontrol_exception_init(), self, and strdup().
| int mediacontrol_get_rate | ( | mediacontrol_Instance * | self, | |
| mediacontrol_Exception * | exception | |||
| ) |
Get the current playing rate, in percent.
| self | the mediacontrol instance | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_ZERO, libvlc_exception_init(), libvlc_media_player_get_rate(), mediacontrol_exception_init(), and self.
| mediacontrol_StreamInformation* mediacontrol_get_stream_information | ( | mediacontrol_Instance * | self, | |
| mediacontrol_PositionKey | a_key, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Get information about a stream.
| self | the mediacontrol instance | |
| a_key | the time unit | |
| exception | an initialized exception pointer |
References mediacontrol_StreamInformation::length, libvlc_Buffering, libvlc_Ended, libvlc_errmsg(), libvlc_Error, libvlc_exception_clear(), libvlc_exception_init(), libvlc_exception_raised(), libvlc_media_get_mrl(), libvlc_media_player_get_length(), libvlc_media_player_get_media(), libvlc_media_player_get_state(), libvlc_media_player_get_time(), libvlc_NothingSpecial, libvlc_Opening, libvlc_Paused, libvlc_Playing, libvlc_Stopped, mediacontrol_BufferingStatus, mediacontrol_EndStatus, mediacontrol_ErrorStatus, mediacontrol_InitStatus, mediacontrol_InternalException, mediacontrol_PauseStatus, mediacontrol_PlayingStatus, mediacontrol_StopStatus, mediacontrol_UndefinedStatus, mediacontrol_StreamInformation::position, RAISE, self, strdup(), mediacontrol_StreamInformation::streamstatus, and mediacontrol_StreamInformation::url.
| mediacontrol_Instance* mediacontrol_new | ( | int | argc, | |
| char ** | argv, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Create a MediaControl instance with parameters.
| argc | the number of arguments | |
| argv | parameters | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_NULL, libvlc_exception_init(), libvlc_media_player_new(), libvlc_new(), mediacontrol_exception_init(), mediacontrol_InternalException, mediacontrol_Instance::p_instance, mediacontrol_Instance::p_media_player, and RAISE_NULL.
| mediacontrol_Instance* mediacontrol_new_from_instance | ( | libvlc_instance_t * | p_instance, | |
| mediacontrol_Exception * | exception | |||
| ) |
Create a MediaControl instance from an existing libvlc instance.
| p_instance | the libvlc instance | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_NULL, libvlc_exception_init(), libvlc_media_player_new(), mediacontrol_InternalException, mediacontrol_Instance::p_instance, mediacontrol_Instance::p_media_player, and RAISE_NULL.
| void mediacontrol_pause | ( | mediacontrol_Instance * | self, | |
| mediacontrol_Exception * | exception | |||
| ) |
Pause the movie at a given position.
| self | the mediacontrol instance | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_VOID, libvlc_exception_init(), libvlc_media_player_pause(), mediacontrol_exception_init(), and self.
| void mediacontrol_PlaylistSeq__free | ( | mediacontrol_PlaylistSeq * | ps | ) |
| void mediacontrol_resume | ( | mediacontrol_Instance * | self, | |
| mediacontrol_Exception * | exception | |||
| ) |
Resume the movie at a given position.
| self | the mediacontrol instance | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_VOID, libvlc_exception_init(), libvlc_media_player_pause(), mediacontrol_exception_init(), and self.
| void mediacontrol_RGBPicture__free | ( | mediacontrol_RGBPicture * | pic | ) |
Free a RGBPicture structure.
| pic,: | the RGBPicture structure |
References mediacontrol_RGBPicture::data.
| void mediacontrol_set_fullscreen | ( | mediacontrol_Instance * | self, | |
| const int | b_fullscreen, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Set fullscreen status.
| self | the mediacontrol instance | |
| b_fullscreen | the desired status | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_VOID, libvlc_exception_init(), libvlc_set_fullscreen(), mediacontrol_exception_init(), and self.
| void mediacontrol_set_media_position | ( | mediacontrol_Instance * | self, | |
| const mediacontrol_Position * | a_position, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Set the position.
| self | the mediacontrol instance | |
| a_position | a mediacontrol_Position | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_VOID, libvlc_exception_init(), libvlc_media_player_set_time(), mediacontrol_exception_init(), private_mediacontrol_position2microsecond(), and self.
| void mediacontrol_set_mrl | ( | mediacontrol_Instance * | self, | |
| const char * | psz_file, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Set the MRL to be played.
| self | the mediacontrol instance | |
| psz_file | the MRL | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_VOID, libvlc_exception_init(), libvlc_media_new(), libvlc_media_player_set_media(), mediacontrol_exception_init(), and self.
| void mediacontrol_set_rate | ( | mediacontrol_Instance * | self, | |
| const int | rate, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Set the playing rate, in percent.
| self | the mediacontrol instance | |
| rate | the desired rate | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_VOID, libvlc_exception_init(), libvlc_media_player_set_rate(), mediacontrol_exception_init(), and self.
| int mediacontrol_set_visual | ( | mediacontrol_Instance * | self, | |
| WINDOWHANDLE | visual_id, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Set the video output window.
| self | the mediacontrol instance | |
| visual_id | the Xid or HWND, depending on the platform | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_ZERO, libvlc_exception_init(), libvlc_media_player_set_hwnd(), libvlc_media_player_set_xwindow(), mediacontrol_exception_init(), and self.
| mediacontrol_RGBPicture* mediacontrol_snapshot | ( | mediacontrol_Instance * | self, | |
| const mediacontrol_Position * | a_position, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Get a snapshot.
| self | the mediacontrol instance | |
| a_position | the desired position (ignored for now) | |
| exception | an initialized exception pointer |
References block_Release(), block_t::i_buffer, video_format_t::i_chroma, video_format_t::i_height, block_t::i_pts, video_format_t::i_width, input_GetVout(), libvlc_exception_init(), libvlc_get_input_thread(), mediacontrol_exception_init(), mediacontrol_InternalException, block_t::p_buffer, private_mediacontrol_createRGBPicture(), RAISE_NULL, self, vlc_object_release, and vout_GetSnapshot().
| unsigned short mediacontrol_sound_get_volume | ( | mediacontrol_Instance * | self, | |
| mediacontrol_Exception * | exception | |||
| ) |
Get the current audio level, normalized in [0.
.100]
| self | the mediacontrol instance | |
| exception | an initialized exception pointer |
References libvlc_audio_get_volume(), mediacontrol_exception_init(), and self.
| void mediacontrol_sound_set_volume | ( | mediacontrol_Instance * | self, | |
| const unsigned short | volume, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Set the audio level.
| self | the mediacontrol instance | |
| volume | the volume (normalized in [0..100]) | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_VOID, libvlc_audio_set_volume(), libvlc_exception_init(), mediacontrol_exception_init(), and self.
| void mediacontrol_start | ( | mediacontrol_Instance * | self, | |
| const mediacontrol_Position * | a_position, | |||
| mediacontrol_Exception * | exception | |||
| ) |
Play the movie at a given position.
| self | the mediacontrol instance | |
| a_position | a mediacontrol_Position | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_VOID, libvlc_exception_init(), libvlc_media_add_option(), libvlc_media_get_mrl(), libvlc_media_new(), libvlc_media_player_get_media(), libvlc_media_player_play(), libvlc_media_player_set_media(), mediacontrol_exception_init(), mediacontrol_PlaylistException, private_mediacontrol_position2microsecond(), psz_name, RAISE, self, and mediacontrol_Position::value.
| void mediacontrol_stop | ( | mediacontrol_Instance * | self, | |
| mediacontrol_Exception * | exception | |||
| ) |
Stop the movie at a given position.
| self | the mediacontrol instance | |
| exception | an initialized exception pointer |
References HANDLE_LIBVLC_EXCEPTION_VOID, libvlc_exception_init(), libvlc_media_player_stop(), mediacontrol_exception_init(), and self.
| void mediacontrol_StreamInformation__free | ( | mediacontrol_StreamInformation * | p_si | ) |
Free a StreamInformation structure.
| pic,: | the StreamInformation structure |
References mediacontrol_StreamInformation::url.
1.5.6