Commit 1596f942 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Add missing GPL license/copyright statements and whitespace cleanup

parent 37c2c108
......@@ -107,7 +107,7 @@ libvlc_instance_t * libvlc_new( int argc, char **argv,
p_new->p_vlm = NULL;
if( !p_new->p_playlist ) RAISENULL( "Playlist creation failed" );
p_new->i_vlc_id = i_vlc_id;
return p_new;
}
......
......@@ -51,8 +51,6 @@ input_thread_t *libvlc_get_input_thread( libvlc_input_t *p_input,
return p_input_thread;
}
/**************************************************************************
* Getters for stream information
**************************************************************************/
......@@ -64,7 +62,7 @@ vlc_int64_t libvlc_input_get_length( libvlc_input_t *p_input,
p_input_thread = libvlc_get_input_thread ( p_input, p_e);
if( libvlc_exception_raised( p_e ) ) return -1;
var_Get( p_input_thread, "length", &val );
vlc_object_release( p_input_thread );
......@@ -93,7 +91,7 @@ void libvlc_input_set_time( libvlc_input_t *p_input, vlc_int64_t time,
p_input_thread = libvlc_get_input_thread ( p_input, p_e );
if( libvlc_exception_raised( p_e ) ) return;
value.i_time = time*1000LL;
var_Set( p_input_thread, "time", value );
vlc_object_release( p_input_thread );
......@@ -105,7 +103,7 @@ void libvlc_input_set_position( libvlc_input_t *p_input, float position,
input_thread_t *p_input_thread;
vlc_value_t val;
val.f_float = position;
p_input_thread = libvlc_get_input_thread ( p_input, p_e);
if ( libvlc_exception_raised( p_e ) ) return;
......@@ -176,7 +174,7 @@ void libvlc_input_set_rate( libvlc_input_t *p_input, float rate,
RAISEVOID( "Rate value is invalid" );
val.i_int = 1000.0f/rate;
p_input_thread = libvlc_get_input_thread ( p_input, p_e);
if ( libvlc_exception_raised( p_e ) ) return;
......@@ -213,4 +211,3 @@ int libvlc_input_get_state( libvlc_input_t *p_input,
return val.i_int;
}
......@@ -166,7 +166,6 @@ int mediacontrol_showtext( vout_thread_t *p_vout, int i_channel,
return VLC_SUCCESS;
}
void
mediacontrol_display_text( mediacontrol_Instance *self,
const char * message,
......@@ -297,10 +296,10 @@ mediacontrol_get_rate( mediacontrol_Instance *self,
p_input = self->p_playlist->p_input;
if( ! p_input )
{
RAISE( mediacontrol_InternalException, "No input" );
return 0;
}
{
RAISE( mediacontrol_InternalException, "No input" );
return 0;
}
retval = var_GetInteger(p_input, "rate") / 10;
return retval;
}
......@@ -314,10 +313,10 @@ mediacontrol_set_rate( mediacontrol_Instance *self,
p_input = self->p_playlist->p_input;
if( ! p_input )
{
RAISE( mediacontrol_InternalException, "No input" );
return;
}
{
RAISE( mediacontrol_InternalException, "No input" );
return;
}
var_SetInteger(p_input, "rate", rate * 10);
return;
}
......@@ -329,22 +328,22 @@ mediacontrol_get_fullscreen( mediacontrol_Instance *self,
vout_thread_t *p_vout = NULL;
vlc_value_t val;
int i_ret;
p_vout = vlc_object_find( self->p_playlist, VLC_OBJECT_VOUT, FIND_CHILD );
if( ! p_vout )
{
RAISE( mediacontrol_InternalException, "no video output" );
return 0;
}
i_ret = var_Get( p_vout, "fullscreen", &val );
vlc_object_release( p_vout );
if( i_ret )
{
{
RAISE( mediacontrol_InternalException, "Unexpected error while looking up fullscreen value" );
return 0;
}
}
return val.b_bool == VLC_TRUE ? 1 : 0;
}
......@@ -356,7 +355,7 @@ mediacontrol_set_fullscreen( mediacontrol_Instance *self,
vout_thread_t *p_vout = NULL;
vlc_value_t val;
int i_ret;
p_vout = vlc_object_find( self->p_playlist, VLC_OBJECT_VOUT, FIND_CHILD );
if( ! p_vout )
{
......@@ -371,9 +370,9 @@ mediacontrol_set_fullscreen( mediacontrol_Instance *self,
vlc_object_release( p_vout );
if( i_ret )
{
{
RAISE( mediacontrol_InternalException, "Unexpected error while setting fullscreen value" );
return;
}
}
return;
}
/*****************************************************************************
* init.c: Core functions : init, playlist, stream management
*****************************************************************************
* Copyright (C) 2005 the VideoLAN team
* $Id$
*
* Authors: Olivier Aubert <olivier.aubert@liris.univ-lyon1.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#define __VLC__
#include <mediacontrol_internal.h>
#include <vlc/mediacontrol.h>
......@@ -40,16 +63,14 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
ppsz_argv[i_count + 1] = NULL;
p_vlc_id = VLC_Create();
if( p_vlc_id < 0 )
{
exception->code = mediacontrol_InternalException;
exception->message = strdup( "unable to create VLC" );
return NULL;
return NULL;
}
p_vlc = ( vlc_object_t* )vlc_current_object( p_vlc_id );
if( ! p_vlc )
{
exception->code = mediacontrol_InternalException;
......@@ -86,18 +107,16 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
return NULL;
}
return retval;
};
return retval;
}
void
mediacontrol_exit( mediacontrol_Instance *self )
{
vlc_object_release( (vlc_object_t* )self->p_playlist );
vlc_object_release( (vlc_object_t* )self->p_intf );
vlc_object_release( (vlc_object_t*)self->p_vlc );
VLC_CleanUp( self->vlc_object_id );
VLC_Destroy( self->vlc_object_id );
}
/*****************************************************************************
* plugin.c: Core functions : init, playlist, stream management
*****************************************************************************
* Copyright (C) 2005 the VideoLAN team
* $Id$
*
* Authors: Olivier Aubert <olivier.aubert@liris.univ-lyon1.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <mediacontrol_internal.h>
#include <vlc/mediacontrol.h>
#include <vlc/intf.h>
......
......@@ -5,7 +5,7 @@
*
* $Id: core.c 14187 2006-02-07 16:37:40Z courmisch $
*
* Authors: Clment Stenac <zorglub@videolan.org>
* Authors: Clent Stenac <zorglub@videolan.org>
* Filippo Carone <littlejohn@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
......@@ -62,7 +62,7 @@ static vout_thread_t *GetVout( libvlc_input_t *p_input,
return NULL;
}
vlc_object_release( p_input_thread );
return p_vout;
}
/**********************************************************************
......@@ -145,7 +145,6 @@ libvlc_video_take_snapshot( libvlc_input_t *p_input, char *psz_filepath,
{
vout_thread_t *p_vout = GetVout( p_input, p_e );
input_thread_t *p_input_thread;
char path[256];
/* GetVout will raise the exception for us */
......@@ -162,7 +161,7 @@ libvlc_video_take_snapshot( libvlc_input_t *p_input, char *psz_filepath,
libvlc_exception_raise( p_e, "Input does not exist" );
return;
}
snprintf( path, 255, "%s", psz_filepath );
var_SetString( p_vout, "snapshot-path", path );
var_SetString( p_vout, "snapshot-format", "png" );
......@@ -172,7 +171,6 @@ libvlc_video_take_snapshot( libvlc_input_t *p_input, char *psz_filepath,
vlc_object_release( p_input_thread );
return;
}
int libvlc_video_get_height( libvlc_input_t *p_input,
......@@ -211,7 +209,7 @@ vlc_bool_t libvlc_input_has_vout( libvlc_input_t *p_input,
}
vlc_object_release( p_vout );
return VLC_TRUE;
}
......@@ -222,9 +220,8 @@ int libvlc_video_reparent( libvlc_input_t *p_input, libvlc_drawable_t d,
vout_thread_t *p_vout = GetVout( p_input, p_e );
vout_Control( p_vout , VOUT_REPARENT, d);
vlc_object_release( p_vout );
return 0;
}
void libvlc_video_resize( libvlc_input_t *p_input, int width, int height, libvlc_exception_t *p_e )
......@@ -332,7 +329,6 @@ int libvlc_video_destroy( libvlc_input_t *p_input,
vlc_object_detach( p_vout );
vlc_object_release( p_vout );
vout_Destroy( p_vout );
return 0;
}
......@@ -239,7 +239,6 @@ void libvlc_vlm_change_media( libvlc_instance_t *p_instance, char *psz_name,
void libvlc_vlm_play_media( libvlc_instance_t *p_instance, char *psz_name,
libvlc_exception_t *p_exception )
{
char *psz_message;
vlm_message_t *answer;
......@@ -258,7 +257,6 @@ void libvlc_vlm_play_media( libvlc_instance_t *p_instance, char *psz_name,
void libvlc_vlm_stop_media( libvlc_instance_t *p_instance, char *psz_name,
libvlc_exception_t *p_exception )
{
char *psz_message;
vlm_message_t *answer;
......@@ -277,7 +275,6 @@ void libvlc_vlm_stop_media( libvlc_instance_t *p_instance, char *psz_name,
void libvlc_vlm_pause_media( libvlc_instance_t *p_instance, char *psz_name,
libvlc_exception_t *p_exception )
{
char *psz_message;
vlm_message_t *answer;
......
Markdown is supported
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