root/bindings/python/vlc_internal.h
| Revision dbddc5ae452252807b520abdb803cf5f231bbdf0, 2.4 kB (checked in by Pierre d'Herbemont <pdherbemont@free.fr>, 9 months ago) | |
|---|---|
| |
| Line | |
|---|---|
| 1 | /***************************************************************************** |
| 2 | * vlc_internal.h: Header for the Python vlcinternal binding |
| 3 | ***************************************************************************** |
| 4 | * Copyright (C) 1998-2004 the VideoLAN team |
| 5 | * $Id$ |
| 6 | * |
| 7 | * Authors: Olivier Aubert <oaubert at bat710.univ-lyon1.fr> |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License as published by |
| 11 | * the Free Software Foundation; either version 2 of the License, or |
| 12 | * (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU General Public License |
| 20 | * along with this program; if not, write to the Free Software |
| 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
| 22 | *****************************************************************************/ |
| 23 | #ifndef _VLCINTERNAL_H |
| 24 | #define _VLCINTERNAL_H 1 |
| 25 | |
| 26 | /* We need to access some internal features of VLC (for vlc_object) */ |
| 27 | /* This is gruik as we are not libvlc at all */ |
| 28 | #define __LIBVLC__ |
| 29 | |
| 30 | #include <Python.h> |
| 31 | #include "structmember.h" |
| 32 | |
| 33 | #include <stdio.h> |
| 34 | #include <vlc/vlc.h> |
| 35 | #include <vlc/libvlc.h> |
| 36 | /* Even gruiker ! We access variable_t ! */ |
| 37 | #include "../../src/misc/variables.h" |
| 38 | |
| 39 | /* Python 2.5 64-bit support compatibility define */ |
| 40 | #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) |
| 41 | typedef int Py_ssize_t; |
| 42 | #define PY_SSIZE_T_MAX INT_MAX |
| 43 | #define PY_SSIZE_T_MIN INT_MIN |
| 44 | #endif |
| 45 | |
| 46 | /********************************************************************** |
| 47 | * VLC Object |
| 48 | **********************************************************************/ |
| 49 | #define VLCSELF ( ( vlcObject* )self ) |
| 50 | |
| 51 | /********************************************************************** |
| 52 | * VLCObject Object |
| 53 | **********************************************************************/ |
| 54 | typedef struct |
| 55 | { |
| 56 | PyObject_HEAD |
| 57 | vlc_object_t* p_object; |
| 58 | int b_released; |
| 59 | } vlcObject; |
| 60 | |
| 61 | /* Forward declarations */ |
| 62 | staticforward PyTypeObject vlcObject_Type; |
| 63 | |
| 64 | /* Long long conversion on Mac os X/ppc */ |
| 65 | #if defined (__ppc__) || defined(__ppc64__) |
| 66 | #define ntohll(x) ((long long) x >> 64) |
| 67 | #else |
| 68 | #define ntohll(x) (x) |
| 69 | #endif |
| 70 | |
| 71 | #endif |
Note: See TracBrowser for help on using the browser.
