Commit 8ee62bb6 authored by Olivier Aubert's avatar Olivier Aubert
Browse files

Trailing whitespace/tabs fixes

parent a65760b0
......@@ -302,12 +302,12 @@ vlcInstance_vlm_add_broadcast( PyObject *self, PyObject *args, PyObject *kwds )
&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,
......@@ -340,7 +340,7 @@ vlcInstance_vlm_set_enabled( PyObject *self, PyObject *args )
libvlc_exception_t ex;
char* psz_name;
int i_enabled;
if( !PyArg_ParseTuple( args, "si", &psz_name, &i_enabled ) )
return NULL;
......@@ -357,7 +357,7 @@ vlcInstance_vlm_set_output( PyObject *self, PyObject *args )
libvlc_exception_t ex;
char* psz_name;
char* psz_output;
if( !PyArg_ParseTuple( args, "ss", &psz_name, &psz_output ) )
return NULL;
......@@ -374,7 +374,7 @@ vlcInstance_vlm_set_input( PyObject *self, PyObject *args )
libvlc_exception_t ex;
char* psz_name;
char* psz_input;
if( !PyArg_ParseTuple( args, "ss", &psz_name, &psz_input ) )
return NULL;
......@@ -391,7 +391,7 @@ vlcInstance_vlm_add_input( PyObject *self, PyObject *args )
libvlc_exception_t ex;
char* psz_name;
char* psz_input;
if( !PyArg_ParseTuple( args, "ss", &psz_name, &psz_input ) )
return NULL;
......@@ -408,7 +408,7 @@ vlcInstance_vlm_set_loop( PyObject *self, PyObject *args )
libvlc_exception_t ex;
char* psz_name;
int i_loop;
if( !PyArg_ParseTuple( args, "si", &psz_name, &i_loop ) )
return NULL;
......@@ -439,12 +439,12 @@ vlcInstance_vlm_change_media( PyObject *self, PyObject *args, PyObject *kwds )
&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,
......@@ -460,7 +460,7 @@ vlcInstance_vlm_play_media( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
char* psz_name;
if( !PyArg_ParseTuple( args, "s", &psz_name ) )
return NULL;
......@@ -492,7 +492,7 @@ vlcInstance_vlm_pause_media( PyObject *self, PyObject *args )
{
libvlc_exception_t ex;
char* psz_name;
if( !PyArg_ParseTuple( args, "s", &psz_name ) )
return NULL;
......@@ -509,7 +509,7 @@ vlcInstance_vlm_seek_media( PyObject *self, PyObject *args )
libvlc_exception_t ex;
char* psz_name;
float f_percentage;
if( !PyArg_ParseTuple( args, "sf", &psz_name, &f_percentage ) )
return NULL;
......
......@@ -179,7 +179,7 @@ static PyMethodDef vlcMedia_methods[] =
"is_preparsed() -> int" },
{ "get_meta", vlcMedia_get_meta, METH_VARARGS,
"get_meta(str) -> str Read the meta of the media." },
{ NULL } /* Sentinel */
};
......
......@@ -37,7 +37,7 @@ MediaControl_new( PyTypeObject *type, PyObject *args, PyObject *kwds )
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");
......
......@@ -46,7 +46,7 @@ vlcMODINIT_FUNC
initvlc( void )
{
PyObject* p_module;
/* vlcMediaPlayer_Type.tp_new = PyType_GenericNew; */
vlcMediaPlayer_Type.tp_alloc = PyType_GenericAlloc;
/* vlcMedia_Type.tp_new = PyType_GenericNew; */
......@@ -160,7 +160,7 @@ initvlc( void )
mediacontrol_EndStatus );
PyModule_AddIntConstant( p_module, "UndefinedStatus",
mediacontrol_UndefinedStatus );
}
/* Horrible hack... Please do not look. Temporary workaround for the
......
......@@ -31,7 +31,7 @@ PyPosition_new( PyTypeObject *type, PyObject *args, PyObject *kwds )
{
PyPosition *self;
static char *kwlist[] = { "value", "origin", "key", NULL};
self = PyObject_New( PyPosition, &PyPosition_Type );
self->value=0;
......
......@@ -44,7 +44,7 @@ class DecoratedVLCWidget(gtk.VBox):
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)
......@@ -58,7 +58,7 @@ class DecoratedVLCWidget(gtk.VBox):
"""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)
......@@ -77,7 +77,7 @@ class DecoratedVLCWidget(gtk.VBox):
on_play),
(_("Pause"), _("Pause"), gtk.STOCK_MEDIA_PAUSE,
on_pause),
(_("Stop"), _("Stop"), gtk.STOCK_MEDIA_STOP,
(_("Stop"), _("Stop"), gtk.STOCK_MEDIA_STOP,
on_stop),
)
......@@ -93,7 +93,7 @@ class VideoPlayer:
"""
def __init__(self):
self.vlc = DecoratedVLCWidget()
def main(self, fname):
self.vlc.player.playlist_add_item(fname)
self.popup()
......
......@@ -291,7 +291,7 @@ VLC_PUBLIC_API void *
* @{
*/
/**
/**
* Create an empty Media Player object
*
* \param p_libvlc_instance the libvlc instance in which the Media Player
......@@ -328,7 +328,7 @@ VLC_PUBLIC_API void libvlc_media_player_retain( libvlc_media_player_t * );
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
......@@ -347,7 +347,7 @@ VLC_PUBLIC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_play
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
......@@ -355,7 +355,7 @@ VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libv
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
......@@ -363,7 +363,7 @@ VLC_PUBLIC_API void libvlc_media_player_play ( libvlc_media_player_t *, libvlc_e
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
......
......@@ -218,7 +218,7 @@ VLC_PUBLIC_API void mediacontrol_set_mrl( mediacontrol_Instance *self,
* \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
......
......@@ -205,10 +205,10 @@ mediacontrol_display_text( mediacontrol_Instance *self,
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,
......
......@@ -98,9 +98,9 @@ mediacontrol_new_from_instance( libvlc_instance_t* p_instance,
{
mediacontrol_Instance* retval;
libvlc_exception_t ex;
libvlc_exception_init( &ex );
retval = ( mediacontrol_Instance* )malloc( sizeof( mediacontrol_Instance ) );
if( ! retval )
{
......@@ -194,7 +194,7 @@ mediacontrol_start( mediacontrol_Instance *self,
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 );
......@@ -213,7 +213,7 @@ mediacontrol_start( mediacontrol_Instance *self,
/* 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;
......@@ -226,7 +226,7 @@ mediacontrol_start( mediacontrol_Instance *self,
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 );
......@@ -285,7 +285,7 @@ mediacontrol_set_mrl( mediacontrol_Instance *self,
mediacontrol_exception_init( exception );
libvlc_exception_init( &ex );
p_media = libvlc_media_new( self->p_instance, psz_file, &ex );
HANDLE_LIBVLC_EXCEPTION_VOID( &ex );
......@@ -302,7 +302,7 @@ mediacontrol_get_mrl( mediacontrol_Instance *self,
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 );
......
......@@ -73,11 +73,11 @@ libvlc_time_t private_mediacontrol_unit_convert( libvlc_media_player_t *p_media_
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 );
......@@ -91,7 +91,7 @@ libvlc_time_t private_mediacontrol_unit_convert( libvlc_media_player_t *p_media_
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;
......@@ -121,7 +121,7 @@ libvlc_time_t private_mediacontrol_unit_convert( libvlc_media_player_t *p_media_
/* 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 )
......@@ -215,7 +215,7 @@ mediacontrol_Exception*
mediacontrol_exception_create( void )
{
mediacontrol_Exception* exception;
exception = ( mediacontrol_Exception* )malloc( sizeof( mediacontrol_Exception ) );
mediacontrol_exception_init( exception );
return exception;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment