Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
42088654
Commit
42088654
authored
Nov 02, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge fixes to the python binding from my branch
parent
c58f4c10
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1304 additions
and
1131 deletions
+1304
-1131
bindings/python/setup.py
bindings/python/setup.py
+2
-1
bindings/python/vlcglue.c
bindings/python/vlcglue.c
+1167
-1124
bindings/python/vlcglue.h
bindings/python/vlcglue.h
+123
-0
src/audio_output/output.c
src/audio_output/output.c
+1
-1
src/control/core.c
src/control/core.c
+4
-2
src/control/init.c
src/control/init.c
+7
-3
No files found.
bindings/python/setup.py
View file @
42088654
...
...
@@ -34,7 +34,8 @@ def get_ldflags():
# To compile in a local vlc tree
vlclocal
=
Extension
(
'vlc'
,
sources
=
[
'vlcglue.c'
,
'../../src/control/init.c'
],
sources
=
[
'vlcglue.c'
,
'../../src/control/init.c'
],
include_dirs
=
[
'../../include'
,
'../../'
,
'/usr/win32/include'
],
extra_objects
=
[
'../../lib/libvlc.a'
],
extra_compile_args
=
get_cflags
(),
...
...
bindings/python/vlcglue.c
View file @
42088654
This diff is collapsed.
Click to expand it.
bindings/python/vlcglue.h
0 → 100644
View file @
42088654
/*****************************************************************************
* vlcglue.h: Main header for the Python binding
*****************************************************************************
* Copyright (C) 1998-2004 the VideoLAN team
* $Id: vlc.c 12667 2005-09-25 10:19:26Z zorglub $
*
* Authors: Olivier Aubert <oaubert at bat710.univ-lyon1.fr>
* Clment Stenac <zorglub@videolan.org>
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <Python.h>
#include "structmember.h"
/* Undefine the following define to disable low-level vlc Object support */
#define VLCOBJECT_SUPPORT 0
#define __VLC__
#include <stdio.h>
#include <vlc/control.h>
#define SELF ((MediaControl*)self)
/**********************************************************************
* Exceptions handling
**********************************************************************/
#define MC_TRY exception=mediacontrol_exception_init(exception)
#define MC_EXCEPT \
if (exception->code) { \
PyObject *py_exc = MediaControl_InternalException; \
switch (exception->code) { \
case mediacontrol_InternalException: \
py_exc = MediaControl_InternalException; \
break; \
case mediacontrol_PlaylistException: \
py_exc = MediaControl_PlaylistException; \
break; \
case mediacontrol_InvalidPosition: \
py_exc = MediaControl_InvalidPosition; \
break; \
case mediacontrol_PositionKeyNotSupported: \
py_exc = MediaControl_PositionKeyNotSupported; \
break; \
case mediacontrol_PositionOriginNotSupported: \
py_exc = MediaControl_PositionOriginNotSupported; \
break; \
} \
PyErr_SetString(py_exc, exception->message); \
mediacontrol_exception_free(exception); \
return NULL; \
} else { mediacontrol_exception_free(exception); }
PyObject
*
MediaControl_InternalException
;
PyObject
*
MediaControl_PositionKeyNotSupported
;
PyObject
*
MediaControl_PositionOriginNotSupported
;
PyObject
*
MediaControl_InvalidPosition
;
PyObject
*
MediaControl_PlaylistException
;
/**********************************************************************
* VLC Object
**********************************************************************/
#ifdef VLCOBJECT_SUPPORT
#define VLCSELF ((vlcObject*)self)
/**********************************************************************
* VLCObject Object
**********************************************************************/
typedef
struct
{
PyObject_HEAD
vlc_object_t
*
p_object
;
int
b_released
;
}
vlcObject
;
staticforward
PyTypeObject
vlcObject_Type
;
#endif
/**********************************************************************
* MediaControl Object
**********************************************************************/
typedef
struct
{
PyObject_HEAD
mediacontrol_Instance
*
mc
;
}
MediaControl
;
staticforward
PyTypeObject
MediaControl_Type
;
/**********************************************************************
* Position Object
**********************************************************************/
typedef
struct
{
PyObject_HEAD
int
origin
;
int
key
;
long
long
value
;
}
PyPosition
;
staticforward
PyTypeObject
PyPosition_Type
;
mediacontrol_PositionKey
positionKey_py_to_c
(
PyObject
*
py_key
);
mediacontrol_PositionOrigin
positionOrigin_py_to_c
(
PyObject
*
py_origin
);
mediacontrol_Position
*
position_py_to_c
(
PyObject
*
py_position
);
PyPosition
*
position_c_to_py
(
mediacontrol_Position
*
position
);
src/audio_output/output.c
View file @
42088654
...
...
@@ -186,7 +186,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
p_aout
->
mixer
.
mixer
.
i_format
=
p_format
->
i_format
;
}
aout_FormatPrint
(
p_aout
,
"mixer"
,
&
p_aout
->
output
.
output
);
aout_FormatPrint
(
p_aout
,
"mixer"
,
&
p_aout
->
mixer
.
mixer
);
/* Create filters. */
p_aout
->
output
.
i_nb_filters
=
0
;
...
...
src/control/core.c
View file @
42088654
...
...
@@ -74,7 +74,8 @@ mediacontrol_Instance* mediacontrol_new_from_object( vlc_object_t* p_object,
retval
->
vlc_object_id
=
p_vlc
->
i_object_id
;
/* We can keep references on these, which should not change. Is it true ? */
retval
->
p_playlist
=
vlc_object_find
(
p_vlc
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
retval
->
p_playlist
=
vlc_object_find
(
p_vlc
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
retval
->
p_intf
=
vlc_object_find
(
p_vlc
,
VLC_OBJECT_INTF
,
FIND_ANYWHERE
);
if
(
!
retval
->
p_playlist
||
!
retval
->
p_intf
)
...
...
@@ -272,7 +273,8 @@ mediacontrol_playlist_add_item( mediacontrol_Instance *self,
return
;
}
playlist_Add
(
self
->
p_playlist
,
psz_file
,
psz_file
,
PLAYLIST_REPLACE
,
0
);
playlist_Add
(
self
->
p_playlist
,
psz_file
,
psz_file
,
PLAYLIST_INSERT
,
PLAYLIST_END
);
}
void
...
...
src/control/init.c
View file @
42088654
...
...
@@ -62,7 +62,8 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
retval
->
vlc_object_id
=
p_vlc_id
;
/* We can keep references on these, which should not change. Is it true ? */
retval
->
p_playlist
=
vlc_object_find
(
p_vlc
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
retval
->
p_playlist
=
vlc_object_find
(
p_vlc
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
retval
->
p_intf
=
vlc_object_find
(
p_vlc
,
VLC_OBJECT_INTF
,
FIND_ANYWHERE
);
if
(
!
retval
->
p_playlist
||
!
retval
->
p_intf
)
...
...
@@ -71,16 +72,19 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
exception
->
message
=
strdup
(
"No available interface"
);
return
NULL
;
}
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
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment