
Data Structures | |
| struct | intf_sys_t |
| Per-interface private state. More... | |
Defines | |
| #define | MAX_LINE_LENGTH 1024 |
| #define | STATUS_CHANGE "status change: " |
| #define | msg_rc(...) __msg_rc( p_intf, __VA_ARGS__ ) |
| #define | POS_TEXT N_("Show stream position") |
| #define | POS_LONGTEXT |
| #define | TTY_TEXT N_("Fake TTY") |
| #define | TTY_LONGTEXT N_("Force the rc module to use stdin as if it was a TTY.") |
| #define | UNIX_TEXT N_("UNIX socket command input") |
| #define | UNIX_LONGTEXT |
| #define | HOST_TEXT N_("TCP command input") |
| #define | HOST_LONGTEXT |
| #define | ADD(name, type, target) |
| #define | SKIPSPACE(p) { while( *p == ' ' || *p == '\t' ) p++; } |
| #define | SKIPTRAILINGSPACE(p, d) { char *e=d; while( e > p && (*(e-1)==' ' || *(e-1)=='\t') ){e--;*e=0;} } |
Functions | |
| static int | Activate (vlc_object_t *) |
| static void | Deactivate (vlc_object_t *) |
| static void | Run (intf_thread_t *) |
| static void | Help (intf_thread_t *, bool) |
| static void | RegisterCallbacks (intf_thread_t *) |
| static bool | ReadCommand (intf_thread_t *, char *, int *) |
| static input_item_t * | parse_MRL (intf_thread_t *, char *) |
| static int | Input (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static int | Playlist (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static int | Quit (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static int | Intf (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static int | Volume (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static int | VolumeMove (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static int | VideoConfig (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static int | AudioConfig (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static int | Menu (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static int | Statistics (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static int | updateStatistics (intf_thread_t *, input_item_t *) |
| static int | VolumeChanged (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static int | InputEvent (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| static void | __msg_rc (intf_thread_t *p_intf, const char *psz_fmt,...) |
| int | vlc_entry__main (module_t *p_module) |
| const char * | vlc_entry_license__main (void) |
| static void | StateChanged (intf_thread_t *p_intf, input_thread_t *p_input) |
| static void | RateChanged (intf_thread_t *p_intf, input_thread_t *p_input) |
| static void | PositionChanged (intf_thread_t *p_intf, input_thread_t *p_input) |
| static void | CacheChanged (intf_thread_t *p_intf) |
| static void | print_playlist (intf_thread_t *p_intf, playlist_item_t *p_item, int i_level) |
Variables | |
| static const char * | ppsz_input_state [] |
| #define ADD | ( | name, | |||
| type, | |||||
| target | ) |
Value:
var_Create( p_intf, name, VLC_VAR_ ## type | VLC_VAR_ISCOMMAND ); \ var_AddCallback( p_intf, name, target, NULL );
Referenced by RegisterCallbacks().
| #define HOST_LONGTEXT |
Value:
N_("Accept commands over a socket rather than stdin. " \ "You can set the address and port the interface will bind to." )
| #define HOST_TEXT N_("TCP command input") |
| #define MAX_LINE_LENGTH 1024 |
Referenced by ReadCommand(), and Run().
| #define msg_rc | ( | ... | ) | __msg_rc( p_intf, __VA_ARGS__ ) |
Referenced by Activate(), AudioConfig(), Help(), Input(), Menu(), Playlist(), PositionChanged(), print_playlist(), RateChanged(), Run(), StateChanged(), updateStatistics(), VideoConfig(), Volume(), VolumeChanged(), and VolumeMove().
| #define POS_LONGTEXT |
Value:
N_("Show the current position in seconds within the " \ "stream from time to time." )
| #define POS_TEXT N_("Show stream position") |
| #define SKIPSPACE | ( | p | ) | { while( *p == ' ' || *p == '\t' ) p++; } |
| #define SKIPTRAILINGSPACE | ( | p, | |||
| d | ) | { char *e=d; while( e > p && (*(e-1)==' ' || *(e-1)=='\t') ){e--;*e=0;} } |
| #define STATUS_CHANGE "status change: " |
Referenced by Playlist(), PositionChanged(), RateChanged(), Run(), StateChanged(), Volume(), VolumeChanged(), and VolumeMove().
| #define TTY_LONGTEXT N_("Force the rc module to use stdin as if it was a TTY.") |
| #define TTY_TEXT N_("Fake TTY") |
| #define UNIX_LONGTEXT |
Value:
N_("Accept commands over a Unix socket rather than " \ "stdin." )
| #define UNIX_TEXT N_("UNIX socket command input") |
| static void __msg_rc | ( | intf_thread_t * | p_intf, | |
| const char * | psz_fmt, | |||
| ... | ||||
| ) | [static] |
References net_vaPrintf, and utf8_vfprintf().
| static int Activate | ( | vlc_object_t * | p_this | ) | [static] |
References _, intf_sys_t::b_input_buffering, CONSOLE_INTRO_MSG, intf_sys_t::i_last_state, vlc_url_t::i_port, intf_sys_t::i_socket, msg_Dbg, msg_Err, msg_Info, msg_rc, msg_Warn, net_Close, net_ListenTCP, intf_thread_t::p_sys, intf_thread_t::pf_run, intf_sys_t::pi_socket_listen, PLAYLIST_STOPPED, vlc_url_t::psz_host, intf_sys_t::psz_unix_path, Run(), intf_sys_t::status_lock, var_InheritInteger, var_InheritString, VLC_EGENERIC, VLC_ENOMEM, vlc_mutex_init(), VLC_SUCCESS, vlc_UrlClean(), and vlc_UrlParse().
| static int AudioConfig | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References _, i, vlc_list_t::i_count, vlc_value_t::i_int, i_value, input_GetAout(), msg_rc, vlc_value_t::p_list, intf_sys_t::p_playlist, intf_thread_t::p_sys, vlc_list_t::p_values, PAUSE_S, playlist_CurrentInput(), vlc_value_t::psz_string, strdup(), text, var_Change, var_FreeList(), var_Get, var_GetInteger, var_Set, VLC_EGENERIC, VLC_ENOOBJ, vlc_object_release, VLC_SUCCESS, VLC_UNUSED, VLC_VAR_GETLIST, and VLC_VAR_GETTEXT.
Referenced by RegisterCallbacks().
| static void CacheChanged | ( | intf_thread_t * | p_intf | ) | [static] |
References intf_sys_t::b_input_buffering, intf_thread_t::p_sys, intf_sys_t::status_lock, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by InputEvent().
| static void Deactivate | ( | vlc_object_t * | p_this | ) | [static] |
References intf_sys_t::i_socket, net_Close, net_ListenClose(), intf_thread_t::p_sys, intf_sys_t::pi_socket_listen, intf_sys_t::psz_unix_path, intf_sys_t::status_lock, and vlc_mutex_destroy().
Referenced by Activate(), Close_Extension(), Control(), Run(), and vlclua_extension_deactivate().
| static void Help | ( | intf_thread_t * | p_intf, | |
| bool | b_longhelp | |||
| ) | [static] |
| static int Input | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References _, ACTIONID_JUMP_BACKWARD_EXTRASHORT, ACTIONID_JUMP_FORWARD_EXTRASHORT, atof(), CLOCK_FREQ, i, vlc_list_t::i_count, vlc_value_t::i_int, i_value, INPUT_RATE_DEFAULT, msg_rc, intf_thread_t::p_libvlc, vlc_value_t::p_list, intf_sys_t::p_playlist, intf_thread_t::p_sys, vlc_list_t::p_values, PAUSE_S, playlist_CurrentInput(), playlist_Pause, vlc_value_t::psz_string, strdup(), text, var_Change, var_CountChoices, var_FreeList(), var_Get, var_GetBool, var_GetFloat, var_GetInteger, var_SetFloat, var_SetInteger, var_SetTime, var_TriggerCallback, VLC_EGENERIC, VLC_ENOOBJ, vlc_object_release, VLC_SUCCESS, VLC_UNUSED, VLC_VAR_GETLIST, and VLC_VAR_GETTEXT.
Referenced by RegisterCallbacks().
| static int InputEvent | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
| static int Intf | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References intf_Create, vlc_object_t::p_libvlc, vlc_value_t::psz_string, and VLC_UNUSED.
Referenced by RegisterCallbacks().
| static int Menu | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References _, vlc_value_t::i_int, msg_rc, osd_MenuActivate, osd_MenuDown, osd_MenuHide, osd_MenuNext, osd_MenuPrev, osd_MenuShow, osd_MenuUp, intf_sys_t::p_playlist, intf_thread_t::p_sys, PAUSE_S, playlist_CurrentInput(), vlc_value_t::psz_string, strdup(), var_Get, VLC_EGENERIC, VLC_ENOMEM, vlc_object_release, VLC_SUCCESS, and VLC_UNUSED.
Referenced by RegisterCallbacks().
| static input_item_t * parse_MRL | ( | intf_thread_t * | p_intf, | |
| char * | psz_mrl | |||
| ) | [static] |
References i, input_item_AddOption(), input_item_New, p_item, SKIPSPACE, SKIPTRAILINGSPACE, strdup(), VLC_INPUT_OPTION_TRUSTED, and xrealloc().
Referenced by Playlist().
| static int Playlist | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References _, vlc_value_t::b_bool, config_GetInt, playlist_item_array_t::i_size, input_GetItem(), input_item_GetURI(), playlist_t::items, msg_rc, msg_Warn, ORDER_NORMAL, playlist_item_array_t::p_elems, p_item, playlist_item_t::p_parent, intf_sys_t::p_playlist, playlist_t::p_root_category, playlist_t::p_root_onelevel, intf_thread_t::p_sys, parse_MRL(), PAUSE_S, PL_LOCK, PL_UNLOCK, pl_Unlocked, playlist_AddInput(), PLAYLIST_APPEND, playlist_Clear(), playlist_Control(), playlist_CurrentInput(), PLAYLIST_END, PLAYLIST_GO, playlist_Next, PLAYLIST_PAUSED, playlist_Play, playlist_Prev, playlist_RecursiveNodeSort(), PLAYLIST_RUNNING, playlist_Status(), playlist_Stop, PLAYLIST_STOPPED, PLAYLIST_VIEWPLAY, print_playlist(), vlc_value_t::psz_string, SORT_ARTIST, STATUS_CHANGE, var_Get, var_GetInteger, var_Set, VLC_EGENERIC, vlc_gc_decref, vlc_object_release, VLC_SUCCESS, and VLC_UNUSED.
Referenced by RegisterCallbacks().
| static void PositionChanged | ( | intf_thread_t * | p_intf, | |
| input_thread_t * | p_input | |||
| ) | [static] |
References intf_sys_t::b_input_buffering, msg_rc, intf_thread_t::p_sys, STATUS_CHANGE, intf_sys_t::status_lock, var_GetTime, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by InputEvent(), and libvlc_media_player_new().
| static void print_playlist | ( | intf_thread_t * | p_intf, | |
| playlist_item_t * | p_item, | |||
| int | i_level | |||
| ) | [static] |
References i, playlist_item_t::i_children, input_item_t::i_duration, msg_rc, MSTRTIME_MAX_SIZE, playlist_item_t::p_input, playlist_item_t::pp_children, input_item_t::psz_name, and secstotimestr().
Referenced by Playlist().
| static int Quit | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References libvlc_Quit(), vlc_object_t::p_libvlc, VLC_SUCCESS, and VLC_UNUSED.
| static void RateChanged | ( | intf_thread_t * | p_intf, | |
| input_thread_t * | p_input | |||
| ) | [static] |
References msg_rc, intf_thread_t::p_sys, STATUS_CHANGE, intf_sys_t::status_lock, var_GetFloat, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by InputEvent().
| bool ReadCommand | ( | intf_thread_t * | p_intf, | |
| char * | p_buffer, | |||
| int * | pi_size | |||
| ) | [static] |
References intf_sys_t::i_socket, INTF_IDLE_SLEEP, MAX_LINE_LENGTH, msleep, net_Close, net_Read, intf_thread_t::p_sys, Quit(), VLC_OBJECT, and vlc_object_alive.
Referenced by Run().
| static void RegisterCallbacks | ( | intf_thread_t * | p_intf | ) | [static] |
References ADD, AudioConfig(), Input(), Intf(), Menu(), Playlist(), Quit(), Statistics(), VideoConfig(), and VolumeMove().
Referenced by Run().
| static void Run | ( | intf_thread_t * | p_intf | ) | [static] |
References _, input_thread_t::b_dead, config_GetInt, Help(), i, input_item_t::i_categories, info_category_t::i_infos, intf_sys_t::i_last_state, intf_sys_t::i_socket, vlc_value_t::i_time, input_GetItem(), input_GetVout(), input_item_GetURI(), InputEvent(), INVALID_HANDLE_VALUE, lock, MAX_LINE_LENGTH, msg_Err, msg_rc, net_Accept, net_Close, intf_thread_t::p_libvlc, intf_sys_t::p_playlist, intf_thread_t::p_sys, intf_sys_t::pi_socket_listen, pl_Get, PL_LOCK, PL_UNLOCK, playlist_CurrentInput(), PLAYLIST_PAUSED, PLAYLIST_RUNNING, playlist_Status(), PLAYLIST_STOPPED, input_item_t::pp_categories, info_category_t::pp_infos, psz_name, info_t::psz_name, info_category_t::psz_name, vlc_value_t::psz_string, info_t::psz_value, ReadCommand(), RegisterCallbacks(), STATUS_CHANGE, strdup(), strncasecmp(), var_AddCallback, var_Command, var_DelCallback, var_Get, var_GetFloat, var_InheritInteger, var_Set, var_SetBool, var_SetInteger, var_ToggleBool, var_Type, vlc_error(), vlc_GetActionId(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_object_alive, vlc_object_kill, vlc_object_release, vlc_restorecancel(), vlc_savecancel(), VLC_VAR_ISCOMMAND, and VolumeChanged().
| static void StateChanged | ( | intf_thread_t * | p_intf, | |
| input_thread_t * | p_input | |||
| ) | [static] |
References msg_rc, intf_sys_t::p_playlist, intf_thread_t::p_sys, PL_LOCK, PL_UNLOCK, PLAYLIST_PAUSED, PLAYLIST_RUNNING, playlist_Status(), PLAYLIST_STOPPED, ppsz_input_state, STATUS_CHANGE, intf_sys_t::status_lock, var_GetInteger, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by InputEvent().
| static int Statistics | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References input_GetItem(), intf_sys_t::p_playlist, intf_thread_t::p_sys, playlist_CurrentInput(), updateStatistics(), VLC_ENOOBJ, vlc_object_release, VLC_SUCCESS, and VLC_UNUSED.
Referenced by RegisterCallbacks().
| static int updateStatistics | ( | intf_thread_t * | p_intf, | |
| input_item_t * | p_item | |||
| ) | [static] |
References _, input_stats_t::f_demux_bitrate, input_stats_t::f_input_bitrate, input_stats_t::f_send_bitrate, input_stats_t::i_decoded_audio, input_stats_t::i_decoded_video, input_stats_t::i_demux_corrupted, input_stats_t::i_demux_discontinuity, input_stats_t::i_demux_read_bytes, input_stats_t::i_displayed_pictures, input_stats_t::i_lost_abuffers, input_stats_t::i_lost_pictures, input_stats_t::i_played_abuffers, input_stats_t::i_read_bytes, input_stats_t::i_sent_bytes, input_stats_t::i_sent_packets, input_stats_t::lock, input_item_t::lock, msg_rc, input_item_t::p_stats, VLC_EGENERIC, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
Referenced by Statistics().
| static int VideoConfig | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References atof(), vlc_value_t::f_float, f_value, i, vlc_list_t::i_count, input_GetVout(), msg_rc, vlc_value_t::p_list, intf_sys_t::p_playlist, intf_thread_t::p_sys, vlc_list_t::p_values, playlist_CurrentInput(), vlc_value_t::psz_string, psz_value, strdup(), text, var_Change, var_FreeList(), var_Get, var_Set, var_TriggerCallback, VLC_EGENERIC, VLC_ENOOBJ, vlc_object_release, VLC_SUCCESS, VLC_UNUSED, VLC_VAR_GETLIST, and VLC_VAR_GETTEXT.
Referenced by RegisterCallbacks().
| int vlc_entry__main | ( | module_t * | p_module | ) |
| const char* vlc_entry_license__main | ( | void | ) |
| static int Volume | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References _, aout_ToggleMute, AOUT_VOLUME_MAX, AOUT_VOLUME_MIN, aout_VolumeGet, aout_VolumeSet, msg_rc, osd_Volume, intf_sys_t::p_playlist, intf_thread_t::p_sys, PAUSE_S, playlist_CurrentInput(), vlc_value_t::psz_string, STATUS_CHANGE, var_GetInteger, VLC_EBADVAR, VLC_EGENERIC, VLC_ENOOBJ, vlc_object_release, VLC_SUCCESS, and VLC_UNUSED.
| static int VolumeChanged | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References config_GetInt, msg_rc, intf_thread_t::p_sys, STATUS_CHANGE, intf_sys_t::status_lock, vlc_mutex_lock(), vlc_mutex_unlock(), VLC_SUCCESS, and VLC_UNUSED.
Referenced by Run().
| static int VolumeMove | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References _, AOUT_VOLUME_MAX, aout_VolumeDown, aout_VolumeUp, config_GetInt, msg_rc, osd_Volume, intf_thread_t::p_libvlc, intf_sys_t::p_playlist, intf_thread_t::p_sys, PAUSE_S, playlist_CurrentInput(), vlc_value_t::psz_string, STATUS_CHANGE, var_GetInteger, VLC_EGENERIC, VLC_ENOOBJ, vlc_object_release, VLC_SUCCESS, and VLC_UNUSED.
Referenced by RegisterCallbacks().
const char* ppsz_input_state[] [static] |
1.5.6