&psz_input, &psz_output,
&py_options, &i_enable, &i_loop ) )
return NULL;
-
+
if( py_options )
{
i_size = pyoptions_to_args( py_options, &ppsz_args );
}
-
+
LIBVLC_TRY;
libvlc_vlm_add_broadcast( LIBVLC_INSTANCE->p_instance,
psz_name, psz_input, psz_output,
libvlc_exception_t ex;
char* psz_name;
int i_enabled;
-
+
if( !PyArg_ParseTuple( args, "si", &psz_name, &i_enabled ) )
return NULL;
libvlc_exception_t ex;
char* psz_name;
char* psz_output;
-
+
if( !PyArg_ParseTuple( args, "ss", &psz_name, &psz_output ) )
return NULL;
libvlc_exception_t ex;
char* psz_name;
char* psz_input;
-
+
if( !PyArg_ParseTuple( args, "ss", &psz_name, &psz_input ) )
return NULL;
libvlc_exception_t ex;
char* psz_name;
char* psz_input;
-
+
if( !PyArg_ParseTuple( args, "ss", &psz_name, &psz_input ) )
return NULL;
libvlc_exception_t ex;
char* psz_name;
int i_loop;
-
+
if( !PyArg_ParseTuple( args, "si", &psz_name, &i_loop ) )
return NULL;
&psz_input, &psz_output,
&py_options, &i_enable, &i_loop ) )
return NULL;
-
+
if( py_options )
{
i_size = pyoptions_to_args( py_options, &ppsz_args );
}
-
+
LIBVLC_TRY;
libvlc_vlm_change_media( LIBVLC_INSTANCE->p_instance,
psz_name, psz_input, psz_output,
{
libvlc_exception_t ex;
char* psz_name;
-
+
if( !PyArg_ParseTuple( args, "s", &psz_name ) )
return NULL;
{
libvlc_exception_t ex;
char* psz_name;
-
+
if( !PyArg_ParseTuple( args, "s", &psz_name ) )
return NULL;
libvlc_exception_t ex;
char* psz_name;
float f_percentage;
-
+
if( !PyArg_ParseTuple( args, "sf", &psz_name, &f_percentage ) )
return NULL;
"is_preparsed() -> int" },
{ "get_meta", vlcMedia_get_meta, METH_VARARGS,
"get_meta(str) -> str Read the meta of the media." },
-
+
{ NULL } /* Sentinel */
};
char** ppsz_args = NULL;
libvlc_instance_t* p_instance = NULL;
Py_ssize_t i_size = 0;
-
+
self = PyObject_New( MediaControl, &MediaControl_Type );
fprintf (stderr, "Instanciating mediacontrol\n");
initvlc( void )
{
PyObject* p_module;
-
+
/* vlcMediaPlayer_Type.tp_new = PyType_GenericNew; */
vlcMediaPlayer_Type.tp_alloc = PyType_GenericAlloc;
/* vlcMedia_Type.tp_new = PyType_GenericNew; */
mediacontrol_EndStatus );
PyModule_AddIntConstant( p_module, "UndefinedStatus",
mediacontrol_UndefinedStatus );
-
+
}
/* Horrible hack... Please do not look. Temporary workaround for the
{
PyPosition *self;
static char *kwlist[] = { "value", "origin", "key", NULL};
-
+
self = PyObject_New( PyPosition, &PyPosition_Type );
self->value=0;
VLC widget decorated with a player control toolbar.
Its player can be controlled through the 'player' attribute, which
- is a MediaControl instance.
+ is a MediaControl instance.
"""
def __init__(self, *p):
gtk.VBox.__init__(self)
"""Return a player control toolbar
"""
tb=gtk.Toolbar()
- tb.set_style(gtk.TOOLBAR_ICONS)
+ tb.set_style(gtk.TOOLBAR_ICONS)
def on_play(b):
self.player.start(0)
on_play),
(_("Pause"), _("Pause"), gtk.STOCK_MEDIA_PAUSE,
on_pause),
- (_("Stop"), _("Stop"), gtk.STOCK_MEDIA_STOP,
+ (_("Stop"), _("Stop"), gtk.STOCK_MEDIA_STOP,
on_stop),
)
"""
def __init__(self):
self.vlc = DecoratedVLCWidget()
-
+
def main(self, fname):
self.vlc.player.playlist_add_item(fname)
self.popup()
* @{
*/
-/**
+/**
* Create an empty Media Player object
*
* \param p_libvlc_instance the libvlc instance in which the Media Player
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.
+ * Get the media used by the media_player.
*
* \param p_mi the Media Player
* \param p_e an initialized exception pointer
VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *, libvlc_exception_t * );
/**
- * Play
+ * 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
+ * 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
+ * Stop
*
* \param p_mi the Media Player
* \param p_e an initialized exception pointer
* \param exception an initialized exception pointer
*/
VLC_PUBLIC_API char * mediacontrol_get_mrl( mediacontrol_Instance *self,
- mediacontrol_Exception *exception );
+ mediacontrol_Exception *exception );
/*****************************************************************************
* A/V functions
mtime_t i_now = mdate();
i_duration = 1000 * private_mediacontrol_unit_convert(
- self->p_media_player,
- end->key,
- mediacontrol_MediaTime,
- end->value );
+ self->p_media_player,
+ end->key,
+ mediacontrol_MediaTime,
+ end->value );
mediacontrol_showtext( p_vout, DEFAULT_CHAN, psz_message, NULL,
OSD_ALIGN_BOTTOM | OSD_ALIGN_LEFT, 0, 0,
{
mediacontrol_Instance* retval;
libvlc_exception_t ex;
-
+
libvlc_exception_init( &ex );
-
+
retval = ( mediacontrol_Instance* )malloc( sizeof( mediacontrol_Instance ) );
if( ! retval )
{
mediacontrol_exception_init( exception );
libvlc_exception_init( &ex );
-
+
p_media = libvlc_media_player_get_media( self->p_media_player, &ex );
HANDLE_LIBVLC_EXCEPTION_VOID( &ex );
/* Create a new media */
p_media = libvlc_media_new( self->p_instance, psz_name, &ex );
HANDLE_LIBVLC_EXCEPTION_VOID( &ex );
-
+
if( a_position->value )
{
char * psz_from;
libvlc_media_add_option( p_media, psz_from, &ex );
HANDLE_LIBVLC_EXCEPTION_VOID( &ex );
}
-
+
libvlc_media_player_set_media( self->p_media_player, p_media, &ex );
HANDLE_LIBVLC_EXCEPTION_VOID( &ex );
mediacontrol_exception_init( exception );
libvlc_exception_init( &ex );
-
+
p_media = libvlc_media_new( self->p_instance, psz_file, &ex );
HANDLE_LIBVLC_EXCEPTION_VOID( &ex );
mediacontrol_exception_init( exception );
libvlc_exception_init( &ex );
-
+
p_media = libvlc_media_player_get_media( self->p_media_player, &ex );
HANDLE_LIBVLC_EXCEPTION_NULL( &ex );
if( to == mediacontrol_SampleCount )
{
double f_fps;
- libvlc_exception_t ex;
- libvlc_exception_init( &ex );
+ libvlc_exception_t ex;
+ libvlc_exception_init( &ex );
- f_fps = libvlc_media_player_get_rate( p_media_player, &ex );
- if( f_fps < 0 )
+ f_fps = libvlc_media_player_get_rate( p_media_player, &ex );
+ if( f_fps < 0 )
return 0;
else
return( value * f_fps / 1000.0 );
double f_fps;
libvlc_exception_t ex;
libvlc_exception_init( &ex );
-
+
f_fps = libvlc_media_player_get_rate( p_media_player, &ex );
if( f_fps < 0 )
return 0;
/* Converts a mediacontrol_Position into a time in microseconds in
movie clock time */
libvlc_time_t
-private_mediacontrol_position2microsecond( libvlc_media_player_t * p_media_player,
+private_mediacontrol_position2microsecond( libvlc_media_player_t * p_media_player,
const mediacontrol_Position * pos )
{
switch( pos->origin )
mediacontrol_exception_create( void )
{
mediacontrol_Exception* exception;
-
+
exception = ( mediacontrol_Exception* )malloc( sizeof( mediacontrol_Exception ) );
mediacontrol_exception_init( exception );
return exception;