Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
1fb54fc4
Commit
1fb54fc4
authored
Dec 15, 2005
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python bindings: formatted to VLC coding style
parent
9992f342
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
658 additions
and
643 deletions
+658
-643
bindings/python/vlcglue.c
bindings/python/vlcglue.c
+621
-595
bindings/python/vlcglue.h
bindings/python/vlcglue.h
+8
-15
include/vlc/control.h
include/vlc/control.h
+14
-15
include/vlc/control_structures.h
include/vlc/control_structures.h
+9
-10
include/vlc_control.h
include/vlc_control.h
+6
-8
No files found.
bindings/python/vlcglue.c
View file @
1fb54fc4
This diff is collapsed.
Click to expand it.
bindings/python/vlcglue.h
View file @
1fb54fc4
...
...
@@ -25,9 +25,6 @@
#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>
...
...
@@ -44,9 +41,9 @@
#define MC_TRY exception=mediacontrol_exception_init(exception)
#define MC_EXCEPT \
if
(exception->code
) { \
if
( exception->code
) { \
PyObject *py_exc = MediaControl_InternalException; \
switch
(exception->code
) { \
switch
( exception->code
) { \
case mediacontrol_InternalException: \
py_exc = MediaControl_InternalException; \
break; \
...
...
@@ -63,10 +60,10 @@
py_exc = MediaControl_PositionOriginNotSupported; \
break; \
} \
PyErr_SetString(
py_exc, exception->message
); \
mediacontrol_exception_free(
exception
); \
PyErr_SetString(
py_exc, exception->message
); \
mediacontrol_exception_free(
exception
); \
return NULL; \
} else { mediacontrol_exception_free(
exception
); }
} else { mediacontrol_exception_free(
exception
); }
PyObject
*
MediaControl_InternalException
;
PyObject
*
MediaControl_PositionKeyNotSupported
;
...
...
@@ -77,9 +74,7 @@ PyObject *MediaControl_PlaylistException;
/**********************************************************************
* VLC Object
**********************************************************************/
#ifdef VLCOBJECT_SUPPORT
#define VLCSELF ((vlcObject*)self)
#define VLCSELF ( ( vlcObject* )self )
/**********************************************************************
* VLCObject Object
...
...
@@ -93,8 +88,6 @@ typedef struct
staticforward
PyTypeObject
vlcObject_Type
;
#endif
/**********************************************************************
* MediaControl Object
**********************************************************************/
...
...
@@ -121,5 +114,5 @@ 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
);
mediacontrol_Position
*
position_py_to_c
(
PyObject
*
py_position
);
PyPosition
*
position_c_to_py
(
mediacontrol_Position
*
position
);
include/vlc/control.h
View file @
1fb54fc4
...
...
@@ -41,22 +41,22 @@ extern "C" {
*************************************************************************/
typedef
struct
{
int
width
;
int
height
;
long
type
;
vlc_int64_t
date
;
int
size
;
char
*
data
;
int
width
;
int
height
;
long
type
;
vlc_int64_t
date
;
int
size
;
char
*
data
;
}
mediacontrol_RGBPicture
;
typedef
struct
{
int
size
;
char
**
data
;
int
size
;
char
**
data
;
}
mediacontrol_PlaylistSeq
;
typedef
struct
{
int
code
;
char
*
message
;
int
code
;
char
*
message
;
}
mediacontrol_Exception
;
/* Exception codes */
...
...
@@ -116,8 +116,7 @@ mediacontrol_Instance *
mediacontrol_new_from_object
(
int
vlc_object_id
,
mediacontrol_Exception
*
exception
);
mediacontrol_Position
*
mediacontrol_get_media_position
(
mediacontrol_Position
*
mediacontrol_get_media_position
(
mediacontrol_Instance
*
self
,
const
mediacontrol_PositionOrigin
an_origin
,
const
mediacontrol_PositionKey
a_key
,
...
...
@@ -132,7 +131,7 @@ void mediacontrol_start( mediacontrol_Instance *self,
mediacontrol_Exception
*
exception
);
void
mediacontrol_pause
(
mediacontrol_Instance
*
self
,
const
mediacontrol_Position
*
a_position
,
const
mediacontrol_Position
*
a_position
,
mediacontrol_Exception
*
exception
);
void
mediacontrol_resume
(
mediacontrol_Instance
*
self
,
...
...
@@ -170,8 +169,8 @@ mediacontrol_RGBPicture **
/* Displays the message string, between "begin" and "end" positions */
void
mediacontrol_display_text
(
mediacontrol_Instance
*
self
,
const
char
*
message
,
const
mediacontrol_Position
*
begin
,
const
char
*
message
,
const
mediacontrol_Position
*
begin
,
const
mediacontrol_Position
*
end
,
mediacontrol_Exception
*
exception
);
...
...
include/vlc/control_structures.h
View file @
1fb54fc4
...
...
@@ -29,24 +29,23 @@ extern "C" {
# endif
typedef
enum
{
mediacontrol_AbsolutePosition
,
mediacontrol_RelativePosition
,
mediacontrol_ModuloPosition
mediacontrol_AbsolutePosition
,
mediacontrol_RelativePosition
,
mediacontrol_ModuloPosition
}
mediacontrol_PositionOrigin
;
typedef
enum
{
mediacontrol_ByteCount
,
mediacontrol_SampleCount
,
mediacontrol_MediaTime
mediacontrol_ByteCount
,
mediacontrol_SampleCount
,
mediacontrol_MediaTime
}
mediacontrol_PositionKey
;
typedef
struct
{
mediacontrol_PositionOrigin
origin
;
mediacontrol_PositionKey
key
;
long
value
;
mediacontrol_PositionOrigin
origin
;
mediacontrol_PositionKey
key
;
long
value
;
}
mediacontrol_Position
;
# ifdef __cplusplus
}
# endif
...
...
include/vlc_control.h
View file @
1fb54fc4
...
...
@@ -31,12 +31,11 @@ extern "C" {
#include <vlc/vlc.h>
#include "vlc/control_structures.h"
typedef
struct
{
vlc_object_t
*
p_vlc
;
playlist_t
*
p_playlist
;
intf_thread_t
*
p_intf
;
int
vlc_object_id
;
vlc_object_t
*
p_vlc
;
playlist_t
*
p_playlist
;
intf_thread_t
*
p_intf
;
int
vlc_object_id
;
}
mediacontrol_Instance
;
vlc_int64_t
mediacontrol_unit_convert
(
input_thread_t
*
p_input
,
...
...
@@ -44,9 +43,8 @@ vlc_int64_t mediacontrol_unit_convert( input_thread_t *p_input,
mediacontrol_PositionKey
to
,
vlc_int64_t
value
);
vlc_int64_t
mediacontrol_position2microsecond
(
input_thread_t
*
p_input
,
const
mediacontrol_Position
*
pos
);
input_thread_t
*
p_input
,
const
mediacontrol_Position
*
pos
);
# ifdef __cplusplus
}
...
...
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