dbus.c File Reference

Include dependency graph for dbus.c:


Data Structures

struct  intf_sys_t
 Per-interface private state. More...
struct  callback_info_t

Defines

#define INTF   ((intf_thread_t *)p_this)
#define PL   (INTF->p_sys->p_playlist)
#define METHOD_FUNC(method, function)
#define ADD_META(entry, type, data)
#define ADD_VLC_META_STRING(entry, item)

Enumerations

enum  {
  CAPS_NONE = 0, CAPS_CAN_GO_NEXT = 1 << 0, CAPS_CAN_GO_PREV = 1 << 1, CAPS_CAN_PAUSE = 1 << 2,
  CAPS_CAN_PLAY = 1 << 3, CAPS_CAN_SEEK = 1 << 4, CAPS_CAN_PROVIDE_METADATA = 1 << 5, CAPS_CAN_HAS_TRACKLIST = 1 << 6
}
enum  {
  SIGNAL_ITEM_CURRENT, SIGNAL_INTF_CHANGE, SIGNAL_PLAYLIST_ITEM_APPEND, SIGNAL_PLAYLIST_ITEM_DELETED,
  SIGNAL_RANDOM, SIGNAL_REPEAT, SIGNAL_LOOP, SIGNAL_STATE
}

Functions

static int Open (vlc_object_t *)
 Probes and initializes.
static void Close (vlc_object_t *)
 Releases resources.
static void Run (intf_thread_t *)
static int StateChange (intf_thread_t *, int)
static int TrackChange (intf_thread_t *)
static int StatusChangeEmit (intf_thread_t *)
static int TrackListChangeEmit (intf_thread_t *, int, int)
static int AllCallback (vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void *)
static int GetInputMeta (input_item_t *, DBusMessageIter *)
static int MarshalStatus (intf_thread_t *, DBusMessageIter *)
static int UpdateCaps (intf_thread_t *)
int vlc_entry__main (module_t *p_module)
const char * vlc_entry_license__main (void)
static DBusHandlerResult Quit (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult MprisVersion (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult PositionGet (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult PositionSet (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult VolumeGet (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult VolumeSet (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult Next (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult Prev (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult Stop (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult GetStatus (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult Pause (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult Play (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult GetCurrentMetadata (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult GetCaps (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult Identity (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult AddTrack (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult GetCurrentTrack (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult GetMetadata (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult GetLength (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult DelTrack (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult SetLoop (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult Repeat (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult SetRandom (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult handle_introspect_root (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult handle_introspect_player (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult handle_introspect_tracklist (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult handle_root (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult handle_player (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult handle_tracklist (DBusConnection *p_conn, DBusMessage *p_from, void *p_this)
static DBusHandlerResult CapsChangeSignal (DBusConnection *p_conn, void *p_data)
static DBusHandlerResult TrackListChangeSignal (DBusConnection *p_conn, void *p_data)
static DBusHandlerResult TrackChangeSignal (DBusConnection *p_conn, void *p_data)
static DBusHandlerResult StatusChangeSignal (DBusConnection *p_conn, void *p_data)

Define Documentation

#define ADD_META ( entry,
type,
data   ) 

Value:

if( data ) { \
        dbus_message_iter_open_container( &dict, DBUS_TYPE_DICT_ENTRY, \
                NULL, &dict_entry ); \
        dbus_message_iter_append_basic( &dict_entry, DBUS_TYPE_STRING, \
                &ppsz_meta_items[entry] ); \
        dbus_message_iter_open_container( &dict_entry, DBUS_TYPE_VARIANT, \
                type##_AS_STRING, &variant ); \
        dbus_message_iter_append_basic( &variant, \
                type, \
                & data ); \
        dbus_message_iter_close_container( &dict_entry, &variant ); \
        dbus_message_iter_close_container( &dict, &dict_entry ); }

Referenced by GetInputMeta(), and MetaPanel::MetaPanel().

#define ADD_VLC_META_STRING ( entry,
item   ) 

Value:

{ \
        char * psz = input_item_Get##item( p_input );\
        ADD_META( entry, DBUS_TYPE_STRING, \
                  psz ); \
        free( psz ); \
    }

Referenced by GetInputMeta().

#define INTF   ((intf_thread_t *)p_this)

Referenced by GetCaps(), and Quit().

#define METHOD_FUNC ( method,
function   ) 

Value:

else if( dbus_message_is_method_call( p_from, MPRIS_DBUS_INTERFACE, method ) )\
        return function( p_conn, p_from, p_this )

Referenced by handle_player(), handle_root(), and handle_tracklist().

#define PL   (INTF->p_sys->p_playlist)


Enumeration Type Documentation

anonymous enum

Enumerator:
CAPS_NONE 
CAPS_CAN_GO_NEXT 
CAPS_CAN_GO_PREV 
CAPS_CAN_PAUSE 
CAPS_CAN_PLAY 
CAPS_CAN_SEEK 
CAPS_CAN_PROVIDE_METADATA 
CAPS_CAN_HAS_TRACKLIST 

anonymous enum

Enumerator:
SIGNAL_ITEM_CURRENT 
SIGNAL_INTF_CHANGE 
SIGNAL_PLAYLIST_ITEM_APPEND 
SIGNAL_PLAYLIST_ITEM_DELETED 
SIGNAL_RANDOM 
SIGNAL_REPEAT 
SIGNAL_LOOP 
SIGNAL_STATE 


Function Documentation

static DBusHandlerResult AddTrack ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static int AllCallback ( vlc_object_t p_this,
const char *  psz_var,
vlc_value_t  oldval,
vlc_value_t  newval,
void *  p_data 
) [static]

static DBusHandlerResult CapsChangeSignal ( DBusConnection *  p_conn,
void *  p_data 
) [static]

static void Close ( vlc_object_t p_this  )  [static]

Releases resources.

Close the module.

Destroys the X11 window.

Disconnect from the X server.

Close a SDL video output.

It destroys an OpenGL vout display.

Terminate a vout display created by Open.

It destroyes a Direct3D vout display.

Terminate an output method created by Open.

Release the drawable.

Close a libcaca video output.

Close a aa video output method.

Close the filter.

Terminate a splitter module.

This function closes a clone video splitter module.

Common close function.

Releases allocate resources.

Close: Destructor.

Parameters:
p_this pointer to this filter object
p_this,: the filter object

static DBusHandlerResult DelTrack ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult GetCaps ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

References ADD_INT32, INTF, OUT_ARGUMENTS, REPLY_INIT, and REPLY_SEND.

Referenced by handle_player().

static DBusHandlerResult GetCurrentMetadata ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult GetCurrentTrack ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static int GetInputMeta ( input_item_t p_input,
DBusMessageIter *  args 
) [static]

The duration of the track can be expressed in second, milli-seconds and ยต-seconds

References ADD_META, ADD_VLC_META_STRING, input_item_GetDuration(), input_item_t::lock, input_item_t::p_meta, vlc_meta_GetStatus(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.

Referenced by GetCurrentMetadata(), GetMetadata(), and TrackChangeSignal().

static DBusHandlerResult GetLength ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult GetMetadata ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult GetStatus ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult handle_introspect_player ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult handle_introspect_root ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult handle_introspect_tracklist ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult handle_player ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult handle_root ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult handle_tracklist ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult Identity ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static int MarshalStatus ( intf_thread_t p_intf,
DBusMessageIter *  args 
) [static]

static DBusHandlerResult MprisVersion ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult Next ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

References PL, playlist_Next, REPLY_INIT, and REPLY_SEND.

Referenced by handle_player(), and Notify().

static int Open ( vlc_object_t p_this  )  [static]

Probes and initializes.

Basic chorus/flanger/delay audio filter This implements a variable delay filter for VLC.

Todo:

  • Improve CDDB support (non-blocking, cache, .

Open the module.

Create an X11 window.

Probe the X server.

This function initializes SDL vout method.

It creates an OpenGL vout display.

This function allocates and initialize the DirectX vout display.

It creates a Direct3D vout display.

This function allocates and initializes a FB vout method.

Find the drawable set by libvlc application.

This function initializes libcaca vout method.

This function allocates and initializes a aa vout method.

This function allocates and initializes a Wall splitter module.

Open the filter.

This function allocates and initializes a Clone splitter module.

Open: initialize and create stuff.

Connect to the sftp server and ask for a file.

Parameters:
p_this,: the vlc_object
Returns:
VLC_SUCCESS if everything was fine
Parameters:
p_this 
p_this,: the filter object
Returns:
VLC_SUCCESS or vlc error codes

Todo:
Reinstate meta codec name

static DBusHandlerResult Pause ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

References PL, playlist_Pause, REPLY_INIT, and REPLY_SEND.

Referenced by handle_player().

static DBusHandlerResult Play ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult PositionGet ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult PositionSet ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult Prev ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

References PL, playlist_Prev, REPLY_INIT, and REPLY_SEND.

Referenced by handle_player(), and Notify().

static DBusHandlerResult Quit ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult Repeat ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static void Run ( intf_thread_t p_intf  )  [static]

static DBusHandlerResult SetLoop ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult SetRandom ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static int StateChange ( intf_thread_t p_intf,
int  i_input_state 
) [static]

static int StatusChangeEmit ( intf_thread_t p_intf  )  [static]

static DBusHandlerResult StatusChangeSignal ( DBusConnection *  p_conn,
void *  p_data 
) [static]

static DBusHandlerResult Stop ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

References PL, playlist_Stop, REPLY_INIT, and REPLY_SEND.

static int TrackChange ( intf_thread_t p_intf  )  [static]

static DBusHandlerResult TrackChangeSignal ( DBusConnection *  p_conn,
void *  p_data 
) [static]

static int TrackListChangeEmit ( intf_thread_t p_intf,
int  signal,
int  i_node 
) [static]

static DBusHandlerResult TrackListChangeSignal ( DBusConnection *  p_conn,
void *  p_data 
) [static]

static int UpdateCaps ( intf_thread_t p_intf  )  [static]

int vlc_entry__main ( module_t p_module  ) 

const char* vlc_entry_license__main ( void   ) 

static DBusHandlerResult VolumeGet ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]

static DBusHandlerResult VolumeSet ( DBusConnection *  p_conn,
DBusMessage *  p_from,
void *  p_this 
) [static]


Generated on Tue May 25 08:05:15 2010 for VLC by  doxygen 1.5.6