Changeset 7b89d13c0ef3a66054f1e61db7ddf243fddebccd
- Timestamp:
- 01/05/07 20:15:16
(2 years ago)
- Author:
- Olivier Aubert <olivier.aubert@liris.cnrs.fr>
- git-committer:
- Olivier Aubert <olivier.aubert@liris.cnrs.fr> 1168024516 +0000
- git-parent:
[a5c6ef976452b28fe34cab82e9597b1f93c17efd]
- git-author:
- Olivier Aubert <olivier.aubert@liris.cnrs.fr> 1168024516 +0000
- Message:
bindings/python: removed vlc.Object code from the main vlc python module. This module should now be cleanly buildable from outside the VLC tree, given the public headers and appropriate libs are available.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rc2d31f4 |
r7b89d13 |
|
| 66 | 66 | return ldflags |
|---|
| 67 | 67 | |
|---|
| 68 | | #source_files = [ 'vlc_module.c', 'vlc_object.c', 'vlc_mediacontrol.c', |
|---|
| | 68 | #source_files = [ 'vlc_module.c', 'vlc_mediacontrol.c', |
|---|
| 69 | 69 | # 'vlc_position.c', 'vlc_instance.c', 'vlc_input.c' ] |
|---|
| 70 | 70 | source_files = [ 'vlc_module.c' ] |
|---|
| … | … | |
| 92 | 92 | video player. Documentation can be found on the VLC wiki : |
|---|
| 93 | 93 | http://wiki.videolan.org/index.php/ExternalAPI |
|---|
| 94 | | |
|---|
| 95 | | The module also provides a Object type, which gives a low-level access |
|---|
| 96 | | to the vlc objects and their variables. |
|---|
| 97 | 94 | |
|---|
| 98 | 95 | This module also provides a MediaControl object, which implements an |
|---|
| … | … | |
| 125 | 122 | # Get status information |
|---|
| 126 | 123 | mc.get_stream_information() |
|---|
| 127 | | |
|---|
| 128 | | # Access lowlevel objets |
|---|
| 129 | | o=vlc.Object(1) |
|---|
| 130 | | o.info() |
|---|
| 131 | | i=o.find_object('input') |
|---|
| 132 | | i.list() |
|---|
| 133 | | i.get('time') |
|---|
| 134 | | |
|---|
| 135 | 124 | """, |
|---|
| 136 | 125 | ext_modules = [ vlclocal ]) |
|---|
| rc9958ed |
r7b89d13 |
|
| 21 | 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
|---|
| 22 | 22 | *****************************************************************************/ |
|---|
| 23 | | |
|---|
| 24 | | /* We need to access some internal features of VLC (for vlc_object) */ |
|---|
| 25 | | /* This is gruik as we are not libvlc at all */ |
|---|
| 26 | | #define __LIBVLC__ |
|---|
| 27 | | |
|---|
| 28 | 23 | |
|---|
| 29 | 24 | #include "vlcglue.h" |
|---|
| … | … | |
| 68 | 63 | return; |
|---|
| 69 | 64 | if( PyType_Ready( &MediaControl_Type ) < 0 ) |
|---|
| 70 | | return; |
|---|
| 71 | | if( PyType_Ready( &vlcObject_Type ) < 0 ) |
|---|
| 72 | 65 | return; |
|---|
| 73 | 66 | if( PyType_Ready( &vlcInstance_Type ) < 0 ) |
|---|
| … | … | |
| 123 | 116 | ( PyObject * )&MediaControl_Type ); |
|---|
| 124 | 117 | |
|---|
| 125 | | Py_INCREF( &vlcObject_Type ); |
|---|
| 126 | | PyModule_AddObject( p_module, "Object", |
|---|
| 127 | | ( PyObject * )&vlcObject_Type ); |
|---|
| 128 | 118 | Py_INCREF( &vlcInstance_Type ); |
|---|
| 129 | 119 | PyModule_AddObject( p_module, "Instance", |
|---|
| … | … | |
| 181 | 171 | #include "vlc_instance.c" |
|---|
| 182 | 172 | #include "vlc_input.c" |
|---|
| 183 | | #include "vlc_object.c" |
|---|
| rc9958ed |
r7b89d13 |
|
| 75 | 75 | |
|---|
| 76 | 76 | /********************************************************************** |
|---|
| 77 | | * VLC Object |
|---|
| 78 | | **********************************************************************/ |
|---|
| 79 | | #define VLCSELF ( ( vlcObject* )self ) |
|---|
| 80 | | |
|---|
| 81 | | /********************************************************************** |
|---|
| 82 | | * VLCObject Object |
|---|
| 83 | | **********************************************************************/ |
|---|
| 84 | | typedef struct |
|---|
| 85 | | { |
|---|
| 86 | | PyObject_HEAD |
|---|
| 87 | | vlc_object_t* p_object; |
|---|
| 88 | | int b_released; |
|---|
| 89 | | } vlcObject; |
|---|
| 90 | | |
|---|
| 91 | | /********************************************************************** |
|---|
| 92 | 77 | * MediaControl Object |
|---|
| 93 | 78 | **********************************************************************/ |
|---|
| … | … | |
| 130 | 115 | |
|---|
| 131 | 116 | /* Forward declarations */ |
|---|
| 132 | | staticforward PyTypeObject vlcObject_Type; |
|---|
| 133 | 117 | staticforward PyTypeObject MediaControl_Type; |
|---|
| 134 | 118 | staticforward PyTypeObject PyPosition_Type; |
|---|