pyxine-0.1alpha2.orig/0040755000175000017500000000000007754223263013725 5ustar pimanpimanpyxine-0.1alpha2.orig/examples/0040755000175000017500000000000007622533572015544 5ustar pimanpimanpyxine-0.1alpha2.orig/examples/Makefile0100644000175000017500000000174707621051152017176 0ustar pimanpiman# $Id: Makefile,v 1.1.1.1 2003/02/08 00:42:18 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. TOP = .. PYSOURCE = player.py tkplayer.py xine-info.py DIST_FILES= Makefile $(PYSOURCE) include $(TOP)/common.mak pyxine-0.1alpha2.orig/examples/player.py0100644000175000017500000001422107621051152017373 0ustar pimanpiman#!/usr/bin/env python # $Id: player.py,v 1.1.1.1 2003/02/08 00:42:18 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. """Demo pyxine player. Note that, at present, tkplayer.py is slightly more polished than this one. """ from Xlib import X, Xutil, threaded, display, XK import pyxine import sys, os, os.path XINECFG = os.path.join(os.environ['HOME'], '.xine/config2') LOGO = "/usr/share/xine/skins/xine-ui_logo.mpv" class Display(display.Display): def __init__(self, display_name=""): if not display_name: display_name = os.environ['DISPLAY'] display.Display.__init__(self, display_name) self.WM_DELETE_WINDOW = self.intern_atom('WM_DELETE_WINDOW') self.WM_PROTOCOLS = self.intern_atom('WM_PROTOCOLS') class Window: def __init__(self, display): self.display = display self.screen = display.screen() self.colormap = self.screen.default_colormap bg = self.colormap.alloc_named_color("gray10").pixel self.window = self.screen.root.create_window( 50, 50, 600, 400, 0, self.screen.root_depth, X.InputOutput, X.CopyFromParent, # special attribute values background_pixel = bg, event_mask = (#X.ExposureMask | X.StructureNotifyMask), colormap = self.colormap ) self.window.set_wm_name('Pyxine') self.window.set_wm_icon_name('Pyxine') self.window.set_wm_class('pyxine', 'PyXine') self.window.set_wm_protocols([display.WM_DELETE_WINDOW]) self.window.set_wm_hints(flags = Xutil.StateHint, initial_state = Xutil.NormalState) self.window.set_wm_normal_hints(flags = (Xutil.PPosition | Xutil.PSize | Xutil.PMinSize), min_width = 20, min_height = 20) # Map the window, making it visible self.window.map() # Wait for window to map. # FIXME: is this right? while 1: e = display.next_event() if e.type == X.MapNotify: break self.xine_visual = pyxine.XlibDrawable(self.window) class Player: def __init__(self, window): xine = pyxine.Xine(cfg_filename=XINECFG) ao = xine.open_audio_driver() vo = xine.open_video_driver(data=window.xine_visual) #vo = xine.open_video_driver("xv", visual="X11", data=vis) stream = xine.stream_new(ao, vo) self.stream = stream self.play(LOGO) def play(self, mrl, pos=0, time=0): stream = self.stream stream.open(mrl) if stream.has_video: self.degoomify() else: self.goomify() stream.play(pos, time) def stop(self): self.stream.stop() def pause(self): stream = self.stream if stream.speed == "NORMAL": stream.speed = "PAUSE" else: stream.speed = "NORMAL" def degoomify(self): stream = self.stream stream.audio_source.wire(stream.ao) def goomify(self): stream = self.stream from pyxine import post goom = post.Post(stream, "goom", audio_target=stream.ao, video_target=stream.vo) stream.audio_source.wire(goom.inputs["audio in"]) class Quit(Exception): pass class Main: def __init__(self): self.display = Display() self.window = Window(self.display) self.player = Player(self.window) self.playlist = sys.argv[1:] self.window.window.change_attributes( event_mask=(X.StructureNotifyMask | X.KeyPressMask)) try: while 1: e = self.display.next_event() print "X11 EVENT", e self.handle_event(e) except Quit: pass def handle_event(self, e): if e.type == X.DestroyNotify: raise Quit elif e.type == X.ClientMessage: self.handle_ClientMessage(e) elif e.type == X.KeyPress: self.handle_KeyPress(e) _actions = { XK.XK_Page_Down:'play_next', XK.XK_Page_Up: 'play_prev', XK.XK_Return: 'play', XK.XK_p: 'play', XK.XK_q: 'quit', XK.XK_s: 'stop', XK.XK_space: 'pause', } def handle_KeyPress(self, e): display = self.display keycode = display.keycode_to_keysym(e.detail ,0) action = self._actions.get(keycode) if action: print "ACTION", action getattr(self, action)() else: print "KEYCODE", keycode def quit(self): raise Quit def play(self): self.player.play(self.playlist[0]) def stop(self): self.player.stop() def pause(self): self.player.pause() def play_next(self): self.playlist.append(self.playlist.pop(0)) self.play() def play_prev(self): self.playlist.insert(0, self.playlist.pop()) self.play() def handle_ClientMessage(self, e): if e.client_type == window.WM_PROTOCOLS: fmt, data = e.data if fmt == 32 and data[0] == window.WM_DELETE_WINDOW: raise Quit if __name__ == '__main__': Main() pyxine-0.1alpha2.orig/examples/tkplayer.py0100644000175000017500000001660107621051152017736 0ustar pimanpiman#!/usr/bin/env python # $Id: tkplayer.py,v 1.1.1.1 2003/02/08 00:42:18 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. from Tkinter import * import pyxine from pyxine import constwrap import os, os.path XINECFG = os.path.join(os.environ['HOME'], '.xine/config2') LOGO = "/usr/share/xine/skins/xine-ui_logo.mpv" # Callbacks from pyxine happen asynchronously. # Tkinter doesn't seem to be thread-safe. # So we need a mutex to make sure only one thread # can call the Tkinter at a time. class RMutex: class _Lock: def __init__(self, mutex): self.mutex = mutex mutex._lock.acquire() def __del__(self): self.mutex._lock.release() def __init__(self): import threading self._lock = threading.RLock() def __call__(self): return RMutex._Lock(self) theTkMutex = RMutex() class X11Visual(pyxine.TkWidget): def __init__(self, widget): pyxine.TkWidget.__init__(self, widget) self.widget = widget self.set_verbosity(2) self.video_geometry = None def compute_output_size(self, video_geometry): width, height = self.natural_output_size(video_geometry) parent = self.widget.master scale = max(1.0, min(parent.winfo_height() / float(height), parent.winfo_width() / float(width))) return int(width * scale + 0.5), int(height * scale + 0.5) def resize_window(self, width, height): print "RESIZE WINDOW", (width, height) win = self.widget win.update_idletasks() if (width,height) != (win.winfo_width(), win.winfo_height()): print "WINDOW RESIZE", (width, height) win.config(width=width, height=height, bg="black") win.update_idletasks() win.config(bg="") def dest_size_cb(self, *args): lock = theTkMutex() return pyxine.TkWidget.dest_size_cb(self, *args) def frame_output_cb(self, *args): lock = theTkMutex() return pyxine.TkWidget.frame_output_cb(self, *args) class Player(Frame): def __init__(self, master=None): Frame.__init__(self, master, bg='gray10', width=100, height=100) self.stream = None vidwin = Frame(self, bg='') vidwin.grid() self.grid_propagate(1) vidwin.bind('', lambda e: self.open_stream()) vidwin.bind('', lambda e: self.close_stream()) self.vidwin = vidwin def open_stream(self): if self.stream: return xine = pyxine.Xine(cfg_filename=XINECFG) visual = X11Visual(self.vidwin) vo = xine.open_video_driver("xv", data=visual) stream = xine.stream_new(vo=vo) self.listener = stream.new_event_listener(self.xine_event_cb) self.stream = stream self.visual = visual self.play(LOGO) def close_stream(self): self.listener = None self.stream = None self.visual = None def xine_event_cb(self, event): if event.type == "FRAME_FORMAT_CHANGE": self.frame_format_change(event.data) elif event.type == "UI_PLAYBACK_FINISHED": print "PLAYBACK DONE" self.stop() else: print "Unhandled event", event def frame_format_change(self, format): video_geometry = format.get_video_geometry() lock = theTkMutex() width, height = self.visual.natural_output_size(video_geometry) print video_geometry, '->', (width, height, self.visual.pixel_aspect) self.vidwin.config(width=width, height=height) top = self.winfo_toplevel() top.aspect(width, height, width, height) top.minsize(width, height) top.update_idletasks() fwidth = top.winfo_width() - (self.winfo_width() - self.winfo_reqwidth()) fheight = top.winfo_height() - (self.winfo_height() - self.winfo_reqheight()) top.geometry("%dx%d" % (fwidth, fheight)) print "FRAME SIZE CHANGE", (width, height), (fwidth, fheight) def play(self, mrl): stream = self.stream stream.close() print "OPEN" stream.open(mrl) self.current_mrl = mrl if stream.has_video: self.degoomify() else: self.goomify() print "PLAY" stream.play() def stop(self): stream = self.stream if self.current_mrl != LOGO: self.play(LOGO) else: self.stream.close() def pause(self): stream = self.stream if stream.speed == "NORMAL": stream.speed = "PAUSE" else: stream.speed = "NORMAL" def seek(self, pos): stream = self.stream stream.stop() stream.play(pos) def seekrel(self, secs): stream = self.stream pos = stream.get_pos_length()[1] stream.stop() stream.play(start_time = pos + secs) def degoomify(self): stream = self.stream stream.audio_source.wire(stream.ao) def goomify(self): stream = self.stream from pyxine import post goom = post.Post(stream, "goom", audio_target=stream.ao, video_target=stream.vo) stream.audio_source.wire(goom.inputs["audio in"]) class Main(Tk): def __init__(self): Tk.__init__(self) self.minsize(100,100) self.title("TkPyxine") self.config(bg="red") self.player = Player(self) self.player.pack(fill=BOTH, expand=1) self.playlist = sys.argv[1:] self.bind("p", lambda e: self.play()) self.bind("", lambda e: self.play()) self.bind("s", lambda e: self.player.stop()) self.bind("q", lambda e: self.quit()) self.bind("", lambda e: self.player.pause()) for d in range(0,10): self.bind(str(d), self.seek) self.bind("", lambda e: self.player.seekrel(30)) self.bind("", lambda e: self.player.seekrel(-30)) self.bind("", lambda e: self.prev()) self.bind("", lambda e: self.next()) def play(self): print "PLAY" self.player.play(self.playlist[0]) def seek(self, e): pos = int(e.char) * 10 print "SEEK", pos self.player.seek(pos) def next(self): head = self.playlist.pop(0) self.playlist.append(head) self.play() def prev(self): tail = self.playlist.pop() self.playlist.insert(0, tail) self.play() def main (): root = Main() root.mainloop() if __name__ == '__main__': main() pyxine-0.1alpha2.orig/examples/xine-info.py0100644000175000017500000000267607621051152020006 0ustar pimanpiman#!/usr/bin/env python # $Id: xine-info.py,v 1.1.1.1 2003/02/08 00:42:18 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. import pyxine import sys sys.stdout = sys.stderr xine = pyxine.Xine(cfg_filename="/tmp/junk-xine.cfg") s = xine.stream_new() s.verbosity = 1 print "Config:" for k in xine.config: print "%s: %s" % (k, xine.config[k]) print "Browsable Plugins", xine.get_browsable_input_plugin_ids() print "Autoplay Plugins", xine.get_autoplay_input_plugin_ids() print "Post Plugins", xine.list_post_plugins() print "Audio Output Plugins", xine.list_audio_output_plugins() print "Video Output Plugins", xine.list_video_output_plugins() xine.config.save("/tmp/junk-xine.cfg") pyxine-0.1alpha2.orig/pxlib/0040755000175000017500000000000007622533572015044 5ustar pimanpimanpyxine-0.1alpha2.orig/pxlib/Makefile0100644000175000017500000000267607621051155016503 0ustar pimanpiman# $Id: Makefile,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. TOP = .. PACKAGE = pyxine CCFILES = Mutex.cc Thread.cc XDisplay.cc Traits.cc CCFILES += Callback.cc Geometry.cc WindowList.cc CCFILES += PxWindow.cc HFILES = pxlib.h $(CCFILES:.cc=.h) GEN_FILES = pxlib.py pxlib_wrap.cc DIST_FILES= Makefile pxlib.i $(CCFILES) $(HFILES) $(GEN_FILES) OFILES = pxlib_wrap.o $(CCFILES:.cc=.o) SOFILES = pxlibc$(SO) BLIB_FILES= $(SOFILES) include $(TOP)/common.mak LIBS += -lstdc++ pxlibc$(SO): $(OFILES) $(LDSHARED) $^ $(LIBS) -o $@ pxlib.py pxlib_wrap.cc: pxlib.i PxWindow.h $(SWIG) -python -c++ -shadow -dnone -o pxlib_wrap.cc pxlib.i pyxine-0.1alpha2.orig/pxlib/pxlib.i0100644000175000017500000000240507621051155016321 0ustar pimanpiman/* -*-c++-*- * * $Id: pxlib.i,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ %module pxlib %{ #include "pxlib.h" #include "PxWindow.h" using namespace pyxine; %} %typemap (python,in) PyObject * { $target = $source; } %typemap (python,out) PyObject * { $target = $source; } %except(python) { try { $function; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } typedef unsigned long Window; %include "PxWindow.h" pyxine-0.1alpha2.orig/pxlib/Mutex.cc0100644000175000017500000000165107621051155016444 0ustar pimanpiman/* -*-c++-*- * * $Id: Mutex.cc,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma implementation #include "Mutex.h" pyxine-0.1alpha2.orig/pxlib/Thread.cc0100644000175000017500000000254607621051155016555 0ustar pimanpiman/* -*-c++-*- * * $Id: Thread.cc,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma implementation #include "Thread.h" BEGIN_PXLIB_NAMESPACE void * ThreadRunner::c_thread_runner (void *data) { static_cast(data)->run(); return 0; } ThreadRunner::ThreadRunner (Thread * thread) { pthread_create(&t, NULL, c_thread_runner, thread); } ThreadRunner::~ThreadRunner () { cerr << "Stopping Thread" << endl; // FIXME: check for errors pthread_cancel(t); pthread_join(t, NULL); cerr << "Thread stopped" << endl; } END_PXLIB_NAMESPACE pyxine-0.1alpha2.orig/pxlib/XDisplay.cc0100644000175000017500000001015107622506433017077 0ustar pimanpiman/* -*-c++-*- * * $Id: XDisplay.cc,v 1.2 2003/02/12 18:06:19 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma implementation #include "XDisplay.h" BEGIN_PXLIB_NAMESPACE class XDisplayLock { Display * display; public: XDisplayLock(Display * _d) : display(_d) { XLockDisplay(display); } ~XDisplayLock() { XUnlockDisplay(display); } }; //////////////////////////////////////////////////////////////// XDisplay::XDisplay (const char * display_name) : name(XDisplayName(display_name)) { static bool seen = false; if (!seen) { if (!XInitThreads()) throw Error("Your Xlib doesn't support threads?"); seen = true; } display = XOpenDisplay(name.c_str()); if (!display) throw Error("Can't open display"); } XDisplay::~XDisplay () { //FIXME:cerr << "XDisplay destroy" << endl; XDisplayLock lock(display); XCloseDisplay(display); //FIXME:cerr << "XDisplay destroyed" << endl; } Bool XDisplay::pick_any_event (Display *, XEvent *, XPointer) { return True; } bool XDisplay::get_event (XEvent * e) { XDisplayLock l(display); return XCheckIfEvent(display, e, pick_any_event, 0); } void XDisplay::next_event (XEvent * e) { pthread_testcancel(); while (! get_event(e)) { int fd = ConnectionNumber(display); fd_set rfds; FD_ZERO(&rfds); FD_SET(fd, &rfds); fd_set efds = rfds; select(fd+1, &rfds, 0, &efds, 0); pthread_testcancel(); } } int XDisplay::get_screen_number_of_window (Window w) { XWindowAttributes attr; XDisplayLock xlock(display); if (!XGetWindowAttributes(display, w, &attr)) throw Error("XGetWindowAttributes failed"); return XScreenNumberOfScreen(attr.screen); } double XDisplay::get_pixel_aspect(int screen) { XDisplayLock lock(display); double res_h = ( (double)DisplayWidth(display, screen) / DisplayWidthMM(display, screen)); double res_v = ( (double)DisplayHeight(display, screen) / DisplayHeightMM(display, screen)); return res_v / res_h; } WindowGeometry XDisplay::get_window_geometry(Window w) { WindowGeometry g; Window _window; unsigned width, height, _border_width, _depth; XDisplayLock lock(display); if (!XGetGeometry(display, w, &_window, &g.x0, &g.y0, &width, &height, &_border_width, &_depth)) throw Error("XGetGeometry failed"); g.width = width; g.height = height; int screen = get_screen_number_of_window(w); g.pixel_aspect = get_pixel_aspect(screen); return g; } WindowGeometry XDisplay::get_window_geometry(const XConfigureEvent& e) { WindowGeometry g; g.width = e.width; g.height = e.height; if (e.display != display) cerr << "Warning: event.display != display" << endl; #if 0 // This doesn't seem to work... g.x0 = e.x; g.y0 = e.y; #else Window tmp_win; XDisplayLock lock(e.display); XTranslateCoordinates(e.display, e.window, DefaultRootWindow(e.display), 0, 0, &g.x0, &g.y0, &tmp_win); #endif int screen = get_screen_number_of_window(e.window); g.pixel_aspect = get_pixel_aspect(screen); return g; } void XDisplay::select_input(Window w, long event_mask) { XDisplayLock xlock(display); XSelectInput(display, w, event_mask); } int XDisplay::get_ShmCompletionEvent_type() const { static int SHM_COMPLETION = 0; if (SHM_COMPLETION == 0) { SHM_COMPLETION = XShmGetEventBase(display) + ShmCompletion; } return SHM_COMPLETION; } END_PXLIB_NAMESPACE pyxine-0.1alpha2.orig/pxlib/Traits.cc0100644000175000017500000000165107621051155016610 0ustar pimanpiman/* -*-c++-*- * * $Id: Traits.cc,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma implementation #include "Traits.h" pyxine-0.1alpha2.orig/pxlib/Callback.cc0100644000175000017500000000575207622306254017050 0ustar pimanpiman/* -*-c++-*- * * $Id: Callback.cc,v 1.2 2003/02/11 23:52:12 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma implementation #include "Callback.h" BEGIN_PXLIB_NAMESPACE //////////////////////////////////////////////////////////////// PythonObject::PythonObject (PyObject * object, bool owned) : ptr(object) { if (!object) throw PythonException(); if (!owned) { Py_INCREF(ptr); } } PythonObject::PythonObject (const PythonObject& that) : ptr(that.ptr) { if (ptr) { Py_INCREF(ptr); } } PythonObject& PythonObject::operator= (const PythonObject& that) { if (ptr) { Py_DECREF(ptr); } ptr = that.ptr; if (ptr) { Py_INCREF(ptr); } return *this; } PythonObject::~PythonObject() { if (ptr) { Py_DECREF(ptr); } } //////////////////////////////////////////////////////////////// PythonContext::rep_t::rep_t() : ref_cnt(1) { // You must call this from a python thread. PyEval_InitThreads(); state = PyThreadState_New(PyThreadState_Get()->interp); if (!state) throw Error("PyThreadState_New failed"); PyThreadState_Clear(state); } PythonContext::rep_t::~rep_t() { PyThreadState_Delete(state); } PythonContext::PythonContext() : rep(new rep_t) // You must call this from a python thread. {} PythonContext::PythonContext(const PythonContext& c) : rep(c.rep) { rep->ref_cnt++; } PythonContext::PythonContext& PythonContext::operator=(const PythonContext& c) { if (--rep->ref_cnt == 0) delete rep; rep = c.rep; rep->ref_cnt++; return *this; } PythonContext::~PythonContext () { if (--rep->ref_cnt == 0) delete rep; } //////////////////////////////////////////////////////////////// PythonGlobalLock::PythonGlobalLock(PythonContext& _context) : mutex_lock(_context), context(_context) { // WARNING: You must not be in a python thread when this is called. PyEval_AcquireLock(); saved_state = PyThreadState_Swap(context); } PythonGlobalLock::~PythonGlobalLock() { // Report any pending exception // (This is redundant. Exceptions should be reported and clears // when (the C++ exception) PythonException is thrown. if (PyErr_Occurred()) PyErr_Print(); PyThreadState_Swap(saved_state); PyThreadState_Clear(context); PyEval_ReleaseLock(); } END_PXLIB_NAMESPACE pyxine-0.1alpha2.orig/pxlib/Geometry.cc0100644000175000017500000000472707622506432017150 0ustar pimanpiman/* -*-c++-*- * * $Id: Geometry.cc,v 1.2 2003/02/12 18:06:18 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma implementation #include "Geometry.h" #include #include #include "Traits.h" #include "Callback.h" BEGIN_PXLIB_NAMESPACE VideoGeometry Traits::unpack_tuple(PyObject * tuple) { VideoGeometry g; if (!PyArg_ParseTuple(tuple, "iid:return from dest_size_cb", &g.width, &g.height, &g.pixel_aspect)) throw PythonException(); return g; } PyObject * Traits::pack_tuple(const VideoGeometry& g) { PyObject * tuple = Py_BuildValue("(iid)", g.width, g.height, g.pixel_aspect); if (!tuple) throw PythonException(); return tuple; } //////////////////////////////////////////////////////////////// VideoOutputGeometry Traits::unpack_tuple(PyObject * tuple) { VideoOutputGeometry g; if (!PyArg_ParseTuple(tuple, "iiiidii:return from frame_output_cb", &g.dest_x, &g.dest_y, &g.width, &g.height, &g.pixel_aspect, &g.win_x, &g.win_y)) throw PythonException(); return g; } //////////////////////////////////////////////////////////////// PyObject * Traits::pack_tuple(const WindowGeometry& g) { PyObject * tuple = Py_BuildValue("(iiiid)", g.width, g.height, g.x0, g.y0, g.pixel_aspect); if (!tuple) throw PythonException(); return tuple; } std::string Traits::to_string(const WindowGeometry& g) { std::ostringstream buf; buf << "<" << typeid(g).name() << ": " << g.width << "x" << g.height << "+" << g.x0 << "+" << g.y0 << " (" << std::setprecision(2) << g.pixel_aspect << ")" << ">"; return buf.str(); } END_PXLIB_NAMESPACE pyxine-0.1alpha2.orig/pxlib/WindowList.cc0100644000175000017500000000335607621051155017451 0ustar pimanpiman/* -*-c++-*- * * $Id: WindowList.cc,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma implementation #include "WindowList.h" #include "PxWindow.h" BEGIN_PXLIB_NAMESPACE //////////////////////////////////////////////////////////////// LockedWindowPtr::LockedWindowPtr (PxWindow * _w) : w(_w) { if (w) lock = MutexLock(w); } //////////////////////////////////////////////////////////////// void WindowList::add (PxWindow * w) { MutexLock lock(mutex); if (! insert(value_type(Window(*w), w)).second) throw Error("window already in list"); } void WindowList::remove (PxWindow * w) { MutexLock lock(mutex); if (!erase(Window(*w))) throw Error("window not in list"); } LockedWindowPtr WindowList::find (Window window) { MutexLock lock(mutex); iterator i = super::find(window); return i == end() ? 0 : i->second; } bool WindowList::empty () const { MutexLock lock(mutex); return super::empty(); } END_PXLIB_NAMESPACE pyxine-0.1alpha2.orig/pxlib/PxWindow.cc0100644000175000017500000001437007621051155017123 0ustar pimanpiman/* -*-c++-*- * * $Id: PxWindow.cc,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma implementation #include "PxWindow.h" #include "Traits.h" BEGIN_PXLIB_NAMESPACE PxDisplay::PxDisplay(const char * display_name) : XDisplay(display_name), event_thread(this) {} PxDisplay::~PxDisplay() { if (has_windows()) cerr << "Deleting PxDisplay which still has managed windows" << endl; } bool PxDisplay::has_windows () { return ! windows.empty(); } void PxDisplay::run () { XEvent xev; cerr << "Event Thread started for '" << get_name() << "'" << endl; while (1) { next_event(&xev); LockedWindowPtr w = find_window(xev.xany.window); if (w) w->_handle_event(&xev); } } //////////////////////////////////////////////////////////////// PxWindow::XineVisual::XineVisual(XDisplay& _display, Window window, PxWindow *pxwindow) { display = _display; d = window; screen = _display.get_screen_number_of_window(window); user_data = static_cast(pxwindow); dest_size_cb = PxWindow::c_dest_size_cb; frame_output_cb = PxWindow::c_frame_output_cb; } PxWindow::PxWindow(PxDisplay * _display, Window _window, PyObject * _dest_size_cb, PyObject * _frame_output_cb) : display(*_display), window(_window), SHM_COMPLETION(_display->get_ShmCompletionEvent_type()), stream(0), xine_visual(*_display, _window, this), dest_size_cb(_dest_size_cb, "dest_size_cb"), frame_output_cb(_frame_output_cb, "frame_output_cb"), verbosity(0) { // Get window geometry after selecting StructureNotify events MutexLock lock(this); display.add_window(this); display.select_input(window, ExposureMask | StructureNotifyMask); window_geometry = display.get_window_geometry(window); } PxWindow::~PxWindow() { display.remove_window(this); //MutexLock lock(this); display.select_input(window, NoEventMask); } const x11_visual_t * PxWindow::get_xine_x11_visual () const { return &xine_visual; } void PxWindow::set_xine_stream (xine_stream_t * s) { stream = s; } void PxWindow::set_verbosity (int _verbosity) { verbosity = _verbosity; } int PxWindow::get_verbosity () const { return verbosity; } double PxWindow::get_pixel_aspect () const { int screen = display.get_screen_number_of_window(window); return display.get_pixel_aspect(screen); } void PxWindow::invalidate_cache() const { dest_size_cb.invalidate_cache(); frame_output_cb.invalidate_cache(); } void PxWindow::_handle_event(XEvent * e) { xine_stream_t * stream = this->stream; // atomic copy if (e->type == SHM_COMPLETION) { if (stream) xine_gui_send_vo_data(stream, XINE_GUI_SEND_COMPLETION_EVENT, static_cast(e)); if (verbosity > 2) cerr << "Got ShmCompletionEvent" << endl; return; } switch (e->type) { case Expose: if (stream) xine_gui_send_vo_data(stream, XINE_GUI_SEND_EXPOSE_EVENT, static_cast(e)); if (verbosity > 1) cerr << "Got ExposeEvent" << endl; break; case ConfigureNotify: { WindowGeometry new_geometry( display.get_window_geometry(e->xconfigure) ); if (window_geometry.update(new_geometry)) invalidate_cache(); if (verbosity > 1) cerr << "Got ConfigureNotify: " << str(new_geometry) << endl; } break; case MapNotify: // This seems not to be used by any X11 xine video output drivers, // but, what the hell? if (stream) xine_gui_send_vo_data(stream, XINE_GUI_SEND_VIDEOWIN_VISIBLE, reinterpret_cast(1)); if (verbosity > 1) cerr << "Got MapNotify" << endl; break; case UnmapNotify: // This seems not to be used by any X11 xine video output drivers, // but, what the hell? if (stream) xine_gui_send_vo_data(stream, XINE_GUI_SEND_VIDEOWIN_VISIBLE, reinterpret_cast(0)); if (verbosity > 1) cerr << "Got UnmapNotify" << endl; break; default: if (verbosity > 0) cerr << "Got unhandled event: type = " << e->type << endl; break; } } PyObject * PxWindow::get_window_geometry () const { return pack_tuple(WindowGeometry(window_geometry)); } void PxWindow::c_dest_size_cb (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_width, int *dest_height, double *dest_pixel_aspect) { PxWindow * self = static_cast(user_data); VideoGeometry input(video_width, video_height, video_pixel_aspect); VideoGeometry output; try { output = self->dest_size_cb(input, self->verbosity); } catch (Error e) { cerr << "Exception during callback: " << e << endl; } *dest_width = output.width; *dest_height = output.height; *dest_pixel_aspect = output.pixel_aspect; } void PxWindow::c_frame_output_cb (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_x, int *dest_y, int *dest_width, int *dest_height, double *dest_pixel_aspect, int *win_x, int *win_y) { PxWindow * self = static_cast(user_data); VideoGeometry input(video_width, video_height, video_pixel_aspect); VideoOutputGeometry output; try { output = self->frame_output_cb(input, self->verbosity); } catch (Error e) { cerr << "Exception during callback: " << e << endl; } *dest_x = output.dest_x; *dest_y = output.dest_y; *dest_width = output.width; *dest_height = output.height; *dest_pixel_aspect = output.pixel_aspect; *win_x = output.win_x; *win_y = output.win_y; } END_PXLIB_NAMESPACE pyxine-0.1alpha2.orig/pxlib/pxlib.h0100644000175000017500000000253307621051155016322 0ustar pimanpiman/* -*-c++-*- * * $Id: pxlib.h,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #ifndef _pxlib_H #define _pxlib_H #include #include #include #define BEGIN_PXLIB_NAMESPACE namespace pyxine { #define END_PXLIB_NAMESPACE } BEGIN_PXLIB_NAMESPACE class Error { std::string msg; public: Error (const std::string& m) : msg(m) {} const char * get_message () const { return msg.c_str(); } operator const char * () const { return msg.c_str(); } }; using std::cerr; using std::endl; END_PXLIB_NAMESPACE #endif // !_pxlib_H pyxine-0.1alpha2.orig/pxlib/Mutex.h0100644000175000017500000000571307621051155016311 0ustar pimanpiman/* -*-c++-*- * * $Id: Mutex.h,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma interface #ifndef _Mutex_H #define _Mutex_H #include "pxlib.h" extern "C" { # include } BEGIN_PXLIB_NAMESPACE class Mutex { private: pthread_mutex_t m; public: Mutex() { pthread_mutex_init(&m, NULL); } ~Mutex() { pthread_mutex_destroy(&m); } operator pthread_mutex_t * () { return &m; } }; class MutexLock { struct lock_t { pthread_mutex_t * mp; int ref_cnt; lock_t(pthread_mutex_t * _mp) : mp(_mp), ref_cnt(1) { pthread_mutex_lock(mp); } ~lock_t() { pthread_mutex_unlock(mp); } }; lock_t * lock; public: MutexLock() : lock(0) {} MutexLock(pthread_mutex_t * m) : lock(new lock_t(m)) {} MutexLock(Mutex * m) : lock(new lock_t(*m)) {} MutexLock(const MutexLock& l) : lock(l.lock) { if (lock) lock->ref_cnt++; } MutexLock& operator= (const MutexLock& l) { if (lock && --lock->ref_cnt == 0) delete lock; lock = l.lock; if (lock) lock->ref_cnt++; return *this; } ~MutexLock () { if (lock && --lock->ref_cnt == 0) delete lock; } }; /** A atomic data item. * * The data contained within is protected by a mutex, so that * access to the data is guaranteed to be atomic. */ template class atomic { public: typedef T data_type; private: data_type value; mutable Mutex mutex; public: atomic() {} atomic(const data_type& x) : value(x) {} atomic(const atomic& a) : value(a) {} /** Assigment. * * Data only comes in with the mutex held. */ atomic& operator= (const data_type& new_value) { MutexLock l(mutex); value = new_value; return *this; } /** Update value. * * Update the value. * * @return True iff the update changed the value. */ bool update (const data_type& new_value) { MutexLock l(mutex); bool changed = value != new_value; if (changed) value = new_value; return changed; } /** * Conversion to data_type. * * This is the only way to access the data. */ operator data_type () const { MutexLock l(mutex); return value; } }; END_PXLIB_NAMESPACE #endif // !_Mutex_H pyxine-0.1alpha2.orig/pxlib/Thread.h0100644000175000017500000000246507621051155016417 0ustar pimanpiman/* -*-c++-*- * * $Id: Thread.h,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma interface #ifndef _Thread_H #define _Thread_H #include "pxlib.h" extern "C" { # include } BEGIN_PXLIB_NAMESPACE class Thread { public: virtual void run () = 0; }; extern "C" { typedef void * thread_runner_t(void *); } class ThreadRunner { pthread_t t; static thread_runner_t c_thread_runner; public: ThreadRunner (Thread * thread); ~ThreadRunner (); }; END_PXLIB_NAMESPACE #endif // !_Thread_H pyxine-0.1alpha2.orig/pxlib/XDisplay.h0100644000175000017500000000427107621051155016742 0ustar pimanpiman/* -*-c++-*- * * $Id: XDisplay.h,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma interface #ifndef _XDisplay_H #define _XDisplay_H extern "C" { # include # include # include # include extern int XShmGetEventBase(Display *); } #include #include "pxlib.h" #include "Geometry.h" BEGIN_PXLIB_NAMESPACE extern "C" { typedef Bool event_predicate_t (Display *, XEvent *, XPointer); } class WindowGeometry; class XDisplay { std::string name; Display * display; static event_predicate_t pick_any_event; bool get_event (XEvent * e); public: XDisplay (const char * display_name); ~XDisplay (); operator Display * () { return display; } const std::string& get_name () { return name; } int get_screen_number_of_window (Window w); double get_pixel_aspect(int screen); void select_input (Window w, long event_mask); WindowGeometry get_window_geometry (Window w); WindowGeometry get_window_geometry (const XConfigureEvent& e); int get_ShmCompletionEvent_type() const; /** * We implement our own version of XNextEvent, because * the normal one doesn't appear to be completely thread safe. * (If thread is cancelled while in XNextEvent, it seems * the Display lock is still held... XCloseDisplay hangs) */ void next_event (XEvent * e); }; END_PXLIB_NAMESPACE #endif // !_XDisplay_H pyxine-0.1alpha2.orig/pxlib/Traits.h0100644000175000017500000000267107621051155016455 0ustar pimanpiman/* -*-c++-*- * * $Id: Traits.h,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma interface #ifndef _Traits_H #define _Traits_H #include "pxlib.h" extern "C" { # include } #include BEGIN_PXLIB_NAMESPACE template class Traits { public: static T unpack_tuple (PyObject * tuple); static PyObject * pack_tuple (const T& x); static std::string to_string (const T& x); }; template inline PyObject * pack_tuple (const T& x) { return Traits::pack_tuple(x); } template inline std::string str (const T& x) { return Traits::to_string(x); } END_PXLIB_NAMESPACE #endif // !_Traits_H pyxine-0.1alpha2.orig/pxlib/Callback.h0100644000175000017500000001126007621051155016675 0ustar pimanpiman/* -*-c++-*- * * $Id: Callback.h,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma interface #ifndef _Callback_H #define _Callback_H #include "pxlib.h" #include "Mutex.h" #include "Traits.h" extern "C" { # include } BEGIN_PXLIB_NAMESPACE class PythonException : public Error { public: PythonException() : Error("A python exception occurred.") { PyErr_Print(); } }; //////////////////////////////////////////////////////////////// class PythonObject { PyObject * ptr; public: PythonObject() : ptr(0) {} PythonObject(PyObject * object, bool owned=true); PythonObject(const PythonObject& that); PythonObject& operator= (const PythonObject& that); ~PythonObject(); operator PyObject * () const { return ptr; } operator bool () const { return ptr != 0; } int refcnt () const { return ptr ? ptr->ob_refcnt : 0; } // debugging }; //////////////////////////////////////////////////////////////// class PythonContext { struct rep_t { int ref_cnt; Mutex mutex; PyThreadState * state; rep_t(); ~rep_t(); }; rep_t * rep; friend class PythonGlobalLock; operator PyThreadState * () const { return rep->state; } operator Mutex * () const { return &rep->mutex; } public: PythonContext(); // You must call this from a python thread. PythonContext(const PythonContext& c); PythonContext& operator=(const PythonContext& c); ~PythonContext(); }; class PythonGlobalLock { MutexLock mutex_lock; PythonContext& context; PyThreadState * saved_state; public: PythonGlobalLock(PythonContext& context); // Never call this from a python thread ~PythonGlobalLock(); }; ///////////////////////////////////////////////////////////////////// template class PythonCallback { public: typedef ReturnType return_type; typedef ArgType arg_type; private: mutable PythonContext context; PythonObject callback; public: PythonCallback(PyObject *callable) : callback(callable, false) { if (!PyCallable_Check(callable)) throw Error("callback object not callable"); } return_type operator() (const arg_type& arg) const { PythonGlobalLock s(context); PythonObject args = pack_tuple(arg); PythonObject retval = PyObject_CallObject(callback, args); return Traits::unpack_tuple(retval); } }; //////////////////////////////////////////////////////////////// template class CachedCallback { public: typedef typename Callback::return_type return_type; typedef typename Callback::arg_type arg_type; private: const std::string name; Callback callback; mutable Mutex mutex; mutable bool cache_valid; mutable arg_type cached_arg; mutable return_type cached_retval; public: CachedCallback(const Callback& cb, const char * _name = "") : name(_name), callback(cb), cache_valid(false) {} void invalidate_cache() const { MutexLock lock(mutex); // this is paranoia cache_valid = false; } return_type operator() (const arg_type& arg, int verbosity = 0) const { MutexLock lock(mutex); if (!cache_valid || cached_arg != arg) { if (verbosity > 1) cerr << "Calling callback " << name << endl; cached_retval = callback(arg); cached_arg = arg; cache_valid = true; } else { if (verbosity > 2) cerr << "Not calling callback " << name << endl; } return cached_retval; } }; //////////////////////////////////////////////////////////////// template class CachedPythonCallback : public CachedCallback > { typedef CachedCallback > super; public: CachedPythonCallback(PyObject *callable, const char * name="") : super(callable, name) {} }; //////////////////////////////////////////////////////////////// END_PXLIB_NAMESPACE #endif // !Callback_H pyxine-0.1alpha2.orig/pxlib/Geometry.h0100644000175000017500000000542307621051155017000 0ustar pimanpiman/* -*-c++-*- * * $Id: Geometry.h,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma interface #ifndef _Geometry_H #define _Geometry_H #include "pxlib.h" BEGIN_PXLIB_NAMESPACE struct VideoGeometry { int width; int height; double pixel_aspect; public: VideoGeometry() : pixel_aspect(1.0) {} VideoGeometry(int w, int h, double pa) : width(w), height(h), pixel_aspect(pa) {} bool operator==(const VideoGeometry& that) const; bool operator!=(const VideoGeometry& that) const { return ! (*this == that); } }; inline bool VideoGeometry::operator==(const VideoGeometry& that) const { return width == that.width && height == that.height && pixel_aspect == that.pixel_aspect; } //////////////////////////////////////////////////////////////// struct VideoOutputGeometry { int dest_x, dest_y; int width; int height; double pixel_aspect; int win_x, win_y; public: VideoOutputGeometry() : pixel_aspect(1.0) {} bool operator==(const VideoOutputGeometry& that) const; bool operator!=(const VideoOutputGeometry& that) const { return ! (*this == that); } }; inline bool VideoOutputGeometry::operator==(const VideoOutputGeometry& that) const { return dest_x == that.dest_x && dest_y == that.dest_y && width == that.width && height == that.height && pixel_aspect == that.pixel_aspect && win_x == that.win_x && win_y == that.win_y; } //////////////////////////////////////////////////////////////// struct WindowGeometry { int x0; int y0; int width; int height; double pixel_aspect; public: WindowGeometry() : pixel_aspect(1.0) {} bool operator==(const WindowGeometry& that) const; bool operator!=(const WindowGeometry& that) const { return ! (*this == that); } }; inline bool WindowGeometry::operator==(const WindowGeometry& that) const { return x0 == that.x0 && y0 == that.y0 && width == that.width && height == that.height && pixel_aspect == that.pixel_aspect; } END_PXLIB_NAMESPACE #endif // !Geometry_H pyxine-0.1alpha2.orig/pxlib/WindowList.h0100644000175000017500000000313107621051155017302 0ustar pimanpiman/* -*-c++-*- * * $Id: WindowList.h,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma interface #ifndef _WindowList_H #define _WindowList_H #include extern "C" { #include } #include "pxlib.h" #include "Mutex.h" BEGIN_PXLIB_NAMESPACE class PxWindow; class LockedWindowPtr { PxWindow * w; MutexLock lock; public: LockedWindowPtr (PxWindow * _w); operator PxWindow * () { return w; } PxWindow* operator-> () { return w; } operator bool () { return w; } }; class WindowList : private std::map { typedef std::map super; mutable Mutex mutex; public: void add (PxWindow * w); void remove (PxWindow * w); LockedWindowPtr find (Window window); bool empty () const; }; END_PXLIB_NAMESPACE #endif // !_WindowList_H pyxine-0.1alpha2.orig/pxlib/PxWindow.h0100644000175000017500000000761607621051155016772 0ustar pimanpiman/* -*-c++-*- * * $Id: PxWindow.h,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ #pragma interface #ifndef _PxWindow_H #define _PxWindow_H extern "C" { //# include # include } #include #include "pxlib.h" #include "Mutex.h" #include "Thread.h" #include "Geometry.h" #include "XDisplay.h" #include "Callback.h" #include "WindowList.h" #ifndef SWIG BEGIN_PXLIB_NAMESPACE extern "C" { typedef void c_dest_size_cb_t (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_width, int *dest_height, double *dest_pixel_aspect); typedef void c_frame_output_cb_t (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_x, int *dest_y, int *dest_width, int *dest_height, double *dest_pixel_aspect, int *win_x, int *win_y); } #endif // !SWIG class PxWindow; typedef CachedPythonCallback DestSizeCallback; typedef CachedPythonCallback FrameOutputCallback; //////////////////////////////////////////////////////////////// class PxDisplay : public XDisplay, private Thread { WindowList windows; ThreadRunner event_thread; LockedWindowPtr find_window (Window window) { return windows.find(window); } #ifndef SWIG PxDisplay(const PxDisplay&); // not allowed PxDisplay& operator= (const PxDisplay&); // not allowed #endif // !SWIG public: PxDisplay(const char * display_name); virtual ~PxDisplay(); bool has_windows(); #ifndef SWIG void add_window (PxWindow * w) { windows.add(w); } void remove_window (PxWindow * w) { windows.remove(w); } virtual void run (); // the event loop #endif // !defined(SWIG) }; //////////////////////////////////////////////////////////////// class PxWindow : public Mutex { #ifndef SWIG struct XineVisual : public x11_visual_t { XineVisual(XDisplay& _display, Window window, PxWindow *pxwindow); }; #endif PxDisplay& display; Window window; const int SHM_COMPLETION; atomic stream; /* Stream to which to report events */ const XineVisual xine_visual; atomic window_geometry; DestSizeCallback dest_size_cb; FrameOutputCallback frame_output_cb; int verbosity; #ifndef SWIG PxWindow(const PxWindow&); // not allowed PxWindow& operator= (const PxWindow&); // not allowed #endif static c_dest_size_cb_t c_dest_size_cb; static c_frame_output_cb_t c_frame_output_cb; public: PxWindow(PxDisplay * display, Window window, PyObject *py_dest_size_cb, PyObject *py_frame_output_cb); ~PxWindow(); PyObject * get_window_geometry () const; const x11_visual_t * get_xine_x11_visual () const; void set_xine_stream (xine_stream_t * s); int get_verbosity () const; void set_verbosity (int verbosity); double get_pixel_aspect () const; void invalidate_cache() const; #ifndef SWIG void _handle_event (XEvent * e); operator Window () const { return window; } #endif // !defined(SWIG) }; #ifndef SWIG END_PXLIB_NAMESPACE #endif // !SWIG #endif // !_PxWindow_H pyxine-0.1alpha2.orig/pxlib/pxlib.py0100644000175000017500000000353707622526700016534 0ustar pimanpiman# This file was created automatically by SWIG. import pxlibc class PxDisplayPtr : def __init__(self,this): self.this = this self.thisown = 0 def __del__(self): if self.thisown == 1 : pxlibc.delete_PxDisplay(self.this) def has_windows(self): val = pxlibc.PxDisplay_has_windows(self.this) return val def __repr__(self): return "" class PxDisplay(PxDisplayPtr): def __init__(self,arg0) : self.this = pxlibc.new_PxDisplay(arg0) self.thisown = 1 class PxWindowPtr : def __init__(self,this): self.this = this self.thisown = 0 def __del__(self): if self.thisown == 1 : pxlibc.delete_PxWindow(self.this) def get_window_geometry(self): val = pxlibc.PxWindow_get_window_geometry(self.this) return val def get_xine_x11_visual(self): val = pxlibc.PxWindow_get_xine_x11_visual(self.this) return val def set_xine_stream(self,arg0): val = pxlibc.PxWindow_set_xine_stream(self.this,arg0) return val def get_verbosity(self): val = pxlibc.PxWindow_get_verbosity(self.this) return val def set_verbosity(self,arg0): val = pxlibc.PxWindow_set_verbosity(self.this,arg0) return val def get_pixel_aspect(self): val = pxlibc.PxWindow_get_pixel_aspect(self.this) return val def invalidate_cache(self): val = pxlibc.PxWindow_invalidate_cache(self.this) return val def __repr__(self): return "" class PxWindow(PxWindowPtr): def __init__(self,arg0,arg1,arg2,arg3) : self.this = pxlibc.new_PxWindow(arg0.this,arg1,arg2,arg3) self.thisown = 1 #-------------- FUNCTION WRAPPERS ------------------ #-------------- VARIABLE WRAPPERS ------------------ pyxine-0.1alpha2.orig/pxlib/pxlib_wrap.cc0100644000175000017500000006713507622526700017526 0ustar pimanpiman/* * FILE : pxlib_wrap.cc * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) * Version 1.1 (Patch 5) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. * Permission is granted to distribute this file in any manner provided * this notice remains intact. * * Do not make changes to this file--changes will be lost! * */ #define SWIGCODE /* Implementation : PYTHON */ #define SWIGPYTHON #include #include /*********************************************************************** * $Header:$ * swig_lib/python/python.cfg * * This file contains coded needed to add variable linking to the * Python interpreter. C variables are added as a new kind of Python * datatype. * * Also contains supporting code for building python under Windows * and things like that. * * $Log:$ ************************************************************************/ #ifdef __cplusplus extern "C" { #endif #include "Python.h" #ifdef __cplusplus } #endif /* Definitions for Windows/Unix exporting */ #if defined(__WIN32__) # if defined(_MSC_VER) # define SWIGEXPORT(a,b) __declspec(dllexport) a b # else # if defined(__BORLANDC__) # define SWIGEXPORT(a,b) a _export b # else # define SWIGEXPORT(a,b) a b # endif # endif #else # define SWIGEXPORT(a,b) a b #endif #ifdef SWIG_GLOBAL #ifdef __cplusplus #define SWIGSTATIC extern "C" #else #define SWIGSTATIC #endif #endif #ifndef SWIGSTATIC #define SWIGSTATIC static #endif typedef struct { char *name; PyObject *(*get_attr)(void); int (*set_attr)(PyObject *); } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar **vars; int nvars; int maxvars; } swig_varlinkobject; /* ---------------------------------------------------------------------- swig_varlink_repr() Function for python repr method ---------------------------------------------------------------------- */ static PyObject * swig_varlink_repr(swig_varlinkobject *v) { v = v; return PyString_FromString(""); } /* --------------------------------------------------------------------- swig_varlink_print() Print out all of the global variable names --------------------------------------------------------------------- */ static int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) { int i = 0; flags = flags; fprintf(fp,"Global variables { "); while (v->vars[i]) { fprintf(fp,"%s", v->vars[i]->name); i++; if (v->vars[i]) fprintf(fp,", "); } fprintf(fp," }\n"); return 0; } /* -------------------------------------------------------------------- swig_varlink_getattr This function gets the value of a variable and returns it as a PyObject. In our case, we'll be looking at the datatype and converting into a number or string -------------------------------------------------------------------- */ static PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { int i = 0; char temp[128]; while (v->vars[i]) { if (strcmp(v->vars[i]->name,n) == 0) { return (*v->vars[i]->get_attr)(); } i++; } sprintf(temp,"C global variable %s not found.", n); PyErr_SetString(PyExc_NameError,temp); return NULL; } /* ------------------------------------------------------------------- swig_varlink_setattr() This function sets the value of a variable. ------------------------------------------------------------------- */ static int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { char temp[128]; int i = 0; while (v->vars[i]) { if (strcmp(v->vars[i]->name,n) == 0) { return (*v->vars[i]->set_attr)(p); } i++; } sprintf(temp,"C global variable %s not found.", n); PyErr_SetString(PyExc_NameError,temp); return 1; } statichere PyTypeObject varlinktype = { /* PyObject_HEAD_INIT(&PyType_Type) Note : This doesn't work on some machines */ PyObject_HEAD_INIT(0) 0, "varlink", /* Type name */ sizeof(swig_varlinkobject), /* Basic size */ 0, /* Itemsize */ 0, /* Deallocator */ (printfunc) swig_varlink_print, /* Print */ (getattrfunc) swig_varlink_getattr, /* get attr */ (setattrfunc) swig_varlink_setattr, /* Set attr */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_mapping*/ 0, /* tp_hash */ }; /* Create a variable linking object for use later */ SWIGSTATIC PyObject * SWIG_newvarlink(void) { swig_varlinkobject *result = 0; result = PyMem_NEW(swig_varlinkobject,1); varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */ result->ob_type = &varlinktype; /* _Py_NewReference(result); Does not seem to be necessary */ result->nvars = 0; result->maxvars = 64; result->vars = (swig_globalvar **) malloc(64*sizeof(swig_globalvar *)); result->vars[0] = 0; result->ob_refcnt = 0; Py_XINCREF((PyObject *) result); return ((PyObject*) result); } SWIGSTATIC void SWIG_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v; v= (swig_varlinkobject *) p; if (v->nvars >= v->maxvars -1) { v->maxvars = 2*v->maxvars; v->vars = (swig_globalvar **) realloc(v->vars,v->maxvars*sizeof(swig_globalvar *)); if (v->vars == NULL) { fprintf(stderr,"SWIG : Fatal error in initializing Python module.\n"); exit(1); } } v->vars[v->nvars] = (swig_globalvar *) malloc(sizeof(swig_globalvar)); v->vars[v->nvars]->name = (char *) malloc(strlen(name)+1); strcpy(v->vars[v->nvars]->name,name); v->vars[v->nvars]->get_attr = get_attr; v->vars[v->nvars]->set_attr = set_attr; v->nvars++; v->vars[v->nvars] = 0; } /***************************************************************************** * $Header:$ * * swigptr.swg * * This file contains supporting code for the SWIG run-time type checking * mechanism. The following functions are available : * * SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)); * * Registers a new type-mapping with the type-checker. origtype is the * original datatype and newtype is an equivalent type. cast is optional * pointer to a function to cast pointer values between types (this * is typically used to cast pointers from derived classes to base classes in C++) * * SWIG_MakePtr(char *buffer, void *ptr, char *typestring); * * Makes a pointer string from a pointer and typestring. The result is returned * in buffer which is assumed to hold enough space for the result. * * char * SWIG_GetPtr(char *buffer, void **ptr, char *type) * * Gets a pointer value from a string. If there is a type-mismatch, returns * a character string to the received type. On success, returns NULL. * * * You can remap these functions by making a file called "swigptr.swg" in * your the same directory as the interface file you are wrapping. * * These functions are normally declared static, but this file can be * can be used in a multi-module environment by redefining the symbol * SWIGSTATIC. *****************************************************************************/ #include #ifdef SWIG_GLOBAL #ifdef __cplusplus #define SWIGSTATIC extern "C" #else #define SWIGSTATIC #endif #endif #ifndef SWIGSTATIC #define SWIGSTATIC static #endif /* SWIG pointer structure */ typedef struct SwigPtrType { char *name; /* Datatype name */ int len; /* Length (used for optimization) */ void *(*cast)(void *); /* Pointer casting function */ struct SwigPtrType *next; /* Linked list pointer */ } SwigPtrType; /* Pointer cache structure */ typedef struct { int stat; /* Status (valid) bit */ SwigPtrType *tp; /* Pointer to type structure */ char name[256]; /* Given datatype name */ char mapped[256]; /* Equivalent name */ } SwigCacheType; /* Some variables */ static int SwigPtrMax = 64; /* Max entries that can be currently held */ /* This value may be adjusted dynamically */ static int SwigPtrN = 0; /* Current number of entries */ static int SwigPtrSort = 0; /* Status flag indicating sort */ static int SwigStart[256]; /* Starting positions of types */ /* Pointer table */ static SwigPtrType *SwigPtrTable = 0; /* Table containing pointer equivalences */ /* Cached values */ #define SWIG_CACHESIZE 8 #define SWIG_CACHEMASK 0x7 static SwigCacheType SwigCache[SWIG_CACHESIZE]; static int SwigCacheIndex = 0; static int SwigLastCache = 0; /* Sort comparison function */ static int swigsort(const void *data1, const void *data2) { SwigPtrType *d1 = (SwigPtrType *) data1; SwigPtrType *d2 = (SwigPtrType *) data2; return strcmp(d1->name,d2->name); } /* Binary Search function */ static int swigcmp(const void *key, const void *data) { char *k = (char *) key; SwigPtrType *d = (SwigPtrType *) data; return strncmp(k,d->name,d->len); } /* Register a new datatype with the type-checker */ SWIGSTATIC void SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)) { int i; SwigPtrType *t = 0,*t1; /* Allocate the pointer table if necessary */ if (!SwigPtrTable) { SwigPtrTable = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType)); SwigPtrN = 0; } /* Grow the table */ if (SwigPtrN >= SwigPtrMax) { SwigPtrMax = 2*SwigPtrMax; SwigPtrTable = (SwigPtrType *) realloc((char *) SwigPtrTable,SwigPtrMax*sizeof(SwigPtrType)); } for (i = 0; i < SwigPtrN; i++) if (strcmp(SwigPtrTable[i].name,origtype) == 0) { t = &SwigPtrTable[i]; break; } if (!t) { t = &SwigPtrTable[SwigPtrN]; t->name = origtype; t->len = strlen(t->name); t->cast = 0; t->next = 0; SwigPtrN++; } /* Check for existing entry */ while (t->next) { if ((strcmp(t->name,newtype) == 0)) { if (cast) t->cast = cast; return; } t = t->next; } /* Now place entry (in sorted order) */ t1 = (SwigPtrType *) malloc(sizeof(SwigPtrType)); t1->name = newtype; t1->len = strlen(t1->name); t1->cast = cast; t1->next = 0; t->next = t1; SwigPtrSort = 0; } /* Make a pointer value string */ SWIGSTATIC void SWIG_MakePtr(char *_c, const void *_ptr, char *type) { static char _hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; unsigned long _p, _s; char _result[20], *_r; /* Note : a 64-bit hex number = 16 digits */ _r = _result; _p = (unsigned long) _ptr; if (_p > 0) { while (_p > 0) { _s = _p & 0xf; *(_r++) = _hex[_s]; _p = _p >> 4; } *_r = '_'; while (_r >= _result) *(_c++) = *(_r--); } else { strcpy (_c, "NULL"); } if (_ptr) strcpy (_c, type); } /* Define for backwards compatibility */ #define _swig_make_hex SWIG_MakePtr /* Function for getting a pointer value */ SWIGSTATIC char *SWIG_GetPtr(char *_c, void **ptr, char *_t) { unsigned long _p; char temp_type[256]; char *name; int i, len; SwigPtrType *sp,*tp; SwigCacheType *cache; int start, end; _p = 0; /* Pointer values must start with leading underscore */ if (*_c == '_') { _c++; /* Extract hex value from pointer */ while (*_c) { if ((*_c >= '0') && (*_c <= '9')) _p = (_p << 4) + (*_c - '0'); else if ((*_c >= 'a') && (*_c <= 'f')) _p = (_p << 4) + ((*_c - 'a') + 10); else break; _c++; } if (_t) { if (strcmp(_t,_c)) { if (!SwigPtrSort) { qsort((void *) SwigPtrTable, SwigPtrN, sizeof(SwigPtrType), swigsort); for (i = 0; i < 256; i++) { SwigStart[i] = SwigPtrN; } for (i = SwigPtrN-1; i >= 0; i--) { SwigStart[(int) (SwigPtrTable[i].name[1])] = i; } for (i = 255; i >= 1; i--) { if (SwigStart[i-1] > SwigStart[i]) SwigStart[i-1] = SwigStart[i]; } SwigPtrSort = 1; for (i = 0; i < SWIG_CACHESIZE; i++) SwigCache[i].stat = 0; } /* First check cache for matches. Uses last cache value as starting point */ cache = &SwigCache[SwigLastCache]; for (i = 0; i < SWIG_CACHESIZE; i++) { if (cache->stat) { if (strcmp(_t,cache->name) == 0) { if (strcmp(_c,cache->mapped) == 0) { cache->stat++; *ptr = (void *) _p; if (cache->tp->cast) *ptr = (*(cache->tp->cast))(*ptr); return (char *) 0; } } } SwigLastCache = (SwigLastCache+1) & SWIG_CACHEMASK; if (!SwigLastCache) cache = SwigCache; else cache++; } /* We have a type mismatch. Will have to look through our type mapping table to figure out whether or not we can accept this datatype */ start = SwigStart[(int) _t[1]]; end = SwigStart[(int) _t[1]+1]; sp = &SwigPtrTable[start]; while (start < end) { if (swigcmp(_t,sp) == 0) break; sp++; start++; } if (start >= end) sp = 0; /* Try to find a match for this */ if (sp) { while (swigcmp(_t,sp) == 0) { name = sp->name; len = sp->len; tp = sp->next; /* Try to find entry for our given datatype */ while(tp) { if (tp->len >= 255) { return _c; } strcpy(temp_type,tp->name); strncat(temp_type,_t+len,255-tp->len); if (strcmp(_c,temp_type) == 0) { strcpy(SwigCache[SwigCacheIndex].mapped,_c); strcpy(SwigCache[SwigCacheIndex].name,_t); SwigCache[SwigCacheIndex].stat = 1; SwigCache[SwigCacheIndex].tp = tp; SwigCacheIndex = SwigCacheIndex & SWIG_CACHEMASK; /* Get pointer value */ *ptr = (void *) _p; if (tp->cast) *ptr = (*(tp->cast))(*ptr); return (char *) 0; } tp = tp->next; } sp++; /* Hmmm. Didn't find it this time */ } } /* Didn't find any sort of match for this data. Get the pointer value and return the received type */ *ptr = (void *) _p; return _c; } else { /* Found a match on the first try. Return pointer value */ *ptr = (void *) _p; return (char *) 0; } } else { /* No type specified. Good luck */ *ptr = (void *) _p; return (char *) 0; } } else { if (strcmp (_c, "NULL") == 0) { *ptr = (void *) 0; return (char *) 0; } *ptr = (void *) 0; return _c; } } /* Compatibility mode */ #define _swig_get_hex SWIG_GetPtr #define SWIG_init initpxlibc #define SWIG_name "pxlibc" #include "pxlib.h" #include "PxWindow.h" using namespace pyxine; #define new_PxDisplay(_swigarg0) (new PxDisplay(_swigarg0)) static PyObject *_wrap_new_PxDisplay(PyObject *self, PyObject *args) { PyObject * _resultobj; PxDisplay * _result; char * _arg0; char _ptemp[128]; self = self; if(!PyArg_ParseTuple(args,"s:new_PxDisplay",&_arg0)) return NULL; { try { _result = (PxDisplay *)new_PxDisplay(_arg0); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } SWIG_MakePtr(_ptemp, (char *) _result,"_PxDisplay_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } #define delete_PxDisplay(_swigobj) (delete _swigobj) static PyObject *_wrap_delete_PxDisplay(PyObject *self, PyObject *args) { PyObject * _resultobj; PxDisplay * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:delete_PxDisplay",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_PxDisplay_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_PxDisplay. Expected _PxDisplay_p."); return NULL; } } { try { delete_PxDisplay(_arg0); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } #define PxDisplay_has_windows(_swigobj) (_swigobj->has_windows()) static PyObject *_wrap_PxDisplay_has_windows(PyObject *self, PyObject *args) { PyObject * _resultobj; bool _result; PxDisplay * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:PxDisplay_has_windows",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_PxDisplay_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of PxDisplay_has_windows. Expected _PxDisplay_p."); return NULL; } } { try { _result = (bool )PxDisplay_has_windows(_arg0); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define new_PxWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new PxWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_PxWindow(PyObject *self, PyObject *args) { PyObject * _resultobj; PxWindow * _result; PxDisplay * _arg0; Window _arg1; PyObject * _arg2; PyObject * _arg3; char * _argc0 = 0; PyObject * _obj2 = 0; PyObject * _obj3 = 0; char _ptemp[128]; self = self; if(!PyArg_ParseTuple(args,"slOO:new_PxWindow",&_argc0,&_arg1,&_obj2,&_obj3)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_PxDisplay_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_PxWindow. Expected _PxDisplay_p."); return NULL; } } { _arg2 = _obj2; } { _arg3 = _obj3; } { try { _result = (PxWindow *)new_PxWindow(_arg0,_arg1,_arg2,_arg3); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } SWIG_MakePtr(_ptemp, (char *) _result,"_PxWindow_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } #define delete_PxWindow(_swigobj) (delete _swigobj) static PyObject *_wrap_delete_PxWindow(PyObject *self, PyObject *args) { PyObject * _resultobj; PxWindow * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:delete_PxWindow",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_PxWindow_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_PxWindow. Expected _PxWindow_p."); return NULL; } } { try { delete_PxWindow(_arg0); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } #define PxWindow_get_window_geometry(_swigobj) (_swigobj->get_window_geometry()) static PyObject *_wrap_PxWindow_get_window_geometry(PyObject *self, PyObject *args) { PyObject * _resultobj; PyObject * _result; PxWindow * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:PxWindow_get_window_geometry",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_PxWindow_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of PxWindow_get_window_geometry. Expected _PxWindow_p."); return NULL; } } { try { _result = (PyObject *)PxWindow_get_window_geometry(_arg0); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } }{ _resultobj = _result; } return _resultobj; } #define PxWindow_get_xine_x11_visual(_swigobj) (_swigobj->get_xine_x11_visual()) static PyObject *_wrap_PxWindow_get_xine_x11_visual(PyObject *self, PyObject *args) { PyObject * _resultobj; x11_visual_t * _result; PxWindow * _arg0; char * _argc0 = 0; char _ptemp[128]; self = self; if(!PyArg_ParseTuple(args,"s:PxWindow_get_xine_x11_visual",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_PxWindow_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of PxWindow_get_xine_x11_visual. Expected _PxWindow_p."); return NULL; } } { try { _result = (x11_visual_t *)PxWindow_get_xine_x11_visual(_arg0); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } SWIG_MakePtr(_ptemp, (char *) _result,"_x11_visual_t_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } #define PxWindow_set_xine_stream(_swigobj,_swigarg0) (_swigobj->set_xine_stream(_swigarg0)) static PyObject *_wrap_PxWindow_set_xine_stream(PyObject *self, PyObject *args) { PyObject * _resultobj; PxWindow * _arg0; xine_stream_t * _arg1; char * _argc0 = 0; char * _argc1 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:PxWindow_set_xine_stream",&_argc0,&_argc1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_PxWindow_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of PxWindow_set_xine_stream. Expected _PxWindow_p."); return NULL; } } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of PxWindow_set_xine_stream. Expected _xine_stream_t_p."); return NULL; } } { try { PxWindow_set_xine_stream(_arg0,_arg1); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } #define PxWindow_get_verbosity(_swigobj) (_swigobj->get_verbosity()) static PyObject *_wrap_PxWindow_get_verbosity(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; PxWindow * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:PxWindow_get_verbosity",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_PxWindow_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of PxWindow_get_verbosity. Expected _PxWindow_p."); return NULL; } } { try { _result = (int )PxWindow_get_verbosity(_arg0); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define PxWindow_set_verbosity(_swigobj,_swigarg0) (_swigobj->set_verbosity(_swigarg0)) static PyObject *_wrap_PxWindow_set_verbosity(PyObject *self, PyObject *args) { PyObject * _resultobj; PxWindow * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:PxWindow_set_verbosity",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_PxWindow_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of PxWindow_set_verbosity. Expected _PxWindow_p."); return NULL; } } { try { PxWindow_set_verbosity(_arg0,_arg1); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } #define PxWindow_get_pixel_aspect(_swigobj) (_swigobj->get_pixel_aspect()) static PyObject *_wrap_PxWindow_get_pixel_aspect(PyObject *self, PyObject *args) { PyObject * _resultobj; double _result; PxWindow * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:PxWindow_get_pixel_aspect",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_PxWindow_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of PxWindow_get_pixel_aspect. Expected _PxWindow_p."); return NULL; } } { try { _result = (double )PxWindow_get_pixel_aspect(_arg0); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } _resultobj = Py_BuildValue("d",_result); return _resultobj; } #define PxWindow_invalidate_cache(_swigobj) (_swigobj->invalidate_cache()) static PyObject *_wrap_PxWindow_invalidate_cache(PyObject *self, PyObject *args) { PyObject * _resultobj; PxWindow * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:PxWindow_invalidate_cache",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_PxWindow_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of PxWindow_invalidate_cache. Expected _PxWindow_p."); return NULL; } } { try { PxWindow_invalidate_cache(_arg0); ; } catch (Error e) { PyErr_SetString(PyExc_Exception, e.get_message()); return 0; } } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyMethodDef pxlibcMethods[] = { { "PxWindow_invalidate_cache", _wrap_PxWindow_invalidate_cache, 1 }, { "PxWindow_get_pixel_aspect", _wrap_PxWindow_get_pixel_aspect, 1 }, { "PxWindow_set_verbosity", _wrap_PxWindow_set_verbosity, 1 }, { "PxWindow_get_verbosity", _wrap_PxWindow_get_verbosity, 1 }, { "PxWindow_set_xine_stream", _wrap_PxWindow_set_xine_stream, 1 }, { "PxWindow_get_xine_x11_visual", _wrap_PxWindow_get_xine_x11_visual, 1 }, { "PxWindow_get_window_geometry", _wrap_PxWindow_get_window_geometry, 1 }, { "delete_PxWindow", _wrap_delete_PxWindow, 1 }, { "new_PxWindow", _wrap_new_PxWindow, 1 }, { "PxDisplay_has_windows", _wrap_PxDisplay_has_windows, 1 }, { "delete_PxDisplay", _wrap_delete_PxDisplay, 1 }, { "new_PxDisplay", _wrap_new_PxDisplay, 1 }, { NULL, NULL } }; static PyObject *SWIG_globals; #ifdef __cplusplus extern "C" #endif SWIGEXPORT(void,initpxlibc)() { PyObject *m, *d; SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("pxlibc", pxlibcMethods); d = PyModule_GetDict(m); /* * These are the pointer type-equivalency mappings. * (Used by the SWIG pointer type-checker). */ SWIG_RegisterMapping("_signed_long","_long",0); SWIG_RegisterMapping("_FrameOutputCallback","_CachedPythonCallback<_VideoGeometry,VideoOutputGeometry_>",0); SWIG_RegisterMapping("_CachedPythonCallback<_VideoGeometry,VideoGeometry_>","_DestSizeCallback",0); SWIG_RegisterMapping("_long","_Window",0); SWIG_RegisterMapping("_long","_unsigned_long",0); SWIG_RegisterMapping("_long","_signed_long",0); SWIG_RegisterMapping("_PxWindow","_class_PxWindow",0); SWIG_RegisterMapping("_Window","_unsigned_long",0); SWIG_RegisterMapping("_Window","_long",0); SWIG_RegisterMapping("_unsigned_long","_Window",0); SWIG_RegisterMapping("_unsigned_long","_long",0); SWIG_RegisterMapping("_signed_int","_int",0); SWIG_RegisterMapping("_PxDisplay","_class_PxDisplay",0); SWIG_RegisterMapping("_unsigned_short","_short",0); SWIG_RegisterMapping("_signed_short","_short",0); SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_class_PxDisplay","_PxDisplay",0); SWIG_RegisterMapping("_short","_unsigned_short",0); SWIG_RegisterMapping("_short","_signed_short",0); SWIG_RegisterMapping("_int","_unsigned_int",0); SWIG_RegisterMapping("_int","_signed_int",0); SWIG_RegisterMapping("_DestSizeCallback","_CachedPythonCallback<_VideoGeometry,VideoGeometry_>",0); SWIG_RegisterMapping("_class_PxWindow","_PxWindow",0); SWIG_RegisterMapping("_CachedPythonCallback<_VideoGeometry,VideoOutputGeometry_>","_FrameOutputCallback",0); } pyxine-0.1alpha2.orig/pyxine/0040755000175000017500000000000007622533572015242 5ustar pimanpimanpyxine-0.1alpha2.orig/pyxine/Makefile0100644000175000017500000000305707621052241016670 0ustar pimanpiman# $Id: Makefile,v 1.2 2003/02/08 00:51:45 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. TOP = .. PACKAGE = pyxine PYSOURCE = config.py constants.py constwrap.py cstruct.py PYSOURCE += event.py __init__.py osd.py post.py PYSOURCE += weakmethod.py x11.py xine.py GEN_FILES = libxine_wrap.c pxlib.py DIST_FILES= Makefile libxine.i fixed_xine.h orig_xine.h DIST_FILES+= $(GEN_FILES) $(PYSOURCE) OFILES = libxine_wrap.o SOFILES = libxine$(SO) PYFILES = $(PYSOURCE) pxlib.py BLIB_FILES= $(SOFILES) $(PYFILES) include $(TOP)/common.mak libxine$(SO): $(OFILES) $(LDSHARED) $^ $(LIBS) -o $@ libxine_wrap.c: libxine.i fixed_xine.h $(SWIG) -python -dnone libxine.i pxlib.py: $(TOP)/pxlib/pxlib.py cp -p $< $@ .PHONY: force $(TOP)/pxlib/pxlib.py: force make -C $(TOP)/pxlib pxlib.py pyxine-0.1alpha2.orig/pyxine/libxine.i0100644000175000017500000005545307621051154017045 0ustar pimanpiman/* -*-C-*- * * $Id: libxine.i,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * Pyxine 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. * * Pyxine 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-1307, USA. */ %module libxine %{ #include #ifdef LIST_OUTPUT # define output_helper l_output_helper #else # define output_helper t_output_helper #endif #define STRINGIFY(s) #s void initlibxine (void); PyObject * Pyxine_Error = 0; static void init_statics (void) { PyObject * pyxine = PyImport_ImportModule("pyxine"); if (pyxine) { Pyxine_Error = PyObject_GetAttrString(pyxine, "Error"); Py_DECREF(pyxine); } if (!Pyxine_Error) { if (PyErr_Occurred()) PyErr_Print(); Pyxine_Error = PyExc_Exception; /* punt */ Py_INCREF(Pyxine_Error); } } %} %init %{ init_statics(); %} %section "libxine", before, pre /***************************************************************** * * Typemaps * ****************************************************************/ %include "typemaps.i" /* * These typedefs are not necessarily correct, but they convince SWIG to * treat the types as simple scalars. (Which is all we really * want...) */ typedef long int64_t; typedef unsigned uint32_t; typedef unsigned short uint16_t; typedef unsigned char uint8_t; /** int64_t * * (SWIG doesn't know about long long's.) */ %typemap (python,in) int64_t { PyObject * aslong = PyNumber_Long($source); if (!aslong) return NULL; $target = PyLong_AsLongLong(aslong); Py_DECREF(aslong); if (PyErr_Occurred()) return NULL; } /** * CONSTANT_MEMBER * * Raise an exception upon attempts to modify struct member. */ %typemap (python,memberin) CONSTANT_MEMBER { PyErr_Format(PyExc_AttributeError, "%s is read-only", STRINGIFY($target)); return 0; } /** INT_ARRAY256_t *INPUT * * Typemap for pointer to an array of ints of length 256. */ %typemap (python,arginit) INT_ARRAY256_t *INPUT { if (!($target = alloca(256 * sizeof(*$target)))) return PyErr_NoMemory(); } %typemap (python,in) INT_ARRAY256_t *INPUT { int i; PyObject * seq = PySequence_Fast($source, ""); if (!seq || PySequence_Fast_GET_SIZE(seq) != 256) { if (seq) { Py_DECREF(seq); } return PyErr_Format(PyExc_ValueError, "expected sequence of length 256 for arg %d of %s", $argnum, STRINGIFY($name)); } for (i = 0; i < 256; i++) { long val = PyInt_AsLong(PySequence_Fast_GET_ITEM(seq, i)); if (val == -1) { Py_DECREF(seq); return PyErr_Format(PyExc_ValueError, "expected sequence of length 256 for arg %d of %s", $argnum, STRINGIFY($name)); } $target[i] = val; } Py_DECREF(seq); } /** INT_ARRAY256_t *OUTPUT * * Typemap for pointer to an array of length 256. */ %typemap (python,ignore) INT_ARRAY256_t *OUTPUT { if (!($target = alloca(256 * sizeof(*$target)))) return PyErr_NoMemory(); } %typemap (python,argout) INT_ARRAY256_t *OUTPUT { int i; PyObject * tuple = PyTuple_New(256); if (!tuple) return NULL; for (i = 0; i < 256; i++) { PyObject * c = PyInt_FromLong((long)$source[i]); if (!c) return NULL; PyTuple_SET_ITEM(tuple, i, c); } $target = l_output_helper($target, tuple); } typedef char * STRING; %{ typedef const char * STRING; %} /** STRING * * Output typemap for (possible NULL) strings. * * HACK ALERT: This checks for python exceptions which might have * been thrown as a result of the CONSTANT_MEMBER memberin typemap. */ %typemap (python, out) STRING { if (PyErr_Occurred()) return NULL; $target = Py_BuildValue("s", $source); if (!$target) return NULL; } %typemap (python,memberin) STRING = CONSTANT_MEMBER; %typemap (python,memberout) STRING = char *; /** FREEABLE_STRING_t * * Output typemap for functions which return a freeable char *. */ %typemap (python,out) FREEABLE_STRING_t { if ($source) { $target = PyString_FromString($source); free($source); if (!$target) return NULL; } else { Py_INCREF(Py_None); $target = Py_None; } } /** STRING * * * Typemap to convert array of strings to tuple of strings. */ %typemap (python,out) STRING * { PyObject * stmp; size_t i, len = 0; while ($source[len]) len++; if (!($target = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString($source[i]))) return NULL; PyTuple_SET_ITEM($target, i, stmp); } } %typemap (python,memberin) STRING * = CONSTANT_MEMBER; /** STRINGDUP * * Input typemap for strings which need to be in their own memory. */ %typemap (python,in) STRINGDUP { char * str = PyString_AsString($source); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", $argnum, STRINGIFY($name)); } $target = strdup(str); if (!$target) { return PyErr_NoMemory(); } } /** STRINGDUP * * * Input typemap for array of strings which need to be copied * into their own memory. */ %typemap (python,in) STRINGDUP * { int i, length; PyObject * seq = PySequence_Fast($source, ""); if (!seq) { return PyErr_Format(PyExc_TypeError, "expected sequence of strings for arg %d of %s", $argnum, STRINGIFY($name)); } length = PySequence_Fast_GET_SIZE(seq); $target = malloc((length + 1) * sizeof(*$target)); if (!$target) { Py_DECREF(seq); return PyErr_NoMemory(); } for (i = 0; i < length; i++) { char * str = PyString_AsString(PySequence_Fast_GET_ITEM(seq, i)); if (!str) { Py_DECREF(seq); return PyErr_Format(PyExc_TypeError, "expected sequence of strings for arg %d of %s", $argnum, STRINGIFY($name)); } $target[i] = strdup(str); if (!$target[i]) { Py_DECREF(seq); return PyErr_NoMemory(); } } $target[length] = 0; Py_DECREF(seq); } /** opt_STRING_t INPUT * * A optional string input. * Expects either a python string or None, converts to char * or NULL. */ %typemap (python,in) opt_STRING_t INPUT { if ($source == Py_None) { $target = 0; } else { if (!($target = PyString_AsString($source))) return NULL; } } /** STRING64_t *OUTPUT * * An output argument which is a string of length < 64. */ %typemap (python,ignore) STRING64_t OUTPUT (char temp[64]) { $target = temp; } %typemap (python,argout) STRING64_t OUTPUT { $target = output_helper($target, PyString_FromString($source)); } /** SWIGPTR *INPUT * * Converts a sequence of SWIG ptrs (strings, e.g. "_2e14f2_xine_t_p") * to a NULL terminated array of C pointers. */ %typemap (python,in) SWIGPTR *INPUT ($type tmp) { static const char * ptrtype = "_" STRINGIFY($basetype) "_p"; PyObject * seq = PySequence_Fast($source, ""); int length, i; if (! seq) { if (!PyErr_ExceptionMatches(PyExc_TypeError)) return NULL; return PyErr_Format(PyExc_TypeError, "expected a sequence of %s's for arg %d of %s", ptrtype, $argnum, STRINGIFY($name)); } length = PySequence_Fast_GET_SIZE(seq); if ( ! (tmp = alloca(sizeof(*tmp) * (length + 1))) ) { Py_DECREF(seq); return PyErr_NoMemory(); } for (i = 0; i < length; i++) { char * str = PyString_AsString(PySequence_Fast_GET_ITEM(seq, i)); if (!str || SWIG_GetPtr(str, (void **)&tmp[i], (char *)ptrtype)) { Py_DECREF(seq); return PyErr_Format(PyExc_TypeError, "expected a sequence of %s's for arg %d of %s", ptrtype, $argnum, STRINGIFY($name)); } } Py_DECREF(seq); tmp[length] = 0; $target = tmp; } /** SWIGPTR * * * Convert pointer to NULL-terminated array of SWIGPTRs to * python sequence object. */ %typemap (python,out) SWIGPTR * { static const char * ptrtype = "_" STRINGIFY($basetype) "_p"; PyObject * stmp; char ptmp[128]; size_t i, len = 0; while ($source[len]) len++; if (!($target = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { SWIG_MakePtr(ptmp, (char *) $source[i], (char *) ptrtype); if (!(stmp = PyString_FromString(ptmp))) return NULL; PyTuple_SET_ITEM($target, i, stmp); } } /** xine_mrl_t ** * * Convert list of xine_mrl_t to tuple of dicts... */ %typemap (python, out) xine_mrl_t ** { size_t i, len = 0; while ($source[len]) len++; if (!($target = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { xine_mrl_t * item = $source[i]; PyObject * val = Py_BuildValue("{s:s,s:s,s:s,s:l,s:l}", "origin", item->origin, "mrl", item->mrl, "link", item->link, "type", (long)item->type, "off_t", (long)item->size); if (!val) return NULL; PyTuple_SET_ITEM($target, i, val); } } /** struct timeval * * * Convert struct timeval's to/from floating point seconds. */ %typemap (python,out) struct timeval * { $target = PyFloat_FromDouble($source->tv_sec + $source->tv_usec / 1e6); } %typemap (python,in) struct timeval * (struct timeval tmp) { double secs; secs = PyFloat_AsDouble($source); tmp.tv_sec = floor(secs); tmp.tv_usec = floor((secs - tmp.tv_sec) * 1e6); $target = &tmp; } /** PyBuffer *OUTPUT * * Return structs as as PyBuffer objects, rather than SWIG pointers. * We do this with xine_cfg_entry_t's and xine_event_t's because * it makes the memory management automatic. * * FIXME: this typemap wont work if applied to more than one * argument of a function. */ %typemap (python,ignore) PyBuffer *OUTPUT (PyObject * buffer) { void * ptr; int length; buffer = PyBuffer_New(sizeof($basetype)); if (!buffer) return NULL; PyObject_AsWriteBuffer(buffer, &ptr, &length); $target = ptr; } %typemap (python,argout) PyBuffer *OUTPUT { $target = output_helper($target, buffer); } /** PyBuffer *INPUT * * Convert PyBuffer to pointers to data on input. */ %typemap (python,in) PyBuffer *INPUT { int length; void * ptr; if (PyObject_AsWriteBuffer($source, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE($basetype) #if #BASETYPE(xine_event_t) if (length != sizeof($basetype) && length != sizeof(xine_input_data_t)) #else if (length != sizeof($basetype)) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", $argnum, STRINGIFY($name), STRINGIFY($basetype)); $target = ptr; } /** PyBuffer * * * Wrap returned pointers in PyBuffer for compatibility. * HACK ALERT: These PyBuffers do not free their associated * memory upon destruction, so you need to arrange for that * some other way. */ %typemap (python,out) PyBuffer * { if ($source) { $target = PyBuffer_FromReadWriteMemory($source, sizeof($basetype)); if (!$target) return NULL; } else { Py_INCREF(Py_None); $target = Py_None; } } #ifndef SWIG /** xine_cfg_entry_t *OUTPUT * * Return these as PyBuffer objects. (We do this, rather than * returning SWIG pointers, because it handles freeing of the * structures memory automatically.) * * FIXME: this typemap wont work if applied to more than one * argument of a function. */ %typemap (python,ignore) xine_cfg_entry_t *OUTPUT (PyObject * buffer) { void * ptr; int length; buffer = PyBuffer_New(sizeof(xine_cfg_entry_t)); if (!buffer) return NULL; PyObject_AsWriteBuffer(buffer, &ptr, &length); $target = (xine_cfg_entry_t *)ptr; } %typemap (python,argout) xine_cfg_entry_t *OUTPUT { $target = output_helper($target, buffer); } %typemap (python,in) xine_cfg_entry_t * { int length; void * ptr; if (PyObject_AsWriteBuffer($source, (void **)&ptr, &length)) return NULL; if (length != sizeof(xine_cfg_entry_t)) return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for xine_cfg_entry_t", $argnum, STRINGIFY($name)); $target = ptr; } %typemap (python,in) struct xine_cfg_entry_s * = xine_cfg_entry_t *; #endif /** NONNULL_SWIGPTR * * Raise failure exception for those "constructor-like" functions which * should return non-NULL SWIG pointers but don't. */ %typemap (python,out) NONNULL_SWIGPTR { char ptmp[128]; if ($source == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY($name)); SWIG_MakePtr(ptmp, (char *)$source, STRINGIFY($mangle)); $target = PyString_FromString(ptmp); if (!$target) return NULL; } /** bool OKAY * * Raise failure exception for those function which * return zero upon failure. */ %typemap (python,out) bool OKAY { if (! $source) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY($name)); Py_INCREF(Py_None); $target = Py_None; } /** bool ITER_OKAY * * Raise StopIteration for those functions which * return zero upon failure. */ %typemap (python,out) bool ITER_OKAY { if (! $source) { PyErr_SetNone(PyExc_StopIteration); return NULL; } Py_INCREF(Py_None); $target = Py_None; } /** bool LOOKUP_OKAY * * Raise KeyError for those functions which * return zero upon failure. */ %typemap (python,out) bool LOOKUP_OKAY { if (! $source) { PyErr_SetNone(PyExc_KeyError); return NULL; } Py_INCREF(Py_None); $target = Py_None; } /***************************************************************** * Python callback handling ****************************************************************/ %{ struct callback_s { PyThreadState * state; PyObject * callback; }; typedef struct callback_s callback_t; static callback_t * callback_t_new(PyObject * callback) { callback_t * cb; if (!PyCallable_Check(callback)) { PyErr_SetString(PyExc_TypeError, "Need a callable object for callback"); return 0; } if (!(cb = malloc(sizeof(callback_t)))) { PyErr_NoMemory(); return 0; } /* You must call this from a python thread. */ PyEval_InitThreads(); cb->state = PyThreadState_New(PyThreadState_Get()->interp); if (!cb->state) { free(cb); return 0; } PyThreadState_Clear(cb->state); cb->callback = callback; Py_INCREF(callback); return cb; } static void callback_t_delete(callback_t * cb) { PyThreadState_Delete(cb->state); Py_DECREF(cb->callback); free(cb); } #define BEGIN_CALLBACK_CONTEXT(cb) \ { \ PyThreadState * saved_state; \ PyEval_AcquireLock(); \ saved_state = PyThreadState_Swap(cb->state); #define END_CALLBACK_CONTEXT(cb) \ /* Report any pending exception */ \ if (PyErr_Occurred()) \ PyErr_Print(); \ PyThreadState_Swap(saved_state); \ PyEval_ReleaseLock(); \ } %} /** CALLBACK_t *INPUT * * Convert python callable object to callback_t * (for use a C callback * user_data). */ %typemap (python,arginit) CALLBACK_t *INPUT { $target = 0; } %typemap (python,in) CALLBACK_t *INPUT { /* FIXME: memory leak: callback_t is never freed */ $target = callback_t_new($source); if (!$target) return NULL; } /** opt_CALLBACK_t *INPUT * * Convert optional python callable object to callback_t * (for use a * C callback user_data). */ %typemap (python,arginit) opt_CALLBACK_t *INPUT = CALLBACK_t *INPUT; %typemap (python,in) opt_CALLBACK_t *INPUT { if ($source != Py_None) { /* FIXME: memory leak: callback_t is never freed */ $target = callback_t_new($source); if (!$target) return NULL; } } /* * The C callback functions for various types of callbacks. */ %{ void event_listener_callback (void *user_data, const xine_event_t *event) { callback_t * cb = (callback_t *)user_data; PyObject * buffer; if (!cb) return; BEGIN_CALLBACK_CONTEXT(cb); buffer = PyBuffer_New(sizeof(xine_event_t)); if (buffer) { void * ptr; int length; PyObject_AsWriteBuffer(buffer, &ptr, &length); *(xine_event_t *)ptr = *event; PyObject_CallFunction(cb->callback, "O", buffer); Py_DECREF(buffer); } END_CALLBACK_CONTEXT(cb); } %} %typemap (python,ignore) xine_event_listener_cb_t { $target = event_listener_callback; } %{ void xine_cfg_entry_callback (void *user_data, xine_cfg_entry_t *entry) { callback_t * cb = (callback_t *)user_data; PyObject * buffer; if (!cb) return; BEGIN_CALLBACK_CONTEXT(cb); buffer = PyBuffer_New(sizeof(xine_cfg_entry_t)); if (buffer) { void * ptr; int length; PyObject_AsWriteBuffer(buffer, &ptr, &length); *(xine_cfg_entry_t *)ptr = *entry; PyObject_CallFunction(cb->callback, "O", buffer); Py_DECREF(buffer); } END_CALLBACK_CONTEXT(cb); } %} %typemap (python,ignore) xine_config_cb_t { $target = xine_cfg_entry_callback; } %{ void xine_log_callback (void *user_data, int section) { callback_t * cb = (callback_t *)user_data; if (!cb) return; BEGIN_CALLBACK_CONTEXT(cb); PyObject_CallFunction(cb->callback, "i", section); END_CALLBACK_CONTEXT(cb); } %} %typemap (python,ignore) xine_log_cb_t { $target = xine_log_callback; } /***************************************************************** * ****************************************************************/ /** BLOCKING * * Drop python global lock for functions which may take a long * time to complete. * * Also for functions which may call python-side callbacks. * (The callbacks need to acquire the python lock themselves.) */ %typemap (python,except) BLOCKING { Py_BEGIN_ALLOW_THREADS $function Py_END_ALLOW_THREADS } /* These may call callbacks */ %apply BLOCKING { xine_video_port_t *xine_open_video_driver, void xine_log, void xine_config_update_entry, int xine_open, int xine_play, void xine_stop, void xine_close }; /* These may block */ %apply BLOCKING { xine_event_t *xine_event_wait }; /***************************************************************** * Input argument fixups. */ /* For xine_open_audio_driver(), xine_open_video_driver() */ %apply opt_STRING_t INPUT { char *id }; /* xine_register_log_cb(), xine_event_create_listener_thread() */ %apply CALLBACK_t *INPUT { void *user_data }; /* xine_config_register_*() */ %apply opt_CALLBACK_t *INPUT { void *cb_data }; %apply STRINGDUP { char *def_value, char *description, char *help } %apply STRINGDUP * { char **values } /* xine_post_init() */ %apply SWIGPTR *INPUT { xine_audio_port_t **audio_target, xine_video_port_t **video_target }; /* xine_osd_set_palette() */ %{ typedef uint32_t color_t; typedef uint8_t trans_t; %} %apply INT_ARRAY256_t *INPUT { trans_t *, color_t * } /* xine_log */ %typemap (python,ignore) char *xine_log_format { $target = "%s\n"; } /* xine_config_update_entry() */ %apply PyBuffer *INPUT { xine_cfg_entry_t * } /* xine_cfg_t_*() accessors */ %apply PyBuffer *INPUT { struct xine_cfg_entry_s * } /* xine_event_free(), xine_event_send(), xine_event_t_*() accessors */ %apply PyBuffer *INPUT { xine_event_t * } /***************************************************************** * Output argument fixups. */ /* For xine_get_pos_length() */ %apply int *OUTPUT { int *pos_stream, int *pos_time, int *length_time }; /* For xine_get_spu_lang(), xine_get_audio_lang() */ %apply STRING64_t OUTPUT { char *lang }; /* xine_osd_get_text_size() */ %apply int *OUTPUT { int *width, int *height }; /* xine_osd_get_palette() */ %apply INT_ARRAY256_t *OUTPUT { trans_t *OUTPUT, color_t *OUTPUT }; /* xine_get_version() */ %apply int *OUTPUT { int *major, int *minor, int *sub }; /* xine_config_get_{first,next}_entry(), xine_config_lookup_entry() */ %apply PyBuffer *OUTPUT { xine_cfg_entry_t *OUTPUT } /***************************************************************** * Return value fixups */ %apply FREEABLE_STRING_t { char *xine_get_file_extensions, char *xine_get_mime_types, char *xine_get_demux_for_mime_type}; /* xine_post_s::audio_input, xine_post_s::video_input */ %apply SWIGPTR * { xine_audio_port_t **, xine_video_port_t ** }; %typemap (python, memberin) xine_audio_port_t ** = CONSTANT_MEMBER; %typemap (python, memberin) xine_video_port_t ** = CONSTANT_MEMBER; /* xine_cfg_entry_s::enum_values */ %apply STRING * { char **xine_cfg_entry_s_enum_values_get } /* xine_event_get(), xine_event_wait() */ %apply PyBuffer * { xine_event_t *xine_event_get, xine_event_t *xine_event_wait } /***************************************************************** * Return value checks */ /* "constructor-like" functions which return NULL upon failure */ %apply NONNULL_SWIGPTR { xine_t *xine_new, xine_audio_port_t *xine_open_audio_driver, xine_video_port_t *xine_open_video_driver, xine_stream_t *xine_stream_new, xine_post_t *xine_post_init, xine_post_in_t *xine_post_input, xine_post_out_t *xine_post_output, xine_post_out_t *xine_get_video_source, xine_post_out_t *xine_get_audio_source, xine_health_check_t *xine_health_check, xine_event_queue_t *xine_event_new_queue, xine_osd_t *xine_osd_new }; /* Functions which return a boolean (zero for failure), * exit code, with more information available from xine_get_error. * * For now, error checking is done on the python side of things... */ %apply int { int xine_open, int xine_play, int xine_trick_mode}; /* Functions which return a boolean (zero for failure) exit code */ %apply bool OKAY { int xine_eject, int xine_get_audio_lang, int xine_get_spu_lang, int xine_get_pos_length, int xine_get_current_frame, int xine_get_video_frame, int xine_post_wire, int xine_post_wire_video_port, int xine_post_wire_audio_port }; %apply bool ITER_OKAY { int xine_config_get_first_entry, int xine_config_get_next_entry }; %apply bool LOOKUP_OKAY { int xine_config_lookup_entry } /***************************************************************** * Constant fixups. * * SWIG doesn't seem to recognize these as constants. */ %{ static const int _XINE_IMGFMT_YV12 = XINE_IMGFMT_YV12; static const int _XINE_IMGFMT_YUY2 = XINE_IMGFMT_YUY2; %} #define XINE_IMGFMT_YV12 (int) _XINE_IMGFMT_YV12 #define XINE_IMGFMT_YUY2 (int) _XINE_IMGFMT_YUY2 /*****************************************************************/ /***************************************************************** * Utility functions */ %apply PyBuffer *OUTPUT { xine_input_data_t *OUTPUT } %inline %{ void px_make_input_event(int type, uint8_t button, uint16_t x, uint16_t y, xine_input_data_t *OUTPUT) { xine_input_data_t * buf = OUTPUT; memset(buf, 0, sizeof(*buf)); buf->event.type = type; buf->event.data = buf; buf->event.data_length = sizeof(*buf); buf->button = button; buf->x = x; buf->y = y; } %} /*****************************************************************/ %include "fixed_xine.h" pyxine-0.1alpha2.orig/pyxine/fixed_xine.h0100644000175000017500000014043307621051155017526 0ustar pimanpiman/* * $Id: fixed_xine.h,v 1.1.1.1 2003/02/08 00:42:21 dairiki Exp $ * * Copyright (C) 2003 Geoffrey T. Dairiki * * This file is part of Pyxine, Python bindings for xine. * * This is a *modification* of xine.h which is part of xine, * a free video player. Xine is available from http://xinehq.de/ * * This version of xine.h is modified so as to make it an * acceptable input to SWIG. * * Pyxine 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. * * Pyxine 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-1307, USA. */ /* * The original copyright follows: * * * Copyright (C) 2000-2002 the xine project * * This file is part of xine, a free video player. * * xine 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. * * xine 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-1307, USA * * Id: xine.h.in,v 1.58 2003/01/29 02:33:35 miguelfreitas Exp * * public xine-lib (libxine) interface and documentation * * * some programming guidelines about this api: * ------------------------------------------- * * (1) libxine has (per stream instance) a fairly static memory * model * (2) as a rule of thumb, never free() or realloc() any pointers * returned by the xine engine (unless stated otherwise) * or, in other words: * do not free() stuff you have not malloc()ed * (3) xine is multi-threaded, make sure your programming environment * can handle this. * for x11-related stuff this means that you either have to properly * use xlockdisplay() or use two seperate connections to the x-server * */ #ifndef HAVE_XINE_H #define HAVE_XINE_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include /********************************************************************* * xine opaque data types * *********************************************************************/ typedef struct xine_s xine_t; typedef struct xine_stream_s xine_stream_t; typedef struct xine_audio_port_s xine_audio_port_t; typedef struct xine_video_port_s xine_video_port_t; /* convenience types: simple player UIs might want to call ports drivers */ typedef xine_audio_port_t xine_ao_driver_t; typedef xine_video_port_t xine_vo_driver_t; /********************************************************************* * global engine handling * *********************************************************************/ /* * version information */ /* dynamic info from actually linked libxine */ const char *xine_get_version_string (void); void xine_get_version (int *major, int *minor, int *sub); /* compare given version to libxine version, return 1 if compatible, 0 otherwise */ int xine_check_version (int major, int minor, int sub) ; /* static info - which libxine release this header came from */ #define XINE_MAJOR_VERSION 1 #define XINE_MINOR_VERSION 0 #define XINE_SUB_VERSION 0 #define XINE_VERSION "1-beta4" /* * pre-init the xine engine * * will first malloc and init a xine_t, create an empty config * system, then scan through all installed plugins and add them * to an internal list for later use. * * to fully init the xine engine, you have to load config values * (either using your own storage method and calling * xine_config_register_entry, or by using the xine_load_config * utility function - see below) and then call xine_init * * the only proper way to shut down the xine engine is to * call xine_exit() - do not try to free() the xine pointer * yourself and do not try to access any internal data structures */ xine_t *xine_new (void); /* * post_init the xine engine */ void xine_init (xine_t *self); /* * helper functions to find and init audio/video drivers * from xine's plugin collection * * id : identifier of the driver, may be NULL for auto-detection * data : special data struct for ui/driver communications, depends * on driver * visual: video driver flavor selector, constants see below * * both functions may return NULL if driver failed to load, was not * found ... * * use xine_close_audio/video_driver() to close loaded drivers * and free resources allocated by them */ xine_audio_port_t *xine_open_audio_driver (xine_t *self, const char *id, void *data); xine_video_port_t *xine_open_video_driver (xine_t *self, const char *id, int visual, void *data); void xine_close_audio_driver (xine_t *self, xine_audio_port_t *driver); void xine_close_video_driver (xine_t *self, xine_video_port_t *driver); /* valid visual types */ #define XINE_VISUAL_TYPE_NONE 0 #define XINE_VISUAL_TYPE_X11 1 #define XINE_VISUAL_TYPE_AA 2 #define XINE_VISUAL_TYPE_FB 3 #define XINE_VISUAL_TYPE_GTK 4 #define XINE_VISUAL_TYPE_DFB 5 #define XINE_VISUAL_TYPE_PM 6 /* used by the OS/2 port */ /* * free all resources, close all plugins, close engine. * self pointer is no longer valid after this call. */ void xine_exit (xine_t *self); /********************************************************************* * stream handling * *********************************************************************/ /* * create a new stream for media playback/access * * returns xine_stream_t* if OK, * NULL on error (use xine_get_error for details) * * the only proper way to free the stream pointer returned by this * function is to call xine_dispose() on it. do not try to access any * fields in xine_stream_t, they're all private and subject to change * without further notice. */ xine_stream_t *xine_stream_new (xine_t *self, xine_audio_port_t *ao, xine_video_port_t *vo); /* * Make one stream the slave of another. * This establishes a binary master slave relation on streams, where * certain operations (specified by parameter "affection") on the master * stream are also applied to the slave stream. * If you want more than one stream to react to one master, you have to * apply the calls in a top down way: * xine_stream_master_slave(stream1, stream2, 3); * xine_stream_master_slave(stream2, stream3, 3); * This will make stream1 affect stream2 and stream2 affect stream3, so * effectively, operations on stream1 propagate to stream2 and 3. * * Please note that subsequent master_slave calls on the same streams * will overwrite their previous master/slave setting. * Be sure to not mess around. * * returns 1 on success, 0 on failure */ int xine_stream_master_slave(xine_stream_t *master, xine_stream_t *slave, int affection); /* affection is some of the following ORed together: */ /* playing the master plays the slave */ #define XINE_MASTER_SLAVE_PLAY (1<<0) /* slave stops on master stop */ #define XINE_MASTER_SLAVE_STOP (1<<1) /* * open a stream * * look for input / demux / decoder plugins, find out about the format * see if it is supported, set up internal buffers and threads * * returns 1 if OK, 0 on error (use xine_get_error for details) */ int xine_open (xine_stream_t *stream, const char *mrl); /* * play a stream from a given position * * start_pos: 0..65535 * start_time: milliseconds * if both start position parameters are != 0 start_pos will be used * for non-seekable streams both values will be ignored * * returns 1 if OK, 0 on error (use xine_get_error for details) */ int xine_play (xine_stream_t *stream, int start_pos, int start_time); /* * set xine to a trick mode for fast forward, backwards playback, * low latency seeking. Please note that this works only with some * input plugins. mode constants see below. * * returns 1 if OK, 0 on error (use xine_get_error for details) */ int xine_trick_mode (xine_stream_t *stream, int mode, int value); /* trick modes */ #define XINE_TRICK_MODE_OFF 0 #define XINE_TRICK_MODE_SEEK_TO_POSITION 1 #define XINE_TRICK_MODE_SEEK_TO_TIME 2 #define XINE_TRICK_MODE_FAST_FORWARD 3 #define XINE_TRICK_MODE_FAST_REWIND 4 /* * stop stream playback * xine_stream_t stays valid for new xine_open or xine_play */ void xine_stop (xine_stream_t *stream); /* * stop stream playback, free all stream-related resources * xine_stream_t stays valid for new xine_open */ void xine_close (xine_stream_t *stream); /* * ask current/recent input plugin to eject media - may or may not work, * depending on input plugin capabilities */ int xine_eject (xine_stream_t *stream); /* * stop playback, dispose all stream-related resources * xine_stream_t no longer valid when after this */ void xine_dispose (xine_stream_t *stream); /* * set/get xine engine parameters * e.g. playback speed, constants see below */ void xine_set_param (xine_stream_t *stream, int param, int value); int xine_get_param (xine_stream_t *stream, int param); /* * xine engine parameters */ #define XINE_PARAM_SPEED 1 /* see below */ #define XINE_PARAM_AV_OFFSET 2 /* unit: 1/90000 sec */ #define XINE_PARAM_AUDIO_CHANNEL_LOGICAL 3 /* -1 => auto, -2 => off */ #define XINE_PARAM_SPU_CHANNEL 4 #define XINE_PARAM_VIDEO_CHANNEL 5 #define XINE_PARAM_AUDIO_VOLUME 6 /* 0..100 */ #define XINE_PARAM_AUDIO_MUTE 7 /* 1=>mute, 0=>unmute */ #define XINE_PARAM_AUDIO_COMPR_LEVEL 8 /* <100=>off, % compress otherw*/ #define XINE_PARAM_AUDIO_AMP_LEVEL 9 /* 0..200, 100=>100% (default) */ #define XINE_PARAM_AUDIO_REPORT_LEVEL 10 /* 1=>send events, 0=> don't */ #define XINE_PARAM_VERBOSITY 11 /* control console output */ #define XINE_PARAM_SPU_OFFSET 12 /* unit: 1/90000 sec */ /* speed values */ #define XINE_SPEED_PAUSE 0 #define XINE_SPEED_SLOW_4 1 #define XINE_SPEED_SLOW_2 2 #define XINE_SPEED_NORMAL 4 #define XINE_SPEED_FAST_2 8 #define XINE_SPEED_FAST_4 16 /* video parameters */ #define XINE_PARAM_VO_DEINTERLACE 0x01000000 /* bool */ #define XINE_PARAM_VO_ASPECT_RATIO 0x01000001 /* see below */ #define XINE_PARAM_VO_HUE 0x01000002 /* 0..65535 */ #define XINE_PARAM_VO_SATURATION 0x01000003 /* 0..65535 */ #define XINE_PARAM_VO_CONTRAST 0x01000004 /* 0..65535 */ #define XINE_PARAM_VO_BRIGHTNESS 0x01000005 /* 0..65535 */ #define XINE_PARAM_VO_ZOOM_X 0x01000008 /* percent */ #define XINE_PARAM_VO_ZOOM_Y 0x0100000d /* percent */ #define XINE_PARAM_VO_PAN_SCAN 0x01000009 /* bool */ #define XINE_PARAM_VO_TVMODE 0x0100000a /* ??? */ #define XINE_VO_ZOOM_STEP 100 #define XINE_VO_ZOOM_MAX 400 #define XINE_VO_ZOOM_MIN -85 /* possible ratios for XINE_PARAM_VO_ASPECT_RATIO */ #define XINE_VO_ASPECT_AUTO 0 #define XINE_VO_ASPECT_SQUARE 1 /* 1:1 */ #define XINE_VO_ASPECT_4_3 2 /* 4:3 */ #define XINE_VO_ASPECT_ANAMORPHIC 3 /* 16:9 */ #define XINE_VO_ASPECT_DVB 4 /* 1:2 */ #define XINE_VO_ASPECT_NUM_RATIOS 5 #define XINE_VO_ASPECT_PAN_SCAN 41 #define XINE_VO_ASPECT_DONT_TOUCH 42 /* stream format detection strategies */ /* recognize stream type first by content then by extension. */ #define XINE_DEMUX_DEFAULT_STRATEGY 0 /* recognize stream type first by extension then by content. */ #define XINE_DEMUX_REVERT_STRATEGY 1 /* recognize stream type by content only. */ #define XINE_DEMUX_CONTENT_STRATEGY 2 /* recognize stream type by extension only. */ #define XINE_DEMUX_EXTENSION_STRATEGY 3 #ifndef SWIG /* * snapshot function * * image format can be YUV 4:2:0 or 4:2:2 * will copy the image data into memory that points to * (interleaved for yuv 4:2:2 or planary for 4:2:0) * * returns 1 on success, 0 failure. */ int xine_get_current_frame (xine_stream_t *stream, int *width, int *height, int *ratio_code, int *format, uint8_t *img); /* xine image formats */ #define XINE_IMGFMT_YV12 (int) (('2'<<24)|('1'<<16)|('V'<<8)|'Y') #define XINE_IMGFMT_YUY2 (int) (('2'<<24)|('Y'<<16)|('U'<<8)|'Y') /********************************************************************* * media processing * *********************************************************************/ #ifdef XINE_ENABLE_EXPERIMENTAL_FEATURES /* * access to decoded audio and video frames from a stream * these functions are intended to provide the basis for * re-encoding and other video processing applications * * warning: highly experimental * */ xine_video_port_t *xine_new_framegrab_video_port (xine_t *self); typedef struct { int64_t vpts; /* timestamp 1/90000 sec for a/v sync */ int64_t duration; int width, height; int colorspace; /* XINE_IMGFMT_* */ double aspect_ratio; int pos_stream; /* bytes from stream start */ int pos_time; /* milliseconds */ uint8_t *data; void *xine_frame; /* used internally by xine engine */ } xine_video_frame_t; int xine_get_next_video_frame (xine_video_port_t *port, xine_video_frame_t *frame); void xine_free_video_frame (xine_video_port_t *port, xine_video_frame_t *frame); xine_audio_port_t *xine_new_framegrab_audio_port (xine_t *self); typedef struct { int64_t vpts; /* timestamp 1/90000 sec for a/v sync */ int num_samples; int sample_rate; int num_channels; int bits_per_sample; /* per channel */ off_t pos_stream; /* bytes from stream start */ int pos_time; /* milliseconds */ uint8_t *data; void *xine_frame; /* used internally by xine engine */ } xine_audio_frame_t; int xine_get_next_audio_frame (xine_audio_port_t *port, xine_audio_frame_t *frame); void xine_free_audio_frame (xine_audio_port_t *port, xine_audio_frame_t *frame); /* * maybe future aproach: */ int xine_get_video_frame (xine_stream_t *stream, int timestamp, /* msec */ int *width, int *height, int *ratio_code, int *duration, /* msec */ int *format, uint8_t *img); /* TODO: xine_get_audio_frame */ #endif #endif /* !SWIG */ /********************************************************************* * post plugin handling * *********************************************************************/ /* * post effect plugin functions * * after the data leaves the decoder it can pass an arbitrary tree * of post plugins allowing for effects to be applied to the video * frames/audio buffers before they reach the output stage */ typedef struct xine_post_s xine_post_t; struct xine_post_s { /* a NULL-terminated array of audio input ports this post plugin * provides; you can hand these to other post plugin's outputs or * pass them to the initialization of streams */ xine_audio_port_t **audio_input; /* a NULL-terminated array of video input ports this post plugin * provides; you can hand these to other post plugin's outputs or * pass them to the initialization of streams */ xine_video_port_t **video_input; /* the type of the post plugin * one of XINE_POST_TYPE_* can be used here */ int type; }; /* * initialize a post plugin * * returns xine_post_t* on success, NULL on failure * * Initializes the post plugin with the given name and connects its * outputs to the NULL-terminated arrays of audio and video ports. * Some plugins also care about the number of inputs you request * (e.g. mixer plugins), others simply ignore this number. */ xine_post_t *xine_post_init(xine_t *xine, const char *name, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); /* get a list of all available post plugins */ STRING *xine_list_post_plugins(xine_t *xine); /* get a list of all post plugins of one type */ STRING *xine_list_post_plugins_typed(xine_t *xine, int type); /* * post plugin input/output * * These structures encapsulate inputs/outputs for post plugins * to transfer arbitrary data. Frontends can also provide inputs * and outputs and connect them to post plugins to exchange data * with them. */ typedef struct xine_post_in_s xine_post_in_t; typedef struct xine_post_out_s xine_post_out_t; struct xine_post_in_s { /* the name identifying this input */ STRING name; /* the datatype of this input, use one of XINE_POST_DATA_* here */ int type; #ifndef SWIG /* the data pointer; input is directed to this memory location, * so you simply access the pointer to access the input data */ void *data; #endif }; struct xine_post_out_s { /* the name identifying this output */ STRING name; /* the datatype of this output, use one of XINE_POST_DATA_* here */ int type; #ifndef SWIG /* the data pointer; output should be directed to this memory location, * so in the easy case you simply write through the pointer */ void *data; /* this function is called, when the output should be redirected * to another input, you sould set the data pointer to direct * any output to this new input; * a special situation is, when this function is called with a NULL * argument: in this case you should disconnect the data pointer * from any output and if necessary to avoid writing to some stray * memory you should make it point to some dummy location, * returns 1 on success, 0 on failure; * if you do not implement rewiring, set this to NULL */ int (*rewire) (xine_post_out_t *self, void *data); #endif }; /* get a list of all inputs of a post plugin */ STRING *xine_post_list_inputs(xine_post_t *self); /* get a list of all outputs of a post plugin */ STRING *xine_post_list_outputs(xine_post_t *self); /* retrieve one specific input of a post plugin */ const xine_post_in_t *xine_post_input(xine_post_t *self, char *name); /* retrieve one specific output of a post plugin */ const xine_post_out_t *xine_post_output(xine_post_t *self, char *name); /* * wire an input to an output * returns 1 on success, 0 on failure */ int xine_post_wire(xine_post_out_t *source, xine_post_in_t *target); /* * wire a video port to a video output * This can be used to rewire different post plugins to the video output * plugin layer. The ports you hand in at xine_post_init() will already * be wired with the post plugin, so you need this function for * _re_connecting only. * * returns 1 on success, 0 on failure */ int xine_post_wire_video_port(xine_post_out_t *source, xine_video_port_t *vo); /* * wire an audio port to an audio output * This can be used to rewire different post plugins to the audio output * plugin layer. The ports you hand in at xine_post_init() will already * be wired with the post plugin, so you need this function for * _re_connecting only. * * returns 1 on success, 0 on failure */ int xine_post_wire_audio_port(xine_post_out_t *source, xine_audio_port_t *vo); /* * Extracts an output for a stream. Use this to rewire the outputs of streams. */ xine_post_out_t * xine_get_video_source(xine_stream_t *stream); xine_post_out_t * xine_get_audio_source(xine_stream_t *stream); /* * disposes the post plugin * please make sure that no other post plugin and no stream is * connected to any of this plugin's inputs */ void xine_post_dispose(xine_t *xine, xine_post_t *self); /* post plugin types */ #define XINE_POST_TYPE_VIDEO_FILTER 0x010000 #define XINE_POST_TYPE_VIDEO_VISUALIZATION 0x010001 #define XINE_POST_TYPE_AUDIO_FILTER 0x020000 #define XINE_POST_TYPE_AUDIO_VISUALIZATION 0x020001 /* post plugin data types */ /* video port data * input->data is a xine_video_port_t* * output->data usually is a xine_video_port_t** */ #define XINE_POST_DATA_VIDEO 0 /* audio port data * input->data is a xine_audio_port_t* * output->data usually is a xine_audio_port_t** */ #define XINE_POST_DATA_AUDIO 1 /* integer data * input->data is a int* * output->data usually is a int* */ #define XINE_POST_DATA_INT 3 /* double precision floating point data * input->data is a double* * output->data usually is a double* */ #define XINE_POST_DATA_DOUBLE 4 /********************************************************************* * information retrieval * *********************************************************************/ /* * xine log functions * * frontends can display xine log output using these functions */ int xine_get_log_section_count(xine_t *self); /* return a NULL terminated array of log sections names */ STRING *xine_get_log_names(xine_t *self); /* print some log information to section */ #ifdef SWIG void xine_log (xine_t *self, int buf, const char *xine_log_format, const char *str); #else void xine_log (xine_t *self, int buf, const char *format, ...); #endif /* get log messages of specified section */ STRING *xine_get_log (xine_t *self, int buf); /* log callback will be called whenever something is logged */ typedef void (*xine_log_cb_t) (void *user_data, int section); void xine_register_log_cb (xine_t *self, xine_log_cb_t cb, void *user_data); /* * error handling / engine status */ /* return last error */ int xine_get_error (xine_stream_t *stream); /* get current xine engine status (constants see below) */ int xine_get_status (xine_stream_t *stream); /* * engine status codes */ #define XINE_STATUS_IDLE 0 /* no mrl assigned */ #define XINE_STATUS_STOP 1 #define XINE_STATUS_PLAY 2 #define XINE_STATUS_QUIT 3 /* * xine error codes */ #define XINE_ERROR_NONE 0 #define XINE_ERROR_NO_INPUT_PLUGIN 1 #define XINE_ERROR_NO_DEMUX_PLUGIN 2 #define XINE_ERROR_DEMUX_FAILED 3 #define XINE_ERROR_MALFORMED_MRL 4 /* * try to find out audio/spu language of given channel * (use -1 for current channel) * * returns 1 on success, 0 on failure */ int xine_get_audio_lang (xine_stream_t *stream, int channel, char *lang); int xine_get_spu_lang (xine_stream_t *stream, int channel, char *lang); /* * get position / length information * * depending of the nature and system layer of the stream, * some or all of this information may be unavailable or incorrect * (e.g. live network streams may not have a valid length) * * returns 1 on success, 0 on failure (data was not updated, * probably because it's not known yet... try again later) */ int xine_get_pos_length (xine_stream_t *stream, int *pos_stream, /* 0..65535 */ int *pos_time, /* milliseconds */ int *length_time);/* milliseconds */ /* * get information about the stream such as * video width/height, codecs, audio format, title, author... * * constants see below */ uint32_t xine_get_stream_info (xine_stream_t *stream, int info); const char *xine_get_meta_info (xine_stream_t *stream, int info); /* xine_get_stream_info */ #define XINE_STREAM_INFO_BITRATE 0 #define XINE_STREAM_INFO_SEEKABLE 1 #define XINE_STREAM_INFO_VIDEO_WIDTH 2 #define XINE_STREAM_INFO_VIDEO_HEIGHT 3 #define XINE_STREAM_INFO_VIDEO_RATIO 4 /* *10000 */ #define XINE_STREAM_INFO_VIDEO_CHANNELS 5 #define XINE_STREAM_INFO_VIDEO_STREAMS 6 #define XINE_STREAM_INFO_VIDEO_BITRATE 7 #define XINE_STREAM_INFO_VIDEO_FOURCC 8 #define XINE_STREAM_INFO_VIDEO_HANDLED 9 /* codec available? */ #define XINE_STREAM_INFO_FRAME_DURATION 10 /* 1/90000 sec */ #define XINE_STREAM_INFO_AUDIO_CHANNELS 11 #define XINE_STREAM_INFO_AUDIO_BITS 12 #define XINE_STREAM_INFO_AUDIO_SAMPLERATE 13 #define XINE_STREAM_INFO_AUDIO_BITRATE 14 #define XINE_STREAM_INFO_AUDIO_FOURCC 15 #define XINE_STREAM_INFO_AUDIO_HANDLED 16 /* codec available? */ #define XINE_STREAM_INFO_HAS_CHAPTERS 17 #define XINE_STREAM_INFO_HAS_VIDEO 18 #define XINE_STREAM_INFO_HAS_AUDIO 19 #define XINE_STREAM_INFO_IGNORE_VIDEO 20 #define XINE_STREAM_INFO_IGNORE_AUDIO 21 #define XINE_STREAM_INFO_IGNORE_SPU 22 #define XINE_STREAM_INFO_VIDEO_HAS_STILL 23 #define XINE_STREAM_INFO_MAX_AUDIO_CHANNEL 24 #define XINE_STREAM_INFO_MAX_SPU_CHANNEL 25 /* xine_get_meta_info */ #define XINE_META_INFO_TITLE 0 #define XINE_META_INFO_COMMENT 1 #define XINE_META_INFO_ARTIST 2 #define XINE_META_INFO_GENRE 3 #define XINE_META_INFO_ALBUM 4 #define XINE_META_INFO_YEAR 5 #define XINE_META_INFO_VIDEOCODEC 6 #define XINE_META_INFO_AUDIOCODEC 7 #define XINE_META_INFO_SYSTEMLAYER 8 #define XINE_META_INFO_INPUT_PLUGIN 9 /********************************************************************* * plugin management / autoplay / mrl browsing * *********************************************************************/ /* * note: the pointers to strings or string arrays returned * by some of these functions are pointers to statically * alloced internal xine memory chunks. * they're only valid between xine function calls * and should never be free()d. */ #ifndef SWIG typedef struct { char *origin; /* file plugin: path */ char *mrl; /* :// */ char *link; uint32_t type; /* see below */ off_t size; /* size of this source, may be 0 */ } xine_mrl_t; #endif /* mrl types */ #define XINE_MRL_TYPE_unknown (0 << 0) #define XINE_MRL_TYPE_dvd (1 << 0) #define XINE_MRL_TYPE_vcd (1 << 1) #define XINE_MRL_TYPE_net (1 << 2) #define XINE_MRL_TYPE_rtp (1 << 3) #define XINE_MRL_TYPE_stdin (1 << 4) #define XINE_MRL_TYPE_cda (1 << 5) #define XINE_MRL_TYPE_file (1 << 6) #define XINE_MRL_TYPE_file_fifo (1 << 7) #define XINE_MRL_TYPE_file_chardev (1 << 8) #define XINE_MRL_TYPE_file_directory (1 << 9) #define XINE_MRL_TYPE_file_blockdev (1 << 10) #define XINE_MRL_TYPE_file_normal (1 << 11) #define XINE_MRL_TYPE_file_symlink (1 << 12) #define XINE_MRL_TYPE_file_sock (1 << 13) #define XINE_MRL_TYPE_file_exec (1 << 14) #define XINE_MRL_TYPE_file_backup (1 << 15) #define XINE_MRL_TYPE_file_hidden (1 << 16) /* get a list of browsable input plugin ids */ STRING *xine_get_browsable_input_plugin_ids (xine_t *self) ; /* * ask input plugin named to return * a list of available MRLs in domain/directory . * * may be NULL indicating the toplevel domain/dir * returns if is a valid MRL, not a directory * returns NULL if is an invalid MRL, not even a directory. */ xine_mrl_t **xine_get_browse_mrls (xine_t *self, const char *plugin_id, const char *start_mrl, int *num_mrls); /* get a list of plugins that support the autoplay feature */ STRING *xine_get_autoplay_input_plugin_ids (xine_t *self); /* get autoplay MRL list from input plugin named */ STRING *xine_get_autoplay_mrls (xine_t *self, const char *plugin_id, int *num_mrls); /* get a list of file extensions for file types supported by xine * the list is separated by spaces * * the pointer returned can be free()ed when no longer used */ char *xine_get_file_extensions (xine_t *self); /* get a list of mime types supported by xine * * the pointer returned can be free()ed when no longer used */ char *xine_get_mime_types (xine_t *self); /* get the demuxer identifier that handles a given mime type * * the pointer returned can be free()ed when no longer used * returns NULL if no demuxer is available to handle this. */ char *xine_get_demux_for_mime_type (xine_t *self, const char *mime_type); /* get a description string for an input plugin */ const char *xine_get_input_plugin_description (xine_t *self, const char *plugin_id); /* get lists of available audio and video output plugins */ STRING *xine_list_audio_output_plugins (xine_t *self) ; STRING *xine_list_video_output_plugins (xine_t *self) ; /********************************************************************* * visual specific gui <-> xine engine communication * *********************************************************************/ /* talk to video output driver */ int xine_gui_send_vo_data (xine_stream_t *self, int type, void *data); typedef struct { /* area of that drawable to be used by video */ int x,y,w,h; } x11_rectangle_t; #ifndef SWIG /* * this is the visual data struct any x11 gui * must supply to the xine_open_video_driver call * ("data" parameter) */ typedef struct { /* some information about the display */ void *display; /* Display* */ int screen; /* drawable to display the video in/on */ unsigned long d; /* Drawable */ void *user_data; /* * dest size callback * * this will be called by the video driver to find out * how big the video output area size will be for a * given video size. The ui should _not_ adjust it's * video out area, just do some calculations and return * the size. This will be called for every frame, ui * implementation should be fast. * dest_pixel_aspect should be set to the used display pixel aspect. * NOTE: Semantics has changed: video_width and video_height * are no longer pixel aspect corrected. Get the old semantics * in the UI with * *dest_pixel_aspect = display_pixel_aspect; * if (video_pixel_aspect >= display_pixel_aspect) * video_width = video_width * video_pixel_aspect / display_pixel_aspect + .5; * else * video_height = video_height * display_pixel_aspect / video_pixel_aspect + .5; */ void (*dest_size_cb) (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_width, int *dest_height, double *dest_pixel_aspect); /* * frame output callback * * this will be called by the video driver for every frame * it's about to draw. ui can adapt it's size if necessary * here. * note: the ui doesn't have to adjust itself to this * size, this is just to be taken as a hint. * ui must return the actual size of the video output * area and the video output driver will do it's best * to adjust the video frames to that size (while * preserving aspect ratio and stuff). * dest_x, dest_y: offset inside window * dest_width, dest_height: available drawing space * dest_pixel_aspect: display pixel aspect * win_x, win_y: window absolute screen position * NOTE: Semantics has changed: video_width and video_height * are no longer pixel aspect corrected. Get the old semantics * in the UI with * *dest_pixel_aspect = display_pixel_aspect; * if (video_pixel_aspect >= display_pixel_aspect) * video_width = video_width * video_pixel_aspect / display_pixel_aspect + .5; * else * video_height = video_height * display_pixel_aspect / video_pixel_aspect + .5; */ void (*frame_output_cb) (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_x, int *dest_y, int *dest_width, int *dest_height, double *dest_pixel_aspect, int *win_x, int *win_y); } x11_visual_t; #endif /* * "type" constants for xine_gui_send_vo_data (...) */ /* xevent *data */ #define XINE_GUI_SEND_COMPLETION_EVENT 1 /* Drawable data */ #define XINE_GUI_SEND_DRAWABLE_CHANGED 2 /* xevent *data */ #define XINE_GUI_SEND_EXPOSE_EVENT 3 /* x11_rectangle_t *data */ #define XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO 4 /* int data */ #define XINE_GUI_SEND_VIDEOWIN_VISIBLE 5 /* *data contains chosen visual, select a new one or change it to NULL * to indicate the visual to use or that no visual will work */ /* XVisualInfo **data */ #define XINE_GUI_SEND_SELECT_VISUAL 8 #ifndef SWIG /********************************************************************* * xine health check stuff * *********************************************************************/ #define XINE_HEALTH_CHECK_OK 0 #define XINE_HEALTH_CHECK_FAIL 1 #define XINE_HEALTH_CHECK_UNSUPPORTED 2 #define XINE_HEALTH_CHECK_NO_SUCH_CHECK 3 #define CHECK_KERNEL 0 #define CHECK_MTRR 1 #define CHECK_CDROM 2 #define CHECK_DVDROM 3 #define CHECK_DMA 4 #define CHECK_X 5 #define CHECK_XV 6 struct xine_health_check_s { int status; const char* cdrom_dev; const char* dvd_dev; char* msg; char* title; char* explanation; }; typedef struct xine_health_check_s xine_health_check_t; xine_health_check_t* xine_health_check(xine_health_check_t*, int check_num); #endif /* !SWIG */ /********************************************************************* * configuration system * *********************************************************************/ /* * config entry data types */ #define XINE_CONFIG_TYPE_UNKNOWN 0 #define XINE_CONFIG_TYPE_RANGE 1 #define XINE_CONFIG_TYPE_STRING 2 #define XINE_CONFIG_TYPE_ENUM 3 #define XINE_CONFIG_TYPE_NUM 4 #define XINE_CONFIG_TYPE_BOOL 5 typedef struct xine_cfg_entry_s xine_cfg_entry_t; typedef void (*xine_config_cb_t) (void *user_data, xine_cfg_entry_t *entry); struct xine_cfg_entry_s { STRING key; /* unique id (example: gui.logo_mrl) */ int type; /* type unknown */ char *unknown_value; /* type string */ char *str_value; char *str_default; char *str_sticky; /* common to range, enum, num, bool: */ int num_value; int num_default; /* type range specific: */ int range_min; int range_max; /* type enum specific: */ char **enum_values; /* help info for the user */ STRING description; STRING help; /* user experience level */ int exp_level; /* 0 => beginner, 10 => advanced user, 20 => expert */ #ifndef SWIG /* callback function and data for live changeable values */ xine_config_cb_t callback; void *callback_data; #endif }; const char *xine_config_register_string (xine_t *self, const char *key, const char *def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_range (xine_t *self, const char *key, int def_value, int min, int max, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_enum (xine_t *self, const char *key, int def_value, char **values, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_num (xine_t *self, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_bool (xine_t *self, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); /* * the following functions will copy data from the internal xine_config * data database to the xine_cfg_entry_t *entry you provide * * they return 1 on success, 0 on failure */ /* get first config item */ int xine_config_get_first_entry (xine_t *self, xine_cfg_entry_t *OUTPUT); /* get next config item (iterate through the items) */ int xine_config_get_next_entry (xine_t *self, xine_cfg_entry_t *OUTPUT); /* search for a config entry by key */ int xine_config_lookup_entry (xine_t *self, const char *key, xine_cfg_entry_t *OUTPUT); /* * update a config entry (which was returned from lookup_entry() ) * * xine will make a deep copy of the data in the entry into it's internal * config database. */ void xine_config_update_entry (xine_t *self, const xine_cfg_entry_t *entry); /* * load/save config data from/to afile (e.g. $HOME/.xine/config) */ void xine_config_load (xine_t *self, const char *cfg_filename); void xine_config_save (xine_t *self, const char *cfg_filename); void xine_config_reset (xine_t *self); /********************************************************************* * asynchroneous xine event mechanism * *********************************************************************/ /* * to receive events you have to register an event queue with * the xine engine (xine_event_new_queue, see below). * * then you can either * 1) check for incoming events regularly (xine_event_get/wait), * process them and free them using xine_event_free * 2) use xine_event_create_listener_thread and specify a callback * which will then be called for each event * * to send events to every module listening you don't need * to register an event queue but simply call xine_event_send. */ /* event types */ #define XINE_EVENT_UI_PLAYBACK_FINISHED 1 /* frontend can e.g. move on to next playlist entry */ #define XINE_EVENT_UI_CHANNELS_CHANGED 2 /* inform ui that new channel info is available */ #define XINE_EVENT_UI_SET_TITLE 3 /* request title display change in ui */ #define XINE_EVENT_UI_MESSAGE 4 /* message (dialog) for the ui to display */ #define XINE_EVENT_FRAME_FORMAT_CHANGE 5 /* e.g. aspect ratio change during dvd playback */ #define XINE_EVENT_AUDIO_LEVEL 6 /* report current audio level (l/r) */ #define XINE_EVENT_QUIT 7 /* last event sent when stream is disposed */ #define XINE_EVENT_PROGRESS 8 /* index creation/network connections */ #define XINE_EVENT_MRL_REFERENCE 9 /* demuxer->frontend: MRL reference(s) for the real stream */ /* input events coming from frontend */ #define XINE_EVENT_INPUT_MOUSE_BUTTON 101 #define XINE_EVENT_INPUT_MOUSE_MOVE 102 #define XINE_EVENT_INPUT_MENU1 103 #define XINE_EVENT_INPUT_MENU2 104 #define XINE_EVENT_INPUT_MENU3 105 #define XINE_EVENT_INPUT_MENU4 106 #define XINE_EVENT_INPUT_MENU5 107 #define XINE_EVENT_INPUT_MENU6 108 #define XINE_EVENT_INPUT_MENU7 109 #define XINE_EVENT_INPUT_UP 110 #define XINE_EVENT_INPUT_DOWN 111 #define XINE_EVENT_INPUT_LEFT 112 #define XINE_EVENT_INPUT_RIGHT 113 #define XINE_EVENT_INPUT_SELECT 114 #define XINE_EVENT_INPUT_NEXT 115 #define XINE_EVENT_INPUT_PREVIOUS 116 #define XINE_EVENT_INPUT_ANGLE_NEXT 117 #define XINE_EVENT_INPUT_ANGLE_PREVIOUS 118 #define XINE_EVENT_INPUT_BUTTON_FORCE 119 #define XINE_EVENT_INPUT_NUMBER_0 120 #define XINE_EVENT_INPUT_NUMBER_1 121 #define XINE_EVENT_INPUT_NUMBER_2 122 #define XINE_EVENT_INPUT_NUMBER_3 123 #define XINE_EVENT_INPUT_NUMBER_4 124 #define XINE_EVENT_INPUT_NUMBER_5 125 #define XINE_EVENT_INPUT_NUMBER_6 126 #define XINE_EVENT_INPUT_NUMBER_7 127 #define XINE_EVENT_INPUT_NUMBER_8 128 #define XINE_EVENT_INPUT_NUMBER_9 129 #define XINE_EVENT_INPUT_NUMBER_10_ADD 130 /* * xine event struct */ typedef struct { int type; /* event type (constants see above) */ xine_stream_t *stream; /* stream this event belongs to */ void *data; /* contents depending on type */ int data_length; /* you do not have to provide this, it will be filled in by xine_event_send() */ struct timeval tv; /* timestamp of event creation */ } xine_event_t; /* * input event dynamic data */ typedef struct { xine_event_t event; uint8_t button; /* Generally 1 = left, 2 = mid, 3 = right */ uint16_t x,y; /* In Image space */ } xine_input_data_t; /* * UI event dynamic data - send information to/from UI. */ typedef struct { int num_buttons; int str_len; char str[256]; /* might be longer */ } xine_ui_data_t; /* * notify frame format change */ typedef struct { int width; int height; int aspect; } xine_format_change_data_t; /* * audio level for left/right channel */ typedef struct { int left; int right; /* 0..255 */ } xine_audio_level_data_t; /* * index generation / buffering */ typedef struct { const char *description; /* e.g. "connecting..." */ int percent; } xine_progress_data_t; /* * mrl reference data is sent by demuxers when a reference stream is found. * this stream just contains pointers (urls) to the real data, which are * passed to frontend using this event type. (examples: .asx, .mov and .ram) * * ideally, frontends should add these mrls to a "hierarchical playlist". * that is, instead of the original file, the ones provided here should be * played instead. on pratice, just using a simple playlist should work. * * mrl references should be played in the same order they are received, just * after the current stream finishes. * alternative playlists may be provided and should be used in case of * failure of the primary playlist. */ typedef struct { int alternative; /* alternative playlist number, usually 0 */ char mrl[1]; /* might (will) be longer */ } xine_mrl_reference_data_t; /* opaque xine_event_queue_t */ typedef struct xine_event_queue_s xine_event_queue_t; /* * register a new event queue * * you have to receive messages from this queue regularly * * use xine_event_dispose_queue to unregister and free the queue */ xine_event_queue_t *xine_event_new_queue (xine_stream_t *stream); void xine_event_dispose_queue (xine_event_queue_t *queue); /* * receive events (poll) * * use xine_event_free on the events received from these calls * when they're no longer needed */ xine_event_t *xine_event_get (xine_event_queue_t *queue); xine_event_t *xine_event_wait (xine_event_queue_t *queue); void xine_event_free (xine_event_t *event); /* * receive events (callback) * * a thread is created which will receive all events from * the specified queue, call your callback on each of them * and will then free the event when your callback returns * */ typedef void (*xine_event_listener_cb_t) (void *user_data, const xine_event_t *event); void xine_event_create_listener_thread (xine_event_queue_t *queue, xine_event_listener_cb_t callback, void *user_data); /* * send an event to all queues * * the event will be copied so you can free or reuse * *event as soon as xine_event_send returns. */ void xine_event_send (xine_stream_t *stream, const xine_event_t *event); /********************************************************************* * OSD (on screen display) * *********************************************************************/ #define XINE_TEXT_PALETTE_SIZE 11 #define XINE_OSD_TEXT1 (0 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT2 (1 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT3 (2 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT4 (3 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT5 (4 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT6 (5 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT7 (6 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT8 (7 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT9 (8 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT10 (9 * XINE_TEXT_PALETTE_SIZE) /* white text, black border, transparent background */ #define XINE_TEXTPALETTE_WHITE_BLACK_TRANSPARENT 0 /* white text, noborder, transparent background */ #define XINE_TEXTPALETTE_WHITE_NONE_TRANSPARENT 1 /* white text, no border, translucid background */ #define XINE_TEXTPALETTE_WHITE_NONE_TRANSLUCID 2 /* yellow text, black border, transparent background */ #define XINE_TEXTPALETTE_YELLOW_BLACK_TRANSPARENT 3 typedef struct xine_osd_s xine_osd_t; xine_osd_t *xine_osd_new (xine_stream_t *self, int x, int y, int width, int height); void xine_osd_draw_point (xine_osd_t *self, int x, int y, int color); void xine_osd_draw_line (xine_osd_t *self, int x1, int y1, int x2, int y2, int color); void xine_osd_draw_rect (xine_osd_t *self, int x1, int y1, int x2, int y2, int color, int filled ); void xine_osd_draw_text (xine_osd_t *self, int x1, int y1, const char *text, int color_base); void xine_osd_get_text_size (xine_osd_t *self, const char *text, int *width, int *height); void xine_osd_set_font (xine_osd_t *self, const char *fontname, int size); /* set position were overlay will be blended */ void xine_osd_set_position (xine_osd_t *self, int x, int y); void xine_osd_show (xine_osd_t *self, int64_t vpts); void xine_osd_hide (xine_osd_t *self, int64_t vpts); /* empty drawing area */ void xine_osd_clear (xine_osd_t *self); /* * close osd rendering engine * loaded fonts are unloaded * osd objects are closed */ void xine_osd_free (xine_osd_t *self); void xine_osd_set_palette (xine_osd_t *self, color_t *INPUT, trans_t *INPUT); /* * set on existing text palette * (-1 to set used specified palette) * * color_base specifies the first color index to use for this text * palette. The OSD palette is then modified starting at this * color index, up to the size of the text palette. * * Use OSD_TEXT1, OSD_TEXT2, ... for some preasssigned color indices. */ void xine_osd_set_text_palette (xine_osd_t *self, int palette_number, int color_base ); /* get palette (color and transparency) */ void xine_osd_get_palette (xine_osd_t *self, color_t *OUTPUT, trans_t *OUTPUT); #ifndef SWIG /********************************************************************* * TV-mode API, to make it possible to use nvtvd to view movies * *********************************************************************/ /* connect to nvtvd server and save current TV and X settings */ void xine_tvmode_init (xine_t *self); /* try to change TV state if enabled * type select 'regular' (0) or 'TV' (1) state * width frame width the mode should match best or 0 if unknown * height frame height the mode should match best or 0 if unknown * fps frame rate the mode should match best or 0 if unknown * returns: finally selected state */ int xine_tvmode_switch (xine_t *self, int type, int width, int height, double fps); /* adapt (maximum) output size to visible area if necessary and return pixel * aspect and real frame rate if available */ void xine_tvmode_size (xine_t *self, int *width, int *height, double *pixelratio, double *fps); /* restore old TV and X settings and close nvtvd connection */ void xine_tvmode_exit (xine_t *self); #endif /* !SWIG */ #ifdef __cplusplus } #endif #endif pyxine-0.1alpha2.orig/pyxine/orig_xine.h0100644000175000017500000013574707621052241017400 0ustar pimanpiman/* * Copyright (C) 2000-2002 the xine project * * This file is part of xine, a free video player. * * xine 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. * * xine 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-1307, USA * * $Id: orig_xine.h,v 1.1 2003/02/08 00:51:45 dairiki Exp $ * * public xine-lib (libxine) interface and documentation * * * some programming guidelines about this api: * ------------------------------------------- * * (1) libxine has (per stream instance) a fairly static memory * model * (2) as a rule of thumb, never free() or realloc() any pointers * returned by the xine engine (unless stated otherwise) * or, in other words: * do not free() stuff you have not malloc()ed * (3) xine is multi-threaded, make sure your programming environment * can handle this. * for x11-related stuff this means that you either have to properly * use xlockdisplay() or use two seperate connections to the x-server * */ #ifndef HAVE_XINE_H #define HAVE_XINE_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include /********************************************************************* * xine opaque data types * *********************************************************************/ typedef struct xine_s xine_t; typedef struct xine_stream_s xine_stream_t; typedef struct xine_audio_port_s xine_audio_port_t; typedef struct xine_video_port_s xine_video_port_t; /* convenience types: simple player UIs might want to call ports drivers */ typedef xine_audio_port_t xine_ao_driver_t; typedef xine_video_port_t xine_vo_driver_t; /********************************************************************* * global engine handling * *********************************************************************/ /* * version information */ /* dynamic info from actually linked libxine */ const char *xine_get_version_string (void); void xine_get_version (int *major, int *minor, int *sub); /* compare given version to libxine version, return 1 if compatible, 0 otherwise */ int xine_check_version (int major, int minor, int sub) ; /* static info - which libxine release this header came from */ #define XINE_MAJOR_VERSION 1 #define XINE_MINOR_VERSION 0 #define XINE_SUB_VERSION 0 #define XINE_VERSION "1-beta4" /* * pre-init the xine engine * * will first malloc and init a xine_t, create an empty config * system, then scan through all installed plugins and add them * to an internal list for later use. * * to fully init the xine engine, you have to load config values * (either using your own storage method and calling * xine_config_register_entry, or by using the xine_load_config * utility function - see below) and then call xine_init * * the only proper way to shut down the xine engine is to * call xine_exit() - do not try to free() the xine pointer * yourself and do not try to access any internal data structures */ xine_t *xine_new (void); /* * post_init the xine engine */ void xine_init (xine_t *self); /* * helper functions to find and init audio/video drivers * from xine's plugin collection * * id : identifier of the driver, may be NULL for auto-detection * data : special data struct for ui/driver communications, depends * on driver * visual: video driver flavor selector, constants see below * * both functions may return NULL if driver failed to load, was not * found ... * * use xine_close_audio/video_driver() to close loaded drivers * and free resources allocated by them */ xine_audio_port_t *xine_open_audio_driver (xine_t *self, const char *id, void *data); xine_video_port_t *xine_open_video_driver (xine_t *self, const char *id, int visual, void *data); void xine_close_audio_driver (xine_t *self, xine_audio_port_t *driver); void xine_close_video_driver (xine_t *self, xine_video_port_t *driver); /* valid visual types */ #define XINE_VISUAL_TYPE_NONE 0 #define XINE_VISUAL_TYPE_X11 1 #define XINE_VISUAL_TYPE_AA 2 #define XINE_VISUAL_TYPE_FB 3 #define XINE_VISUAL_TYPE_GTK 4 #define XINE_VISUAL_TYPE_DFB 5 #define XINE_VISUAL_TYPE_PM 6 /* used by the OS/2 port */ /* * free all resources, close all plugins, close engine. * self pointer is no longer valid after this call. */ void xine_exit (xine_t *self); /********************************************************************* * stream handling * *********************************************************************/ /* * create a new stream for media playback/access * * returns xine_stream_t* if OK, * NULL on error (use xine_get_error for details) * * the only proper way to free the stream pointer returned by this * function is to call xine_dispose() on it. do not try to access any * fields in xine_stream_t, they're all private and subject to change * without further notice. */ xine_stream_t *xine_stream_new (xine_t *self, xine_audio_port_t *ao, xine_video_port_t *vo); /* * Make one stream the slave of another. * This establishes a binary master slave relation on streams, where * certain operations (specified by parameter "affection") on the master * stream are also applied to the slave stream. * If you want more than one stream to react to one master, you have to * apply the calls in a top down way: * xine_stream_master_slave(stream1, stream2, 3); * xine_stream_master_slave(stream2, stream3, 3); * This will make stream1 affect stream2 and stream2 affect stream3, so * effectively, operations on stream1 propagate to stream2 and 3. * * Please note that subsequent master_slave calls on the same streams * will overwrite their previous master/slave setting. * Be sure to not mess around. * * returns 1 on success, 0 on failure */ int xine_stream_master_slave(xine_stream_t *master, xine_stream_t *slave, int affection); /* affection is some of the following ORed together: */ /* playing the master plays the slave */ #define XINE_MASTER_SLAVE_PLAY (1<<0) /* slave stops on master stop */ #define XINE_MASTER_SLAVE_STOP (1<<1) /* * open a stream * * look for input / demux / decoder plugins, find out about the format * see if it is supported, set up internal buffers and threads * * returns 1 if OK, 0 on error (use xine_get_error for details) */ int xine_open (xine_stream_t *stream, const char *mrl); /* * play a stream from a given position * * start_pos: 0..65535 * start_time: milliseconds * if both start position parameters are != 0 start_pos will be used * for non-seekable streams both values will be ignored * * returns 1 if OK, 0 on error (use xine_get_error for details) */ int xine_play (xine_stream_t *stream, int start_pos, int start_time); /* * set xine to a trick mode for fast forward, backwards playback, * low latency seeking. Please note that this works only with some * input plugins. mode constants see below. * * returns 1 if OK, 0 on error (use xine_get_error for details) */ int xine_trick_mode (xine_stream_t *stream, int mode, int value); /* trick modes */ #define XINE_TRICK_MODE_OFF 0 #define XINE_TRICK_MODE_SEEK_TO_POSITION 1 #define XINE_TRICK_MODE_SEEK_TO_TIME 2 #define XINE_TRICK_MODE_FAST_FORWARD 3 #define XINE_TRICK_MODE_FAST_REWIND 4 /* * stop stream playback * xine_stream_t stays valid for new xine_open or xine_play */ void xine_stop (xine_stream_t *stream); /* * stop stream playback, free all stream-related resources * xine_stream_t stays valid for new xine_open */ void xine_close (xine_stream_t *stream); /* * ask current/recent input plugin to eject media - may or may not work, * depending on input plugin capabilities */ int xine_eject (xine_stream_t *stream); /* * stop playback, dispose all stream-related resources * xine_stream_t no longer valid when after this */ void xine_dispose (xine_stream_t *stream); /* * set/get xine engine parameters * e.g. playback speed, constants see below */ void xine_set_param (xine_stream_t *stream, int param, int value); int xine_get_param (xine_stream_t *stream, int param); /* * xine engine parameters */ #define XINE_PARAM_SPEED 1 /* see below */ #define XINE_PARAM_AV_OFFSET 2 /* unit: 1/90000 sec */ #define XINE_PARAM_AUDIO_CHANNEL_LOGICAL 3 /* -1 => auto, -2 => off */ #define XINE_PARAM_SPU_CHANNEL 4 #define XINE_PARAM_VIDEO_CHANNEL 5 #define XINE_PARAM_AUDIO_VOLUME 6 /* 0..100 */ #define XINE_PARAM_AUDIO_MUTE 7 /* 1=>mute, 0=>unmute */ #define XINE_PARAM_AUDIO_COMPR_LEVEL 8 /* <100=>off, % compress otherw*/ #define XINE_PARAM_AUDIO_AMP_LEVEL 9 /* 0..200, 100=>100% (default) */ #define XINE_PARAM_AUDIO_REPORT_LEVEL 10 /* 1=>send events, 0=> don't */ #define XINE_PARAM_VERBOSITY 11 /* control console output */ #define XINE_PARAM_SPU_OFFSET 12 /* unit: 1/90000 sec */ /* speed values */ #define XINE_SPEED_PAUSE 0 #define XINE_SPEED_SLOW_4 1 #define XINE_SPEED_SLOW_2 2 #define XINE_SPEED_NORMAL 4 #define XINE_SPEED_FAST_2 8 #define XINE_SPEED_FAST_4 16 /* video parameters */ #define XINE_PARAM_VO_DEINTERLACE 0x01000000 /* bool */ #define XINE_PARAM_VO_ASPECT_RATIO 0x01000001 /* see below */ #define XINE_PARAM_VO_HUE 0x01000002 /* 0..65535 */ #define XINE_PARAM_VO_SATURATION 0x01000003 /* 0..65535 */ #define XINE_PARAM_VO_CONTRAST 0x01000004 /* 0..65535 */ #define XINE_PARAM_VO_BRIGHTNESS 0x01000005 /* 0..65535 */ #define XINE_PARAM_VO_ZOOM_X 0x01000008 /* percent */ #define XINE_PARAM_VO_ZOOM_Y 0x0100000d /* percent */ #define XINE_PARAM_VO_PAN_SCAN 0x01000009 /* bool */ #define XINE_PARAM_VO_TVMODE 0x0100000a /* ??? */ #define XINE_VO_ZOOM_STEP 100 #define XINE_VO_ZOOM_MAX 400 #define XINE_VO_ZOOM_MIN -85 /* possible ratios for XINE_PARAM_VO_ASPECT_RATIO */ #define XINE_VO_ASPECT_AUTO 0 #define XINE_VO_ASPECT_SQUARE 1 /* 1:1 */ #define XINE_VO_ASPECT_4_3 2 /* 4:3 */ #define XINE_VO_ASPECT_ANAMORPHIC 3 /* 16:9 */ #define XINE_VO_ASPECT_DVB 4 /* 1:2 */ #define XINE_VO_ASPECT_NUM_RATIOS 5 #define XINE_VO_ASPECT_PAN_SCAN 41 #define XINE_VO_ASPECT_DONT_TOUCH 42 /* stream format detection strategies */ /* recognize stream type first by content then by extension. */ #define XINE_DEMUX_DEFAULT_STRATEGY 0 /* recognize stream type first by extension then by content. */ #define XINE_DEMUX_REVERT_STRATEGY 1 /* recognize stream type by content only. */ #define XINE_DEMUX_CONTENT_STRATEGY 2 /* recognize stream type by extension only. */ #define XINE_DEMUX_EXTENSION_STRATEGY 3 /* * snapshot function * * image format can be YUV 4:2:0 or 4:2:2 * will copy the image data into memory that points to * (interleaved for yuv 4:2:2 or planary for 4:2:0) * * returns 1 on success, 0 failure. */ int xine_get_current_frame (xine_stream_t *stream, int *width, int *height, int *ratio_code, int *format, uint8_t *img); /* xine image formats */ #define XINE_IMGFMT_YV12 (('2'<<24)|('1'<<16)|('V'<<8)|'Y') #define XINE_IMGFMT_YUY2 (('2'<<24)|('Y'<<16)|('U'<<8)|'Y') /********************************************************************* * media processing * *********************************************************************/ #ifdef XINE_ENABLE_EXPERIMENTAL_FEATURES /* * access to decoded audio and video frames from a stream * these functions are intended to provide the basis for * re-encoding and other video processing applications * * warning: highly experimental * */ xine_video_port_t *xine_new_framegrab_video_port (xine_t *self); typedef struct { int64_t vpts; /* timestamp 1/90000 sec for a/v sync */ int64_t duration; int width, height; int colorspace; /* XINE_IMGFMT_* */ double aspect_ratio; int pos_stream; /* bytes from stream start */ int pos_time; /* milliseconds */ uint8_t *data; void *xine_frame; /* used internally by xine engine */ } xine_video_frame_t; int xine_get_next_video_frame (xine_video_port_t *port, xine_video_frame_t *frame); void xine_free_video_frame (xine_video_port_t *port, xine_video_frame_t *frame); xine_audio_port_t *xine_new_framegrab_audio_port (xine_t *self); typedef struct { int64_t vpts; /* timestamp 1/90000 sec for a/v sync */ int num_samples; int sample_rate; int num_channels; int bits_per_sample; /* per channel */ off_t pos_stream; /* bytes from stream start */ int pos_time; /* milliseconds */ uint8_t *data; void *xine_frame; /* used internally by xine engine */ } xine_audio_frame_t; int xine_get_next_audio_frame (xine_audio_port_t *port, xine_audio_frame_t *frame); void xine_free_audio_frame (xine_audio_port_t *port, xine_audio_frame_t *frame); /* * maybe future aproach: */ int xine_get_video_frame (xine_stream_t *stream, int timestamp, /* msec */ int *width, int *height, int *ratio_code, int *duration, /* msec */ int *format, uint8_t *img); /* TODO: xine_get_audio_frame */ #endif /********************************************************************* * post plugin handling * *********************************************************************/ /* * post effect plugin functions * * after the data leaves the decoder it can pass an arbitrary tree * of post plugins allowing for effects to be applied to the video * frames/audio buffers before they reach the output stage */ typedef struct xine_post_s xine_post_t; struct xine_post_s { /* a NULL-terminated array of audio input ports this post plugin * provides; you can hand these to other post plugin's outputs or * pass them to the initialization of streams */ xine_audio_port_t **audio_input; /* a NULL-terminated array of video input ports this post plugin * provides; you can hand these to other post plugin's outputs or * pass them to the initialization of streams */ xine_video_port_t **video_input; /* the type of the post plugin * one of XINE_POST_TYPE_* can be used here */ int type; }; /* * initialize a post plugin * * returns xine_post_t* on success, NULL on failure * * Initializes the post plugin with the given name and connects its * outputs to the NULL-terminated arrays of audio and video ports. * Some plugins also care about the number of inputs you request * (e.g. mixer plugins), others simply ignore this number. */ xine_post_t *xine_post_init(xine_t *xine, const char *name, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); /* get a list of all available post plugins */ const char *const *xine_list_post_plugins(xine_t *xine); /* get a list of all post plugins of one type */ const char *const *xine_list_post_plugins_typed(xine_t *xine, int type); /* * post plugin input/output * * These structures encapsulate inputs/outputs for post plugins * to transfer arbitrary data. Frontends can also provide inputs * and outputs and connect them to post plugins to exchange data * with them. */ typedef struct xine_post_in_s xine_post_in_t; typedef struct xine_post_out_s xine_post_out_t; struct xine_post_in_s { /* the name identifying this input */ const char *name; /* the datatype of this input, use one of XINE_POST_DATA_* here */ int type; /* the data pointer; input is directed to this memory location, * so you simply access the pointer to access the input data */ void *data; }; struct xine_post_out_s { /* the name identifying this output */ const char *name; /* the datatype of this output, use one of XINE_POST_DATA_* here */ int type; /* the data pointer; output should be directed to this memory location, * so in the easy case you simply write through the pointer */ void *data; /* this function is called, when the output should be redirected * to another input, you sould set the data pointer to direct * any output to this new input; * a special situation is, when this function is called with a NULL * argument: in this case you should disconnect the data pointer * from any output and if necessary to avoid writing to some stray * memory you should make it point to some dummy location, * returns 1 on success, 0 on failure; * if you do not implement rewiring, set this to NULL */ int (*rewire) (xine_post_out_t *self, void *data); }; /* get a list of all inputs of a post plugin */ const char *const *xine_post_list_inputs(xine_post_t *self); /* get a list of all outputs of a post plugin */ const char *const *xine_post_list_outputs(xine_post_t *self); /* retrieve one specific input of a post plugin */ const xine_post_in_t *xine_post_input(xine_post_t *self, char *name); /* retrieve one specific output of a post plugin */ const xine_post_out_t *xine_post_output(xine_post_t *self, char *name); /* * wire an input to an output * returns 1 on success, 0 on failure */ int xine_post_wire(xine_post_out_t *source, xine_post_in_t *target); /* * wire a video port to a video output * This can be used to rewire different post plugins to the video output * plugin layer. The ports you hand in at xine_post_init() will already * be wired with the post plugin, so you need this function for * _re_connecting only. * * returns 1 on success, 0 on failure */ int xine_post_wire_video_port(xine_post_out_t *source, xine_video_port_t *vo); /* * wire an audio port to an audio output * This can be used to rewire different post plugins to the audio output * plugin layer. The ports you hand in at xine_post_init() will already * be wired with the post plugin, so you need this function for * _re_connecting only. * * returns 1 on success, 0 on failure */ int xine_post_wire_audio_port(xine_post_out_t *source, xine_audio_port_t *vo); /* * Extracts an output for a stream. Use this to rewire the outputs of streams. */ xine_post_out_t * xine_get_video_source(xine_stream_t *stream); xine_post_out_t * xine_get_audio_source(xine_stream_t *stream); /* * disposes the post plugin * please make sure that no other post plugin and no stream is * connected to any of this plugin's inputs */ void xine_post_dispose(xine_t *xine, xine_post_t *self); /* post plugin types */ #define XINE_POST_TYPE_VIDEO_FILTER 0x010000 #define XINE_POST_TYPE_VIDEO_VISUALIZATION 0x010001 #define XINE_POST_TYPE_AUDIO_FILTER 0x020000 #define XINE_POST_TYPE_AUDIO_VISUALIZATION 0x020001 /* post plugin data types */ /* video port data * input->data is a xine_video_port_t* * output->data usually is a xine_video_port_t** */ #define XINE_POST_DATA_VIDEO 0 /* audio port data * input->data is a xine_audio_port_t* * output->data usually is a xine_audio_port_t** */ #define XINE_POST_DATA_AUDIO 1 /* integer data * input->data is a int* * output->data usually is a int* */ #define XINE_POST_DATA_INT 3 /* double precision floating point data * input->data is a double* * output->data usually is a double* */ #define XINE_POST_DATA_DOUBLE 4 /********************************************************************* * information retrieval * *********************************************************************/ /* * xine log functions * * frontends can display xine log output using these functions */ int xine_get_log_section_count(xine_t *self); /* return a NULL terminated array of log sections names */ const char *const *xine_get_log_names(xine_t *self); /* print some log information to section */ void xine_log (xine_t *self, int buf, const char *format, ...); /* get log messages of specified section */ const char *const *xine_get_log (xine_t *self, int buf); /* log callback will be called whenever something is logged */ typedef void (*xine_log_cb_t) (void *user_data, int section); void xine_register_log_cb (xine_t *self, xine_log_cb_t cb, void *user_data); /* * error handling / engine status */ /* return last error */ int xine_get_error (xine_stream_t *stream); /* get current xine engine status (constants see below) */ int xine_get_status (xine_stream_t *stream); /* * engine status codes */ #define XINE_STATUS_IDLE 0 /* no mrl assigned */ #define XINE_STATUS_STOP 1 #define XINE_STATUS_PLAY 2 #define XINE_STATUS_QUIT 3 /* * xine error codes */ #define XINE_ERROR_NONE 0 #define XINE_ERROR_NO_INPUT_PLUGIN 1 #define XINE_ERROR_NO_DEMUX_PLUGIN 2 #define XINE_ERROR_DEMUX_FAILED 3 #define XINE_ERROR_MALFORMED_MRL 4 /* * try to find out audio/spu language of given channel * (use -1 for current channel) * * returns 1 on success, 0 on failure */ int xine_get_audio_lang (xine_stream_t *stream, int channel, char *lang); int xine_get_spu_lang (xine_stream_t *stream, int channel, char *lang); /* * get position / length information * * depending of the nature and system layer of the stream, * some or all of this information may be unavailable or incorrect * (e.g. live network streams may not have a valid length) * * returns 1 on success, 0 on failure (data was not updated, * probably because it's not known yet... try again later) */ int xine_get_pos_length (xine_stream_t *stream, int *pos_stream, /* 0..65535 */ int *pos_time, /* milliseconds */ int *length_time);/* milliseconds */ /* * get information about the stream such as * video width/height, codecs, audio format, title, author... * * constants see below */ uint32_t xine_get_stream_info (xine_stream_t *stream, int info); const char *xine_get_meta_info (xine_stream_t *stream, int info); /* xine_get_stream_info */ #define XINE_STREAM_INFO_BITRATE 0 #define XINE_STREAM_INFO_SEEKABLE 1 #define XINE_STREAM_INFO_VIDEO_WIDTH 2 #define XINE_STREAM_INFO_VIDEO_HEIGHT 3 #define XINE_STREAM_INFO_VIDEO_RATIO 4 /* *10000 */ #define XINE_STREAM_INFO_VIDEO_CHANNELS 5 #define XINE_STREAM_INFO_VIDEO_STREAMS 6 #define XINE_STREAM_INFO_VIDEO_BITRATE 7 #define XINE_STREAM_INFO_VIDEO_FOURCC 8 #define XINE_STREAM_INFO_VIDEO_HANDLED 9 /* codec available? */ #define XINE_STREAM_INFO_FRAME_DURATION 10 /* 1/90000 sec */ #define XINE_STREAM_INFO_AUDIO_CHANNELS 11 #define XINE_STREAM_INFO_AUDIO_BITS 12 #define XINE_STREAM_INFO_AUDIO_SAMPLERATE 13 #define XINE_STREAM_INFO_AUDIO_BITRATE 14 #define XINE_STREAM_INFO_AUDIO_FOURCC 15 #define XINE_STREAM_INFO_AUDIO_HANDLED 16 /* codec available? */ #define XINE_STREAM_INFO_HAS_CHAPTERS 17 #define XINE_STREAM_INFO_HAS_VIDEO 18 #define XINE_STREAM_INFO_HAS_AUDIO 19 #define XINE_STREAM_INFO_IGNORE_VIDEO 20 #define XINE_STREAM_INFO_IGNORE_AUDIO 21 #define XINE_STREAM_INFO_IGNORE_SPU 22 #define XINE_STREAM_INFO_VIDEO_HAS_STILL 23 #define XINE_STREAM_INFO_MAX_AUDIO_CHANNEL 24 #define XINE_STREAM_INFO_MAX_SPU_CHANNEL 25 /* xine_get_meta_info */ #define XINE_META_INFO_TITLE 0 #define XINE_META_INFO_COMMENT 1 #define XINE_META_INFO_ARTIST 2 #define XINE_META_INFO_GENRE 3 #define XINE_META_INFO_ALBUM 4 #define XINE_META_INFO_YEAR 5 #define XINE_META_INFO_VIDEOCODEC 6 #define XINE_META_INFO_AUDIOCODEC 7 #define XINE_META_INFO_SYSTEMLAYER 8 #define XINE_META_INFO_INPUT_PLUGIN 9 /********************************************************************* * plugin management / autoplay / mrl browsing * *********************************************************************/ /* * note: the pointers to strings or string arrays returned * by some of these functions are pointers to statically * alloced internal xine memory chunks. * they're only valid between xine function calls * and should never be free()d. */ typedef struct { char *origin; /* file plugin: path */ char *mrl; /* :// */ char *link; uint32_t type; /* see below */ off_t size; /* size of this source, may be 0 */ } xine_mrl_t; /* mrl types */ #define XINE_MRL_TYPE_unknown (0 << 0) #define XINE_MRL_TYPE_dvd (1 << 0) #define XINE_MRL_TYPE_vcd (1 << 1) #define XINE_MRL_TYPE_net (1 << 2) #define XINE_MRL_TYPE_rtp (1 << 3) #define XINE_MRL_TYPE_stdin (1 << 4) #define XINE_MRL_TYPE_cda (1 << 5) #define XINE_MRL_TYPE_file (1 << 6) #define XINE_MRL_TYPE_file_fifo (1 << 7) #define XINE_MRL_TYPE_file_chardev (1 << 8) #define XINE_MRL_TYPE_file_directory (1 << 9) #define XINE_MRL_TYPE_file_blockdev (1 << 10) #define XINE_MRL_TYPE_file_normal (1 << 11) #define XINE_MRL_TYPE_file_symlink (1 << 12) #define XINE_MRL_TYPE_file_sock (1 << 13) #define XINE_MRL_TYPE_file_exec (1 << 14) #define XINE_MRL_TYPE_file_backup (1 << 15) #define XINE_MRL_TYPE_file_hidden (1 << 16) /* get a list of browsable input plugin ids */ const char *const *xine_get_browsable_input_plugin_ids (xine_t *self) ; /* * ask input plugin named to return * a list of available MRLs in domain/directory . * * may be NULL indicating the toplevel domain/dir * returns if is a valid MRL, not a directory * returns NULL if is an invalid MRL, not even a directory. */ xine_mrl_t **xine_get_browse_mrls (xine_t *self, const char *plugin_id, const char *start_mrl, int *num_mrls); /* get a list of plugins that support the autoplay feature */ const char *const *xine_get_autoplay_input_plugin_ids (xine_t *self); /* get autoplay MRL list from input plugin named */ char **xine_get_autoplay_mrls (xine_t *self, const char *plugin_id, int *num_mrls); /* get a list of file extensions for file types supported by xine * the list is separated by spaces * * the pointer returned can be free()ed when no longer used */ char *xine_get_file_extensions (xine_t *self); /* get a list of mime types supported by xine * * the pointer returned can be free()ed when no longer used */ char *xine_get_mime_types (xine_t *self); /* get the demuxer identifier that handles a given mime type * * the pointer returned can be free()ed when no longer used * returns NULL if no demuxer is available to handle this. */ char *xine_get_demux_for_mime_type (xine_t *self, const char *mime_type); /* get a description string for an input plugin */ const char *xine_get_input_plugin_description (xine_t *self, const char *plugin_id); /* get lists of available audio and video output plugins */ const char *const *xine_list_audio_output_plugins (xine_t *self) ; const char *const *xine_list_video_output_plugins (xine_t *self) ; /********************************************************************* * visual specific gui <-> xine engine communication * *********************************************************************/ /* talk to video output driver */ int xine_gui_send_vo_data (xine_stream_t *self, int type, void *data); typedef struct { /* area of that drawable to be used by video */ int x,y,w,h; } x11_rectangle_t; /* * this is the visual data struct any x11 gui * must supply to the xine_open_video_driver call * ("data" parameter) */ typedef struct { /* some information about the display */ void *display; /* Display* */ int screen; /* drawable to display the video in/on */ unsigned long d; /* Drawable */ void *user_data; /* * dest size callback * * this will be called by the video driver to find out * how big the video output area size will be for a * given video size. The ui should _not_ adjust it's * video out area, just do some calculations and return * the size. This will be called for every frame, ui * implementation should be fast. * dest_pixel_aspect should be set to the used display pixel aspect. * NOTE: Semantics has changed: video_width and video_height * are no longer pixel aspect corrected. Get the old semantics * in the UI with * *dest_pixel_aspect = display_pixel_aspect; * if (video_pixel_aspect >= display_pixel_aspect) * video_width = video_width * video_pixel_aspect / display_pixel_aspect + .5; * else * video_height = video_height * display_pixel_aspect / video_pixel_aspect + .5; */ void (*dest_size_cb) (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_width, int *dest_height, double *dest_pixel_aspect); /* * frame output callback * * this will be called by the video driver for every frame * it's about to draw. ui can adapt it's size if necessary * here. * note: the ui doesn't have to adjust itself to this * size, this is just to be taken as a hint. * ui must return the actual size of the video output * area and the video output driver will do it's best * to adjust the video frames to that size (while * preserving aspect ratio and stuff). * dest_x, dest_y: offset inside window * dest_width, dest_height: available drawing space * dest_pixel_aspect: display pixel aspect * win_x, win_y: window absolute screen position * NOTE: Semantics has changed: video_width and video_height * are no longer pixel aspect corrected. Get the old semantics * in the UI with * *dest_pixel_aspect = display_pixel_aspect; * if (video_pixel_aspect >= display_pixel_aspect) * video_width = video_width * video_pixel_aspect / display_pixel_aspect + .5; * else * video_height = video_height * display_pixel_aspect / video_pixel_aspect + .5; */ void (*frame_output_cb) (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_x, int *dest_y, int *dest_width, int *dest_height, double *dest_pixel_aspect, int *win_x, int *win_y); } x11_visual_t; /* * "type" constants for xine_gui_send_vo_data (...) */ /* xevent *data */ #define XINE_GUI_SEND_COMPLETION_EVENT 1 /* Drawable data */ #define XINE_GUI_SEND_DRAWABLE_CHANGED 2 /* xevent *data */ #define XINE_GUI_SEND_EXPOSE_EVENT 3 /* x11_rectangle_t *data */ #define XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO 4 /* int data */ #define XINE_GUI_SEND_VIDEOWIN_VISIBLE 5 /* *data contains chosen visual, select a new one or change it to NULL * to indicate the visual to use or that no visual will work */ /* XVisualInfo **data */ #define XINE_GUI_SEND_SELECT_VISUAL 8 /********************************************************************* * xine health check stuff * *********************************************************************/ #define XINE_HEALTH_CHECK_OK 0 #define XINE_HEALTH_CHECK_FAIL 1 #define XINE_HEALTH_CHECK_UNSUPPORTED 2 #define XINE_HEALTH_CHECK_NO_SUCH_CHECK 3 #define CHECK_KERNEL 0 #define CHECK_MTRR 1 #define CHECK_CDROM 2 #define CHECK_DVDROM 3 #define CHECK_DMA 4 #define CHECK_X 5 #define CHECK_XV 6 struct xine_health_check_s { int status; const char* cdrom_dev; const char* dvd_dev; char* msg; char* title; char* explanation; }; typedef struct xine_health_check_s xine_health_check_t; xine_health_check_t* xine_health_check(xine_health_check_t*, int check_num); /********************************************************************* * configuration system * *********************************************************************/ /* * config entry data types */ #define XINE_CONFIG_TYPE_UNKNOWN 0 #define XINE_CONFIG_TYPE_RANGE 1 #define XINE_CONFIG_TYPE_STRING 2 #define XINE_CONFIG_TYPE_ENUM 3 #define XINE_CONFIG_TYPE_NUM 4 #define XINE_CONFIG_TYPE_BOOL 5 typedef struct xine_cfg_entry_s xine_cfg_entry_t; typedef void (*xine_config_cb_t) (void *user_data, xine_cfg_entry_t *entry); struct xine_cfg_entry_s { const char *key; /* unique id (example: gui.logo_mrl) */ int type; /* type unknown */ char *unknown_value; /* type string */ char *str_value; char *str_default; char *str_sticky; /* common to range, enum, num, bool: */ int num_value; int num_default; /* type range specific: */ int range_min; int range_max; /* type enum specific: */ char **enum_values; /* help info for the user */ const char *description; const char *help; /* user experience level */ int exp_level; /* 0 => beginner, 10 => advanced user, 20 => expert */ /* callback function and data for live changeable values */ xine_config_cb_t callback; void *callback_data; }; const char *xine_config_register_string (xine_t *self, const char *key, const char *def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_range (xine_t *self, const char *key, int def_value, int min, int max, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_enum (xine_t *self, const char *key, int def_value, char **values, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_num (xine_t *self, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_bool (xine_t *self, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); /* * the following functions will copy data from the internal xine_config * data database to the xine_cfg_entry_t *entry you provide * * they return 1 on success, 0 on failure */ /* get first config item */ int xine_config_get_first_entry (xine_t *self, xine_cfg_entry_t *entry); /* get next config item (iterate through the items) */ int xine_config_get_next_entry (xine_t *self, xine_cfg_entry_t *entry); /* search for a config entry by key */ int xine_config_lookup_entry (xine_t *self, const char *key, xine_cfg_entry_t *entry); /* * update a config entry (which was returned from lookup_entry() ) * * xine will make a deep copy of the data in the entry into it's internal * config database. */ void xine_config_update_entry (xine_t *self, const xine_cfg_entry_t *entry); /* * load/save config data from/to afile (e.g. $HOME/.xine/config) */ void xine_config_load (xine_t *self, const char *cfg_filename); void xine_config_save (xine_t *self, const char *cfg_filename); void xine_config_reset (xine_t *self); /********************************************************************* * asynchroneous xine event mechanism * *********************************************************************/ /* * to receive events you have to register an event queue with * the xine engine (xine_event_new_queue, see below). * * then you can either * 1) check for incoming events regularly (xine_event_get/wait), * process them and free them using xine_event_free * 2) use xine_event_create_listener_thread and specify a callback * which will then be called for each event * * to send events to every module listening you don't need * to register an event queue but simply call xine_event_send. */ /* event types */ #define XINE_EVENT_UI_PLAYBACK_FINISHED 1 /* frontend can e.g. move on to next playlist entry */ #define XINE_EVENT_UI_CHANNELS_CHANGED 2 /* inform ui that new channel info is available */ #define XINE_EVENT_UI_SET_TITLE 3 /* request title display change in ui */ #define XINE_EVENT_UI_MESSAGE 4 /* message (dialog) for the ui to display */ #define XINE_EVENT_FRAME_FORMAT_CHANGE 5 /* e.g. aspect ratio change during dvd playback */ #define XINE_EVENT_AUDIO_LEVEL 6 /* report current audio level (l/r) */ #define XINE_EVENT_QUIT 7 /* last event sent when stream is disposed */ #define XINE_EVENT_PROGRESS 8 /* index creation/network connections */ #define XINE_EVENT_MRL_REFERENCE 9 /* demuxer->frontend: MRL reference(s) for the real stream */ /* input events coming from frontend */ #define XINE_EVENT_INPUT_MOUSE_BUTTON 101 #define XINE_EVENT_INPUT_MOUSE_MOVE 102 #define XINE_EVENT_INPUT_MENU1 103 #define XINE_EVENT_INPUT_MENU2 104 #define XINE_EVENT_INPUT_MENU3 105 #define XINE_EVENT_INPUT_MENU4 106 #define XINE_EVENT_INPUT_MENU5 107 #define XINE_EVENT_INPUT_MENU6 108 #define XINE_EVENT_INPUT_MENU7 109 #define XINE_EVENT_INPUT_UP 110 #define XINE_EVENT_INPUT_DOWN 111 #define XINE_EVENT_INPUT_LEFT 112 #define XINE_EVENT_INPUT_RIGHT 113 #define XINE_EVENT_INPUT_SELECT 114 #define XINE_EVENT_INPUT_NEXT 115 #define XINE_EVENT_INPUT_PREVIOUS 116 #define XINE_EVENT_INPUT_ANGLE_NEXT 117 #define XINE_EVENT_INPUT_ANGLE_PREVIOUS 118 #define XINE_EVENT_INPUT_BUTTON_FORCE 119 #define XINE_EVENT_INPUT_NUMBER_0 120 #define XINE_EVENT_INPUT_NUMBER_1 121 #define XINE_EVENT_INPUT_NUMBER_2 122 #define XINE_EVENT_INPUT_NUMBER_3 123 #define XINE_EVENT_INPUT_NUMBER_4 124 #define XINE_EVENT_INPUT_NUMBER_5 125 #define XINE_EVENT_INPUT_NUMBER_6 126 #define XINE_EVENT_INPUT_NUMBER_7 127 #define XINE_EVENT_INPUT_NUMBER_8 128 #define XINE_EVENT_INPUT_NUMBER_9 129 #define XINE_EVENT_INPUT_NUMBER_10_ADD 130 /* * xine event struct */ typedef struct { int type; /* event type (constants see above) */ xine_stream_t *stream; /* stream this event belongs to */ void *data; /* contents depending on type */ int data_length; /* you do not have to provide this, it will be filled in by xine_event_send() */ struct timeval tv; /* timestamp of event creation */ } xine_event_t; /* * input event dynamic data */ typedef struct { xine_event_t event; uint8_t button; /* Generally 1 = left, 2 = mid, 3 = right */ uint16_t x,y; /* In Image space */ } xine_input_data_t; /* * UI event dynamic data - send information to/from UI. */ typedef struct { int num_buttons; int str_len; char str[256]; /* might be longer */ } xine_ui_data_t; /* * notify frame format change */ typedef struct { int width; int height; int aspect; } xine_format_change_data_t; /* * audio level for left/right channel */ typedef struct { int left; int right; /* 0..255 */ } xine_audio_level_data_t; /* * index generation / buffering */ typedef struct { const char *description; /* e.g. "connecting..." */ int percent; } xine_progress_data_t; /* * mrl reference data is sent by demuxers when a reference stream is found. * this stream just contains pointers (urls) to the real data, which are * passed to frontend using this event type. (examples: .asx, .mov and .ram) * * ideally, frontends should add these mrls to a "hierarchical playlist". * that is, instead of the original file, the ones provided here should be * played instead. on pratice, just using a simple playlist should work. * * mrl references should be played in the same order they are received, just * after the current stream finishes. * alternative playlists may be provided and should be used in case of * failure of the primary playlist. */ typedef struct { int alternative; /* alternative playlist number, usually 0 */ char mrl[1]; /* might (will) be longer */ } xine_mrl_reference_data_t; /* opaque xine_event_queue_t */ typedef struct xine_event_queue_s xine_event_queue_t; /* * register a new event queue * * you have to receive messages from this queue regularly * * use xine_event_dispose_queue to unregister and free the queue */ xine_event_queue_t *xine_event_new_queue (xine_stream_t *stream); void xine_event_dispose_queue (xine_event_queue_t *queue); /* * receive events (poll) * * use xine_event_free on the events received from these calls * when they're no longer needed */ xine_event_t *xine_event_get (xine_event_queue_t *queue); xine_event_t *xine_event_wait (xine_event_queue_t *queue); void xine_event_free (xine_event_t *event); /* * receive events (callback) * * a thread is created which will receive all events from * the specified queue, call your callback on each of them * and will then free the event when your callback returns * */ typedef void (*xine_event_listener_cb_t) (void *user_data, const xine_event_t *event); void xine_event_create_listener_thread (xine_event_queue_t *queue, xine_event_listener_cb_t callback, void *user_data); /* * send an event to all queues * * the event will be copied so you can free or reuse * *event as soon as xine_event_send returns. */ void xine_event_send (xine_stream_t *stream, const xine_event_t *event); /********************************************************************* * OSD (on screen display) * *********************************************************************/ #define XINE_TEXT_PALETTE_SIZE 11 #define XINE_OSD_TEXT1 (0 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT2 (1 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT3 (2 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT4 (3 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT5 (4 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT6 (5 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT7 (6 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT8 (7 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT9 (8 * XINE_TEXT_PALETTE_SIZE) #define XINE_OSD_TEXT10 (9 * XINE_TEXT_PALETTE_SIZE) /* white text, black border, transparent background */ #define XINE_TEXTPALETTE_WHITE_BLACK_TRANSPARENT 0 /* white text, noborder, transparent background */ #define XINE_TEXTPALETTE_WHITE_NONE_TRANSPARENT 1 /* white text, no border, translucid background */ #define XINE_TEXTPALETTE_WHITE_NONE_TRANSLUCID 2 /* yellow text, black border, transparent background */ #define XINE_TEXTPALETTE_YELLOW_BLACK_TRANSPARENT 3 typedef struct xine_osd_s xine_osd_t; xine_osd_t *xine_osd_new (xine_stream_t *self, int x, int y, int width, int height); void xine_osd_draw_point (xine_osd_t *self, int x, int y, int color); void xine_osd_draw_line (xine_osd_t *self, int x1, int y1, int x2, int y2, int color); void xine_osd_draw_rect (xine_osd_t *self, int x1, int y1, int x2, int y2, int color, int filled ); void xine_osd_draw_text (xine_osd_t *self, int x1, int y1, const char *text, int color_base); void xine_osd_get_text_size (xine_osd_t *self, const char *text, int *width, int *height); void xine_osd_set_font (xine_osd_t *self, const char *fontname, int size); /* set position were overlay will be blended */ void xine_osd_set_position (xine_osd_t *self, int x, int y); void xine_osd_show (xine_osd_t *self, int64_t vpts); void xine_osd_hide (xine_osd_t *self, int64_t vpts); /* empty drawing area */ void xine_osd_clear (xine_osd_t *self); /* * close osd rendering engine * loaded fonts are unloaded * osd objects are closed */ void xine_osd_free (xine_osd_t *self); void xine_osd_set_palette (xine_osd_t *self, const uint32_t *const color, const uint8_t *const trans ); /* * set on existing text palette * (-1 to set used specified palette) * * color_base specifies the first color index to use for this text * palette. The OSD palette is then modified starting at this * color index, up to the size of the text palette. * * Use OSD_TEXT1, OSD_TEXT2, ... for some preasssigned color indices. */ void xine_osd_set_text_palette (xine_osd_t *self, int palette_number, int color_base ); /* get palette (color and transparency) */ void xine_osd_get_palette (xine_osd_t *self, uint32_t *color, uint8_t *trans); /********************************************************************* * TV-mode API, to make it possible to use nvtvd to view movies * *********************************************************************/ /* connect to nvtvd server and save current TV and X settings */ void xine_tvmode_init (xine_t *self); /* try to change TV state if enabled * type select 'regular' (0) or 'TV' (1) state * width frame width the mode should match best or 0 if unknown * height frame height the mode should match best or 0 if unknown * fps frame rate the mode should match best or 0 if unknown * returns: finally selected state */ int xine_tvmode_switch (xine_t *self, int type, int width, int height, double fps); /* adapt (maximum) output size to visible area if necessary and return pixel * aspect and real frame rate if available */ void xine_tvmode_size (xine_t *self, int *width, int *height, double *pixelratio, double *fps); /* restore old TV and X settings and close nvtvd connection */ void xine_tvmode_exit (xine_t *self); #ifdef __cplusplus } #endif #endif pyxine-0.1alpha2.orig/pyxine/libxine_wrap.c0100644000175000017500000067632407622526701020104 0ustar pimanpiman/* * FILE : libxine_wrap.c * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) * Version 1.1 (Patch 5) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. * Permission is granted to distribute this file in any manner provided * this notice remains intact. * * Do not make changes to this file--changes will be lost! * */ #define SWIGCODE /* Implementation : PYTHON */ #define SWIGPYTHON #include #include /*********************************************************************** * $Header:$ * swig_lib/python/python.cfg * * This file contains coded needed to add variable linking to the * Python interpreter. C variables are added as a new kind of Python * datatype. * * Also contains supporting code for building python under Windows * and things like that. * * $Log:$ ************************************************************************/ #ifdef __cplusplus extern "C" { #endif #include "Python.h" #ifdef __cplusplus } #endif /* Definitions for Windows/Unix exporting */ #if defined(__WIN32__) # if defined(_MSC_VER) # define SWIGEXPORT(a,b) __declspec(dllexport) a b # else # if defined(__BORLANDC__) # define SWIGEXPORT(a,b) a _export b # else # define SWIGEXPORT(a,b) a b # endif # endif #else # define SWIGEXPORT(a,b) a b #endif #ifdef SWIG_GLOBAL #ifdef __cplusplus #define SWIGSTATIC extern "C" #else #define SWIGSTATIC #endif #endif #ifndef SWIGSTATIC #define SWIGSTATIC static #endif typedef struct { char *name; PyObject *(*get_attr)(void); int (*set_attr)(PyObject *); } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar **vars; int nvars; int maxvars; } swig_varlinkobject; /* ---------------------------------------------------------------------- swig_varlink_repr() Function for python repr method ---------------------------------------------------------------------- */ static PyObject * swig_varlink_repr(swig_varlinkobject *v) { v = v; return PyString_FromString(""); } /* --------------------------------------------------------------------- swig_varlink_print() Print out all of the global variable names --------------------------------------------------------------------- */ static int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) { int i = 0; flags = flags; fprintf(fp,"Global variables { "); while (v->vars[i]) { fprintf(fp,"%s", v->vars[i]->name); i++; if (v->vars[i]) fprintf(fp,", "); } fprintf(fp," }\n"); return 0; } /* -------------------------------------------------------------------- swig_varlink_getattr This function gets the value of a variable and returns it as a PyObject. In our case, we'll be looking at the datatype and converting into a number or string -------------------------------------------------------------------- */ static PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { int i = 0; char temp[128]; while (v->vars[i]) { if (strcmp(v->vars[i]->name,n) == 0) { return (*v->vars[i]->get_attr)(); } i++; } sprintf(temp,"C global variable %s not found.", n); PyErr_SetString(PyExc_NameError,temp); return NULL; } /* ------------------------------------------------------------------- swig_varlink_setattr() This function sets the value of a variable. ------------------------------------------------------------------- */ static int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { char temp[128]; int i = 0; while (v->vars[i]) { if (strcmp(v->vars[i]->name,n) == 0) { return (*v->vars[i]->set_attr)(p); } i++; } sprintf(temp,"C global variable %s not found.", n); PyErr_SetString(PyExc_NameError,temp); return 1; } statichere PyTypeObject varlinktype = { /* PyObject_HEAD_INIT(&PyType_Type) Note : This doesn't work on some machines */ PyObject_HEAD_INIT(0) 0, "varlink", /* Type name */ sizeof(swig_varlinkobject), /* Basic size */ 0, /* Itemsize */ 0, /* Deallocator */ (printfunc) swig_varlink_print, /* Print */ (getattrfunc) swig_varlink_getattr, /* get attr */ (setattrfunc) swig_varlink_setattr, /* Set attr */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_mapping*/ 0, /* tp_hash */ }; /* Create a variable linking object for use later */ SWIGSTATIC PyObject * SWIG_newvarlink(void) { swig_varlinkobject *result = 0; result = PyMem_NEW(swig_varlinkobject,1); varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */ result->ob_type = &varlinktype; /* _Py_NewReference(result); Does not seem to be necessary */ result->nvars = 0; result->maxvars = 64; result->vars = (swig_globalvar **) malloc(64*sizeof(swig_globalvar *)); result->vars[0] = 0; result->ob_refcnt = 0; Py_XINCREF((PyObject *) result); return ((PyObject*) result); } SWIGSTATIC void SWIG_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v; v= (swig_varlinkobject *) p; if (v->nvars >= v->maxvars -1) { v->maxvars = 2*v->maxvars; v->vars = (swig_globalvar **) realloc(v->vars,v->maxvars*sizeof(swig_globalvar *)); if (v->vars == NULL) { fprintf(stderr,"SWIG : Fatal error in initializing Python module.\n"); exit(1); } } v->vars[v->nvars] = (swig_globalvar *) malloc(sizeof(swig_globalvar)); v->vars[v->nvars]->name = (char *) malloc(strlen(name)+1); strcpy(v->vars[v->nvars]->name,name); v->vars[v->nvars]->get_attr = get_attr; v->vars[v->nvars]->set_attr = set_attr; v->nvars++; v->vars[v->nvars] = 0; } /***************************************************************************** * $Header:$ * * swigptr.swg * * This file contains supporting code for the SWIG run-time type checking * mechanism. The following functions are available : * * SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)); * * Registers a new type-mapping with the type-checker. origtype is the * original datatype and newtype is an equivalent type. cast is optional * pointer to a function to cast pointer values between types (this * is typically used to cast pointers from derived classes to base classes in C++) * * SWIG_MakePtr(char *buffer, void *ptr, char *typestring); * * Makes a pointer string from a pointer and typestring. The result is returned * in buffer which is assumed to hold enough space for the result. * * char * SWIG_GetPtr(char *buffer, void **ptr, char *type) * * Gets a pointer value from a string. If there is a type-mismatch, returns * a character string to the received type. On success, returns NULL. * * * You can remap these functions by making a file called "swigptr.swg" in * your the same directory as the interface file you are wrapping. * * These functions are normally declared static, but this file can be * can be used in a multi-module environment by redefining the symbol * SWIGSTATIC. *****************************************************************************/ #include #ifdef SWIG_GLOBAL #ifdef __cplusplus #define SWIGSTATIC extern "C" #else #define SWIGSTATIC #endif #endif #ifndef SWIGSTATIC #define SWIGSTATIC static #endif /* SWIG pointer structure */ typedef struct SwigPtrType { char *name; /* Datatype name */ int len; /* Length (used for optimization) */ void *(*cast)(void *); /* Pointer casting function */ struct SwigPtrType *next; /* Linked list pointer */ } SwigPtrType; /* Pointer cache structure */ typedef struct { int stat; /* Status (valid) bit */ SwigPtrType *tp; /* Pointer to type structure */ char name[256]; /* Given datatype name */ char mapped[256]; /* Equivalent name */ } SwigCacheType; /* Some variables */ static int SwigPtrMax = 64; /* Max entries that can be currently held */ /* This value may be adjusted dynamically */ static int SwigPtrN = 0; /* Current number of entries */ static int SwigPtrSort = 0; /* Status flag indicating sort */ static int SwigStart[256]; /* Starting positions of types */ /* Pointer table */ static SwigPtrType *SwigPtrTable = 0; /* Table containing pointer equivalences */ /* Cached values */ #define SWIG_CACHESIZE 8 #define SWIG_CACHEMASK 0x7 static SwigCacheType SwigCache[SWIG_CACHESIZE]; static int SwigCacheIndex = 0; static int SwigLastCache = 0; /* Sort comparison function */ static int swigsort(const void *data1, const void *data2) { SwigPtrType *d1 = (SwigPtrType *) data1; SwigPtrType *d2 = (SwigPtrType *) data2; return strcmp(d1->name,d2->name); } /* Binary Search function */ static int swigcmp(const void *key, const void *data) { char *k = (char *) key; SwigPtrType *d = (SwigPtrType *) data; return strncmp(k,d->name,d->len); } /* Register a new datatype with the type-checker */ SWIGSTATIC void SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)) { int i; SwigPtrType *t = 0,*t1; /* Allocate the pointer table if necessary */ if (!SwigPtrTable) { SwigPtrTable = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType)); SwigPtrN = 0; } /* Grow the table */ if (SwigPtrN >= SwigPtrMax) { SwigPtrMax = 2*SwigPtrMax; SwigPtrTable = (SwigPtrType *) realloc((char *) SwigPtrTable,SwigPtrMax*sizeof(SwigPtrType)); } for (i = 0; i < SwigPtrN; i++) if (strcmp(SwigPtrTable[i].name,origtype) == 0) { t = &SwigPtrTable[i]; break; } if (!t) { t = &SwigPtrTable[SwigPtrN]; t->name = origtype; t->len = strlen(t->name); t->cast = 0; t->next = 0; SwigPtrN++; } /* Check for existing entry */ while (t->next) { if ((strcmp(t->name,newtype) == 0)) { if (cast) t->cast = cast; return; } t = t->next; } /* Now place entry (in sorted order) */ t1 = (SwigPtrType *) malloc(sizeof(SwigPtrType)); t1->name = newtype; t1->len = strlen(t1->name); t1->cast = cast; t1->next = 0; t->next = t1; SwigPtrSort = 0; } /* Make a pointer value string */ SWIGSTATIC void SWIG_MakePtr(char *_c, const void *_ptr, char *type) { static char _hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; unsigned long _p, _s; char _result[20], *_r; /* Note : a 64-bit hex number = 16 digits */ _r = _result; _p = (unsigned long) _ptr; if (_p > 0) { while (_p > 0) { _s = _p & 0xf; *(_r++) = _hex[_s]; _p = _p >> 4; } *_r = '_'; while (_r >= _result) *(_c++) = *(_r--); } else { strcpy (_c, "NULL"); } if (_ptr) strcpy (_c, type); } /* Define for backwards compatibility */ #define _swig_make_hex SWIG_MakePtr /* Function for getting a pointer value */ SWIGSTATIC char *SWIG_GetPtr(char *_c, void **ptr, char *_t) { unsigned long _p; char temp_type[256]; char *name; int i, len; SwigPtrType *sp,*tp; SwigCacheType *cache; int start, end; _p = 0; /* Pointer values must start with leading underscore */ if (*_c == '_') { _c++; /* Extract hex value from pointer */ while (*_c) { if ((*_c >= '0') && (*_c <= '9')) _p = (_p << 4) + (*_c - '0'); else if ((*_c >= 'a') && (*_c <= 'f')) _p = (_p << 4) + ((*_c - 'a') + 10); else break; _c++; } if (_t) { if (strcmp(_t,_c)) { if (!SwigPtrSort) { qsort((void *) SwigPtrTable, SwigPtrN, sizeof(SwigPtrType), swigsort); for (i = 0; i < 256; i++) { SwigStart[i] = SwigPtrN; } for (i = SwigPtrN-1; i >= 0; i--) { SwigStart[(int) (SwigPtrTable[i].name[1])] = i; } for (i = 255; i >= 1; i--) { if (SwigStart[i-1] > SwigStart[i]) SwigStart[i-1] = SwigStart[i]; } SwigPtrSort = 1; for (i = 0; i < SWIG_CACHESIZE; i++) SwigCache[i].stat = 0; } /* First check cache for matches. Uses last cache value as starting point */ cache = &SwigCache[SwigLastCache]; for (i = 0; i < SWIG_CACHESIZE; i++) { if (cache->stat) { if (strcmp(_t,cache->name) == 0) { if (strcmp(_c,cache->mapped) == 0) { cache->stat++; *ptr = (void *) _p; if (cache->tp->cast) *ptr = (*(cache->tp->cast))(*ptr); return (char *) 0; } } } SwigLastCache = (SwigLastCache+1) & SWIG_CACHEMASK; if (!SwigLastCache) cache = SwigCache; else cache++; } /* We have a type mismatch. Will have to look through our type mapping table to figure out whether or not we can accept this datatype */ start = SwigStart[(int) _t[1]]; end = SwigStart[(int) _t[1]+1]; sp = &SwigPtrTable[start]; while (start < end) { if (swigcmp(_t,sp) == 0) break; sp++; start++; } if (start >= end) sp = 0; /* Try to find a match for this */ if (sp) { while (swigcmp(_t,sp) == 0) { name = sp->name; len = sp->len; tp = sp->next; /* Try to find entry for our given datatype */ while(tp) { if (tp->len >= 255) { return _c; } strcpy(temp_type,tp->name); strncat(temp_type,_t+len,255-tp->len); if (strcmp(_c,temp_type) == 0) { strcpy(SwigCache[SwigCacheIndex].mapped,_c); strcpy(SwigCache[SwigCacheIndex].name,_t); SwigCache[SwigCacheIndex].stat = 1; SwigCache[SwigCacheIndex].tp = tp; SwigCacheIndex = SwigCacheIndex & SWIG_CACHEMASK; /* Get pointer value */ *ptr = (void *) _p; if (tp->cast) *ptr = (*(tp->cast))(*ptr); return (char *) 0; } tp = tp->next; } sp++; /* Hmmm. Didn't find it this time */ } } /* Didn't find any sort of match for this data. Get the pointer value and return the received type */ *ptr = (void *) _p; return _c; } else { /* Found a match on the first try. Return pointer value */ *ptr = (void *) _p; return (char *) 0; } } else { /* No type specified. Good luck */ *ptr = (void *) _p; return (char *) 0; } } else { if (strcmp (_c, "NULL") == 0) { *ptr = (void *) 0; return (char *) 0; } *ptr = (void *) 0; return _c; } } /* Compatibility mode */ #define _swig_get_hex SWIG_GetPtr #define SWIG_init initlibxine #define SWIG_name "libxine" #include #ifdef LIST_OUTPUT # define output_helper l_output_helper #else # define output_helper t_output_helper #endif #define STRINGIFY(s) #s void initlibxine (void); PyObject * Pyxine_Error = 0; static void init_statics (void) { PyObject * pyxine = PyImport_ImportModule("pyxine"); if (pyxine) { Pyxine_Error = PyObject_GetAttrString(pyxine, "Error"); Py_DECREF(pyxine); } if (!Pyxine_Error) { if (PyErr_Occurred()) PyErr_Print(); Pyxine_Error = PyExc_Exception; /* punt */ Py_INCREF(Pyxine_Error); } } static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { Py_DECREF(Py_None); target = o; } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); PyList_Append(target, o2); Py_XDECREF(o2); } PyList_Append(target,o); Py_XDECREF(o); } return target; } static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { Py_DECREF(Py_None); target = o; } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } o3 = PyTuple_New(1); PyTuple_SetItem(o3, 0, o); o2 = target; target = PySequence_Concat(o2, o3); Py_DECREF(o2); Py_DECREF(o3); } return target; } typedef const char * STRING; struct callback_s { PyThreadState * state; PyObject * callback; }; typedef struct callback_s callback_t; static callback_t * callback_t_new(PyObject * callback) { callback_t * cb; if (!PyCallable_Check(callback)) { PyErr_SetString(PyExc_TypeError, "Need a callable object for callback"); return 0; } if (!(cb = malloc(sizeof(callback_t)))) { PyErr_NoMemory(); return 0; } /* You must call this from a python thread. */ PyEval_InitThreads(); cb->state = PyThreadState_New(PyThreadState_Get()->interp); if (!cb->state) { free(cb); return 0; } PyThreadState_Clear(cb->state); cb->callback = callback; Py_INCREF(callback); return cb; } static void callback_t_delete(callback_t * cb) { PyThreadState_Delete(cb->state); Py_DECREF(cb->callback); free(cb); } #define BEGIN_CALLBACK_CONTEXT(cb) \ { \ PyThreadState * saved_state; \ PyEval_AcquireLock(); \ saved_state = PyThreadState_Swap(cb->state); #define END_CALLBACK_CONTEXT(cb) \ /* Report any pending exception */ \ if (PyErr_Occurred()) \ PyErr_Print(); \ PyThreadState_Swap(saved_state); \ PyEval_ReleaseLock(); \ } void event_listener_callback (void *user_data, const xine_event_t *event) { callback_t * cb = (callback_t *)user_data; PyObject * buffer; if (!cb) return; BEGIN_CALLBACK_CONTEXT(cb); buffer = PyBuffer_New(sizeof(xine_event_t)); if (buffer) { void * ptr; int length; PyObject_AsWriteBuffer(buffer, &ptr, &length); *(xine_event_t *)ptr = *event; PyObject_CallFunction(cb->callback, "O", buffer); Py_DECREF(buffer); } END_CALLBACK_CONTEXT(cb); } void xine_cfg_entry_callback (void *user_data, xine_cfg_entry_t *entry) { callback_t * cb = (callback_t *)user_data; PyObject * buffer; if (!cb) return; BEGIN_CALLBACK_CONTEXT(cb); buffer = PyBuffer_New(sizeof(xine_cfg_entry_t)); if (buffer) { void * ptr; int length; PyObject_AsWriteBuffer(buffer, &ptr, &length); *(xine_cfg_entry_t *)ptr = *entry; PyObject_CallFunction(cb->callback, "O", buffer); Py_DECREF(buffer); } END_CALLBACK_CONTEXT(cb); } void xine_log_callback (void *user_data, int section) { callback_t * cb = (callback_t *)user_data; if (!cb) return; BEGIN_CALLBACK_CONTEXT(cb); PyObject_CallFunction(cb->callback, "i", section); END_CALLBACK_CONTEXT(cb); } typedef uint32_t color_t; typedef uint8_t trans_t; static const int _XINE_IMGFMT_YV12 = XINE_IMGFMT_YV12; static const int _XINE_IMGFMT_YUY2 = XINE_IMGFMT_YUY2; void px_make_input_event(int type, uint8_t button, uint16_t x, uint16_t y, xine_input_data_t *OUTPUT) { xine_input_data_t * buf = OUTPUT; memset(buf, 0, sizeof(*buf)); buf->event.type = type; buf->event.data = buf; buf->event.data_length = sizeof(*buf); buf->button = button; buf->x = x; buf->y = y; } static PyObject *_wrap_px_make_input_event(PyObject *self, PyObject *args) { PyObject * _resultobj; int _arg0; uint8_t _arg1; uint16_t _arg2; uint16_t _arg3; xine_input_data_t * _arg4; PyObject * buffer; self = self; { void * ptr; int length; buffer = PyBuffer_New(sizeof(xine_input_data_t )); if (!buffer) return NULL; PyObject_AsWriteBuffer(buffer, &ptr, &length); _arg4 = ptr; } if(!PyArg_ParseTuple(args,"ibhh:px_make_input_event",&_arg0,&_arg1,&_arg2,&_arg3)) return NULL; px_make_input_event(_arg0,_arg1,_arg2,_arg3,_arg4); Py_INCREF(Py_None); _resultobj = Py_None; { _resultobj = output_helper(_resultobj, buffer); } return _resultobj; } static PyObject *_wrap_xine_get_version_string(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; self = self; if(!PyArg_ParseTuple(args,":xine_get_version_string")) return NULL; _result = (char *)xine_get_version_string(); _resultobj = Py_BuildValue("s", _result); return _resultobj; } static PyObject *_wrap_xine_get_version(PyObject *self, PyObject *args) { PyObject * _resultobj; int * _arg0; int temp; int * _arg1; int temp0; int * _arg2; int temp1; self = self; { _arg0 = &temp; } { _arg1 = &temp0; } { _arg2 = &temp1; } if(!PyArg_ParseTuple(args,":xine_get_version")) return NULL; xine_get_version(_arg0,_arg1,_arg2); Py_INCREF(Py_None); _resultobj = Py_None; { PyObject *o; o = PyInt_FromLong((long) (*_arg0)); _resultobj = t_output_helper(_resultobj, o); } { PyObject *o; o = PyInt_FromLong((long) (*_arg1)); _resultobj = t_output_helper(_resultobj, o); } { PyObject *o; o = PyInt_FromLong((long) (*_arg2)); _resultobj = t_output_helper(_resultobj, o); } return _resultobj; } static PyObject *_wrap_xine_check_version(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; int _arg0; int _arg1; int _arg2; self = self; if(!PyArg_ParseTuple(args,"iii:xine_check_version",&_arg0,&_arg1,&_arg2)) return NULL; _result = (int )xine_check_version(_arg0,_arg1,_arg2); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_new(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _result; self = self; if(!PyArg_ParseTuple(args,":xine_new")) return NULL; _result = (xine_t *)xine_new(); { char ptmp[128]; if (_result == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_new)); SWIG_MakePtr(ptmp, (char *)_result, STRINGIFY(_xine_t_p)); _resultobj = PyString_FromString(ptmp); if (!_resultobj) return NULL; } return _resultobj; } static PyObject *_wrap_xine_init(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_init",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_init. Expected _xine_t_p."); return NULL; } } xine_init(_arg0); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_open_audio_driver(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_audio_port_t * _result; xine_t * _arg0; char * _arg1; void * _arg2; char * _argc0 = 0; PyObject * _obj1 = 0; char * _argc2 = 0; self = self; if(!PyArg_ParseTuple(args,"sOs:xine_open_audio_driver",&_argc0,&_obj1,&_argc2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_open_audio_driver. Expected _xine_t_p."); return NULL; } } { if (_obj1 == Py_None) { _arg1 = 0; } else { if (!(_arg1 = PyString_AsString(_obj1))) return NULL; } } if (_argc2) { if (SWIG_GetPtr(_argc2,(void **) &_arg2,(char *) 0 )) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of xine_open_audio_driver. Expected _void_p."); return NULL; } } _result = (xine_audio_port_t *)xine_open_audio_driver(_arg0,_arg1,_arg2); { char ptmp[128]; if (_result == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_open_audio_driver)); SWIG_MakePtr(ptmp, (char *)_result, STRINGIFY(_xine_audio_port_t_p)); _resultobj = PyString_FromString(ptmp); if (!_resultobj) return NULL; } return _resultobj; } static PyObject *_wrap_xine_open_video_driver(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_video_port_t * _result; xine_t * _arg0; char * _arg1; int _arg2; void * _arg3; char * _argc0 = 0; PyObject * _obj1 = 0; char * _argc3 = 0; self = self; if(!PyArg_ParseTuple(args,"sOis:xine_open_video_driver",&_argc0,&_obj1,&_arg2,&_argc3)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_open_video_driver. Expected _xine_t_p."); return NULL; } } { if (_obj1 == Py_None) { _arg1 = 0; } else { if (!(_arg1 = PyString_AsString(_obj1))) return NULL; } } if (_argc3) { if (SWIG_GetPtr(_argc3,(void **) &_arg3,(char *) 0 )) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of xine_open_video_driver. Expected _void_p."); return NULL; } } { Py_BEGIN_ALLOW_THREADS _result = (xine_video_port_t *)xine_open_video_driver(_arg0,_arg1,_arg2,_arg3); Py_END_ALLOW_THREADS }{ char ptmp[128]; if (_result == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_open_video_driver)); SWIG_MakePtr(ptmp, (char *)_result, STRINGIFY(_xine_video_port_t_p)); _resultobj = PyString_FromString(ptmp); if (!_resultobj) return NULL; } return _resultobj; } static PyObject *_wrap_xine_close_audio_driver(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _arg0; xine_audio_port_t * _arg1; char * _argc0 = 0; char * _argc1 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_close_audio_driver",&_argc0,&_argc1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_close_audio_driver. Expected _xine_t_p."); return NULL; } } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_audio_port_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_close_audio_driver. Expected _xine_audio_port_t_p."); return NULL; } } xine_close_audio_driver(_arg0,_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_close_video_driver(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _arg0; xine_video_port_t * _arg1; char * _argc0 = 0; char * _argc1 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_close_video_driver",&_argc0,&_argc1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_close_video_driver. Expected _xine_t_p."); return NULL; } } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_video_port_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_close_video_driver. Expected _xine_video_port_t_p."); return NULL; } } xine_close_video_driver(_arg0,_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_exit(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_exit",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_exit. Expected _xine_t_p."); return NULL; } } xine_exit(_arg0); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_stream_new(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_stream_t * _result; xine_t * _arg0; xine_audio_port_t * _arg1; xine_video_port_t * _arg2; char * _argc0 = 0; char * _argc1 = 0; char * _argc2 = 0; self = self; if(!PyArg_ParseTuple(args,"sss:xine_stream_new",&_argc0,&_argc1,&_argc2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_stream_new. Expected _xine_t_p."); return NULL; } } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_audio_port_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_stream_new. Expected _xine_audio_port_t_p."); return NULL; } } if (_argc2) { if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_xine_video_port_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of xine_stream_new. Expected _xine_video_port_t_p."); return NULL; } } _result = (xine_stream_t *)xine_stream_new(_arg0,_arg1,_arg2); { char ptmp[128]; if (_result == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_stream_new)); SWIG_MakePtr(ptmp, (char *)_result, STRINGIFY(_xine_stream_t_p)); _resultobj = PyString_FromString(ptmp); if (!_resultobj) return NULL; } return _resultobj; } static PyObject *_wrap_xine_stream_master_slave(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; xine_stream_t * _arg1; int _arg2; char * _argc0 = 0; char * _argc1 = 0; self = self; if(!PyArg_ParseTuple(args,"ssi:xine_stream_master_slave",&_argc0,&_argc1,&_arg2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_stream_master_slave. Expected _xine_stream_t_p."); return NULL; } } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_stream_master_slave. Expected _xine_stream_t_p."); return NULL; } } _result = (int )xine_stream_master_slave(_arg0,_arg1,_arg2); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_open(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; char * _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_open",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_open. Expected _xine_stream_t_p."); return NULL; } } { Py_BEGIN_ALLOW_THREADS _result = (int )xine_open(_arg0,_arg1); Py_END_ALLOW_THREADS } _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_play(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; int _arg1; int _arg2; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"sii:xine_play",&_argc0,&_arg1,&_arg2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_play. Expected _xine_stream_t_p."); return NULL; } } { Py_BEGIN_ALLOW_THREADS _result = (int )xine_play(_arg0,_arg1,_arg2); Py_END_ALLOW_THREADS } _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_trick_mode(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; int _arg1; int _arg2; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"sii:xine_trick_mode",&_argc0,&_arg1,&_arg2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_trick_mode. Expected _xine_stream_t_p."); return NULL; } } _result = (int )xine_trick_mode(_arg0,_arg1,_arg2); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_stop(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_stream_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_stop",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_stop. Expected _xine_stream_t_p."); return NULL; } } { Py_BEGIN_ALLOW_THREADS xine_stop(_arg0); Py_END_ALLOW_THREADS } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_close(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_stream_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_close",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_close. Expected _xine_stream_t_p."); return NULL; } } { Py_BEGIN_ALLOW_THREADS xine_close(_arg0); Py_END_ALLOW_THREADS } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_eject(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_eject",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_eject. Expected _xine_stream_t_p."); return NULL; } } _result = (int )xine_eject(_arg0); { if (! _result) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_eject)); Py_INCREF(Py_None); _resultobj = Py_None; } return _resultobj; } static PyObject *_wrap_xine_dispose(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_stream_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_dispose",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_dispose. Expected _xine_stream_t_p."); return NULL; } } xine_dispose(_arg0); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_set_param(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_stream_t * _arg0; int _arg1; int _arg2; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"sii:xine_set_param",&_argc0,&_arg1,&_arg2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_set_param. Expected _xine_stream_t_p."); return NULL; } } xine_set_param(_arg0,_arg1,_arg2); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_get_param(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_get_param",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_param. Expected _xine_stream_t_p."); return NULL; } } _result = (int )xine_get_param(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_post_init(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_post_t * _result; xine_t * _arg0; char * _arg1; int _arg2; xine_audio_port_t ** _arg3; xine_video_port_t ** _arg4; char * _argc0 = 0; xine_audio_port_t ** tmp; PyObject * _obj3 = 0; xine_video_port_t ** tmp0; PyObject * _obj4 = 0; self = self; if(!PyArg_ParseTuple(args,"ssiOO:xine_post_init",&_argc0,&_arg1,&_arg2,&_obj3,&_obj4)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_init. Expected _xine_t_p."); return NULL; } } { static const char * ptrtype = "_" STRINGIFY(xine_audio_port_t ) "_p"; PyObject * seq = PySequence_Fast(_obj3, ""); int length, i; if (! seq) { if (!PyErr_ExceptionMatches(PyExc_TypeError)) return NULL; return PyErr_Format(PyExc_TypeError, "expected a sequence of %s's for arg %d of %s", ptrtype, 4, STRINGIFY(xine_post_init)); } length = PySequence_Fast_GET_SIZE(seq); if ( ! (tmp = alloca(sizeof(*tmp) * (length + 1))) ) { Py_DECREF(seq); return PyErr_NoMemory(); } for (i = 0; i < length; i++) { char * str = PyString_AsString(PySequence_Fast_GET_ITEM(seq, i)); if (!str || SWIG_GetPtr(str, (void **)&tmp[i], (char *)ptrtype)) { Py_DECREF(seq); return PyErr_Format(PyExc_TypeError, "expected a sequence of %s's for arg %d of %s", ptrtype, 4, STRINGIFY(xine_post_init)); } } Py_DECREF(seq); tmp[length] = 0; _arg3 = tmp; } { static const char * ptrtype = "_" STRINGIFY(xine_video_port_t ) "_p"; PyObject * seq = PySequence_Fast(_obj4, ""); int length, i; if (! seq) { if (!PyErr_ExceptionMatches(PyExc_TypeError)) return NULL; return PyErr_Format(PyExc_TypeError, "expected a sequence of %s's for arg %d of %s", ptrtype, 5, STRINGIFY(xine_post_init)); } length = PySequence_Fast_GET_SIZE(seq); if ( ! (tmp0 = alloca(sizeof(*tmp0) * (length + 1))) ) { Py_DECREF(seq); return PyErr_NoMemory(); } for (i = 0; i < length; i++) { char * str = PyString_AsString(PySequence_Fast_GET_ITEM(seq, i)); if (!str || SWIG_GetPtr(str, (void **)&tmp0[i], (char *)ptrtype)) { Py_DECREF(seq); return PyErr_Format(PyExc_TypeError, "expected a sequence of %s's for arg %d of %s", ptrtype, 5, STRINGIFY(xine_post_init)); } } Py_DECREF(seq); tmp0[length] = 0; _arg4 = tmp0; } _result = (xine_post_t *)xine_post_init(_arg0,_arg1,_arg2,_arg3,_arg4); { char ptmp[128]; if (_result == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_post_init)); SWIG_MakePtr(ptmp, (char *)_result, STRINGIFY(_xine_post_t_p)); _resultobj = PyString_FromString(ptmp); if (!_resultobj) return NULL; } return _resultobj; } static PyObject *_wrap_xine_list_post_plugins(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING * _result; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_list_post_plugins",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_list_post_plugins. Expected _xine_t_p."); return NULL; } } _result = (STRING *)xine_list_post_plugins(_arg0); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static PyObject *_wrap_xine_list_post_plugins_typed(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING * _result; xine_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_list_post_plugins_typed",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_list_post_plugins_typed. Expected _xine_t_p."); return NULL; } } _result = (STRING *)xine_list_post_plugins_typed(_arg0,_arg1); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static PyObject *_wrap_xine_post_list_inputs(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING * _result; xine_post_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_post_list_inputs",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_post_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_list_inputs. Expected _xine_post_t_p."); return NULL; } } _result = (STRING *)xine_post_list_inputs(_arg0); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static PyObject *_wrap_xine_post_list_outputs(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING * _result; xine_post_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_post_list_outputs",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_post_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_list_outputs. Expected _xine_post_t_p."); return NULL; } } _result = (STRING *)xine_post_list_outputs(_arg0); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static PyObject *_wrap_xine_post_input(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_post_in_t * _result; xine_post_t * _arg0; char * _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_post_input",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_post_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_input. Expected _xine_post_t_p."); return NULL; } } _result = (xine_post_in_t *)xine_post_input(_arg0,_arg1); { char ptmp[128]; if (_result == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_post_input)); SWIG_MakePtr(ptmp, (char *)_result, STRINGIFY(_xine_post_in_t_p)); _resultobj = PyString_FromString(ptmp); if (!_resultobj) return NULL; } return _resultobj; } static PyObject *_wrap_xine_post_output(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_post_out_t * _result; xine_post_t * _arg0; char * _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_post_output",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_post_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_output. Expected _xine_post_t_p."); return NULL; } } _result = (xine_post_out_t *)xine_post_output(_arg0,_arg1); { char ptmp[128]; if (_result == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_post_output)); SWIG_MakePtr(ptmp, (char *)_result, STRINGIFY(_xine_post_out_t_p)); _resultobj = PyString_FromString(ptmp); if (!_resultobj) return NULL; } return _resultobj; } static PyObject *_wrap_xine_post_wire(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_post_out_t * _arg0; xine_post_in_t * _arg1; char * _argc0 = 0; char * _argc1 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_post_wire",&_argc0,&_argc1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_post_out_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_wire. Expected _xine_post_out_t_p."); return NULL; } } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_post_in_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_post_wire. Expected _xine_post_in_t_p."); return NULL; } } _result = (int )xine_post_wire(_arg0,_arg1); { if (! _result) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_post_wire)); Py_INCREF(Py_None); _resultobj = Py_None; } return _resultobj; } static PyObject *_wrap_xine_post_wire_video_port(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_post_out_t * _arg0; xine_video_port_t * _arg1; char * _argc0 = 0; char * _argc1 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_post_wire_video_port",&_argc0,&_argc1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_post_out_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_wire_video_port. Expected _xine_post_out_t_p."); return NULL; } } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_video_port_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_post_wire_video_port. Expected _xine_video_port_t_p."); return NULL; } } _result = (int )xine_post_wire_video_port(_arg0,_arg1); { if (! _result) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_post_wire_video_port)); Py_INCREF(Py_None); _resultobj = Py_None; } return _resultobj; } static PyObject *_wrap_xine_post_wire_audio_port(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_post_out_t * _arg0; xine_audio_port_t * _arg1; char * _argc0 = 0; char * _argc1 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_post_wire_audio_port",&_argc0,&_argc1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_post_out_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_wire_audio_port. Expected _xine_post_out_t_p."); return NULL; } } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_audio_port_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_post_wire_audio_port. Expected _xine_audio_port_t_p."); return NULL; } } _result = (int )xine_post_wire_audio_port(_arg0,_arg1); { if (! _result) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_post_wire_audio_port)); Py_INCREF(Py_None); _resultobj = Py_None; } return _resultobj; } static PyObject *_wrap_xine_get_video_source(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_post_out_t * _result; xine_stream_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_get_video_source",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_video_source. Expected _xine_stream_t_p."); return NULL; } } _result = (xine_post_out_t *)xine_get_video_source(_arg0); { char ptmp[128]; if (_result == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_get_video_source)); SWIG_MakePtr(ptmp, (char *)_result, STRINGIFY(_xine_post_out_t_p)); _resultobj = PyString_FromString(ptmp); if (!_resultobj) return NULL; } return _resultobj; } static PyObject *_wrap_xine_get_audio_source(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_post_out_t * _result; xine_stream_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_get_audio_source",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_audio_source. Expected _xine_stream_t_p."); return NULL; } } _result = (xine_post_out_t *)xine_get_audio_source(_arg0); { char ptmp[128]; if (_result == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_get_audio_source)); SWIG_MakePtr(ptmp, (char *)_result, STRINGIFY(_xine_post_out_t_p)); _resultobj = PyString_FromString(ptmp); if (!_resultobj) return NULL; } return _resultobj; } static PyObject *_wrap_xine_post_dispose(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _arg0; xine_post_t * _arg1; char * _argc0 = 0; char * _argc1 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_post_dispose",&_argc0,&_argc1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_dispose. Expected _xine_t_p."); return NULL; } } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_post_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_post_dispose. Expected _xine_post_t_p."); return NULL; } } xine_post_dispose(_arg0,_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_get_log_section_count(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_get_log_section_count",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_log_section_count. Expected _xine_t_p."); return NULL; } } _result = (int )xine_get_log_section_count(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_get_log_names(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING * _result; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_get_log_names",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_log_names. Expected _xine_t_p."); return NULL; } } _result = (STRING *)xine_get_log_names(_arg0); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static PyObject *_wrap_xine_log(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _arg0; int _arg1; char * _arg2; char * _arg3; char * _argc0 = 0; self = self; { _arg2 = "%s\n"; } if(!PyArg_ParseTuple(args,"sis:xine_log",&_argc0,&_arg1,&_arg3)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_log. Expected _xine_t_p."); return NULL; } } { Py_BEGIN_ALLOW_THREADS xine_log(_arg0,_arg1,_arg2,_arg3); Py_END_ALLOW_THREADS } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_get_log(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING * _result; xine_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_get_log",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_log. Expected _xine_t_p."); return NULL; } } _result = (STRING *)xine_get_log(_arg0,_arg1); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static PyObject *_wrap_xine_register_log_cb(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _arg0; xine_log_cb_t _arg1; void * _arg2; char * _argc0 = 0; PyObject * _obj2 = 0; self = self; { _arg1 = xine_log_callback; } { _arg2 = 0; } if(!PyArg_ParseTuple(args,"sO:xine_register_log_cb",&_argc0,&_obj2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_register_log_cb. Expected _xine_t_p."); return NULL; } } if (_obj2) { /* FIXME: memory leak: callback_t is never freed */ _arg2 = callback_t_new(_obj2); if (!_arg2) return NULL; } xine_register_log_cb(_arg0,_arg1,_arg2); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_get_error(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_get_error",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_error. Expected _xine_stream_t_p."); return NULL; } } _result = (int )xine_get_error(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_get_status(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_get_status",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_status. Expected _xine_stream_t_p."); return NULL; } } _result = (int )xine_get_status(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_get_audio_lang(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; int _arg1; char * _arg2; char temp[64]; char * _argc0 = 0; self = self; { _arg2 = temp; } if(!PyArg_ParseTuple(args,"si:xine_get_audio_lang",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_audio_lang. Expected _xine_stream_t_p."); return NULL; } } _result = (int )xine_get_audio_lang(_arg0,_arg1,_arg2); { if (! _result) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_get_audio_lang)); Py_INCREF(Py_None); _resultobj = Py_None; } { _resultobj = output_helper(_resultobj, PyString_FromString(_arg2)); } return _resultobj; } static PyObject *_wrap_xine_get_spu_lang(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; int _arg1; char * _arg2; char temp[64]; char * _argc0 = 0; self = self; { _arg2 = temp; } if(!PyArg_ParseTuple(args,"si:xine_get_spu_lang",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_spu_lang. Expected _xine_stream_t_p."); return NULL; } } _result = (int )xine_get_spu_lang(_arg0,_arg1,_arg2); { if (! _result) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_get_spu_lang)); Py_INCREF(Py_None); _resultobj = Py_None; } { _resultobj = output_helper(_resultobj, PyString_FromString(_arg2)); } return _resultobj; } static PyObject *_wrap_xine_get_pos_length(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; int * _arg1; int temp; int * _arg2; int temp0; int * _arg3; int temp1; char * _argc0 = 0; self = self; { _arg1 = &temp; } { _arg2 = &temp0; } { _arg3 = &temp1; } if(!PyArg_ParseTuple(args,"s:xine_get_pos_length",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_pos_length. Expected _xine_stream_t_p."); return NULL; } } _result = (int )xine_get_pos_length(_arg0,_arg1,_arg2,_arg3); { if (! _result) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_get_pos_length)); Py_INCREF(Py_None); _resultobj = Py_None; } { PyObject *o; o = PyInt_FromLong((long) (*_arg1)); _resultobj = t_output_helper(_resultobj, o); } { PyObject *o; o = PyInt_FromLong((long) (*_arg2)); _resultobj = t_output_helper(_resultobj, o); } { PyObject *o; o = PyInt_FromLong((long) (*_arg3)); _resultobj = t_output_helper(_resultobj, o); } return _resultobj; } static PyObject *_wrap_xine_get_stream_info(PyObject *self, PyObject *args) { PyObject * _resultobj; uint32_t _result; xine_stream_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_get_stream_info",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_stream_info. Expected _xine_stream_t_p."); return NULL; } } _result = (uint32_t )xine_get_stream_info(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_get_meta_info(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; xine_stream_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_get_meta_info",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_meta_info. Expected _xine_stream_t_p."); return NULL; } } _result = (char *)xine_get_meta_info(_arg0,_arg1); _resultobj = Py_BuildValue("s", _result); return _resultobj; } static PyObject *_wrap_xine_get_browsable_input_plugin_ids(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING * _result; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_get_browsable_input_plugin_ids",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_browsable_input_plugin_ids. Expected _xine_t_p."); return NULL; } } _result = (STRING *)xine_get_browsable_input_plugin_ids(_arg0); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static PyObject *_wrap_xine_get_browse_mrls(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_mrl_t ** _result; xine_t * _arg0; char * _arg1; char * _arg2; int * _arg3; char * _argc0 = 0; char * _argc3 = 0; self = self; if(!PyArg_ParseTuple(args,"ssss:xine_get_browse_mrls",&_argc0,&_arg1,&_arg2,&_argc3)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_browse_mrls. Expected _xine_t_p."); return NULL; } } if (_argc3) { if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_int_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of xine_get_browse_mrls. Expected _int_p."); return NULL; } } _result = (xine_mrl_t **)xine_get_browse_mrls(_arg0,_arg1,_arg2,_arg3); { size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { xine_mrl_t * item = _result[i]; PyObject * val = Py_BuildValue("{s:s,s:s,s:s,s:l,s:l}", "origin", item->origin, "mrl", item->mrl, "link", item->link, "type", (long)item->type, "off_t", (long)item->size); if (!val) return NULL; PyTuple_SET_ITEM(_resultobj, i, val); } } return _resultobj; } static PyObject *_wrap_xine_get_autoplay_input_plugin_ids(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING * _result; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_get_autoplay_input_plugin_ids",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_autoplay_input_plugin_ids. Expected _xine_t_p."); return NULL; } } _result = (STRING *)xine_get_autoplay_input_plugin_ids(_arg0); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static PyObject *_wrap_xine_get_autoplay_mrls(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING * _result; xine_t * _arg0; char * _arg1; int * _arg2; char * _argc0 = 0; char * _argc2 = 0; self = self; if(!PyArg_ParseTuple(args,"sss:xine_get_autoplay_mrls",&_argc0,&_arg1,&_argc2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_autoplay_mrls. Expected _xine_t_p."); return NULL; } } if (_argc2) { if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_int_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of xine_get_autoplay_mrls. Expected _int_p."); return NULL; } } _result = (STRING *)xine_get_autoplay_mrls(_arg0,_arg1,_arg2); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static PyObject *_wrap_xine_get_file_extensions(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_get_file_extensions",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_file_extensions. Expected _xine_t_p."); return NULL; } } _result = (char *)xine_get_file_extensions(_arg0); { if (_result) { _resultobj = PyString_FromString(_result); free(_result); if (!_resultobj) return NULL; } else { Py_INCREF(Py_None); _resultobj = Py_None; } } return _resultobj; } static PyObject *_wrap_xine_get_mime_types(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_get_mime_types",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_mime_types. Expected _xine_t_p."); return NULL; } } _result = (char *)xine_get_mime_types(_arg0); { if (_result) { _resultobj = PyString_FromString(_result); free(_result); if (!_resultobj) return NULL; } else { Py_INCREF(Py_None); _resultobj = Py_None; } } return _resultobj; } static PyObject *_wrap_xine_get_demux_for_mime_type(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; xine_t * _arg0; char * _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_get_demux_for_mime_type",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_demux_for_mime_type. Expected _xine_t_p."); return NULL; } } _result = (char *)xine_get_demux_for_mime_type(_arg0,_arg1); { if (_result) { _resultobj = PyString_FromString(_result); free(_result); if (!_resultobj) return NULL; } else { Py_INCREF(Py_None); _resultobj = Py_None; } } return _resultobj; } static PyObject *_wrap_xine_get_input_plugin_description(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; xine_t * _arg0; char * _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_get_input_plugin_description",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_get_input_plugin_description. Expected _xine_t_p."); return NULL; } } _result = (char *)xine_get_input_plugin_description(_arg0,_arg1); _resultobj = Py_BuildValue("s", _result); return _resultobj; } static PyObject *_wrap_xine_list_audio_output_plugins(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING * _result; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_list_audio_output_plugins",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_list_audio_output_plugins. Expected _xine_t_p."); return NULL; } } _result = (STRING *)xine_list_audio_output_plugins(_arg0); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static PyObject *_wrap_xine_list_video_output_plugins(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING * _result; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_list_video_output_plugins",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_list_video_output_plugins. Expected _xine_t_p."); return NULL; } } _result = (STRING *)xine_list_video_output_plugins(_arg0); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static PyObject *_wrap_xine_gui_send_vo_data(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_stream_t * _arg0; int _arg1; void * _arg2; char * _argc0 = 0; char * _argc2 = 0; self = self; if(!PyArg_ParseTuple(args,"sis:xine_gui_send_vo_data",&_argc0,&_arg1,&_argc2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_gui_send_vo_data. Expected _xine_stream_t_p."); return NULL; } } if (_argc2) { if (SWIG_GetPtr(_argc2,(void **) &_arg2,(char *) 0 )) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of xine_gui_send_vo_data. Expected _void_p."); return NULL; } } _result = (int )xine_gui_send_vo_data(_arg0,_arg1,_arg2); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_config_register_string(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; xine_t * _arg0; char * _arg1; char * _arg2; char * _arg3; char * _arg4; int _arg5; xine_config_cb_t _arg6; void * _arg7; char * _argc0 = 0; PyObject * _obj2 = 0; PyObject * _obj3 = 0; PyObject * _obj4 = 0; PyObject * _obj7 = 0; self = self; { _arg6 = xine_cfg_entry_callback; } { _arg7 = 0; } if(!PyArg_ParseTuple(args,"ssOOOiO:xine_config_register_string",&_argc0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_obj7)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_register_string. Expected _xine_t_p."); return NULL; } } { char * str = PyString_AsString(_obj2); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", 3, STRINGIFY(xine_config_register_string)); } _arg2 = strdup(str); if (!_arg2) { return PyErr_NoMemory(); } } { char * str = PyString_AsString(_obj3); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", 4, STRINGIFY(xine_config_register_string)); } _arg3 = strdup(str); if (!_arg3) { return PyErr_NoMemory(); } } { char * str = PyString_AsString(_obj4); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", 5, STRINGIFY(xine_config_register_string)); } _arg4 = strdup(str); if (!_arg4) { return PyErr_NoMemory(); } } if (_obj7) { if (_obj7 != Py_None) { /* FIXME: memory leak: callback_t is never freed */ _arg7 = callback_t_new(_obj7); if (!_arg7) return NULL; } } _result = (char *)xine_config_register_string(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); _resultobj = Py_BuildValue("s", _result); return _resultobj; } static PyObject *_wrap_xine_config_register_range(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_t * _arg0; char * _arg1; int _arg2; int _arg3; int _arg4; char * _arg5; char * _arg6; int _arg7; xine_config_cb_t _arg8; void * _arg9; char * _argc0 = 0; PyObject * _obj5 = 0; PyObject * _obj6 = 0; PyObject * _obj9 = 0; self = self; { _arg8 = xine_cfg_entry_callback; } { _arg9 = 0; } if(!PyArg_ParseTuple(args,"ssiiiOOiO:xine_config_register_range",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_obj5,&_obj6,&_arg7,&_obj9)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_register_range. Expected _xine_t_p."); return NULL; } } { char * str = PyString_AsString(_obj5); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", 6, STRINGIFY(xine_config_register_range)); } _arg5 = strdup(str); if (!_arg5) { return PyErr_NoMemory(); } } { char * str = PyString_AsString(_obj6); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", 7, STRINGIFY(xine_config_register_range)); } _arg6 = strdup(str); if (!_arg6) { return PyErr_NoMemory(); } } if (_obj9) { if (_obj9 != Py_None) { /* FIXME: memory leak: callback_t is never freed */ _arg9 = callback_t_new(_obj9); if (!_arg9) return NULL; } } _result = (int )xine_config_register_range(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_config_register_enum(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_t * _arg0; char * _arg1; int _arg2; char ** _arg3; char * _arg4; char * _arg5; int _arg6; xine_config_cb_t _arg7; void * _arg8; char * _argc0 = 0; PyObject * _obj3 = 0; PyObject * _obj4 = 0; PyObject * _obj5 = 0; PyObject * _obj8 = 0; self = self; { _arg7 = xine_cfg_entry_callback; } { _arg8 = 0; } if(!PyArg_ParseTuple(args,"ssiOOOiO:xine_config_register_enum",&_argc0,&_arg1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_obj8)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_register_enum. Expected _xine_t_p."); return NULL; } } { int i, length; PyObject * seq = PySequence_Fast(_obj3, ""); if (!seq) { return PyErr_Format(PyExc_TypeError, "expected sequence of strings for arg %d of %s", 4, STRINGIFY(xine_config_register_enum)); } length = PySequence_Fast_GET_SIZE(seq); _arg3 = malloc((length + 1) * sizeof(*_arg3)); if (!_arg3) { Py_DECREF(seq); return PyErr_NoMemory(); } for (i = 0; i < length; i++) { char * str = PyString_AsString(PySequence_Fast_GET_ITEM(seq, i)); if (!str) { Py_DECREF(seq); return PyErr_Format(PyExc_TypeError, "expected sequence of strings for arg %d of %s", 4, STRINGIFY(xine_config_register_enum)); } _arg3[i] = strdup(str); if (!_arg3[i]) { Py_DECREF(seq); return PyErr_NoMemory(); } } _arg3[length] = 0; Py_DECREF(seq); } { char * str = PyString_AsString(_obj4); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", 5, STRINGIFY(xine_config_register_enum)); } _arg4 = strdup(str); if (!_arg4) { return PyErr_NoMemory(); } } { char * str = PyString_AsString(_obj5); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", 6, STRINGIFY(xine_config_register_enum)); } _arg5 = strdup(str); if (!_arg5) { return PyErr_NoMemory(); } } if (_obj8) { if (_obj8 != Py_None) { /* FIXME: memory leak: callback_t is never freed */ _arg8 = callback_t_new(_obj8); if (!_arg8) return NULL; } } _result = (int )xine_config_register_enum(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_config_register_num(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_t * _arg0; char * _arg1; int _arg2; char * _arg3; char * _arg4; int _arg5; xine_config_cb_t _arg6; void * _arg7; char * _argc0 = 0; PyObject * _obj3 = 0; PyObject * _obj4 = 0; PyObject * _obj7 = 0; self = self; { _arg6 = xine_cfg_entry_callback; } { _arg7 = 0; } if(!PyArg_ParseTuple(args,"ssiOOiO:xine_config_register_num",&_argc0,&_arg1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj7)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_register_num. Expected _xine_t_p."); return NULL; } } { char * str = PyString_AsString(_obj3); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", 4, STRINGIFY(xine_config_register_num)); } _arg3 = strdup(str); if (!_arg3) { return PyErr_NoMemory(); } } { char * str = PyString_AsString(_obj4); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", 5, STRINGIFY(xine_config_register_num)); } _arg4 = strdup(str); if (!_arg4) { return PyErr_NoMemory(); } } if (_obj7) { if (_obj7 != Py_None) { /* FIXME: memory leak: callback_t is never freed */ _arg7 = callback_t_new(_obj7); if (!_arg7) return NULL; } } _result = (int )xine_config_register_num(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_config_register_bool(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_t * _arg0; char * _arg1; int _arg2; char * _arg3; char * _arg4; int _arg5; xine_config_cb_t _arg6; void * _arg7; char * _argc0 = 0; PyObject * _obj3 = 0; PyObject * _obj4 = 0; PyObject * _obj7 = 0; self = self; { _arg6 = xine_cfg_entry_callback; } { _arg7 = 0; } if(!PyArg_ParseTuple(args,"ssiOOiO:xine_config_register_bool",&_argc0,&_arg1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj7)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_register_bool. Expected _xine_t_p."); return NULL; } } { char * str = PyString_AsString(_obj3); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", 4, STRINGIFY(xine_config_register_bool)); } _arg3 = strdup(str); if (!_arg3) { return PyErr_NoMemory(); } } { char * str = PyString_AsString(_obj4); if (!str) { return PyErr_Format(PyExc_TypeError, "expected string for arg %d of %s", 5, STRINGIFY(xine_config_register_bool)); } _arg4 = strdup(str); if (!_arg4) { return PyErr_NoMemory(); } } if (_obj7) { if (_obj7 != Py_None) { /* FIXME: memory leak: callback_t is never freed */ _arg7 = callback_t_new(_obj7); if (!_arg7) return NULL; } } _result = (int )xine_config_register_bool(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static PyObject *_wrap_xine_config_get_first_entry(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_t * _arg0; xine_cfg_entry_t * _arg1; PyObject * buffer; char * _argc0 = 0; self = self; { void * ptr; int length; buffer = PyBuffer_New(sizeof(xine_cfg_entry_t )); if (!buffer) return NULL; PyObject_AsWriteBuffer(buffer, &ptr, &length); _arg1 = ptr; } if(!PyArg_ParseTuple(args,"s:xine_config_get_first_entry",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_get_first_entry. Expected _xine_t_p."); return NULL; } } _result = (int )xine_config_get_first_entry(_arg0,_arg1); { if (! _result) { PyErr_SetNone(PyExc_StopIteration); return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; } { _resultobj = output_helper(_resultobj, buffer); } return _resultobj; } static PyObject *_wrap_xine_config_get_next_entry(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_t * _arg0; xine_cfg_entry_t * _arg1; PyObject * buffer; char * _argc0 = 0; self = self; { void * ptr; int length; buffer = PyBuffer_New(sizeof(xine_cfg_entry_t )); if (!buffer) return NULL; PyObject_AsWriteBuffer(buffer, &ptr, &length); _arg1 = ptr; } if(!PyArg_ParseTuple(args,"s:xine_config_get_next_entry",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_get_next_entry. Expected _xine_t_p."); return NULL; } } _result = (int )xine_config_get_next_entry(_arg0,_arg1); { if (! _result) { PyErr_SetNone(PyExc_StopIteration); return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; } { _resultobj = output_helper(_resultobj, buffer); } return _resultobj; } static PyObject *_wrap_xine_config_lookup_entry(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_t * _arg0; char * _arg1; xine_cfg_entry_t * _arg2; PyObject * buffer; char * _argc0 = 0; self = self; { void * ptr; int length; buffer = PyBuffer_New(sizeof(xine_cfg_entry_t )); if (!buffer) return NULL; PyObject_AsWriteBuffer(buffer, &ptr, &length); _arg2 = ptr; } if(!PyArg_ParseTuple(args,"ss:xine_config_lookup_entry",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_lookup_entry. Expected _xine_t_p."); return NULL; } } _result = (int )xine_config_lookup_entry(_arg0,_arg1,_arg2); { if (! _result) { PyErr_SetNone(PyExc_KeyError); return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; } { _resultobj = output_helper(_resultobj, buffer); } return _resultobj; } static PyObject *_wrap_xine_config_update_entry(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _arg0; xine_cfg_entry_t * _arg1; char * _argc0 = 0; PyObject * _obj1 = 0; self = self; if(!PyArg_ParseTuple(args,"sO:xine_config_update_entry",&_argc0,&_obj1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_update_entry. Expected _xine_t_p."); return NULL; } } { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj1, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_cfg_entry_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_cfg_entry_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_cfg_entry_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 2, STRINGIFY(xine_config_update_entry), STRINGIFY(xine_cfg_entry_t )); _arg1 = ptr; } { Py_BEGIN_ALLOW_THREADS xine_config_update_entry(_arg0,_arg1); Py_END_ALLOW_THREADS } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_config_load(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _arg0; char * _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_config_load",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_load. Expected _xine_t_p."); return NULL; } } xine_config_load(_arg0,_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_config_save(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _arg0; char * _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_config_save",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_save. Expected _xine_t_p."); return NULL; } } xine_config_save(_arg0,_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_config_reset(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_config_reset",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_config_reset. Expected _xine_t_p."); return NULL; } } xine_config_reset(_arg0); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_event_new_queue(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_event_queue_t * _result; xine_stream_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_event_new_queue",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_event_new_queue. Expected _xine_stream_t_p."); return NULL; } } _result = (xine_event_queue_t *)xine_event_new_queue(_arg0); { char ptmp[128]; if (_result == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_event_new_queue)); SWIG_MakePtr(ptmp, (char *)_result, STRINGIFY(_xine_event_queue_t_p)); _resultobj = PyString_FromString(ptmp); if (!_resultobj) return NULL; } return _resultobj; } static PyObject *_wrap_xine_event_dispose_queue(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_event_queue_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_event_dispose_queue",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_event_queue_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_event_dispose_queue. Expected _xine_event_queue_t_p."); return NULL; } } xine_event_dispose_queue(_arg0); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_event_get(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_event_t * _result; xine_event_queue_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_event_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_event_queue_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_event_get. Expected _xine_event_queue_t_p."); return NULL; } } _result = (xine_event_t *)xine_event_get(_arg0); { if (_result) { _resultobj = PyBuffer_FromReadWriteMemory(_result, sizeof(xine_event_t )); if (!_resultobj) return NULL; } else { Py_INCREF(Py_None); _resultobj = Py_None; } } return _resultobj; } static PyObject *_wrap_xine_event_wait(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_event_t * _result; xine_event_queue_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_event_wait",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_event_queue_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_event_wait. Expected _xine_event_queue_t_p."); return NULL; } } { Py_BEGIN_ALLOW_THREADS _result = (xine_event_t *)xine_event_wait(_arg0); Py_END_ALLOW_THREADS }{ if (_result) { _resultobj = PyBuffer_FromReadWriteMemory(_result, sizeof(xine_event_t )); if (!_resultobj) return NULL; } else { Py_INCREF(Py_None); _resultobj = Py_None; } } return _resultobj; } static PyObject *_wrap_xine_event_free(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_event_t * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_event_free",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_event_free), STRINGIFY(xine_event_t )); _arg0 = ptr; } xine_event_free(_arg0); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_event_create_listener_thread(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_event_queue_t * _arg0; xine_event_listener_cb_t _arg1; void * _arg2; char * _argc0 = 0; PyObject * _obj2 = 0; self = self; { _arg1 = event_listener_callback; } { _arg2 = 0; } if(!PyArg_ParseTuple(args,"sO:xine_event_create_listener_thread",&_argc0,&_obj2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_event_queue_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_event_create_listener_thread. Expected _xine_event_queue_t_p."); return NULL; } } if (_obj2) { /* FIXME: memory leak: callback_t is never freed */ _arg2 = callback_t_new(_obj2); if (!_arg2) return NULL; } xine_event_create_listener_thread(_arg0,_arg1,_arg2); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_event_send(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_stream_t * _arg0; xine_event_t * _arg1; char * _argc0 = 0; PyObject * _obj1 = 0; self = self; if(!PyArg_ParseTuple(args,"sO:xine_event_send",&_argc0,&_obj1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_event_send. Expected _xine_stream_t_p."); return NULL; } } { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj1, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 2, STRINGIFY(xine_event_send), STRINGIFY(xine_event_t )); _arg1 = ptr; } xine_event_send(_arg0,_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_new(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _result; xine_stream_t * _arg0; int _arg1; int _arg2; int _arg3; int _arg4; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"siiii:xine_osd_new",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_new. Expected _xine_stream_t_p."); return NULL; } } _result = (xine_osd_t *)xine_osd_new(_arg0,_arg1,_arg2,_arg3,_arg4); { char ptmp[128]; if (_result == NULL) return PyErr_Format(Pyxine_Error, "%s failed", STRINGIFY(xine_osd_new)); SWIG_MakePtr(ptmp, (char *)_result, STRINGIFY(_xine_osd_t_p)); _resultobj = PyString_FromString(ptmp); if (!_resultobj) return NULL; } return _resultobj; } static PyObject *_wrap_xine_osd_draw_point(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; int _arg1; int _arg2; int _arg3; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"siii:xine_osd_draw_point",&_argc0,&_arg1,&_arg2,&_arg3)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_draw_point. Expected _xine_osd_t_p."); return NULL; } } xine_osd_draw_point(_arg0,_arg1,_arg2,_arg3); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_draw_line(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; int _arg1; int _arg2; int _arg3; int _arg4; int _arg5; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"siiiii:xine_osd_draw_line",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_draw_line. Expected _xine_osd_t_p."); return NULL; } } xine_osd_draw_line(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_draw_rect(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; int _arg1; int _arg2; int _arg3; int _arg4; int _arg5; int _arg6; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"siiiiii:xine_osd_draw_rect",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_draw_rect. Expected _xine_osd_t_p."); return NULL; } } xine_osd_draw_rect(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_draw_text(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; int _arg1; int _arg2; char * _arg3; int _arg4; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"siisi:xine_osd_draw_text",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_draw_text. Expected _xine_osd_t_p."); return NULL; } } xine_osd_draw_text(_arg0,_arg1,_arg2,_arg3,_arg4); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_get_text_size(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; char * _arg1; int * _arg2; int temp; int * _arg3; int temp0; char * _argc0 = 0; self = self; { _arg2 = &temp; } { _arg3 = &temp0; } if(!PyArg_ParseTuple(args,"ss:xine_osd_get_text_size",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_get_text_size. Expected _xine_osd_t_p."); return NULL; } } xine_osd_get_text_size(_arg0,_arg1,_arg2,_arg3); Py_INCREF(Py_None); _resultobj = Py_None; { PyObject *o; o = PyInt_FromLong((long) (*_arg2)); _resultobj = t_output_helper(_resultobj, o); } { PyObject *o; o = PyInt_FromLong((long) (*_arg3)); _resultobj = t_output_helper(_resultobj, o); } return _resultobj; } static PyObject *_wrap_xine_osd_set_font(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; char * _arg1; int _arg2; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"ssi:xine_osd_set_font",&_argc0,&_arg1,&_arg2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_set_font. Expected _xine_osd_t_p."); return NULL; } } xine_osd_set_font(_arg0,_arg1,_arg2); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_set_position(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; int _arg1; int _arg2; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"sii:xine_osd_set_position",&_argc0,&_arg1,&_arg2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_set_position. Expected _xine_osd_t_p."); return NULL; } } xine_osd_set_position(_arg0,_arg1,_arg2); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_show(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; int64_t _arg1; char * _argc0 = 0; PyObject * _obj1 = 0; self = self; if(!PyArg_ParseTuple(args,"sO:xine_osd_show",&_argc0,&_obj1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_show. Expected _xine_osd_t_p."); return NULL; } } { PyObject * aslong = PyNumber_Long(_obj1); if (!aslong) return NULL; _arg1 = PyLong_AsLongLong(aslong); Py_DECREF(aslong); if (PyErr_Occurred()) return NULL; } xine_osd_show(_arg0,_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_hide(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; int64_t _arg1; char * _argc0 = 0; PyObject * _obj1 = 0; self = self; if(!PyArg_ParseTuple(args,"sO:xine_osd_hide",&_argc0,&_obj1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_hide. Expected _xine_osd_t_p."); return NULL; } } { PyObject * aslong = PyNumber_Long(_obj1); if (!aslong) return NULL; _arg1 = PyLong_AsLongLong(aslong); Py_DECREF(aslong); if (PyErr_Occurred()) return NULL; } xine_osd_hide(_arg0,_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_clear(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_osd_clear",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_clear. Expected _xine_osd_t_p."); return NULL; } } xine_osd_clear(_arg0); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_free(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_osd_free",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_free. Expected _xine_osd_t_p."); return NULL; } } xine_osd_free(_arg0); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_set_palette(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; color_t * _arg1; trans_t * _arg2; char * _argc0 = 0; PyObject * _obj1 = 0; PyObject * _obj2 = 0; self = self; { if (!(_arg1 = alloca(256 * sizeof(*_arg1)))) return PyErr_NoMemory(); } { if (!(_arg2 = alloca(256 * sizeof(*_arg2)))) return PyErr_NoMemory(); } if(!PyArg_ParseTuple(args,"sOO:xine_osd_set_palette",&_argc0,&_obj1,&_obj2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_set_palette. Expected _xine_osd_t_p."); return NULL; } } { int i; PyObject * seq = PySequence_Fast(_obj1, ""); if (!seq || PySequence_Fast_GET_SIZE(seq) != 256) { if (seq) { Py_DECREF(seq); } return PyErr_Format(PyExc_ValueError, "expected sequence of length 256 for arg %d of %s", 2, STRINGIFY(xine_osd_set_palette)); } for (i = 0; i < 256; i++) { long val = PyInt_AsLong(PySequence_Fast_GET_ITEM(seq, i)); if (val == -1) { Py_DECREF(seq); return PyErr_Format(PyExc_ValueError, "expected sequence of length 256 for arg %d of %s", 2, STRINGIFY(xine_osd_set_palette)); } _arg1[i] = val; } Py_DECREF(seq); } { int i; PyObject * seq = PySequence_Fast(_obj2, ""); if (!seq || PySequence_Fast_GET_SIZE(seq) != 256) { if (seq) { Py_DECREF(seq); } return PyErr_Format(PyExc_ValueError, "expected sequence of length 256 for arg %d of %s", 3, STRINGIFY(xine_osd_set_palette)); } for (i = 0; i < 256; i++) { long val = PyInt_AsLong(PySequence_Fast_GET_ITEM(seq, i)); if (val == -1) { Py_DECREF(seq); return PyErr_Format(PyExc_ValueError, "expected sequence of length 256 for arg %d of %s", 3, STRINGIFY(xine_osd_set_palette)); } _arg2[i] = val; } Py_DECREF(seq); } xine_osd_set_palette(_arg0,_arg1,_arg2); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_set_text_palette(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; int _arg1; int _arg2; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"sii:xine_osd_set_text_palette",&_argc0,&_arg1,&_arg2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_set_text_palette. Expected _xine_osd_t_p."); return NULL; } } xine_osd_set_text_palette(_arg0,_arg1,_arg2); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } static PyObject *_wrap_xine_osd_get_palette(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_osd_t * _arg0; color_t * _arg1; trans_t * _arg2; char * _argc0 = 0; self = self; { if (!(_arg1 = alloca(256 * sizeof(*_arg1)))) return PyErr_NoMemory(); } { if (!(_arg2 = alloca(256 * sizeof(*_arg2)))) return PyErr_NoMemory(); } if(!PyArg_ParseTuple(args,"s:xine_osd_get_palette",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_osd_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_osd_get_palette. Expected _xine_osd_t_p."); return NULL; } } xine_osd_get_palette(_arg0,_arg1,_arg2); Py_INCREF(Py_None); _resultobj = Py_None; { int i; PyObject * tuple = PyTuple_New(256); if (!tuple) return NULL; for (i = 0; i < 256; i++) { PyObject * c = PyInt_FromLong((long)_arg1[i]); if (!c) return NULL; PyTuple_SET_ITEM(tuple, i, c); } _resultobj = l_output_helper(_resultobj, tuple); } { int i; PyObject * tuple = PyTuple_New(256); if (!tuple) return NULL; for (i = 0; i < 256; i++) { PyObject * c = PyInt_FromLong((long)_arg2[i]); if (!c) return NULL; PyTuple_SET_ITEM(tuple, i, c); } _resultobj = l_output_helper(_resultobj, tuple); } return _resultobj; } static xine_audio_port_t ** xine_post_s_audio_input_set(struct xine_post_s *obj, xine_audio_port_t **val) { { PyErr_Format(PyExc_AttributeError, "%s is read-only", STRINGIFY(obj->audio_input)); return 0; } return (xine_audio_port_t **) val; } static PyObject *_wrap_xine_post_s_audio_input_set(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_audio_port_t ** _result; struct xine_post_s * _arg0; xine_audio_port_t ** _arg1; char * _argc0 = 0; char * _argc1 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_post_s_audio_input_set",&_argc0,&_argc1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_s_audio_input_set. Expected _struct_xine_post_s_p."); return NULL; } } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_audio_port_t_pp")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_post_s_audio_input_set. Expected _xine_audio_port_t_pp."); return NULL; } } _result = (xine_audio_port_t **)xine_post_s_audio_input_set(_arg0,_arg1); { static const char * ptrtype = "_" STRINGIFY(xine_audio_port_t ) "_p"; PyObject * stmp; char ptmp[128]; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { SWIG_MakePtr(ptmp, (char *) _result[i], (char *) ptrtype); if (!(stmp = PyString_FromString(ptmp))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } #define xine_post_s_audio_input_get(_swigobj) ((xine_audio_port_t **) _swigobj->audio_input) static PyObject *_wrap_xine_post_s_audio_input_get(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_audio_port_t ** _result; struct xine_post_s * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_post_s_audio_input_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_s_audio_input_get. Expected _struct_xine_post_s_p."); return NULL; } } _result = (xine_audio_port_t **)xine_post_s_audio_input_get(_arg0); { static const char * ptrtype = "_" STRINGIFY(xine_audio_port_t ) "_p"; PyObject * stmp; char ptmp[128]; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { SWIG_MakePtr(ptmp, (char *) _result[i], (char *) ptrtype); if (!(stmp = PyString_FromString(ptmp))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static xine_video_port_t ** xine_post_s_video_input_set(struct xine_post_s *obj, xine_video_port_t **val) { { PyErr_Format(PyExc_AttributeError, "%s is read-only", STRINGIFY(obj->video_input)); return 0; } return (xine_video_port_t **) val; } static PyObject *_wrap_xine_post_s_video_input_set(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_video_port_t ** _result; struct xine_post_s * _arg0; xine_video_port_t ** _arg1; char * _argc0 = 0; char * _argc1 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_post_s_video_input_set",&_argc0,&_argc1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_s_video_input_set. Expected _struct_xine_post_s_p."); return NULL; } } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_video_port_t_pp")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_post_s_video_input_set. Expected _xine_video_port_t_pp."); return NULL; } } _result = (xine_video_port_t **)xine_post_s_video_input_set(_arg0,_arg1); { static const char * ptrtype = "_" STRINGIFY(xine_video_port_t ) "_p"; PyObject * stmp; char ptmp[128]; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { SWIG_MakePtr(ptmp, (char *) _result[i], (char *) ptrtype); if (!(stmp = PyString_FromString(ptmp))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } #define xine_post_s_video_input_get(_swigobj) ((xine_video_port_t **) _swigobj->video_input) static PyObject *_wrap_xine_post_s_video_input_get(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_video_port_t ** _result; struct xine_post_s * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_post_s_video_input_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_s_video_input_get. Expected _struct_xine_post_s_p."); return NULL; } } _result = (xine_video_port_t **)xine_post_s_video_input_get(_arg0); { static const char * ptrtype = "_" STRINGIFY(xine_video_port_t ) "_p"; PyObject * stmp; char ptmp[128]; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { SWIG_MakePtr(ptmp, (char *) _result[i], (char *) ptrtype); if (!(stmp = PyString_FromString(ptmp))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } #define xine_post_s_type_set(_swigobj,_swigval) (_swigobj->type = _swigval,_swigval) static PyObject *_wrap_xine_post_s_type_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_post_s * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_post_s_type_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_s_type_set. Expected _struct_xine_post_s_p."); return NULL; } } _result = (int )xine_post_s_type_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_post_s_type_get(_swigobj) ((int ) _swigobj->type) static PyObject *_wrap_xine_post_s_type_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_post_s * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_post_s_type_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_s_type_get. Expected _struct_xine_post_s_p."); return NULL; } } _result = (int )xine_post_s_type_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static STRING xine_post_in_s_name_set(struct xine_post_in_s *obj, STRING val) { { PyErr_Format(PyExc_AttributeError, "%s is read-only", STRINGIFY(obj->name)); return 0; } return (STRING ) val; } static PyObject *_wrap_xine_post_in_s_name_set(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING _result; struct xine_post_in_s * _arg0; STRING _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_post_in_s_name_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_in_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_in_s_name_set. Expected _struct_xine_post_in_s_p."); return NULL; } } _result = (STRING )xine_post_in_s_name_set(_arg0,_arg1); { if (PyErr_Occurred()) return NULL; _resultobj = Py_BuildValue("s", _result); if (!_resultobj) return NULL; } return _resultobj; } #define xine_post_in_s_name_get(_swigobj) ((STRING ) _swigobj->name) static PyObject *_wrap_xine_post_in_s_name_get(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING _result; struct xine_post_in_s * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_post_in_s_name_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_in_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_in_s_name_get. Expected _struct_xine_post_in_s_p."); return NULL; } } _result = (STRING )xine_post_in_s_name_get(_arg0); { if (PyErr_Occurred()) return NULL; _resultobj = Py_BuildValue("s", _result); if (!_resultobj) return NULL; } return _resultobj; } #define xine_post_in_s_type_set(_swigobj,_swigval) (_swigobj->type = _swigval,_swigval) static PyObject *_wrap_xine_post_in_s_type_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_post_in_s * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_post_in_s_type_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_in_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_in_s_type_set. Expected _struct_xine_post_in_s_p."); return NULL; } } _result = (int )xine_post_in_s_type_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_post_in_s_type_get(_swigobj) ((int ) _swigobj->type) static PyObject *_wrap_xine_post_in_s_type_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_post_in_s * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_post_in_s_type_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_in_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_in_s_type_get. Expected _struct_xine_post_in_s_p."); return NULL; } } _result = (int )xine_post_in_s_type_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static STRING xine_post_out_s_name_set(struct xine_post_out_s *obj, STRING val) { { PyErr_Format(PyExc_AttributeError, "%s is read-only", STRINGIFY(obj->name)); return 0; } return (STRING ) val; } static PyObject *_wrap_xine_post_out_s_name_set(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING _result; struct xine_post_out_s * _arg0; STRING _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"ss:xine_post_out_s_name_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_out_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_out_s_name_set. Expected _struct_xine_post_out_s_p."); return NULL; } } _result = (STRING )xine_post_out_s_name_set(_arg0,_arg1); { if (PyErr_Occurred()) return NULL; _resultobj = Py_BuildValue("s", _result); if (!_resultobj) return NULL; } return _resultobj; } #define xine_post_out_s_name_get(_swigobj) ((STRING ) _swigobj->name) static PyObject *_wrap_xine_post_out_s_name_get(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING _result; struct xine_post_out_s * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_post_out_s_name_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_out_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_out_s_name_get. Expected _struct_xine_post_out_s_p."); return NULL; } } _result = (STRING )xine_post_out_s_name_get(_arg0); { if (PyErr_Occurred()) return NULL; _resultobj = Py_BuildValue("s", _result); if (!_resultobj) return NULL; } return _resultobj; } #define xine_post_out_s_type_set(_swigobj,_swigval) (_swigobj->type = _swigval,_swigval) static PyObject *_wrap_xine_post_out_s_type_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_post_out_s * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_post_out_s_type_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_out_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_out_s_type_set. Expected _struct_xine_post_out_s_p."); return NULL; } } _result = (int )xine_post_out_s_type_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_post_out_s_type_get(_swigobj) ((int ) _swigobj->type) static PyObject *_wrap_xine_post_out_s_type_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_post_out_s * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_post_out_s_type_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_xine_post_out_s_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_post_out_s_type_get. Expected _struct_xine_post_out_s_p."); return NULL; } } _result = (int )xine_post_out_s_type_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define x11_rectangle_t_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_x11_rectangle_t_x_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; x11_rectangle_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:x11_rectangle_t_x_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_x11_rectangle_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of x11_rectangle_t_x_set. Expected _x11_rectangle_t_p."); return NULL; } } _result = (int )x11_rectangle_t_x_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define x11_rectangle_t_x_get(_swigobj) ((int ) _swigobj->x) static PyObject *_wrap_x11_rectangle_t_x_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; x11_rectangle_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:x11_rectangle_t_x_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_x11_rectangle_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of x11_rectangle_t_x_get. Expected _x11_rectangle_t_p."); return NULL; } } _result = (int )x11_rectangle_t_x_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define x11_rectangle_t_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) static PyObject *_wrap_x11_rectangle_t_y_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; x11_rectangle_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:x11_rectangle_t_y_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_x11_rectangle_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of x11_rectangle_t_y_set. Expected _x11_rectangle_t_p."); return NULL; } } _result = (int )x11_rectangle_t_y_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define x11_rectangle_t_y_get(_swigobj) ((int ) _swigobj->y) static PyObject *_wrap_x11_rectangle_t_y_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; x11_rectangle_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:x11_rectangle_t_y_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_x11_rectangle_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of x11_rectangle_t_y_get. Expected _x11_rectangle_t_p."); return NULL; } } _result = (int )x11_rectangle_t_y_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define x11_rectangle_t_w_set(_swigobj,_swigval) (_swigobj->w = _swigval,_swigval) static PyObject *_wrap_x11_rectangle_t_w_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; x11_rectangle_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:x11_rectangle_t_w_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_x11_rectangle_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of x11_rectangle_t_w_set. Expected _x11_rectangle_t_p."); return NULL; } } _result = (int )x11_rectangle_t_w_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define x11_rectangle_t_w_get(_swigobj) ((int ) _swigobj->w) static PyObject *_wrap_x11_rectangle_t_w_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; x11_rectangle_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:x11_rectangle_t_w_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_x11_rectangle_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of x11_rectangle_t_w_get. Expected _x11_rectangle_t_p."); return NULL; } } _result = (int )x11_rectangle_t_w_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define x11_rectangle_t_h_set(_swigobj,_swigval) (_swigobj->h = _swigval,_swigval) static PyObject *_wrap_x11_rectangle_t_h_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; x11_rectangle_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:x11_rectangle_t_h_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_x11_rectangle_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of x11_rectangle_t_h_set. Expected _x11_rectangle_t_p."); return NULL; } } _result = (int )x11_rectangle_t_h_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define x11_rectangle_t_h_get(_swigobj) ((int ) _swigobj->h) static PyObject *_wrap_x11_rectangle_t_h_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; x11_rectangle_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:x11_rectangle_t_h_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_x11_rectangle_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of x11_rectangle_t_h_get. Expected _x11_rectangle_t_p."); return NULL; } } _result = (int )x11_rectangle_t_h_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static STRING xine_cfg_entry_s_key_set(struct xine_cfg_entry_s *obj, STRING val) { { PyErr_Format(PyExc_AttributeError, "%s is read-only", STRINGIFY(obj->key)); return 0; } return (STRING ) val; } static PyObject *_wrap_xine_cfg_entry_s_key_set(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING _result; struct xine_cfg_entry_s * _arg0; STRING _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Os:xine_cfg_entry_s_key_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_key_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (STRING )xine_cfg_entry_s_key_set(_arg0,_arg1); { if (PyErr_Occurred()) return NULL; _resultobj = Py_BuildValue("s", _result); if (!_resultobj) return NULL; } return _resultobj; } #define xine_cfg_entry_s_key_get(_swigobj) ((STRING ) _swigobj->key) static PyObject *_wrap_xine_cfg_entry_s_key_get(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_key_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_key_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (STRING )xine_cfg_entry_s_key_get(_arg0); { if (PyErr_Occurred()) return NULL; _resultobj = Py_BuildValue("s", _result); if (!_resultobj) return NULL; } return _resultobj; } #define xine_cfg_entry_s_type_set(_swigobj,_swigval) (_swigobj->type = _swigval,_swigval) static PyObject *_wrap_xine_cfg_entry_s_type_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; int _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Oi:xine_cfg_entry_s_type_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_type_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_type_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_cfg_entry_s_type_get(_swigobj) ((int ) _swigobj->type) static PyObject *_wrap_xine_cfg_entry_s_type_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_type_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_type_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_type_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } static char * xine_cfg_entry_s_unknown_value_set(struct xine_cfg_entry_s *obj, char *val) { if (obj->unknown_value) free(obj->unknown_value); obj->unknown_value = (char *) malloc(strlen(val)+1); strcpy(obj->unknown_value,val); return val; } static PyObject *_wrap_xine_cfg_entry_s_unknown_value_set(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; struct xine_cfg_entry_s * _arg0; char * _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Os:xine_cfg_entry_s_unknown_value_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_unknown_value_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (char *)xine_cfg_entry_s_unknown_value_set(_arg0,_arg1); _resultobj = Py_BuildValue("s", _result); return _resultobj; } #define xine_cfg_entry_s_unknown_value_get(_swigobj) ((char *) _swigobj->unknown_value) static PyObject *_wrap_xine_cfg_entry_s_unknown_value_get(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_unknown_value_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_unknown_value_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (char *)xine_cfg_entry_s_unknown_value_get(_arg0); _resultobj = Py_BuildValue("s", _result); return _resultobj; } static char * xine_cfg_entry_s_str_value_set(struct xine_cfg_entry_s *obj, char *val) { if (obj->str_value) free(obj->str_value); obj->str_value = (char *) malloc(strlen(val)+1); strcpy(obj->str_value,val); return val; } static PyObject *_wrap_xine_cfg_entry_s_str_value_set(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; struct xine_cfg_entry_s * _arg0; char * _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Os:xine_cfg_entry_s_str_value_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_str_value_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (char *)xine_cfg_entry_s_str_value_set(_arg0,_arg1); _resultobj = Py_BuildValue("s", _result); return _resultobj; } #define xine_cfg_entry_s_str_value_get(_swigobj) ((char *) _swigobj->str_value) static PyObject *_wrap_xine_cfg_entry_s_str_value_get(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_str_value_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_str_value_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (char *)xine_cfg_entry_s_str_value_get(_arg0); _resultobj = Py_BuildValue("s", _result); return _resultobj; } static char * xine_cfg_entry_s_str_default_set(struct xine_cfg_entry_s *obj, char *val) { if (obj->str_default) free(obj->str_default); obj->str_default = (char *) malloc(strlen(val)+1); strcpy(obj->str_default,val); return val; } static PyObject *_wrap_xine_cfg_entry_s_str_default_set(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; struct xine_cfg_entry_s * _arg0; char * _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Os:xine_cfg_entry_s_str_default_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_str_default_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (char *)xine_cfg_entry_s_str_default_set(_arg0,_arg1); _resultobj = Py_BuildValue("s", _result); return _resultobj; } #define xine_cfg_entry_s_str_default_get(_swigobj) ((char *) _swigobj->str_default) static PyObject *_wrap_xine_cfg_entry_s_str_default_get(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_str_default_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_str_default_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (char *)xine_cfg_entry_s_str_default_get(_arg0); _resultobj = Py_BuildValue("s", _result); return _resultobj; } static char * xine_cfg_entry_s_str_sticky_set(struct xine_cfg_entry_s *obj, char *val) { if (obj->str_sticky) free(obj->str_sticky); obj->str_sticky = (char *) malloc(strlen(val)+1); strcpy(obj->str_sticky,val); return val; } static PyObject *_wrap_xine_cfg_entry_s_str_sticky_set(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; struct xine_cfg_entry_s * _arg0; char * _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Os:xine_cfg_entry_s_str_sticky_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_str_sticky_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (char *)xine_cfg_entry_s_str_sticky_set(_arg0,_arg1); _resultobj = Py_BuildValue("s", _result); return _resultobj; } #define xine_cfg_entry_s_str_sticky_get(_swigobj) ((char *) _swigobj->str_sticky) static PyObject *_wrap_xine_cfg_entry_s_str_sticky_get(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_str_sticky_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_str_sticky_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (char *)xine_cfg_entry_s_str_sticky_get(_arg0); _resultobj = Py_BuildValue("s", _result); return _resultobj; } #define xine_cfg_entry_s_num_value_set(_swigobj,_swigval) (_swigobj->num_value = _swigval,_swigval) static PyObject *_wrap_xine_cfg_entry_s_num_value_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; int _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Oi:xine_cfg_entry_s_num_value_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_num_value_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_num_value_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_cfg_entry_s_num_value_get(_swigobj) ((int ) _swigobj->num_value) static PyObject *_wrap_xine_cfg_entry_s_num_value_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_num_value_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_num_value_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_num_value_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_cfg_entry_s_num_default_set(_swigobj,_swigval) (_swigobj->num_default = _swigval,_swigval) static PyObject *_wrap_xine_cfg_entry_s_num_default_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; int _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Oi:xine_cfg_entry_s_num_default_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_num_default_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_num_default_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_cfg_entry_s_num_default_get(_swigobj) ((int ) _swigobj->num_default) static PyObject *_wrap_xine_cfg_entry_s_num_default_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_num_default_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_num_default_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_num_default_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_cfg_entry_s_range_min_set(_swigobj,_swigval) (_swigobj->range_min = _swigval,_swigval) static PyObject *_wrap_xine_cfg_entry_s_range_min_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; int _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Oi:xine_cfg_entry_s_range_min_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_range_min_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_range_min_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_cfg_entry_s_range_min_get(_swigobj) ((int ) _swigobj->range_min) static PyObject *_wrap_xine_cfg_entry_s_range_min_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_range_min_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_range_min_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_range_min_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_cfg_entry_s_range_max_set(_swigobj,_swigval) (_swigobj->range_max = _swigval,_swigval) static PyObject *_wrap_xine_cfg_entry_s_range_max_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; int _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Oi:xine_cfg_entry_s_range_max_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_range_max_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_range_max_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_cfg_entry_s_range_max_get(_swigobj) ((int ) _swigobj->range_max) static PyObject *_wrap_xine_cfg_entry_s_range_max_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_range_max_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_range_max_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_range_max_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_cfg_entry_s_enum_values_set(_swigobj,_swigval) (_swigobj->enum_values = _swigval,_swigval) static PyObject *_wrap_xine_cfg_entry_s_enum_values_set(PyObject *self, PyObject *args) { PyObject * _resultobj; char ** _result; struct xine_cfg_entry_s * _arg0; char ** _arg1; PyObject * _obj0 = 0; char * _argc1 = 0; char _ptemp[128]; self = self; if(!PyArg_ParseTuple(args,"Os:xine_cfg_entry_s_enum_values_set",&_obj0,&_argc1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_enum_values_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_char_pp")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_cfg_entry_s_enum_values_set. Expected _char_pp."); return NULL; } } _result = (char **)xine_cfg_entry_s_enum_values_set(_arg0,_arg1); SWIG_MakePtr(_ptemp, (char *) _result,"_char_pp"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } #define xine_cfg_entry_s_enum_values_get(_swigobj) ((char **) _swigobj->enum_values) static PyObject *_wrap_xine_cfg_entry_s_enum_values_get(PyObject *self, PyObject *args) { PyObject * _resultobj; char ** _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_enum_values_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_enum_values_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (char **)xine_cfg_entry_s_enum_values_get(_arg0); { PyObject * stmp; size_t i, len = 0; while (_result[len]) len++; if (!(_resultobj = PyTuple_New(len))) return NULL; for (i = 0; i < len; i++) { if (!(stmp = PyString_FromString(_result[i]))) return NULL; PyTuple_SET_ITEM(_resultobj, i, stmp); } } return _resultobj; } static STRING xine_cfg_entry_s_description_set(struct xine_cfg_entry_s *obj, STRING val) { { PyErr_Format(PyExc_AttributeError, "%s is read-only", STRINGIFY(obj->description)); return 0; } return (STRING ) val; } static PyObject *_wrap_xine_cfg_entry_s_description_set(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING _result; struct xine_cfg_entry_s * _arg0; STRING _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Os:xine_cfg_entry_s_description_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_description_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (STRING )xine_cfg_entry_s_description_set(_arg0,_arg1); { if (PyErr_Occurred()) return NULL; _resultobj = Py_BuildValue("s", _result); if (!_resultobj) return NULL; } return _resultobj; } #define xine_cfg_entry_s_description_get(_swigobj) ((STRING ) _swigobj->description) static PyObject *_wrap_xine_cfg_entry_s_description_get(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_description_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_description_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (STRING )xine_cfg_entry_s_description_get(_arg0); { if (PyErr_Occurred()) return NULL; _resultobj = Py_BuildValue("s", _result); if (!_resultobj) return NULL; } return _resultobj; } static STRING xine_cfg_entry_s_help_set(struct xine_cfg_entry_s *obj, STRING val) { { PyErr_Format(PyExc_AttributeError, "%s is read-only", STRINGIFY(obj->help)); return 0; } return (STRING ) val; } static PyObject *_wrap_xine_cfg_entry_s_help_set(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING _result; struct xine_cfg_entry_s * _arg0; STRING _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Os:xine_cfg_entry_s_help_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_help_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (STRING )xine_cfg_entry_s_help_set(_arg0,_arg1); { if (PyErr_Occurred()) return NULL; _resultobj = Py_BuildValue("s", _result); if (!_resultobj) return NULL; } return _resultobj; } #define xine_cfg_entry_s_help_get(_swigobj) ((STRING ) _swigobj->help) static PyObject *_wrap_xine_cfg_entry_s_help_get(PyObject *self, PyObject *args) { PyObject * _resultobj; STRING _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_help_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_help_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (STRING )xine_cfg_entry_s_help_get(_arg0); { if (PyErr_Occurred()) return NULL; _resultobj = Py_BuildValue("s", _result); if (!_resultobj) return NULL; } return _resultobj; } #define xine_cfg_entry_s_exp_level_set(_swigobj,_swigval) (_swigobj->exp_level = _swigval,_swigval) static PyObject *_wrap_xine_cfg_entry_s_exp_level_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; int _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Oi:xine_cfg_entry_s_exp_level_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_exp_level_set), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_exp_level_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_cfg_entry_s_exp_level_get(_swigobj) ((int ) _swigobj->exp_level) static PyObject *_wrap_xine_cfg_entry_s_exp_level_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; struct xine_cfg_entry_s * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_cfg_entry_s_exp_level_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(struct xine_cfg_entry_s ) #if #BASETYPE(xine_event_t) if (length != sizeof(struct xine_cfg_entry_s ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(struct xine_cfg_entry_s )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_cfg_entry_s_exp_level_get), STRINGIFY(struct xine_cfg_entry_s )); _arg0 = ptr; } _result = (int )xine_cfg_entry_s_exp_level_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_event_t_type_set(_swigobj,_swigval) (_swigobj->type = _swigval,_swigval) static PyObject *_wrap_xine_event_t_type_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_event_t * _arg0; int _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Oi:xine_event_t_type_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_event_t_type_set), STRINGIFY(xine_event_t )); _arg0 = ptr; } _result = (int )xine_event_t_type_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_event_t_type_get(_swigobj) ((int ) _swigobj->type) static PyObject *_wrap_xine_event_t_type_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_event_t * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_event_t_type_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_event_t_type_get), STRINGIFY(xine_event_t )); _arg0 = ptr; } _result = (int )xine_event_t_type_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_event_t_stream_set(_swigobj,_swigval) (_swigobj->stream = _swigval,_swigval) static PyObject *_wrap_xine_event_t_stream_set(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_stream_t * _result; xine_event_t * _arg0; xine_stream_t * _arg1; PyObject * _obj0 = 0; char * _argc1 = 0; char _ptemp[128]; self = self; if(!PyArg_ParseTuple(args,"Os:xine_event_t_stream_set",&_obj0,&_argc1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_event_t_stream_set), STRINGIFY(xine_event_t )); _arg0 = ptr; } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_xine_stream_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_event_t_stream_set. Expected _xine_stream_t_p."); return NULL; } } _result = (xine_stream_t *)xine_event_t_stream_set(_arg0,_arg1); SWIG_MakePtr(_ptemp, (char *) _result,"_xine_stream_t_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } #define xine_event_t_stream_get(_swigobj) ((xine_stream_t *) _swigobj->stream) static PyObject *_wrap_xine_event_t_stream_get(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_stream_t * _result; xine_event_t * _arg0; PyObject * _obj0 = 0; char _ptemp[128]; self = self; if(!PyArg_ParseTuple(args,"O:xine_event_t_stream_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_event_t_stream_get), STRINGIFY(xine_event_t )); _arg0 = ptr; } _result = (xine_stream_t *)xine_event_t_stream_get(_arg0); SWIG_MakePtr(_ptemp, (char *) _result,"_xine_stream_t_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } #define xine_event_t_data_set(_swigobj,_swigval) (_swigobj->data = _swigval,_swigval) static PyObject *_wrap_xine_event_t_data_set(PyObject *self, PyObject *args) { PyObject * _resultobj; void * _result; xine_event_t * _arg0; void * _arg1; PyObject * _obj0 = 0; char * _argc1 = 0; char _ptemp[128]; self = self; if(!PyArg_ParseTuple(args,"Os:xine_event_t_data_set",&_obj0,&_argc1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_event_t_data_set), STRINGIFY(xine_event_t )); _arg0 = ptr; } if (_argc1) { if (SWIG_GetPtr(_argc1,(void **) &_arg1,(char *) 0 )) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of xine_event_t_data_set. Expected _void_p."); return NULL; } } _result = (void *)xine_event_t_data_set(_arg0,_arg1); SWIG_MakePtr(_ptemp, (char *) _result,"_void_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } #define xine_event_t_data_get(_swigobj) ((void *) _swigobj->data) static PyObject *_wrap_xine_event_t_data_get(PyObject *self, PyObject *args) { PyObject * _resultobj; void * _result; xine_event_t * _arg0; PyObject * _obj0 = 0; char _ptemp[128]; self = self; if(!PyArg_ParseTuple(args,"O:xine_event_t_data_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_event_t_data_get), STRINGIFY(xine_event_t )); _arg0 = ptr; } _result = (void *)xine_event_t_data_get(_arg0); SWIG_MakePtr(_ptemp, (char *) _result,"_void_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } #define xine_event_t_data_length_set(_swigobj,_swigval) (_swigobj->data_length = _swigval,_swigval) static PyObject *_wrap_xine_event_t_data_length_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_event_t * _arg0; int _arg1; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"Oi:xine_event_t_data_length_set",&_obj0,&_arg1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_event_t_data_length_set), STRINGIFY(xine_event_t )); _arg0 = ptr; } _result = (int )xine_event_t_data_length_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_event_t_data_length_get(_swigobj) ((int ) _swigobj->data_length) static PyObject *_wrap_xine_event_t_data_length_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_event_t * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_event_t_data_length_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_event_t_data_length_get), STRINGIFY(xine_event_t )); _arg0 = ptr; } _result = (int )xine_event_t_data_length_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_event_t_tv_set(_swigobj,_swigval) (_swigobj->tv = *(_swigval),_swigval) static PyObject *_wrap_xine_event_t_tv_set(PyObject *self, PyObject *args) { PyObject * _resultobj; struct timeval * _result; xine_event_t * _arg0; struct timeval * _arg1; PyObject * _obj0 = 0; struct timeval tmp; PyObject * _obj1 = 0; self = self; if(!PyArg_ParseTuple(args,"OO:xine_event_t_tv_set",&_obj0,&_obj1)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_event_t_tv_set), STRINGIFY(xine_event_t )); _arg0 = ptr; } { double secs; secs = PyFloat_AsDouble(_obj1); tmp.tv_sec = floor(secs); tmp.tv_usec = floor((secs - tmp.tv_sec) * 1e6); _arg1 = &tmp; } _result = (struct timeval *)xine_event_t_tv_set(_arg0,_arg1); { _resultobj = PyFloat_FromDouble(_result->tv_sec + _result->tv_usec / 1e6); } return _resultobj; } #define xine_event_t_tv_get(_swigobj) (&_swigobj->tv) static PyObject *_wrap_xine_event_t_tv_get(PyObject *self, PyObject *args) { PyObject * _resultobj; struct timeval * _result; xine_event_t * _arg0; PyObject * _obj0 = 0; self = self; if(!PyArg_ParseTuple(args,"O:xine_event_t_tv_get",&_obj0)) return NULL; { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj0, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 1, STRINGIFY(xine_event_t_tv_get), STRINGIFY(xine_event_t )); _arg0 = ptr; } _result = (struct timeval *)xine_event_t_tv_get(_arg0); { _resultobj = PyFloat_FromDouble(_result->tv_sec + _result->tv_usec / 1e6); } return _resultobj; } #define xine_input_data_t_event_set(_swigobj,_swigval) (_swigobj->event = *(_swigval),_swigval) static PyObject *_wrap_xine_input_data_t_event_set(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_event_t * _result; xine_input_data_t * _arg0; xine_event_t * _arg1; char * _argc0 = 0; PyObject * _obj1 = 0; self = self; if(!PyArg_ParseTuple(args,"sO:xine_input_data_t_event_set",&_argc0,&_obj1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_input_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_input_data_t_event_set. Expected _xine_input_data_t_p."); return NULL; } } { int length; void * ptr; if (PyObject_AsWriteBuffer(_obj1, (void **)&ptr, &length)) return NULL; #unassert BASETYPE #assert BASETYPE(xine_event_t ) #if #BASETYPE(xine_event_t) if (length != sizeof(xine_event_t ) && length != sizeof(xine_input_data_t)) #else if (length != sizeof(xine_event_t )) #endif #unassert BASETYPE return PyErr_Format(PyExc_TypeError, "arg %d of %s has bad size for %s", 2, STRINGIFY(xine_input_data_t_event_set), STRINGIFY(xine_event_t )); _arg1 = ptr; } _result = (xine_event_t *)xine_input_data_t_event_set(_arg0,_arg1); { if (_result) { _resultobj = PyBuffer_FromReadWriteMemory(_result, sizeof(xine_event_t )); if (!_resultobj) return NULL; } else { Py_INCREF(Py_None); _resultobj = Py_None; } } return _resultobj; } #define xine_input_data_t_event_get(_swigobj) (&_swigobj->event) static PyObject *_wrap_xine_input_data_t_event_get(PyObject *self, PyObject *args) { PyObject * _resultobj; xine_event_t * _result; xine_input_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_input_data_t_event_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_input_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_input_data_t_event_get. Expected _xine_input_data_t_p."); return NULL; } } _result = (xine_event_t *)xine_input_data_t_event_get(_arg0); { if (_result) { _resultobj = PyBuffer_FromReadWriteMemory(_result, sizeof(xine_event_t )); if (!_resultobj) return NULL; } else { Py_INCREF(Py_None); _resultobj = Py_None; } } return _resultobj; } #define xine_input_data_t_button_set(_swigobj,_swigval) (_swigobj->button = _swigval,_swigval) static PyObject *_wrap_xine_input_data_t_button_set(PyObject *self, PyObject *args) { PyObject * _resultobj; uint8_t _result; xine_input_data_t * _arg0; uint8_t _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"sb:xine_input_data_t_button_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_input_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_input_data_t_button_set. Expected _xine_input_data_t_p."); return NULL; } } _result = (uint8_t )xine_input_data_t_button_set(_arg0,_arg1); _resultobj = Py_BuildValue("b",_result); return _resultobj; } #define xine_input_data_t_button_get(_swigobj) ((uint8_t ) _swigobj->button) static PyObject *_wrap_xine_input_data_t_button_get(PyObject *self, PyObject *args) { PyObject * _resultobj; uint8_t _result; xine_input_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_input_data_t_button_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_input_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_input_data_t_button_get. Expected _xine_input_data_t_p."); return NULL; } } _result = (uint8_t )xine_input_data_t_button_get(_arg0); _resultobj = Py_BuildValue("b",_result); return _resultobj; } #define xine_input_data_t_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_xine_input_data_t_x_set(PyObject *self, PyObject *args) { PyObject * _resultobj; uint16_t _result; xine_input_data_t * _arg0; uint16_t _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"sh:xine_input_data_t_x_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_input_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_input_data_t_x_set. Expected _xine_input_data_t_p."); return NULL; } } _result = (uint16_t )xine_input_data_t_x_set(_arg0,_arg1); _resultobj = Py_BuildValue("h",_result); return _resultobj; } #define xine_input_data_t_x_get(_swigobj) ((uint16_t ) _swigobj->x) static PyObject *_wrap_xine_input_data_t_x_get(PyObject *self, PyObject *args) { PyObject * _resultobj; uint16_t _result; xine_input_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_input_data_t_x_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_input_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_input_data_t_x_get. Expected _xine_input_data_t_p."); return NULL; } } _result = (uint16_t )xine_input_data_t_x_get(_arg0); _resultobj = Py_BuildValue("h",_result); return _resultobj; } #define xine_input_data_t_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) static PyObject *_wrap_xine_input_data_t_y_set(PyObject *self, PyObject *args) { PyObject * _resultobj; uint16_t _result; xine_input_data_t * _arg0; uint16_t _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"sh:xine_input_data_t_y_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_input_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_input_data_t_y_set. Expected _xine_input_data_t_p."); return NULL; } } _result = (uint16_t )xine_input_data_t_y_set(_arg0,_arg1); _resultobj = Py_BuildValue("h",_result); return _resultobj; } #define xine_input_data_t_y_get(_swigobj) ((uint16_t ) _swigobj->y) static PyObject *_wrap_xine_input_data_t_y_get(PyObject *self, PyObject *args) { PyObject * _resultobj; uint16_t _result; xine_input_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_input_data_t_y_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_input_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_input_data_t_y_get. Expected _xine_input_data_t_p."); return NULL; } } _result = (uint16_t )xine_input_data_t_y_get(_arg0); _resultobj = Py_BuildValue("h",_result); return _resultobj; } #define xine_ui_data_t_num_buttons_set(_swigobj,_swigval) (_swigobj->num_buttons = _swigval,_swigval) static PyObject *_wrap_xine_ui_data_t_num_buttons_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_ui_data_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_ui_data_t_num_buttons_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_ui_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_ui_data_t_num_buttons_set. Expected _xine_ui_data_t_p."); return NULL; } } _result = (int )xine_ui_data_t_num_buttons_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_ui_data_t_num_buttons_get(_swigobj) ((int ) _swigobj->num_buttons) static PyObject *_wrap_xine_ui_data_t_num_buttons_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_ui_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_ui_data_t_num_buttons_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_ui_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_ui_data_t_num_buttons_get. Expected _xine_ui_data_t_p."); return NULL; } } _result = (int )xine_ui_data_t_num_buttons_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_ui_data_t_str_len_set(_swigobj,_swigval) (_swigobj->str_len = _swigval,_swigval) static PyObject *_wrap_xine_ui_data_t_str_len_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_ui_data_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_ui_data_t_str_len_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_ui_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_ui_data_t_str_len_set. Expected _xine_ui_data_t_p."); return NULL; } } _result = (int )xine_ui_data_t_str_len_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_ui_data_t_str_len_get(_swigobj) ((int ) _swigobj->str_len) static PyObject *_wrap_xine_ui_data_t_str_len_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_ui_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_ui_data_t_str_len_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_ui_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_ui_data_t_str_len_get. Expected _xine_ui_data_t_p."); return NULL; } } _result = (int )xine_ui_data_t_str_len_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_ui_data_t_str_get(_swigobj) ((char *) _swigobj->str) static PyObject *_wrap_xine_ui_data_t_str_get(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; xine_ui_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_ui_data_t_str_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_ui_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_ui_data_t_str_get. Expected _xine_ui_data_t_p."); return NULL; } } _result = (char *)xine_ui_data_t_str_get(_arg0); _resultobj = Py_BuildValue("s", _result); return _resultobj; } #define xine_format_change_data_t_width_set(_swigobj,_swigval) (_swigobj->width = _swigval,_swigval) static PyObject *_wrap_xine_format_change_data_t_width_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_format_change_data_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_format_change_data_t_width_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_format_change_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_format_change_data_t_width_set. Expected _xine_format_change_data_t_p."); return NULL; } } _result = (int )xine_format_change_data_t_width_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_format_change_data_t_width_get(_swigobj) ((int ) _swigobj->width) static PyObject *_wrap_xine_format_change_data_t_width_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_format_change_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_format_change_data_t_width_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_format_change_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_format_change_data_t_width_get. Expected _xine_format_change_data_t_p."); return NULL; } } _result = (int )xine_format_change_data_t_width_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_format_change_data_t_height_set(_swigobj,_swigval) (_swigobj->height = _swigval,_swigval) static PyObject *_wrap_xine_format_change_data_t_height_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_format_change_data_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_format_change_data_t_height_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_format_change_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_format_change_data_t_height_set. Expected _xine_format_change_data_t_p."); return NULL; } } _result = (int )xine_format_change_data_t_height_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_format_change_data_t_height_get(_swigobj) ((int ) _swigobj->height) static PyObject *_wrap_xine_format_change_data_t_height_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_format_change_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_format_change_data_t_height_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_format_change_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_format_change_data_t_height_get. Expected _xine_format_change_data_t_p."); return NULL; } } _result = (int )xine_format_change_data_t_height_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_format_change_data_t_aspect_set(_swigobj,_swigval) (_swigobj->aspect = _swigval,_swigval) static PyObject *_wrap_xine_format_change_data_t_aspect_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_format_change_data_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_format_change_data_t_aspect_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_format_change_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_format_change_data_t_aspect_set. Expected _xine_format_change_data_t_p."); return NULL; } } _result = (int )xine_format_change_data_t_aspect_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_format_change_data_t_aspect_get(_swigobj) ((int ) _swigobj->aspect) static PyObject *_wrap_xine_format_change_data_t_aspect_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_format_change_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_format_change_data_t_aspect_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_format_change_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_format_change_data_t_aspect_get. Expected _xine_format_change_data_t_p."); return NULL; } } _result = (int )xine_format_change_data_t_aspect_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_audio_level_data_t_left_set(_swigobj,_swigval) (_swigobj->left = _swigval,_swigval) static PyObject *_wrap_xine_audio_level_data_t_left_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_audio_level_data_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_audio_level_data_t_left_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_audio_level_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_audio_level_data_t_left_set. Expected _xine_audio_level_data_t_p."); return NULL; } } _result = (int )xine_audio_level_data_t_left_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_audio_level_data_t_left_get(_swigobj) ((int ) _swigobj->left) static PyObject *_wrap_xine_audio_level_data_t_left_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_audio_level_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_audio_level_data_t_left_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_audio_level_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_audio_level_data_t_left_get. Expected _xine_audio_level_data_t_p."); return NULL; } } _result = (int )xine_audio_level_data_t_left_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_audio_level_data_t_right_set(_swigobj,_swigval) (_swigobj->right = _swigval,_swigval) static PyObject *_wrap_xine_audio_level_data_t_right_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_audio_level_data_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_audio_level_data_t_right_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_audio_level_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_audio_level_data_t_right_set. Expected _xine_audio_level_data_t_p."); return NULL; } } _result = (int )xine_audio_level_data_t_right_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_audio_level_data_t_right_get(_swigobj) ((int ) _swigobj->right) static PyObject *_wrap_xine_audio_level_data_t_right_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_audio_level_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_audio_level_data_t_right_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_audio_level_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_audio_level_data_t_right_get. Expected _xine_audio_level_data_t_p."); return NULL; } } _result = (int )xine_audio_level_data_t_right_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_progress_data_t_percent_set(_swigobj,_swigval) (_swigobj->percent = _swigval,_swigval) static PyObject *_wrap_xine_progress_data_t_percent_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_progress_data_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_progress_data_t_percent_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_progress_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_progress_data_t_percent_set. Expected _xine_progress_data_t_p."); return NULL; } } _result = (int )xine_progress_data_t_percent_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_progress_data_t_percent_get(_swigobj) ((int ) _swigobj->percent) static PyObject *_wrap_xine_progress_data_t_percent_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_progress_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_progress_data_t_percent_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_progress_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_progress_data_t_percent_get. Expected _xine_progress_data_t_p."); return NULL; } } _result = (int )xine_progress_data_t_percent_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_mrl_reference_data_t_alternative_set(_swigobj,_swigval) (_swigobj->alternative = _swigval,_swigval) static PyObject *_wrap_xine_mrl_reference_data_t_alternative_set(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_mrl_reference_data_t * _arg0; int _arg1; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"si:xine_mrl_reference_data_t_alternative_set",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_mrl_reference_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_mrl_reference_data_t_alternative_set. Expected _xine_mrl_reference_data_t_p."); return NULL; } } _result = (int )xine_mrl_reference_data_t_alternative_set(_arg0,_arg1); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_mrl_reference_data_t_alternative_get(_swigobj) ((int ) _swigobj->alternative) static PyObject *_wrap_xine_mrl_reference_data_t_alternative_get(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; xine_mrl_reference_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_mrl_reference_data_t_alternative_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_mrl_reference_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_mrl_reference_data_t_alternative_get. Expected _xine_mrl_reference_data_t_p."); return NULL; } } _result = (int )xine_mrl_reference_data_t_alternative_get(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define xine_mrl_reference_data_t_mrl_get(_swigobj) ((char *) _swigobj->mrl) static PyObject *_wrap_xine_mrl_reference_data_t_mrl_get(PyObject *self, PyObject *args) { PyObject * _resultobj; char * _result; xine_mrl_reference_data_t * _arg0; char * _argc0 = 0; self = self; if(!PyArg_ParseTuple(args,"s:xine_mrl_reference_data_t_mrl_get",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_xine_mrl_reference_data_t_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of xine_mrl_reference_data_t_mrl_get. Expected _xine_mrl_reference_data_t_p."); return NULL; } } _result = (char *)xine_mrl_reference_data_t_mrl_get(_arg0); _resultobj = Py_BuildValue("s", _result); return _resultobj; } static PyMethodDef libxineMethods[] = { { "xine_mrl_reference_data_t_mrl_get", _wrap_xine_mrl_reference_data_t_mrl_get, 1 }, { "xine_mrl_reference_data_t_alternative_get", _wrap_xine_mrl_reference_data_t_alternative_get, 1 }, { "xine_mrl_reference_data_t_alternative_set", _wrap_xine_mrl_reference_data_t_alternative_set, 1 }, { "xine_progress_data_t_percent_get", _wrap_xine_progress_data_t_percent_get, 1 }, { "xine_progress_data_t_percent_set", _wrap_xine_progress_data_t_percent_set, 1 }, { "xine_audio_level_data_t_right_get", _wrap_xine_audio_level_data_t_right_get, 1 }, { "xine_audio_level_data_t_right_set", _wrap_xine_audio_level_data_t_right_set, 1 }, { "xine_audio_level_data_t_left_get", _wrap_xine_audio_level_data_t_left_get, 1 }, { "xine_audio_level_data_t_left_set", _wrap_xine_audio_level_data_t_left_set, 1 }, { "xine_format_change_data_t_aspect_get", _wrap_xine_format_change_data_t_aspect_get, 1 }, { "xine_format_change_data_t_aspect_set", _wrap_xine_format_change_data_t_aspect_set, 1 }, { "xine_format_change_data_t_height_get", _wrap_xine_format_change_data_t_height_get, 1 }, { "xine_format_change_data_t_height_set", _wrap_xine_format_change_data_t_height_set, 1 }, { "xine_format_change_data_t_width_get", _wrap_xine_format_change_data_t_width_get, 1 }, { "xine_format_change_data_t_width_set", _wrap_xine_format_change_data_t_width_set, 1 }, { "xine_ui_data_t_str_get", _wrap_xine_ui_data_t_str_get, 1 }, { "xine_ui_data_t_str_len_get", _wrap_xine_ui_data_t_str_len_get, 1 }, { "xine_ui_data_t_str_len_set", _wrap_xine_ui_data_t_str_len_set, 1 }, { "xine_ui_data_t_num_buttons_get", _wrap_xine_ui_data_t_num_buttons_get, 1 }, { "xine_ui_data_t_num_buttons_set", _wrap_xine_ui_data_t_num_buttons_set, 1 }, { "xine_input_data_t_y_get", _wrap_xine_input_data_t_y_get, 1 }, { "xine_input_data_t_y_set", _wrap_xine_input_data_t_y_set, 1 }, { "xine_input_data_t_x_get", _wrap_xine_input_data_t_x_get, 1 }, { "xine_input_data_t_x_set", _wrap_xine_input_data_t_x_set, 1 }, { "xine_input_data_t_button_get", _wrap_xine_input_data_t_button_get, 1 }, { "xine_input_data_t_button_set", _wrap_xine_input_data_t_button_set, 1 }, { "xine_input_data_t_event_get", _wrap_xine_input_data_t_event_get, 1 }, { "xine_input_data_t_event_set", _wrap_xine_input_data_t_event_set, 1 }, { "xine_event_t_tv_get", _wrap_xine_event_t_tv_get, 1 }, { "xine_event_t_tv_set", _wrap_xine_event_t_tv_set, 1 }, { "xine_event_t_data_length_get", _wrap_xine_event_t_data_length_get, 1 }, { "xine_event_t_data_length_set", _wrap_xine_event_t_data_length_set, 1 }, { "xine_event_t_data_get", _wrap_xine_event_t_data_get, 1 }, { "xine_event_t_data_set", _wrap_xine_event_t_data_set, 1 }, { "xine_event_t_stream_get", _wrap_xine_event_t_stream_get, 1 }, { "xine_event_t_stream_set", _wrap_xine_event_t_stream_set, 1 }, { "xine_event_t_type_get", _wrap_xine_event_t_type_get, 1 }, { "xine_event_t_type_set", _wrap_xine_event_t_type_set, 1 }, { "xine_cfg_entry_s_exp_level_get", _wrap_xine_cfg_entry_s_exp_level_get, 1 }, { "xine_cfg_entry_s_exp_level_set", _wrap_xine_cfg_entry_s_exp_level_set, 1 }, { "xine_cfg_entry_s_help_get", _wrap_xine_cfg_entry_s_help_get, 1 }, { "xine_cfg_entry_s_help_set", _wrap_xine_cfg_entry_s_help_set, 1 }, { "xine_cfg_entry_s_description_get", _wrap_xine_cfg_entry_s_description_get, 1 }, { "xine_cfg_entry_s_description_set", _wrap_xine_cfg_entry_s_description_set, 1 }, { "xine_cfg_entry_s_enum_values_get", _wrap_xine_cfg_entry_s_enum_values_get, 1 }, { "xine_cfg_entry_s_enum_values_set", _wrap_xine_cfg_entry_s_enum_values_set, 1 }, { "xine_cfg_entry_s_range_max_get", _wrap_xine_cfg_entry_s_range_max_get, 1 }, { "xine_cfg_entry_s_range_max_set", _wrap_xine_cfg_entry_s_range_max_set, 1 }, { "xine_cfg_entry_s_range_min_get", _wrap_xine_cfg_entry_s_range_min_get, 1 }, { "xine_cfg_entry_s_range_min_set", _wrap_xine_cfg_entry_s_range_min_set, 1 }, { "xine_cfg_entry_s_num_default_get", _wrap_xine_cfg_entry_s_num_default_get, 1 }, { "xine_cfg_entry_s_num_default_set", _wrap_xine_cfg_entry_s_num_default_set, 1 }, { "xine_cfg_entry_s_num_value_get", _wrap_xine_cfg_entry_s_num_value_get, 1 }, { "xine_cfg_entry_s_num_value_set", _wrap_xine_cfg_entry_s_num_value_set, 1 }, { "xine_cfg_entry_s_str_sticky_get", _wrap_xine_cfg_entry_s_str_sticky_get, 1 }, { "xine_cfg_entry_s_str_sticky_set", _wrap_xine_cfg_entry_s_str_sticky_set, 1 }, { "xine_cfg_entry_s_str_default_get", _wrap_xine_cfg_entry_s_str_default_get, 1 }, { "xine_cfg_entry_s_str_default_set", _wrap_xine_cfg_entry_s_str_default_set, 1 }, { "xine_cfg_entry_s_str_value_get", _wrap_xine_cfg_entry_s_str_value_get, 1 }, { "xine_cfg_entry_s_str_value_set", _wrap_xine_cfg_entry_s_str_value_set, 1 }, { "xine_cfg_entry_s_unknown_value_get", _wrap_xine_cfg_entry_s_unknown_value_get, 1 }, { "xine_cfg_entry_s_unknown_value_set", _wrap_xine_cfg_entry_s_unknown_value_set, 1 }, { "xine_cfg_entry_s_type_get", _wrap_xine_cfg_entry_s_type_get, 1 }, { "xine_cfg_entry_s_type_set", _wrap_xine_cfg_entry_s_type_set, 1 }, { "xine_cfg_entry_s_key_get", _wrap_xine_cfg_entry_s_key_get, 1 }, { "xine_cfg_entry_s_key_set", _wrap_xine_cfg_entry_s_key_set, 1 }, { "x11_rectangle_t_h_get", _wrap_x11_rectangle_t_h_get, 1 }, { "x11_rectangle_t_h_set", _wrap_x11_rectangle_t_h_set, 1 }, { "x11_rectangle_t_w_get", _wrap_x11_rectangle_t_w_get, 1 }, { "x11_rectangle_t_w_set", _wrap_x11_rectangle_t_w_set, 1 }, { "x11_rectangle_t_y_get", _wrap_x11_rectangle_t_y_get, 1 }, { "x11_rectangle_t_y_set", _wrap_x11_rectangle_t_y_set, 1 }, { "x11_rectangle_t_x_get", _wrap_x11_rectangle_t_x_get, 1 }, { "x11_rectangle_t_x_set", _wrap_x11_rectangle_t_x_set, 1 }, { "xine_post_out_s_type_get", _wrap_xine_post_out_s_type_get, 1 }, { "xine_post_out_s_type_set", _wrap_xine_post_out_s_type_set, 1 }, { "xine_post_out_s_name_get", _wrap_xine_post_out_s_name_get, 1 }, { "xine_post_out_s_name_set", _wrap_xine_post_out_s_name_set, 1 }, { "xine_post_in_s_type_get", _wrap_xine_post_in_s_type_get, 1 }, { "xine_post_in_s_type_set", _wrap_xine_post_in_s_type_set, 1 }, { "xine_post_in_s_name_get", _wrap_xine_post_in_s_name_get, 1 }, { "xine_post_in_s_name_set", _wrap_xine_post_in_s_name_set, 1 }, { "xine_post_s_type_get", _wrap_xine_post_s_type_get, 1 }, { "xine_post_s_type_set", _wrap_xine_post_s_type_set, 1 }, { "xine_post_s_video_input_get", _wrap_xine_post_s_video_input_get, 1 }, { "xine_post_s_video_input_set", _wrap_xine_post_s_video_input_set, 1 }, { "xine_post_s_audio_input_get", _wrap_xine_post_s_audio_input_get, 1 }, { "xine_post_s_audio_input_set", _wrap_xine_post_s_audio_input_set, 1 }, { "xine_osd_get_palette", _wrap_xine_osd_get_palette, 1 }, { "xine_osd_set_text_palette", _wrap_xine_osd_set_text_palette, 1 }, { "xine_osd_set_palette", _wrap_xine_osd_set_palette, 1 }, { "xine_osd_free", _wrap_xine_osd_free, 1 }, { "xine_osd_clear", _wrap_xine_osd_clear, 1 }, { "xine_osd_hide", _wrap_xine_osd_hide, 1 }, { "xine_osd_show", _wrap_xine_osd_show, 1 }, { "xine_osd_set_position", _wrap_xine_osd_set_position, 1 }, { "xine_osd_set_font", _wrap_xine_osd_set_font, 1 }, { "xine_osd_get_text_size", _wrap_xine_osd_get_text_size, 1 }, { "xine_osd_draw_text", _wrap_xine_osd_draw_text, 1 }, { "xine_osd_draw_rect", _wrap_xine_osd_draw_rect, 1 }, { "xine_osd_draw_line", _wrap_xine_osd_draw_line, 1 }, { "xine_osd_draw_point", _wrap_xine_osd_draw_point, 1 }, { "xine_osd_new", _wrap_xine_osd_new, 1 }, { "xine_event_send", _wrap_xine_event_send, 1 }, { "xine_event_create_listener_thread", _wrap_xine_event_create_listener_thread, 1 }, { "xine_event_free", _wrap_xine_event_free, 1 }, { "xine_event_wait", _wrap_xine_event_wait, 1 }, { "xine_event_get", _wrap_xine_event_get, 1 }, { "xine_event_dispose_queue", _wrap_xine_event_dispose_queue, 1 }, { "xine_event_new_queue", _wrap_xine_event_new_queue, 1 }, { "xine_config_reset", _wrap_xine_config_reset, 1 }, { "xine_config_save", _wrap_xine_config_save, 1 }, { "xine_config_load", _wrap_xine_config_load, 1 }, { "xine_config_update_entry", _wrap_xine_config_update_entry, 1 }, { "xine_config_lookup_entry", _wrap_xine_config_lookup_entry, 1 }, { "xine_config_get_next_entry", _wrap_xine_config_get_next_entry, 1 }, { "xine_config_get_first_entry", _wrap_xine_config_get_first_entry, 1 }, { "xine_config_register_bool", _wrap_xine_config_register_bool, 1 }, { "xine_config_register_num", _wrap_xine_config_register_num, 1 }, { "xine_config_register_enum", _wrap_xine_config_register_enum, 1 }, { "xine_config_register_range", _wrap_xine_config_register_range, 1 }, { "xine_config_register_string", _wrap_xine_config_register_string, 1 }, { "xine_gui_send_vo_data", _wrap_xine_gui_send_vo_data, 1 }, { "xine_list_video_output_plugins", _wrap_xine_list_video_output_plugins, 1 }, { "xine_list_audio_output_plugins", _wrap_xine_list_audio_output_plugins, 1 }, { "xine_get_input_plugin_description", _wrap_xine_get_input_plugin_description, 1 }, { "xine_get_demux_for_mime_type", _wrap_xine_get_demux_for_mime_type, 1 }, { "xine_get_mime_types", _wrap_xine_get_mime_types, 1 }, { "xine_get_file_extensions", _wrap_xine_get_file_extensions, 1 }, { "xine_get_autoplay_mrls", _wrap_xine_get_autoplay_mrls, 1 }, { "xine_get_autoplay_input_plugin_ids", _wrap_xine_get_autoplay_input_plugin_ids, 1 }, { "xine_get_browse_mrls", _wrap_xine_get_browse_mrls, 1 }, { "xine_get_browsable_input_plugin_ids", _wrap_xine_get_browsable_input_plugin_ids, 1 }, { "xine_get_meta_info", _wrap_xine_get_meta_info, 1 }, { "xine_get_stream_info", _wrap_xine_get_stream_info, 1 }, { "xine_get_pos_length", _wrap_xine_get_pos_length, 1 }, { "xine_get_spu_lang", _wrap_xine_get_spu_lang, 1 }, { "xine_get_audio_lang", _wrap_xine_get_audio_lang, 1 }, { "xine_get_status", _wrap_xine_get_status, 1 }, { "xine_get_error", _wrap_xine_get_error, 1 }, { "xine_register_log_cb", _wrap_xine_register_log_cb, 1 }, { "xine_get_log", _wrap_xine_get_log, 1 }, { "xine_log", _wrap_xine_log, 1 }, { "xine_get_log_names", _wrap_xine_get_log_names, 1 }, { "xine_get_log_section_count", _wrap_xine_get_log_section_count, 1 }, { "xine_post_dispose", _wrap_xine_post_dispose, 1 }, { "xine_get_audio_source", _wrap_xine_get_audio_source, 1 }, { "xine_get_video_source", _wrap_xine_get_video_source, 1 }, { "xine_post_wire_audio_port", _wrap_xine_post_wire_audio_port, 1 }, { "xine_post_wire_video_port", _wrap_xine_post_wire_video_port, 1 }, { "xine_post_wire", _wrap_xine_post_wire, 1 }, { "xine_post_output", _wrap_xine_post_output, 1 }, { "xine_post_input", _wrap_xine_post_input, 1 }, { "xine_post_list_outputs", _wrap_xine_post_list_outputs, 1 }, { "xine_post_list_inputs", _wrap_xine_post_list_inputs, 1 }, { "xine_list_post_plugins_typed", _wrap_xine_list_post_plugins_typed, 1 }, { "xine_list_post_plugins", _wrap_xine_list_post_plugins, 1 }, { "xine_post_init", _wrap_xine_post_init, 1 }, { "xine_get_param", _wrap_xine_get_param, 1 }, { "xine_set_param", _wrap_xine_set_param, 1 }, { "xine_dispose", _wrap_xine_dispose, 1 }, { "xine_eject", _wrap_xine_eject, 1 }, { "xine_close", _wrap_xine_close, 1 }, { "xine_stop", _wrap_xine_stop, 1 }, { "xine_trick_mode", _wrap_xine_trick_mode, 1 }, { "xine_play", _wrap_xine_play, 1 }, { "xine_open", _wrap_xine_open, 1 }, { "xine_stream_master_slave", _wrap_xine_stream_master_slave, 1 }, { "xine_stream_new", _wrap_xine_stream_new, 1 }, { "xine_exit", _wrap_xine_exit, 1 }, { "xine_close_video_driver", _wrap_xine_close_video_driver, 1 }, { "xine_close_audio_driver", _wrap_xine_close_audio_driver, 1 }, { "xine_open_video_driver", _wrap_xine_open_video_driver, 1 }, { "xine_open_audio_driver", _wrap_xine_open_audio_driver, 1 }, { "xine_init", _wrap_xine_init, 1 }, { "xine_new", _wrap_xine_new, 1 }, { "xine_check_version", _wrap_xine_check_version, 1 }, { "xine_get_version", _wrap_xine_get_version, 1 }, { "xine_get_version_string", _wrap_xine_get_version_string, 1 }, { "px_make_input_event", _wrap_px_make_input_event, 1 }, { NULL, NULL } }; static PyObject *SWIG_globals; #ifdef __cplusplus extern "C" #endif SWIGEXPORT(void,initlibxine)() { PyObject *m, *d; SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("libxine", libxineMethods); d = PyModule_GetDict(m); init_statics(); PyDict_SetItemString(d,"XINE_IMGFMT_YV12", PyInt_FromLong((long) (int)_XINE_IMGFMT_YV12)); PyDict_SetItemString(d,"XINE_IMGFMT_YUY2", PyInt_FromLong((long) (int)_XINE_IMGFMT_YUY2)); PyDict_SetItemString(d,"XINE_MAJOR_VERSION", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_MINOR_VERSION", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_SUB_VERSION", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_VERSION", PyString_FromString("1-beta4")); PyDict_SetItemString(d,"XINE_VISUAL_TYPE_NONE", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_VISUAL_TYPE_X11", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_VISUAL_TYPE_AA", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_VISUAL_TYPE_FB", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_VISUAL_TYPE_GTK", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_VISUAL_TYPE_DFB", PyInt_FromLong((long) 5)); PyDict_SetItemString(d,"XINE_VISUAL_TYPE_PM", PyInt_FromLong((long) 6)); PyDict_SetItemString(d,"XINE_MASTER_SLAVE_PLAY", PyInt_FromLong((long) (1<<0))); PyDict_SetItemString(d,"XINE_MASTER_SLAVE_STOP", PyInt_FromLong((long) (1<<1))); PyDict_SetItemString(d,"XINE_TRICK_MODE_OFF", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_TRICK_MODE_SEEK_TO_POSITION", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_TRICK_MODE_SEEK_TO_TIME", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_TRICK_MODE_FAST_FORWARD", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_TRICK_MODE_FAST_REWIND", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_PARAM_SPEED", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_PARAM_AV_OFFSET", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_PARAM_AUDIO_CHANNEL_LOGICAL", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_PARAM_SPU_CHANNEL", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_PARAM_VIDEO_CHANNEL", PyInt_FromLong((long) 5)); PyDict_SetItemString(d,"XINE_PARAM_AUDIO_VOLUME", PyInt_FromLong((long) 6)); PyDict_SetItemString(d,"XINE_PARAM_AUDIO_MUTE", PyInt_FromLong((long) 7)); PyDict_SetItemString(d,"XINE_PARAM_AUDIO_COMPR_LEVEL", PyInt_FromLong((long) 8)); PyDict_SetItemString(d,"XINE_PARAM_AUDIO_AMP_LEVEL", PyInt_FromLong((long) 9)); PyDict_SetItemString(d,"XINE_PARAM_AUDIO_REPORT_LEVEL", PyInt_FromLong((long) 10)); PyDict_SetItemString(d,"XINE_PARAM_VERBOSITY", PyInt_FromLong((long) 11)); PyDict_SetItemString(d,"XINE_PARAM_SPU_OFFSET", PyInt_FromLong((long) 12)); PyDict_SetItemString(d,"XINE_SPEED_PAUSE", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_SPEED_SLOW_4", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_SPEED_SLOW_2", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_SPEED_NORMAL", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_SPEED_FAST_2", PyInt_FromLong((long) 8)); PyDict_SetItemString(d,"XINE_SPEED_FAST_4", PyInt_FromLong((long) 16)); PyDict_SetItemString(d,"XINE_PARAM_VO_DEINTERLACE", PyInt_FromLong((long) 0x01000000)); PyDict_SetItemString(d,"XINE_PARAM_VO_ASPECT_RATIO", PyInt_FromLong((long) 0x01000001)); PyDict_SetItemString(d,"XINE_PARAM_VO_HUE", PyInt_FromLong((long) 0x01000002)); PyDict_SetItemString(d,"XINE_PARAM_VO_SATURATION", PyInt_FromLong((long) 0x01000003)); PyDict_SetItemString(d,"XINE_PARAM_VO_CONTRAST", PyInt_FromLong((long) 0x01000004)); PyDict_SetItemString(d,"XINE_PARAM_VO_BRIGHTNESS", PyInt_FromLong((long) 0x01000005)); PyDict_SetItemString(d,"XINE_PARAM_VO_ZOOM_X", PyInt_FromLong((long) 0x01000008)); PyDict_SetItemString(d,"XINE_PARAM_VO_ZOOM_Y", PyInt_FromLong((long) 0x0100000d)); PyDict_SetItemString(d,"XINE_PARAM_VO_PAN_SCAN", PyInt_FromLong((long) 0x01000009)); PyDict_SetItemString(d,"XINE_PARAM_VO_TVMODE", PyInt_FromLong((long) 0x0100000a)); PyDict_SetItemString(d,"XINE_VO_ZOOM_STEP", PyInt_FromLong((long) 100)); PyDict_SetItemString(d,"XINE_VO_ZOOM_MAX", PyInt_FromLong((long) 400)); PyDict_SetItemString(d,"XINE_VO_ZOOM_MIN", PyInt_FromLong((long) -85)); PyDict_SetItemString(d,"XINE_VO_ASPECT_AUTO", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_VO_ASPECT_SQUARE", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_VO_ASPECT_4_3", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_VO_ASPECT_ANAMORPHIC", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_VO_ASPECT_DVB", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_VO_ASPECT_NUM_RATIOS", PyInt_FromLong((long) 5)); PyDict_SetItemString(d,"XINE_VO_ASPECT_PAN_SCAN", PyInt_FromLong((long) 41)); PyDict_SetItemString(d,"XINE_VO_ASPECT_DONT_TOUCH", PyInt_FromLong((long) 42)); PyDict_SetItemString(d,"XINE_DEMUX_DEFAULT_STRATEGY", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_DEMUX_REVERT_STRATEGY", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_DEMUX_CONTENT_STRATEGY", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_DEMUX_EXTENSION_STRATEGY", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_POST_TYPE_VIDEO_FILTER", PyInt_FromLong((long) 0x010000)); PyDict_SetItemString(d,"XINE_POST_TYPE_VIDEO_VISUALIZATION", PyInt_FromLong((long) 0x010001)); PyDict_SetItemString(d,"XINE_POST_TYPE_AUDIO_FILTER", PyInt_FromLong((long) 0x020000)); PyDict_SetItemString(d,"XINE_POST_TYPE_AUDIO_VISUALIZATION", PyInt_FromLong((long) 0x020001)); PyDict_SetItemString(d,"XINE_POST_DATA_VIDEO", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_POST_DATA_AUDIO", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_POST_DATA_INT", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_POST_DATA_DOUBLE", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_STATUS_IDLE", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_STATUS_STOP", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_STATUS_PLAY", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_STATUS_QUIT", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_ERROR_NONE", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_ERROR_NO_INPUT_PLUGIN", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_ERROR_NO_DEMUX_PLUGIN", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_ERROR_DEMUX_FAILED", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_ERROR_MALFORMED_MRL", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_STREAM_INFO_BITRATE", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_STREAM_INFO_SEEKABLE", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_STREAM_INFO_VIDEO_WIDTH", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_STREAM_INFO_VIDEO_HEIGHT", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_STREAM_INFO_VIDEO_RATIO", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_STREAM_INFO_VIDEO_CHANNELS", PyInt_FromLong((long) 5)); PyDict_SetItemString(d,"XINE_STREAM_INFO_VIDEO_STREAMS", PyInt_FromLong((long) 6)); PyDict_SetItemString(d,"XINE_STREAM_INFO_VIDEO_BITRATE", PyInt_FromLong((long) 7)); PyDict_SetItemString(d,"XINE_STREAM_INFO_VIDEO_FOURCC", PyInt_FromLong((long) 8)); PyDict_SetItemString(d,"XINE_STREAM_INFO_VIDEO_HANDLED", PyInt_FromLong((long) 9)); PyDict_SetItemString(d,"XINE_STREAM_INFO_FRAME_DURATION", PyInt_FromLong((long) 10)); PyDict_SetItemString(d,"XINE_STREAM_INFO_AUDIO_CHANNELS", PyInt_FromLong((long) 11)); PyDict_SetItemString(d,"XINE_STREAM_INFO_AUDIO_BITS", PyInt_FromLong((long) 12)); PyDict_SetItemString(d,"XINE_STREAM_INFO_AUDIO_SAMPLERATE", PyInt_FromLong((long) 13)); PyDict_SetItemString(d,"XINE_STREAM_INFO_AUDIO_BITRATE", PyInt_FromLong((long) 14)); PyDict_SetItemString(d,"XINE_STREAM_INFO_AUDIO_FOURCC", PyInt_FromLong((long) 15)); PyDict_SetItemString(d,"XINE_STREAM_INFO_AUDIO_HANDLED", PyInt_FromLong((long) 16)); PyDict_SetItemString(d,"XINE_STREAM_INFO_HAS_CHAPTERS", PyInt_FromLong((long) 17)); PyDict_SetItemString(d,"XINE_STREAM_INFO_HAS_VIDEO", PyInt_FromLong((long) 18)); PyDict_SetItemString(d,"XINE_STREAM_INFO_HAS_AUDIO", PyInt_FromLong((long) 19)); PyDict_SetItemString(d,"XINE_STREAM_INFO_IGNORE_VIDEO", PyInt_FromLong((long) 20)); PyDict_SetItemString(d,"XINE_STREAM_INFO_IGNORE_AUDIO", PyInt_FromLong((long) 21)); PyDict_SetItemString(d,"XINE_STREAM_INFO_IGNORE_SPU", PyInt_FromLong((long) 22)); PyDict_SetItemString(d,"XINE_STREAM_INFO_VIDEO_HAS_STILL", PyInt_FromLong((long) 23)); PyDict_SetItemString(d,"XINE_STREAM_INFO_MAX_AUDIO_CHANNEL", PyInt_FromLong((long) 24)); PyDict_SetItemString(d,"XINE_STREAM_INFO_MAX_SPU_CHANNEL", PyInt_FromLong((long) 25)); PyDict_SetItemString(d,"XINE_META_INFO_TITLE", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_META_INFO_COMMENT", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_META_INFO_ARTIST", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_META_INFO_GENRE", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_META_INFO_ALBUM", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_META_INFO_YEAR", PyInt_FromLong((long) 5)); PyDict_SetItemString(d,"XINE_META_INFO_VIDEOCODEC", PyInt_FromLong((long) 6)); PyDict_SetItemString(d,"XINE_META_INFO_AUDIOCODEC", PyInt_FromLong((long) 7)); PyDict_SetItemString(d,"XINE_META_INFO_SYSTEMLAYER", PyInt_FromLong((long) 8)); PyDict_SetItemString(d,"XINE_META_INFO_INPUT_PLUGIN", PyInt_FromLong((long) 9)); PyDict_SetItemString(d,"XINE_MRL_TYPE_unknown", PyInt_FromLong((long) (0<<0))); PyDict_SetItemString(d,"XINE_MRL_TYPE_dvd", PyInt_FromLong((long) (1<<0))); PyDict_SetItemString(d,"XINE_MRL_TYPE_vcd", PyInt_FromLong((long) (1<<1))); PyDict_SetItemString(d,"XINE_MRL_TYPE_net", PyInt_FromLong((long) (1<<2))); PyDict_SetItemString(d,"XINE_MRL_TYPE_rtp", PyInt_FromLong((long) (1<<3))); PyDict_SetItemString(d,"XINE_MRL_TYPE_stdin", PyInt_FromLong((long) (1<<4))); PyDict_SetItemString(d,"XINE_MRL_TYPE_cda", PyInt_FromLong((long) (1<<5))); PyDict_SetItemString(d,"XINE_MRL_TYPE_file", PyInt_FromLong((long) (1<<6))); PyDict_SetItemString(d,"XINE_MRL_TYPE_file_fifo", PyInt_FromLong((long) (1<<7))); PyDict_SetItemString(d,"XINE_MRL_TYPE_file_chardev", PyInt_FromLong((long) (1<<8))); PyDict_SetItemString(d,"XINE_MRL_TYPE_file_directory", PyInt_FromLong((long) (1<<9))); PyDict_SetItemString(d,"XINE_MRL_TYPE_file_blockdev", PyInt_FromLong((long) (1<<10))); PyDict_SetItemString(d,"XINE_MRL_TYPE_file_normal", PyInt_FromLong((long) (1<<11))); PyDict_SetItemString(d,"XINE_MRL_TYPE_file_symlink", PyInt_FromLong((long) (1<<12))); PyDict_SetItemString(d,"XINE_MRL_TYPE_file_sock", PyInt_FromLong((long) (1<<13))); PyDict_SetItemString(d,"XINE_MRL_TYPE_file_exec", PyInt_FromLong((long) (1<<14))); PyDict_SetItemString(d,"XINE_MRL_TYPE_file_backup", PyInt_FromLong((long) (1<<15))); PyDict_SetItemString(d,"XINE_MRL_TYPE_file_hidden", PyInt_FromLong((long) (1<<16))); PyDict_SetItemString(d,"XINE_GUI_SEND_COMPLETION_EVENT", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_GUI_SEND_DRAWABLE_CHANGED", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_GUI_SEND_EXPOSE_EVENT", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_GUI_SEND_VIDEOWIN_VISIBLE", PyInt_FromLong((long) 5)); PyDict_SetItemString(d,"XINE_GUI_SEND_SELECT_VISUAL", PyInt_FromLong((long) 8)); PyDict_SetItemString(d,"XINE_CONFIG_TYPE_UNKNOWN", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_CONFIG_TYPE_RANGE", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_CONFIG_TYPE_STRING", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_CONFIG_TYPE_ENUM", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_CONFIG_TYPE_NUM", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_CONFIG_TYPE_BOOL", PyInt_FromLong((long) 5)); PyDict_SetItemString(d,"XINE_EVENT_UI_PLAYBACK_FINISHED", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_EVENT_UI_CHANNELS_CHANGED", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_EVENT_UI_SET_TITLE", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"XINE_EVENT_UI_MESSAGE", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"XINE_EVENT_FRAME_FORMAT_CHANGE", PyInt_FromLong((long) 5)); PyDict_SetItemString(d,"XINE_EVENT_AUDIO_LEVEL", PyInt_FromLong((long) 6)); PyDict_SetItemString(d,"XINE_EVENT_QUIT", PyInt_FromLong((long) 7)); PyDict_SetItemString(d,"XINE_EVENT_PROGRESS", PyInt_FromLong((long) 8)); PyDict_SetItemString(d,"XINE_EVENT_MRL_REFERENCE", PyInt_FromLong((long) 9)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_MOUSE_BUTTON", PyInt_FromLong((long) 101)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_MOUSE_MOVE", PyInt_FromLong((long) 102)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_MENU1", PyInt_FromLong((long) 103)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_MENU2", PyInt_FromLong((long) 104)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_MENU3", PyInt_FromLong((long) 105)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_MENU4", PyInt_FromLong((long) 106)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_MENU5", PyInt_FromLong((long) 107)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_MENU6", PyInt_FromLong((long) 108)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_MENU7", PyInt_FromLong((long) 109)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_UP", PyInt_FromLong((long) 110)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_DOWN", PyInt_FromLong((long) 111)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_LEFT", PyInt_FromLong((long) 112)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_RIGHT", PyInt_FromLong((long) 113)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_SELECT", PyInt_FromLong((long) 114)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NEXT", PyInt_FromLong((long) 115)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_PREVIOUS", PyInt_FromLong((long) 116)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_ANGLE_NEXT", PyInt_FromLong((long) 117)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_ANGLE_PREVIOUS", PyInt_FromLong((long) 118)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_BUTTON_FORCE", PyInt_FromLong((long) 119)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NUMBER_0", PyInt_FromLong((long) 120)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NUMBER_1", PyInt_FromLong((long) 121)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NUMBER_2", PyInt_FromLong((long) 122)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NUMBER_3", PyInt_FromLong((long) 123)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NUMBER_4", PyInt_FromLong((long) 124)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NUMBER_5", PyInt_FromLong((long) 125)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NUMBER_6", PyInt_FromLong((long) 126)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NUMBER_7", PyInt_FromLong((long) 127)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NUMBER_8", PyInt_FromLong((long) 128)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NUMBER_9", PyInt_FromLong((long) 129)); PyDict_SetItemString(d,"XINE_EVENT_INPUT_NUMBER_10_ADD", PyInt_FromLong((long) 130)); PyDict_SetItemString(d,"XINE_TEXT_PALETTE_SIZE", PyInt_FromLong((long) 11)); PyDict_SetItemString(d,"XINE_OSD_TEXT1", PyInt_FromLong((long) (0*(11)))); PyDict_SetItemString(d,"XINE_OSD_TEXT2", PyInt_FromLong((long) (1*(11)))); PyDict_SetItemString(d,"XINE_OSD_TEXT3", PyInt_FromLong((long) (2*(11)))); PyDict_SetItemString(d,"XINE_OSD_TEXT4", PyInt_FromLong((long) (3*(11)))); PyDict_SetItemString(d,"XINE_OSD_TEXT5", PyInt_FromLong((long) (4*(11)))); PyDict_SetItemString(d,"XINE_OSD_TEXT6", PyInt_FromLong((long) (5*(11)))); PyDict_SetItemString(d,"XINE_OSD_TEXT7", PyInt_FromLong((long) (6*(11)))); PyDict_SetItemString(d,"XINE_OSD_TEXT8", PyInt_FromLong((long) (7*(11)))); PyDict_SetItemString(d,"XINE_OSD_TEXT9", PyInt_FromLong((long) (8*(11)))); PyDict_SetItemString(d,"XINE_OSD_TEXT10", PyInt_FromLong((long) (9*(11)))); PyDict_SetItemString(d,"XINE_TEXTPALETTE_WHITE_BLACK_TRANSPARENT", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"XINE_TEXTPALETTE_WHITE_NONE_TRANSPARENT", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"XINE_TEXTPALETTE_WHITE_NONE_TRANSLUCID", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"XINE_TEXTPALETTE_YELLOW_BLACK_TRANSPARENT", PyInt_FromLong((long) 3)); PyDict_SetItemString(d,"xine_progress_data_t_description", PyString_FromString("xine_progress_data_t::description")); /* * These are the pointer type-equivalency mappings. * (Used by the SWIG pointer type-checker). */ SWIG_RegisterMapping("_signed_long","_int64_t",0); SWIG_RegisterMapping("_signed_long","_long",0); SWIG_RegisterMapping("_xine_ao_driver_t","_xine_audio_port_t",0); SWIG_RegisterMapping("_xine_ao_driver_t","_struct_xine_audio_port_s",0); SWIG_RegisterMapping("_xine_post_in_s","_struct_xine_post_in_s",0); SWIG_RegisterMapping("_xine_post_in_t","_struct_xine_post_in_s",0); SWIG_RegisterMapping("_long","_int64_t",0); SWIG_RegisterMapping("_long","_unsigned_long",0); SWIG_RegisterMapping("_long","_signed_long",0); SWIG_RegisterMapping("_int64_t","_long",0); SWIG_RegisterMapping("_int64_t","_signed_long",0); SWIG_RegisterMapping("_int64_t","_unsigned_long",0); SWIG_RegisterMapping("_uint32_t","_unsigned",0); SWIG_RegisterMapping("_struct_xine_post_s","_xine_post_s",0); SWIG_RegisterMapping("_struct_xine_post_s","_xine_post_t",0); SWIG_RegisterMapping("_struct_xine_stream_s","_xine_stream_t",0); SWIG_RegisterMapping("_struct_xine_event_queue_s","_xine_event_queue_t",0); SWIG_RegisterMapping("_struct_xine_audio_port_s","_xine_ao_driver_t",0); SWIG_RegisterMapping("_struct_xine_audio_port_s","_xine_audio_port_t",0); SWIG_RegisterMapping("_struct_xine_video_port_s","_xine_vo_driver_t",0); SWIG_RegisterMapping("_struct_xine_video_port_s","_xine_video_port_t",0); SWIG_RegisterMapping("_xine_vo_driver_t","_xine_video_port_t",0); SWIG_RegisterMapping("_xine_vo_driver_t","_struct_xine_video_port_s",0); SWIG_RegisterMapping("_char_p","_STRING",0); SWIG_RegisterMapping("_xine_event_queue_t","_struct_xine_event_queue_s",0); SWIG_RegisterMapping("_struct_xine_s","_xine_t",0); SWIG_RegisterMapping("_struct_xine_post_out_s","_xine_post_out_s",0); SWIG_RegisterMapping("_struct_xine_post_out_s","_xine_post_out_t",0); SWIG_RegisterMapping("_xine_post_out_s","_struct_xine_post_out_s",0); SWIG_RegisterMapping("_xine_post_out_t","_struct_xine_post_out_s",0); SWIG_RegisterMapping("_unsigned_long","_int64_t",0); SWIG_RegisterMapping("_unsigned_long","_long",0); SWIG_RegisterMapping("_signed_int","_int",0); SWIG_RegisterMapping("_unsigned_short","_uint16_t",0); SWIG_RegisterMapping("_unsigned_short","_short",0); SWIG_RegisterMapping("_uint8_t","_unsigned_char",0); SWIG_RegisterMapping("_xine_osd_t","_struct_xine_osd_s",0); SWIG_RegisterMapping("_signed_short","_short",0); SWIG_RegisterMapping("_unsigned_char","_uint8_t",0); SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_uint16_t","_unsigned_short",0); SWIG_RegisterMapping("_uint16_t","_short",0); SWIG_RegisterMapping("_struct_xine_post_in_s","_xine_post_in_s",0); SWIG_RegisterMapping("_struct_xine_post_in_s","_xine_post_in_t",0); SWIG_RegisterMapping("_short","_uint16_t",0); SWIG_RegisterMapping("_short","_unsigned_short",0); SWIG_RegisterMapping("_short","_signed_short",0); SWIG_RegisterMapping("_xine_t","_struct_xine_s",0); SWIG_RegisterMapping("_int","_unsigned_int",0); SWIG_RegisterMapping("_int","_signed_int",0); SWIG_RegisterMapping("_xine_post_s","_struct_xine_post_s",0); SWIG_RegisterMapping("_xine_post_t","_struct_xine_post_s",0); SWIG_RegisterMapping("_struct_xine_osd_s","_xine_osd_t",0); SWIG_RegisterMapping("_xine_stream_t","_struct_xine_stream_s",0); SWIG_RegisterMapping("_STRING","_char_p",0); SWIG_RegisterMapping("_struct_xine_cfg_entry_s","_xine_cfg_entry_s",0); SWIG_RegisterMapping("_struct_xine_cfg_entry_s","_xine_cfg_entry_t",0); SWIG_RegisterMapping("_unsigned","_uint32_t",0); SWIG_RegisterMapping("_xine_audio_port_t","_xine_ao_driver_t",0); SWIG_RegisterMapping("_xine_audio_port_t","_struct_xine_audio_port_s",0); SWIG_RegisterMapping("_xine_video_port_t","_xine_vo_driver_t",0); SWIG_RegisterMapping("_xine_video_port_t","_struct_xine_video_port_s",0); SWIG_RegisterMapping("_xine_cfg_entry_s","_struct_xine_cfg_entry_s",0); SWIG_RegisterMapping("_xine_cfg_entry_t","_struct_xine_cfg_entry_s",0); } pyxine-0.1alpha2.orig/pyxine/pxlib.py0100644000175000017500000000353707622526737016744 0ustar pimanpiman# This file was created automatically by SWIG. import pxlibc class PxDisplayPtr : def __init__(self,this): self.this = this self.thisown = 0 def __del__(self): if self.thisown == 1 : pxlibc.delete_PxDisplay(self.this) def has_windows(self): val = pxlibc.PxDisplay_has_windows(self.this) return val def __repr__(self): return "" class PxDisplay(PxDisplayPtr): def __init__(self,arg0) : self.this = pxlibc.new_PxDisplay(arg0) self.thisown = 1 class PxWindowPtr : def __init__(self,this): self.this = this self.thisown = 0 def __del__(self): if self.thisown == 1 : pxlibc.delete_PxWindow(self.this) def get_window_geometry(self): val = pxlibc.PxWindow_get_window_geometry(self.this) return val def get_xine_x11_visual(self): val = pxlibc.PxWindow_get_xine_x11_visual(self.this) return val def set_xine_stream(self,arg0): val = pxlibc.PxWindow_set_xine_stream(self.this,arg0) return val def get_verbosity(self): val = pxlibc.PxWindow_get_verbosity(self.this) return val def set_verbosity(self,arg0): val = pxlibc.PxWindow_set_verbosity(self.this,arg0) return val def get_pixel_aspect(self): val = pxlibc.PxWindow_get_pixel_aspect(self.this) return val def invalidate_cache(self): val = pxlibc.PxWindow_invalidate_cache(self.this) return val def __repr__(self): return "" class PxWindow(PxWindowPtr): def __init__(self,arg0,arg1,arg2,arg3) : self.this = pxlibc.new_PxWindow(arg0.this,arg1,arg2,arg3) self.thisown = 1 #-------------- FUNCTION WRAPPERS ------------------ #-------------- VARIABLE WRAPPERS ------------------ pyxine-0.1alpha2.orig/pyxine/config.py0100644000175000017500000001573407621051154017056 0ustar pimanpiman# $Id: config.py,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. from pyxine import libxine, cstruct, constants, constwrap import inspect class _ConfigEntry(object): def __init__(self, rep): self.rep = rep key = property(lambda s: s.rep.key) type = property(lambda s: constwrap.XINE_CONFIG_TYPE(s.rep.type)) description = property(lambda s: s.rep.description) help = property(lambda s: s.rep.help) exp_level = property(lambda s: s.rep.exp_level) def __repr__(self): def is_property(p): return type(p) == property d = {} for k,v in inspect.getmembers(self.__class__, is_property): d[k] = getattr(self, k) return "<%s: %s>" % (self.__class__.__name__, d) __str__ = __repr__ class _Num_ConfigEntry(_ConfigEntry): def _set_value(self, val): self.rep.num_value = val value = property(lambda s: s.rep.num_value, _set_value) default = property(lambda s: s.rep.num_default) def __str__(self): return str(self.value) def __int__(self): return self.value class _Bool_ConfigEntry(_Num_ConfigEntry): pass class _Range_ConfigEntry(_Num_ConfigEntry): min = property(lambda s: s.rep.range_min) max = property(lambda s: s.rep.range_max) class _String_ConfigEntry(_ConfigEntry): def _set_value(self, val): self.rep.str_value = val value = property(lambda s: s.rep.str_value, _set_value) default = property(lambda s: s.rep.str_default) sticky = property(lambda s: s.rep.str_sticky) # FIXME: what is this ?? def __str__(self): return self.value class _Enum_ConfigEntry(_ConfigEntry): values = property(lambda s: s.rep.enum_values) enum_values = values def _set_num_value(self, val): try: self.values[val] except IndexError: raise ValueError self.rep.num_value = val num_value = property(lambda s: s.rep.num_value, _set_num_value) num_default = property(lambda s: s.rep.num_default) def _set_value(self, val): if type(val) is int: self.rep.num_value = val else: self.rep.num_value = list(self.values).index(val) value = property(lambda s: s.values[s.rep.num_value], _set_value) default = property(lambda s: s.values[s.rep.num_default]) def __str__(self): return self.value _config_entry_types = { constants.XINE_CONFIG_TYPE_RANGE: _Range_ConfigEntry, constants.XINE_CONFIG_TYPE_STRING: _String_ConfigEntry, constants.XINE_CONFIG_TYPE_ENUM: _Enum_ConfigEntry, constants.XINE_CONFIG_TYPE_NUM: _Num_ConfigEntry, constants.XINE_CONFIG_TYPE_BOOL: _Bool_ConfigEntry, } def xine_cfg_entry_t(packed): rep = cstruct.xine_cfg_entry_t(packed) proxy = _config_entry_types.get(rep.type, _ConfigEntry) return proxy(rep) def _wrap_cb(cb): if cb is None: return None def wrapper(entry): cb(xine_cfg_entry_t(entry)) return wrapper class XineConfig: def __init__(self, xine): self.this = xine.this self.xine = xine def load(self, cfg_filename): if self.xine.cfg_filename is not None: self.reset() libxine.xine_config_load(self.this, cfg_filename) self.xine.cfg_filename = cfg_filename def save(self, cfg_filename=None): cfg_filename = cfg_filename or self.xine.cfg_filename libxine.xine_config_save(self.this, cfg_filename) self.xine.cfg_filename = cfg_filename def reset(self): libxine.xine_config_reset(self.this) self.xine.cfg_filename = None def values(self): v = [] try: entry = libxine.xine_config_get_first_entry(self.this) while 1: v.append(xine_cfg_entry_t(entry)) entry = libxine.xine_config_get_next_entry(self.this) except StopIteration: pass return v def keys(self): return map(lambda entry: entry.key, self.values()) def items(self): return map(lambda entry: (entry.key, entry), self.values()) def itervalues(self): return iter(self.values()) def iterkeys(self): return iter(self.keys()) def iteritems(self): return iter(self.items()) def __iter__(self): return self.iterkeys() def __getitem__(self, key): entry = libxine.xine_config_lookup_entry(self.this, key) return xine_cfg_entry_t(entry) def __setitem__(self, key, value): entry = self[key] entry.value = value libxine.xine_config_update_entry(self.this, entry.rep.this) def register_string(self, key, def_value="", description="", help="", exp_level=0, changed_cb=None): return libxine.xine_config_register_string( self.this, key, def_value, description, help, exp_level, _wrap_cb(changed_cb)) def register_range(self, key, def_value=0, min=0, max=100, description="", help="", exp_level=0, changed_cb=None): return libxine.xine_config_register_range( self.this, key, def_value, min, max, description, help, exp_level, _wrap_cb(changed_cb)) def register_enum(self, key, def_value=0, values=(), description="", help="", exp_level=0, changed_cb=None): num_val = libxine.xine_config_register_enum( self.this, key, def_value, values, description, help, exp_level, _wrap_cb(changed_cb)) return values[num_val] def register_num(self, key, def_value=0, description="", help="", exp_level=0, changed_cb=None): return libxine.xine_config_register_num( self.this, key, def_value, description, help, exp_level, _wrap_cb(changed_cb)) def register_bool(self, key, def_value=0, description="", help="", exp_level=0, changed_cb=None): return libxine.xine_config_register_bool( self.this, key, def_value, description, help, exp_level, _wrap_cb(changed_cb)) pyxine-0.1alpha2.orig/pyxine/constants.py0100644000175000017500000000207207621051154017614 0ustar pimanpiman# $Id: constants.py,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. """The constants from libxine. """ from pyxine import libxine for name in dir(libxine): if name.startswith("XINE_") or name.startswith("CHECK_"): globals()[name] = getattr(libxine, name) pyxine-0.1alpha2.orig/pyxine/constwrap.py0100644000175000017500000001167107621051154017625 0ustar pimanpiman# $Id: constwrap.py,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. """Wrappers for the various constant sets. This probably is just way too much syntactic sugar. """ from pyxine import constants import warnings class _constants(int): class __metaclass__(type): def __new__(cls_type, cls_name, cls_bases, cls_dict): prefix = cls_name + "_" names = {} values = {} for name in dir(constants): if name.startswith(prefix): val = getattr(constants, name) names[val] = name values[name[len(prefix):]] = val if not names and cls_name != '_constants': import warnings warnings.warn("%s: empty constant set" % cls_name, stacklevel=2) cls_dict["_prefix"] = prefix cls_dict["_names"] = names cls_dict["_values"] = values cls_dict["__slots__"] = [] return type.__new__(cls_type, cls_name, cls_bases, cls_dict) def __iter__(self): """Allow use of class as sequence of constant names. Example: >>> list(XINE_STATUS) ['IDLE', 'STOP', 'PLAY', 'QUIT'] """ return iter(self._values) def _str2int(cls, name): if name.startswith(cls._prefix): return getattr(constants, name, None) try: return getattr(constants, cls._prefix + name) except AttributeError: pass try: return cls.__bases__[0]._str2int(name) except AttributeError: return None _str2int = classmethod(_str2int) def __new__(cls, val): try: intval = int(val) except ValueError: intval = cls._str2int(str(val)) if intval is None: raise ValueError, "%s: unknown constant" % val else: if not cls._names.has_key(intval): # FIXME: Use a specific warning class for this. warnings.warn("bad value for %s* (%d)" % (cls._prefix, intval), stacklevel=2) return int.__new__(cls, intval) def __str__(self): try: return self._names[int(self)] except KeyError: return "%s(%d)" % (self.__class__.__name__, self) __repr__ = __str__ def __cmp__(self, other): if isinstance(other, _constants): return cmp((self._prefix, int(self)), (other._prefix, int(other))) try: return cmp(int(self), int(other)) except ValueError: return cmp(int(self), int(self.__class__(str(other)))) def contains(cls, val): """Check to see if value is in the set of known constants. >>> XINE_EVENT_INPUT.contains(101) # 101 = XINE_EVENT_INPUT_MOUSE_BUTTON 1 >>> XINE_EVENT_INPUT.contains(0) 0 >>> XINE_EVENT_INPUT.contains('MOUSE_BUTTON') 1 """ try: return cls._names.has_key(int(val)) except ValueError: return cls._str2int(str(val)) is not None contains = classmethod(contains) class XINE_VISUAL_TYPE(_constants): pass class XINE_MASTER_SLAVE(_constants): pass class XINE_TRICK_MODE(_constants): pass class XINE_PARAM(_constants): pass class XINE_SPEED(_constants): pass class XINE_PARAM_VO(_constants): pass #class XINE_VO_ZOOM(_constants): pass class XINE_VO_ASPECT(_constants): pass class XINE_DEMUX(_constants): pass class XINE_IMGFMT(_constants): pass class XINE_POST_TYPE(_constants): pass class XINE_POST_DATA(_constants): pass class XINE_STATUS(_constants): pass class XINE_ERROR(_constants): pass class XINE_STREAM_INFO(_constants): pass class XINE_META_INFO(_constants): pass # FIXME: this is a bitmask class XINE_MRL_TYPE(_constants): pass class XINE_GUI_SEND(_constants): pass #class XINE_HEALTH_CHECK(_constants): pass #class CHECK(_constants): pass class XINE_CONFIG_TYPE(_constants): pass class XINE_EVENT(_constants): pass class XINE_EVENT_INPUT(XINE_EVENT): pass class XINE_OSD(_constants): pass class XINE_TEXTPALETTE(_constants): pass pyxine-0.1alpha2.orig/pyxine/cstruct.py0100644000175000017500000001121207621051154017263 0ustar pimanpiman# $Id: cstruct.py,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. """Wrappers for the SWIG-generated struct accessors. """ from pyxine import libxine import inspect, weakref class _member(property): def __init__(self, struct_name, name): accessor_base = "%s_%s" % (struct_name, name) doc = "%s::%s" % (struct_name, name) getter = getattr(libxine, accessor_base + "_get") setter = getattr(libxine, accessor_base + "_set", None) def fget(self): return getter(self.this) if setter: def fset(self, val): setter(self.this, val) else: fset = None property.__init__(self, fget, fset) self.__doc__ = doc class _cstruct(object): class __metaclass__(type): def __new__(cls_type, cls_name, cls_bases, cls_dict): if cls_name == '_cstruct' or cls_bases[0] != _cstruct: return type.__new__(cls_type, cls_name, cls_bases, cls_dict) struct_name = cls_name def isgetter(func): return func.endswith('_get') and func.startswith(struct_name) members = map(lambda s: s[len(struct_name)+1:-4], filter(isgetter, dir(libxine))) members.sort() for name in members: cls_dict[name] = _member(struct_name, name) def __repr__(self): data = dict(map(lambda m: (m, getattr(self, m)), members)) return "<%s: %s>" % (cls_name, data) cls_dict['__repr__'] = __repr__ cls_dict['__str__'] = __repr__ cls_dict['_struct_name'] = struct_name return type.__new__(cls_type, cls_name, cls_bases, cls_dict) def __init__(self, datap): if type(datap) is str: if datap.endswith("_void_p"): datap = datap[:-6] + self.__class__.__name__ + "_p" elif not datap.endswith("_p"): raise ValueError, "bad SWIG pointer (%s)" % datap elif not datap: # FIXME: better checking for PyBuffer object raise ValueError self.this = datap class super(object): """This is like the __builtin__.super, but it works for properties. (The builtin super only seems to work for methods.) """ def __init__(self, cls, object=None): self.__dict__['_super__cls'] = cls if object is not None: object = weakref.proxy(object) self.__dict__['_super__object'] = object def __get__(self, object, cls=None): if not self.__object: if object is not None: object = weakref.proxy(object) self.__dict__['_super__object'] = object return self def __getprop(self, name): base_seen = 0 for sup in inspect.getmro(self.__object.__class__): if not base_seen: base_seen = sup is self.__cls else: a = getattr(sup, name, None) if hasattr(a, '__get__'): return a raise AttributeError def __getattr__(self, name): return self.__getprop(name).__get__(self.__object, self.__object.__class__) def __setattr__(self, name, val): self.__getprop(name).__set__(self.__object, val) class xine_event_t(_cstruct): pass class xine_ui_data_t(_cstruct): pass class xine_format_change_data_t(_cstruct): pass class xine_audio_level_data_t(_cstruct): pass class xine_progress_data_t(_cstruct): pass class xine_input_data_t(_cstruct): pass class xine_cfg_entry_s(_cstruct): pass xine_cfg_entry_t = xine_cfg_entry_s class xine_post_s(_cstruct): pass xine_post_t = xine_post_s class xine_post_in_s(_cstruct): pass xine_post_in_t = xine_post_in_s class xine_post_out_s(_cstruct): pass xine_post_out_t = xine_post_out_s pyxine-0.1alpha2.orig/pyxine/event.py0100644000175000017500000001333207621051154016722 0ustar pimanpiman# $Id: event.py,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. from pyxine import libxine, constants, constwrap, cstruct class Event(cstruct.xine_event_t): _owned = 0 def __init__(self, _raw, _owned=0): cstruct.xine_event_t.__init__(self, _raw) self._owned = _owned self.__super = cstruct.super(Event, self) def __get_type(self): return constwrap.XINE_EVENT(self.__super.type) def __set_type(self, val): self.__super.type = constwrap.XINE_EVENT(val) type = property(__get_type, __set_type, doc="The event type") def __get_data(self): data = self.__super.data try: return self._data_type(data) except AttributeError: return data data = property(__get_data, doc="The event data") def __del__(self): if self._owned: libxine.xine_event_free(self.this) print "Event freed" class xine_format_change_data_t(cstruct.xine_format_change_data_t): def __init__(self, _raw): cstruct.xine_format_change_data_t.__init__(self, _raw) self.__super = cstruct.super(xine_format_change_data_t, self) def __get_aspect(self): return constwrap.XINE_VO_ASPECT(self.__super.aspect) aspect = property(__get_aspect, doc="The aspect ratio code") def get_video_geometry(self, default_aspect=4.0/3.0): width, height = self.width, self.height video_aspect = self.get_aspect_ratio(default_aspect) pixel_aspect = video_aspect * height / width return width, height, pixel_aspect def get_aspect_ratio(self, default=None): # FIXME: this may not be right aspect = self.aspect if aspect == "4_3": return 4.0 / 3.0 elif aspect in ("ANAMORPHIC", "PAN_SCAN"): return 16.0 / 9.0 elif aspect == "DVB": return 2.11 elif aspect in ("SQUARE", "DONT_TOUCH"): return float(self.width) / float(self.height) else: return default class UIDataEvent(Event): _data_type = cstruct.xine_ui_data_t class FrameFormatChangeEvent(Event): _data_type = xine_format_change_data_t class AudioLevelEvent(Event): _data_type = cstruct.xine_audio_level_data_t class ProgressEvent(Event): _data_type = cstruct.xine_progress_data_t class InputEvent(Event): _data_type = cstruct.xine_input_data_t def __init__(self, type=None, button=0, x=0, y=0, _raw=None, _owned=0): if _raw is None: if type is None: raise ValueError, "must specify a type" # FIXME: check type for validity as XINE_EVENT_INPUT type type = constwrap.XINE_EVENT(type) _raw = libxine.px_make_input_event(type, button, x, y) # This is a PyBuffer and will auto-free itself... _owned = 0 Event.__init__(self, _raw, _owned) _event_types = { constants.XINE_EVENT_UI_SET_TITLE: UIDataEvent, constants.XINE_EVENT_UI_MESSAGE: UIDataEvent, constants.XINE_EVENT_FRAME_FORMAT_CHANGE: FrameFormatChangeEvent, constants.XINE_EVENT_AUDIO_LEVEL: AudioLevelEvent, constants.XINE_EVENT_PROGRESS: ProgressEvent, #constants.XINE_EVENT_INPUT_MOUSE_BUTTON: InputEvent, #constants.XINE_EVENT_INPUT_MOUSE_MOVE: InputEvent, #constants.XINE_EVENT_INPUT_BUTTON_FORCE: spu_button_t, #??? } def _wrap_event(raw, owned=0): event = cstruct.xine_event_t(raw) if event.data_length == 0: # FIXME: check for actual data size needed? return Event(_raw=raw, _owned=owned) elif constwrap.XINE_EVENT_INPUT.contains(event.type): return InputEvent(_raw=raw, _owned=owned) else: cls = _event_types.get(event.type, Event) return cls(_raw=raw, _owned=owned) class EventQueueBase: def __init__(self, stream, this): self.stream, self.this = stream, this def __del__(self): libxine.xine_event_dispose_queue(self.this) print "deleted EventQueue" class EventQueue(EventQueueBase): def get(self): e = libxine.xine_event_get(self.this) if e is None: return None return _wrap_event(e, owned=1) def wait(self): e = libxine.xine_event_wait(self.this) return _wrap_event(e, owned=1) class ListenerThread(EventQueueBase): """ ALERT: We hold a reference to your callback. If it is, e.g. a bound method, you may have problems with garbage collection not happening at the right times. You can fix this by using a weakly bound method (see weakmethod.) """ def __init__(self, stream, this, callback): EventQueueBase.__init__(self, stream, this) if not callable(callback): raise ValueError, "callback not callable" def cb_wrap (e): callback(_wrap_event(e, owned=0)) libxine.xine_event_create_listener_thread(self.this, cb_wrap) pyxine-0.1alpha2.orig/pyxine/__init__.py0100644000175000017500000000505707621051154017345 0ustar pimanpiman# $Id: __init__.py,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. __all__ = [ 'constants', 'xine', 'x11', 'stream' ] class Error(Exception): """Base exception class for exceptions raised by pyxine. """ pass class StreamError(Error): """Exceptions associated with stream error codes from xine_get_error(). """ def __init__(self, errcode): Error.__init__(self, errcode) self.errcode = constwrap.XINE_ERROR(errcode) def __str__(self): return str(self.errcode) from pyxine import libxine, constwrap from pyxine.constants import XINE_VERSION, \ XINE_MAJOR_VERSION, XINE_MINOR_VERSION, XINE_SUB_VERSION def get_version_string(): """Get the version string for the installed libxine. Note that the version string of the libxine this pyxine was compiled against is available in 'XINE_VERSION'. """ return libxine.xine_get_version_string() def get_version(): """Get the version of the installed libxine. Returns a triple of integers: ('major', 'minor', 'sub') Note that the version of the libxine this pyxine was compiled against is available in ('XINE_MAJOR_VERSION', 'XINE_MINOR_VERSION', 'XINE_SUB_VERSION'). """ return libxine.xine_get_version() def check_version(major=XINE_MAJOR_VERSION, minor=XINE_MINOR_VERSION, sub=XINE_SUB_VERSION): """Check to see if the installed libxine is of an appropriate version. Raises 'Error' if the installed version of libxine is incompatible. """ if not libxine.xine_check_version(major, minor, sub): raise Error, "Installed libxine is incompatible" check_version() # Import a few specific classes from pyxine.xine import Xine from pyxine.x11 import X11Visual, TkWidget, XlibDrawable pyxine-0.1alpha2.orig/pyxine/osd.py0100644000175000017500000000731307621051154016370 0ustar pimanpiman# $Id: osd.py,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. from pyxine import libxine, constants, constwrap class OsdColor: def __init__(self, color, trans): self.color, self.trans = color, trans def __repr__(self): return "<%s: (0x%06x, 0x%02x)>" % (self.__class__.__name__, self.color, self.trans) def __str__(self): return repr(self) class Osd: def __init__(self, stream, width, height, x=0, y=0): self.this = libxine.xine_osd_new(stream.this, x, y, width, height) self.clear() self.set_font() self.set_text_palette(constants.XINE_TEXTPALETTE_WHITE_BLACK_TRANSPARENT) def __del__(self): self.hide() libxine.xine_osd_free(self.this) def set_position(self, x, y): libxine.xine_osd_set_position(self.this, x, y) def show(self, vpts=0): libxine.xine_osd_show(self.this, vpts) def hide(self, vpts=0): libxine.xine_osd_hide(self.this, vpts) def clear(self): libxine.xine_osd_clear(self.this) def draw_point(self, x, y, color): libxine.xine_osd_draw_point(self.this, x, y, color) def draw_line(self, x1, y1, x2, y2, color): libxine.xine_osd_draw_line(self.this, x1, y1, x2, y2, color) def draw_rect(self, x1, y1, x2, y2, color, filled=0): libxine.xine_osd_draw_rect(self.this, x1, y1, x2, y2, color, filled) def draw_text(self, x, y, text, color_base=constants.XINE_OSD_TEXT1): color_base = constwrap.XINE_OSD(color_base) libxine.xine_osd_draw_text(self.this, x, y, text, color_base) def set_font(self, fontname="sans", size=16): libxine.xine_osd_set_font(self.this, fontname, size) def get_text_size(self, text): return libxine.xine_osd_get_text_size(self.this, text) def set_text_palette(self, palette_number=constants.XINE_TEXTPALETTE_WHITE_BLACK_TRANSPARENT, color_base=constants.XINE_OSD_TEXT1): palette_number = constwrap.XINE_TEXTPALETTE(palette_number) color_base = constwrap.XINE_OSD(color_base) libxine.xine_osd_set_text_palette(self.this, palette_number, color_base) def get_palette(self): color, trans = libxine.xine_osd_get_palette(self.this) return map(OsdColor, color, trans) def set_palette(self, palette): assert palette.count() == 256 color = map(lambda c: c.color, palette) trans = map(lambda c: c.trans, palette) libxine.xine_osd_set_palette(self.this, color, trans) def get_color(self, i): color, trans = libxine.xine_osd_get_palette(self.this) return OsdColor(color[i], trans[i]) def set_color(self, i, val): color, trans = libxine.xine_osd_get_palette(self.this) color[i] = val.color trans[i] = val.trans libxine.xine_osd_set_palette(self.this, color, trans) pyxine-0.1alpha2.orig/pyxine/post.py0100644000175000017500000001636707621051154016601 0ustar pimanpiman# $Id: post.py,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. from pyxine import libxine, constants, constwrap, cstruct, xine from pyxine import Error def _tuplize(val): """Convert val to tuple. If 'val' is a sequence, just convert to tuple. If 'val' is None, return a 0-tuple. Otherwise return a 1-tuple containing 'val'. """ try: return tuple(val) except TypeError: if val is None: return () return (val,) class _readonly_dict_base(object): def get(self, name, default=None): try: return self[name] except KeyError: return default def has_key(self, name): return self.get(name) is not None def values(self): return map(self.__getitem__, self.keys()) def items(self): return map(lambda name: (name, self[name]), self.keys()) def iterkeys(self): return iter(self.keys()) def itervalues(self): return iter(self.values()) def iteritems(self): return iter(self.items()) def __len__(self): return len(self.keys()) __iter__ = iterkeys class _Post_inputs(_readonly_dict_base): def __init__(self, post): self.post = post def keys(self): return libxine.xine_post_list_inputs(self.post.this) def __getitem__(self, name): post = self.post try: input = libxine.xine_post_input(post.this, name) except Error: raise KeyError, "no input named '%s'" % name return PostInput(post, input) class _Post_outputs(_readonly_dict_base): def __init__(self, post): self.post = post def keys(self): return libxine.xine_post_list_outputs(self.post.this) def __getitem__(self, name): post = self.post try: output = libxine.xine_post_output(post.this, name) except Error: raise KeyError, "no output named '%s'" % name return PostOutput(post, output) class Post(object): """A xine post-plugin. Example Usage: To initialize and wire up the goom visualization filter: >>> goom = Post(stream, 'goom', audio_target=stream.ao, video_target=stream.vo) >>> stream.audio_source.wire(goom.inputs['audio in']) When finished, to unwire the goom: >>> stream.audio_source.wire(stream.ao) """ # Destination of the outputs (if wired) _dest = {} def __init__(self, xine_or_stream, name, inputs=0, audio_target=[], video_target=[]): audio_target = _tuplize(audio_target) video_target = _tuplize(video_target) try: self.xine = xine_or_stream.xine # xine_or_stream is stream except AttributeError: self.xine = xine_or_stream self.this = libxine.xine_post_init(self.xine.this, name, inputs, map(lambda s: s.this, audio_target), map(lambda s: s.this, video_target)) self.rep = cstruct.xine_post_t(self.this) def isvideo(port): return port.type == constants.XINE_POST_DATA_VIDEO def isaudio(port): return port.type == constants.XINE_POST_DATA_AUDIO outputs = self.outputs.values() video_outputs = filter(isvideo, outputs) audio_outputs = filter(isaudio, outputs) self._dest = {} for out, port in ( map(None, video_outputs, video_target) + map(None, audio_outputs, audio_target) ): if out and port: self._dest[out.name] = port def __del__(self): if hasattr(self, 'this'): libxine.xine_post_dispose(self.xine.this, self.this) print "Post deleted" type = property( lambda s: constwrap.XINE_POST_TYPE(s.rep.type), doc="The type of this plugin") def __get_audio_input(self): return map(lambda ptr: xine.AudioPort(self.xine, ptr), self.rep.audio_input) audio_input = property( __get_audio_input, doc="""A list of the audio input ports provied by this plugin. The values in this list are 'AudioPort's. You can hand these to other post plugin's outputs or pass them to the initialization of streams. """) def __get_video_input(self): return map(lambda ptr: xine.VideoPort(self.xine, ptr), self.rep.audio_input) video_input = property( __get_audio_input, doc="""A list of the video input ports provied by this plugin. The values in this list are 'VideoPort's. You can hand these to other post plugin's outputs or pass them to the initialization of streams. """) inputs = property(_Post_inputs, doc="""Input ports. This is a readonly dict (whose keys are the port names, and whose values are 'PostInputs') of the input ports of this Post plugin. You use these for rewiring post-plugins. """) outputs = property(_Post_outputs, doc="""Output ports. This is a readonly dict (whose keys are the port names, and whose values are 'PostOutputs') of the output ports of this Post plugin. You use these for rewiring post-plugins. """) class PostInput(cstruct.xine_post_in_t): def __init__(self, post, this): self.post = post cstruct.xine_post_in_t.__init__(self, this) self.__super = cstruct.super(PostInput, self) type = property(lambda s: constwrap.XINE_POST_DATA(s.__super.type)) class PostOutput(cstruct.xine_post_out_t): def __init__(self, post, this): self.post = post # can be stream, too cstruct.xine_post_out_t.__init__(self, this) self.__super = cstruct.super(PostOutput, self) type = property(lambda s: constwrap.XINE_POST_DATA(s.__super.type)) def wire(self, target): if target is None: libxine.xine_post_wire(self.this, "NULL") elif isinstance(target, PostInput): libxine.xine_post_wire(self.this, target.this) elif isinstance(target, xine.VideoPort): libxine.xine_post_wire_video_port(self.this, target.this) elif isinstance(target, xine.AudioPort): libxine.xine_post_wire_audio_port(self.this, target.this) else: raise ValueError, "don't know how to wire to target type" self.post._dest[self.name] = target pyxine-0.1alpha2.orig/pyxine/weakmethod.py0100644000175000017500000000474007621051154017734 0ustar pimanpiman# $Id: weakmethod.py,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. import weakref class weakmethod(object): """A weakly bound method. This is a class method which binds to its instance using a weakref. This is useful, among other things, for callback methods in pyxine, so that the existence of the bound method (in the C guts of libxine) won't keep the instance from being garbage collected. Example: from pyxine.weakmethod import weakmethod class MyClass: def callback(self, arg): self.arg_val = arg callback = weakmethod(callback) o = MyClass() cb = o.callback cb(1) del o # o will be garbage collected here # This will rais weakref.ReferenceError (when/if the bound method # tries to use self.) cb(2) """ im_func = None im_class = None im_self = None def __init__(self, func): self.im_func = func def __getattr__(self, attr): return getattr(self.im_func, attr) def __get__(self, obj, cls=None): if obj is not None: return _bound(self, obj, cls) else: return _unbound(self, cls) class _bound(weakmethod): def __init__(self, method, obj, cls): self.im_func = method.im_func self.im_self = weakref.proxy(obj) self.im_class = cls def __call__(self, *args, **kwargs): self.im_self return self.im_func(self.im_self, *args, **kwargs) class _unbound(weakmethod): def __init__(self, method, cls): self.im_func = method.im_func self.im_class = cls pyxine-0.1alpha2.orig/pyxine/x11.py0100644000175000017500000001672507621051154016223 0ustar pimanpiman# $Id: x11.py,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. from pyxine import weakmethod, pxlib import weakref, re _display_cache = weakref.WeakValueDictionary() def _canonify_display_name(name): # Strip trailing '.' (if any) from display name. return re.sub(r'\.\d+$', '', name) def _get_display(name): name = _canonify_display_name(name) try: return _display_cache[name] except KeyError: display = pxlib.PxDisplay(name) _display_cache[name] = display return display class X11Visual(pxlib.PxWindow): """A wrapper class for a python-xlib Window This class provides a few utility functions needed to allow pyxine to output to your python-xlib Window: * It starts a (non-python) thread to monitor certain events on the window. - Window size and position changes are tracked. - It provides the plumbing to forward 'Expose', 'ShmCompletion', 'MapNotify' and 'UnmapNotify' events to the appropriate Stream. * It provides the x11_visual_t structure needed as an argument to Xine::open_video_driver(). If you have special requirements you may want to subclass this class, and override the 'frame_output_cb' and/or 'dest_size_cb' methods. """ pixel_aspect = 1.0 def __init__(self, display_name, window_id): self._pxdisplay = _get_display(display_name) pxlib.PxWindow.__init__(self, self._pxdisplay, window_id, self.__dest_size_cb, self.__frame_output_cb) self.pixel_aspect = self.get_pixel_aspect() def __del__(self): try: pxlib.PxWindow.__del__(self) except AttributeError: pass print "X11Visual deleted" def direct_events_to(self, stream=None): """Send window events to stream. Specify which 'Stream' window events should be directed to. (The events which will be forwarded are 'ShmCompletion', 'Expose', 'MapNotify', and 'UnmapNotify'. When called with no argument, will cause window events to be discarded. """ if stream is None: stream_p = "NULL" else: stream_p = stream.this pxlib.PxWindow.set_xine_stream(self, stream_p) set_xine_stream = direct_events_to def __dest_size_cb(self, *args): return self.dest_size_cb(*args) __dest_size_cb = weakmethod.weakmethod(__dest_size_cb) def __frame_output_cb(self, *args): return self.frame_output_cb(*args) __frame_output_cb = weakmethod.weakmethod(__frame_output_cb) def natural_output_size(self, video_geometry): """Compute the natural output size for video. This is the output size for ~1:1 enlargement, taking into account pixel aspect ratios. """ video_width, video_height, video_pixel_aspect = video_geometry try: if video_pixel_aspect >= self.pixel_aspect: video_width = int(video_width * video_pixel_aspect / self.pixel_aspect + .5) else: video_height = int(video_height * self.pixel_aspect / video_pixel_aspect + .5) except ZeroDivisionError: pass # punt return video_width, video_height def compute_output_size(self, video_geometry): """Compute the output size for video. (You may want to override this method in subclasses.) """ return self.natural_output_size(video_geometry) def dest_size_cb(self, *video_geometry): """Figure out video output size. This will be called by the video driver to find out how big the video output area size will be for a given video size. The ui should _not_ adjust it's video out area, just do some calculations and return the size. Should return a triple ('dest_width', 'dest_height', 'dest_pixel_aspect'). This will usually be called only when the video dimensions change, or the window size has changed, Dest_pixel_aspect should be set to the used display pixel aspect. """ width, height = self.compute_output_size(video_geometry) output_geometry = (width, height, self.pixel_aspect) print "DEST_SIZE_CB", video_geometry, "->", output_geometry return output_geometry def frame_output_cb(self, *video_geometry): """Figure out and/or adjust video output size. This will be called by the video driver when it is about to draw a frame. The UI can adapt it's size if necessary here. Note: the UI doesn't have to adjust itself to this size, this is just to be taken as a hint. This will usually be called only when the video dimensions change, or the window size has changed. The UI must return the actual size of the video output area and the video output driver will do it's best to adjust the video frames to that size (while preserving aspect ratio and stuff). dest_x, dest_y -- offset inside window dest_width, dest_height -- available drawing space dest_pixel_aspect -- display pixel aspect win_x, win_y -- window absolute screen position """ width, height = self.compute_output_size(video_geometry) window_geometry = self.get_window_geometry() window_size = window_geometry[:2] win_x, win_y = window_geometry[2:4] if (width, height) != window_size: newpos = self.resize_window(width, height) if newpos: win_x, win_y = newpos output_geometry = (0,0, width, height, self.pixel_aspect, win_x, win_y) print "FRAME_OUTPUT_CB", video_geometry, "->", output_geometry return output_geometry def resize_window(self, width, height): """Resize the video output window. Subclasses should override this method. It should return the pair (win_x, win_y), or None, if the window location is not available. """ return None class TkWidget(X11Visual): """An X11Visual which can be initialized with a Tkinter.Widget. """ def __init__(self, widget): X11Visual.__init__(self, widget.winfo_screen(), widget.winfo_id()) class XlibDrawable(X11Visual): """An X11Visual which can be initialized with an Xlib Drawable. """ def __init__(self, drawable): X11Visual.__init__(self, drawable.display.get_display_name(), drawable.id) pyxine-0.1alpha2.orig/pyxine/xine.py0100644000175000017500000005017407621051154016551 0ustar pimanpiman# $Id: xine.py,v 1.1.1.1 2003/02/08 00:42:20 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. from pyxine import Error, StreamError, libxine, constants, constwrap import warnings class Xine(object): """The 'Xine' video player engine. """ def __init__(self, config={}, cfg_filename=None): """Create and initialize the xine engine. You can specify (initial) xine configuration values. Examples: import pyxine import os, os.path # To read config from ~/.xine/config2 xine = pyxine.Xine( cfg_filename=os.path.join(os.environ['HOME'], '.xine/config2')) # To explicitly specify some config values: xine = pyxine.Xine({'misc.memcpy_method': 'mmx', 'input.dvd_region': 2}) """ self.this = libxine.xine_new() for k,v in config.items(): libxine.xine_config_register_string(self.this, k, str(v), "", "", 0, None) self.cfg_filename = cfg_filename if cfg_filename is not None: libxine.xine_config_load(self.this, cfg_filename) libxine.xine_init(self.this) def __get_config(self): """Xine configuration accessor. See pyxine.config.XineConfig for details. """ from pyxine import config return config.XineConfig(self) config = property(__get_config) def __del__(self): libxine.xine_exit(self.this) print "Xine deleted" def open_audio_driver(self, id=None, data="NULL"): """Initialize an audio output driver. FIXME: more """ return AudioPort(self, libxine.xine_open_audio_driver(self.this, id, data), data=data) def open_video_driver(self, id=None, visual=None, data="NULL"): """Initialize a video output driver. FIXME: more """ try: datap = data.get_xine_x11_visual() default_visual = "X11" except AttributeError: datap = data default_visual = "NONE" if visual is None: visual = default_visual visual = constwrap.XINE_VISUAL_TYPE(visual) return VideoPort(self, libxine.xine_open_video_driver(self.this, id, visual, datap), data=data) def stream_new(self, ao=None, vo=None): """Create a new 'Stream'. The stream will be initialized to play through the specified audio and video output drivers. """ if ao is None: ao = self.open_audio_driver() if vo is None: vo = self.open_video_driver() return Stream(self, ao, vo, libxine.xine_stream_new(self.this, ao.this, vo.this)) def get_browsable_input_plugin_ids(self): """Get a list of browsable input plugins. Returns a sequence of plugin ids (strings). """ return libxine.xine_get_browsable_input_plugin_ids(self.this) def get_autoplay_input_plugin_ids(self): """Get a list of input plugins which support the autoplay feature (whatever that is...) Returns a sequence of plugin ids (strings). """ return libxine.xine_get_autoplay_input_plugin_ids(self.this) def get_file_extensions(self): """Get list of recognized file extensions. """ return libxine.xine_get_file_extensions(self.this).split(' ') def get_mime_types(self): """Get list of recognized MIME types. Returns a dict whose keys are the recognized MIME types. The values of the returned dict are themselves dicts, each with two items: 'extensions' -- which contains a list of filename extensions associated with the given type. 'description' -- A textual description of the type. """ d = {} for str in filter(None, libxine.xine_get_mime_types(self.this).split(';')): try: mimetype = MimeTypeInfo(str) d[mimetype.type] = mimetype except ValueError: warnings.warn("Bad MIME type: '%s'" % str) return d def get_demux_for_mime_type(self, mime_type): """Get the demuxer id which handles a given MIME type. Returns 'None' if there is no demuxer for the specified type. """ return libxine.xine_get_demux_for_mime_type(self.this, mime_type) def get_input_plugin_description(self, plugin_id): """Get description of input plugin. """ return libxine.xine_get_input_plugin_description(self.this, plugin_id) def list_audio_output_plugins(self): """List available audio output plugins. Returns a tuple of plugin ids (strings). """ return libxine.xine_list_audio_output_plugins(self.this) def list_video_output_plugins(self): """List available video output plugins. Returns a tuple of plugin ids (strings). """ return libxine.xine_list_video_output_plugins(self.this) def list_post_plugins(self, type=None): """List available post(-processing) plugins. Returns a tuple of plugin ids (strings). The optional argument 'type' can be give as one of: 'VIDEO_FILTER', 'VIDEO_VISUALIZATION', 'AUDIO_FILTER', or 'AUDIO_VISUALIZATION' to limit the returned list to the specified type. """ if type is not None: type = constwrap.XINE_POST_TYPE(type) return libxine.xine_list_post_plugins_typed(self.this, type) else: return libxine.xine_list_post_plugins(self.this) def get_log_names(self): """Get the names of the log buffers. """ return libxine.xine_get_log_names(self.this) def __log_buf(self, buf): try: return int(buf) except ValueError: return list(self.get_log_names()).index(buf) def log(self, buf, *args): """Write a log message to a log buffer. """ libxine.xine_log(self.this, self.__log_buf(buf), ' '.join(map(str, args))) def get_log(self, buf): """Retrieve messages from a log buffer. """ return libxine.xine_get_log(self.this, self.__log_buf(buf)) def register_log_cb(self, callback): """Register a log callback function. Note: This is unsupported as of libxine 1 beta4 (January, 2003) """ libxine.xine_register_log_cb(self.this, callback) class AudioPort: def __init__(self, xine, port, data=None): self.this, self.xine, self.data = port, xine, data def __del__(self): libxine.xine_close_audio_driver(self.xine.this, self.this) print "AudioPort deleted" class VideoPort: def __init__(self, xine, port, data=None): self.this, self.xine, self.data = port, xine, data def __del__(self): libxine.xine_close_video_driver(self.xine.this, self.this) print "VideoPort deleted" class MimeTypeInfo: def __init__(self, str): import re type, exts, desc = str.split(':') self.type = type.strip() self.extensions = map(lambda s: s.strip(), exts.split(',')) self.description = desc.strip() def __str__(self): return ": ".join((self.type, ", ".join(self.extensions), self.description)) def __repr__(self): return "<%s: %s>" % (self.__class__.__name__, str(self)) ################################################################ # class Stream class _param(property): def __init__(self, key, wrapper=int): key = constwrap.XINE_PARAM(key) def fget(stream): return wrapper(libxine.xine_get_param(stream.this, key)) def fset(stream, val): libxine.xine_set_param(stream.this, key, wrapper(val)) property.__init__(self, fget, fset) # FIXME: why can't I set this through property.__init__? self.__doc__ = "Stream parameter %s" % key class _stream_info(property): def __init__(self, key): key = constwrap.XINE_STREAM_INFO(key) def fget(self): return libxine.xine_get_stream_info(self.this, key) property.__init__(self, fget) self.__doc__ = "Stream info %s" % key class _meta_info(property): def __init__(self, key): key = constwrap.XINE_META_INFO(key) def fget(self): return libxine.xine_get_meta_info(self.this, key) property.__init__(self, fget) self.__doc__ = "Stream meta-info %s" % key class _Stream_EventStream: class Error(Exception): pass def __init__(self, visual, stream): try: self.direct_events_to = visual.direct_events_to except AttributeError: raise self.Error self.direct_events_to(stream) def __del__(self): if hasattr(self, 'direct_events_to'): self.direct_events_to() class Stream(object): __slots__ = [ 'xine', 'ao', 'vo', 'this', '_dest', 'estream', '__weakref__' ] def __init__(self, xine, ao, vo, streamptr): self.xine, self.ao, self.vo, self.this = xine, ao, vo, streamptr self._dest = {} try: self.estream = _Stream_EventStream(vo.data, self) except _Stream_EventStream.Error: self.estream = None def __del__(self): # FIXME: we get hung here sometimes, particularly when # the movie has not completely starting playing... print "deleting Stream" #self.stop() del self.estream libxine.xine_dispose(self.this) print "Stream deleted" def __raise_error(self): raise StreamError, libxine.xine_get_error(self.this) def open(self, mrl): """Open a stream. Look for input, demux, and decoder plugins, find out about the format, see if it is supported, set up internal buffers and threads. Raises pyxine.StreamError upon failure. """ if not libxine.xine_open(self.this, mrl): self.__raise_error() def play(self, start_pos=0, start_time=0): """Play a stream from a given position. To start playing a other than the beginning of the stream, specify either 'start_pos' (0..100: percentage of the way through the stream), or 'start_time' (in seconds). Raises pyxine.StreamError upon failure. """ if start_pos: start_pos = int(start_pos * 655.36) start_time = 0 else: start_time = int(start_time * 1000) if not libxine.xine_play(self.this, start_pos, start_time): self.__raise_error() def trick_mode(self, mode, value): """Set xine to a *trick* mode. Set xine to a *trick* mode for fast forward, backwards playback, low latency seeking. Please note that this works only with some input plugins. (In fact, as of libxine 1beta4 (Jan, 2003) this is not supported at all.) 'Mode' can be one of: - 'OFF' - 'SEEK_TO_POSITION' - 'SEEK_TO_TIME' - 'FAST_FORWARD' - 'FAST_REWIND' Raises StreamError upon failure. """ mode = constwrap.XINE_TRICK_MODE(mode) if not libxine.xine_trick_mode(self.this, mode, value): self.__raise_error() def stop(self): """Stop stream playback. Stream stays valid for new open() or play(). """ libxine.xine_stop(self.this) def close(self): """Stop stream playback, free all stream-related resource. Stream stays valid for new open(). """ libxine.xine_close(self.this) def eject(self): """Ask current/recent input plugin to eject media This may or may not work, depending on input plugin capabilities """ libxine.xine_eject(self.this) def get_status(self): """Get current xine engine status. Returns one of: 'XINE_STATUS_IDLE' -- No MRL assigned 'XINE_STATUS_STOP' 'XINE_STATUS_PLAY' 'XINE_STATUS_QUIT' Actually, as of libxine 1beta4, 'XINE_STATUS_STOP' and 'XINE_STATUS_PLAY' seem to be the only values you'll ever see. 'XINE_STATUS_IDLE' is never used, and 'XINE_STATUS_QUIT' is only used inside the stream destructor. """ return constwrap.XINE_STATUS( libxine.xine_get_status(self.this)) def get_audio_lang(self, channel=-1): """Try to find out language of an audio channel. Use -1 (the default) for current channel. This may raise pyxine.Error if unsuccessful. """ return libxine.xine_get_audio_lang(self.this, channel) def get_spu_lang(self, channel=-1): """Try to find out language of an SPU channel. Use -1 (the default) for current channel. This may raise pyxine.Error if unsuccessful. """ return libxine.xine_get_spu_lang(self.this, channel) def get_pos_length(self): """Get position / length information. Returns a triple of: - 'pos_stream' (0..100) - 'pos_time' (seconds) - 'length_time' (seconds) Depending of the nature and system layer of the stream, some or all of this information may be unavailable or incorrect (e.g. live network streams may not have a valid length) Raises pyxine.Error on failure (probably because data is not known yet... try again later) """ pos_stream, pos_time, length_time = \ libxine.xine_get_pos_length(self.this) pos_stream = pos_stream /655.36 pos_time = pos_time / 1000.0 length_time = length_time / 1000.0 return (pos_stream, pos_time, length_time) def send_input_event(self, type, button=0, x=0, y=0): """Send an event to the stream. All listeners on the stream will get the event. Currently, you can only send input events (type XINE_EVENT_INPUT_*). """ import event e = event.InputEvent(type, button=button, x=x, y=y) libxine.xine_event_send(self.this, e.this) def new_event_queue(self): """Create a new EventQueue to receive events from this stream. """ from pyxine import event return event.EventQueue(self, libxine.xine_event_new_queue(self.this)) def new_event_listener(self, callback): """Create a new listener thread to receive events from this tream. ALERT: We hold a reference to your callback. If it is, e.g. a bound method, you may have problems with garbage collection not happening at the right times. You can fix this by using a weakly bound method (see weakmethod.) """ from pyxine import event return event.ListenerThread(self, libxine.xine_event_new_queue(self.this), callback) def get_video_source(self): """Get video source for the stream. Use this to rewire the video into post plugins. """ from pyxine import post return post.PostOutput(self, libxine.xine_get_video_source(self.this)) def get_audio_source(self): """Get audio source for the stream. Use this to rewire the video into post plugins. """ from pyxine import post return post.PostOutput(self, libxine.xine_get_audio_source(self.this)) # FIXME: # get_current_frame() # get_video_frame() # FIXME: def send_vo_data (self, type, data): type = constwrap.XINE_GUI_SEND(type) if type == constants.XINE_GUI_SEND_COMPLETION_EVENT: event = _XEvent(data) packed = event._ptr() elif type == constants.XINE_GUI_SEND_DRAWABLE_CHANGED: packed = _int2void_p(data.get('id', data)) elif type == constants.XINE_GUI_SEND_EXPOSE_EVENT: event = _XEvent(data) packed = event._ptr() elif type == constants.XINE_GUI_SEND_VIDEOWIN_VISIBLE: packed = _int2void_p(data) else: raise Exception, "%s not supported" % type # FIXME: how to interpret return code? # (seems to be 0 if request recognized, # somewhat random otherwise)... return libxine.xine_gui_send_vo_data(self.this, type, packed) # Stream parameters, and (meta-)info are accessible as properties # # e.g. # # print "speed is", stream.speed # # stream.audio_mute = 1 # Parameters locals().update(dict(map(lambda key: (key.lower(), _param(key)), constwrap.XINE_PARAM))) speed = _param(constants.XINE_PARAM_SPEED, constwrap.XINE_SPEED) vo_aspect_ratio = _param(constants.XINE_PARAM_VO_ASPECT_RATIO, constwrap.XINE_VO_ASPECT) # Stream info locals().update(dict(map(lambda key: (key.lower(), _stream_info(key)), constwrap.XINE_STREAM_INFO))) # Meta info locals().update(dict(map(lambda key: (key.lower(), _meta_info(key)), constwrap.XINE_META_INFO))) # Other miscellaneous properties as alternatives to the get_*() methods status = property(get_status, doc="""Current stream status. See documentation for method get_status. """) audio_source = property(get_audio_source, doc="""Current audio source for stream. See documentation for method get_audio_source. """) video_source = property(get_video_source, doc="""Current video source for stream. See documentation for method get_video_source. """) #FIXME: clean this up... def _int2void_p (val): return "_%x_void_p" % val import struct class _XEvent: _size = 24 * len(struct.pack("l", 0)) def __init__(self, e): type = e.type # The XAnyEvent structure data = struct.pack("iLiPL", type, e.sequence_number, # long unsigned serial e.send_event, # Bool send_event 0, # FIXME: HACK: Display * display e.window.id) # Window window # XINE_GUI_SEND_COMPLETION_EVENT wants an XShmCompletionEvent, # but doesn't seem to use anything but the window id (drawable). # XINE_GUI_SEND_EXPOSE_EVENT wants an XExposeEvent. # It uses count from Xlib import X # FIXME if type == X.Expose: data += struct.pack("iiiii", e.x, e.y, e.width, e.height, e.count) pad = self._size - len(data) assert pad >= 0 data += "\0" * pad self.data = data def _ptr (self): return libxine.rawmem(self.data) pyxine-0.1alpha2.orig/test/0040755000175000017500000000000007622533572014705 5ustar pimanpimanpyxine-0.1alpha2.orig/test/Makefile0100644000175000017500000000321407621051152016326 0ustar pimanpiman# $Id: Makefile,v 1.1.1.1 2003/02/08 00:42:18 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. TOP = .. PYSOURCE = pxtest.py PYSOURCE += constants_test.py constwrap_test.py cstruct_test.py event_test.py PYSOURCE += post_test.py swig_test.py weakmethod_test.py xine_test.py TESTSOURCE = wonderful_strange.wav TESTINPUTS = $(TESTSOURCE:.wav=.mp3) GEN_FILES = $(TESTINPUTS) DIST_FILES = Makefile CREDITS DIST_FILES += $(PYSOURCE) $(TESTSOURCE) $(TESTINPUTS) include $(TOP)/common.mak all: check: all blib-top PYTHONPATH=$(blibdir) $(PYTHON) pxtest.py 2>&1 >/dev/null .PHONY: blib-top blib-top: $(MAKE) -C $(TOP) blib # Test sound file from # http://www.wavsource.com/tv/tv06.htm#twin wonderful_strange.mp3: wonderful_strange.wav lame --mp1input -h --resample 44.1 --lowpass 5.0 -b 32 -S \ --tt "Wonderful and Strange" \ --tl "Twin Peaks" --tg "Sound Clip" \ $< $@ pyxine-0.1alpha2.orig/test/CREDITS0100644000175000017500000000035107621051152015705 0ustar pimanpimanwonderful_strange.wav: The sound file wonderful_strange.wav (used to generate wonderful_strange.mp3 which is used for testing) came from http://www.wavsource.com/tv/tv06.htm#twin. It's a sound clip from the TV Series "Twin Peaks". pyxine-0.1alpha2.orig/test/pxtest.py0100644000175000017500000000660107621051153016573 0ustar pimanpiman# $Id: pxtest.py,v 1.1.1.1 2003/02/08 00:42:19 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. import sys, os, os.path, inspect, unittest, weakref the_xine = None the_stream = None def srcdir(obj=None): f = inspect.getfile(obj or inspect.currentframe()) return os.path.dirname(os.path.abspath(f)) testdir = srcdir() try: import pyxine except ImportError: sys.path.insert(0, os.path.join(testdir, '../build/lib')) import pyxine if __name__.endswith('pxtest'): sys.stderr.write("Using pyxine from %s\n" % srcdir(pyxine)) class TestCase(unittest.TestCase): def getXine(self): global the_xine if not the_xine: the_xine = pyxine.Xine({'misc.memcpy_method': 'glibc'}) return weakref.proxy(the_xine) def getStream(self): global the_stream if not the_stream: the_stream = self.getXine().stream_new() return weakref.proxy(the_stream) def delStream(self): global the_stream print "Deleting the_stream" del the_stream the_stream = None def delXine(self): global the_xine self.delStream() the_xine = None def getTestMRL(self): return 'file:' + os.path.join(testdir, "wonderful_strange.mp3") class AllTestLoader(unittest.TestLoader): def __init__(self, testLoader=unittest.defaultTestLoader): self.testLoader = testLoader def loadTestsFromModule(self, module): suite = unittest.TestSuite() dir = self.get_dir(module) for mod in self.all_test_modules(dir): suite.addTest(self.testLoader.loadTestsFromModule(mod)) return suite def loadTestsFromNames(self, names, module): suite = unittest.TestSuite() dir = self.get_dir(module) for mod in self.all_test_modules(dir): try: suite.addTest(self.testLoader.loadTestsFromNames(names, mod)) except AttributeError: pass if suite.countTestCases() == 0: raise RuntimeError, "No tests found for %s" % names return suite def get_dir(self, module): try: return os.path.dirname(inspect.getfile(module)) or '.' except TypeError: # Punt... return testdir def all_test_modules(self, dir): test_src = filter(lambda f: f.endswith('_test.py'), os.listdir(dir)) test_src.sort() return map(lambda f: __import__(f[:-3], globals(), locals(), []), test_src) if __name__ == '__main__': unittest.main(testLoader = AllTestLoader()) pyxine-0.1alpha2.orig/test/constants_test.py0100644000175000017500000000231207621051153020312 0ustar pimanpiman# $Id: constants_test.py,v 1.1.1.1 2003/02/08 00:42:19 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. import unittest from pyxine.constants import * class ConstantsTests(unittest.TestCase): def test_0(self): self.failUnlessEqual(XINE_VISUAL_TYPE_NONE, 0) def test_1(self): self.failUnlessEqual(type(XINE_IMGFMT_YV12), int) if __name__ == '__main__': unittest.main() pyxine-0.1alpha2.orig/test/constwrap_test.py0100644000175000017500000000665307621051153020332 0ustar pimanpiman# $Id: constwrap_test.py,v 1.1.1.1 2003/02/08 00:42:19 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. import unittest from pyxine.constwrap import * from pyxine.constants import * class ConstwrapTests(unittest.TestCase): def test_str(self): self.failUnlessEqual(str(XINE_ERROR(XINE_ERROR_NONE)), "XINE_ERROR_NONE") def test_repr(self): self.failUnlessEqual(repr(XINE_ERROR(XINE_ERROR_NONE)), "XINE_ERROR_NONE") def test_iter(self): self.failUnless('NONE' in XINE_ERROR) def test_init_with_str(self): self.failUnlessEqual(XINE_STATUS("STOP"), XINE_STATUS_STOP) def test_init_with_prefixed_str(self): self.failUnlessEqual(XINE_STATUS("XINE_STATUS_PLAY"), XINE_STATUS_PLAY) def test_bad_init(self): self.failUnlessRaises(ValueError, XINE_STATUS, "FOO") def test_XINE_EVENT_INPUT(self): self.failUnlessEqual(XINE_EVENT_INPUT("MOUSE_BUTTON"), XINE_EVENT_INPUT_MOUSE_BUTTON) self.failUnlessEqual(XINE_EVENT_INPUT("INPUT_MOUSE_MOVE"), XINE_EVENT_INPUT_MOUSE_MOVE) self.failUnlessEqual(XINE_EVENT_INPUT("XINE_EVENT_INPUT_MENU1"), XINE_EVENT_INPUT_MENU1) self.failUnlessRaises(ValueError, XINE_EVENT_INPUT, "BAR") def test_contains(self): self.failUnless(XINE_EVENT_INPUT.contains(XINE_EVENT_INPUT_MOUSE_BUTTON)) self.failUnless(XINE_EVENT_INPUT.contains("MOUSE_MOVE")) self.failUnless(XINE_EVENT_INPUT.contains("INPUT_MOUSE_MOVE")) self.failUnless(XINE_EVENT_INPUT.contains("XINE_EVENT_INPUT_MOUSE_MOVE")) self.failIf(XINE_EVENT_INPUT.contains(XINE_EVENT_QUIT)) def test_compare_with_int(self): play = XINE_STATUS("PLAY") self.failUnlessEqual(play, XINE_STATUS_PLAY) self.failUnless(play > XINE_STATUS_STOP) self.failUnlessEqual(XINE_STATUS_PLAY, play) self.failUnless(XINE_STATUS_STOP < play) def test_compare_with_constwrap(self): idle = XINE_STATUS("IDLE") enone = XINE_ERROR("NONE") self.failUnlessEqual(int(idle), int(enone)) self.failUnlessEqual(idle, XINE_STATUS("IDLE")) self.failIfEqual(idle, enone) def test_compare_with_string(self): play = XINE_STATUS("PLAY") enone = XINE_ERROR("NONE") self.failUnlessEqual(play, "PLAY") self.failUnless(play in ("STOP", "PLAY")) self.failUnless(play in XINE_STATUS) self.failUnlessEqual("PLAY", play) self.failUnlessEqual(play, "XINE_STATUS_PLAY") self.failUnlessEqual(str(XINE_STATUS_PLAY), play) self.failUnless(play > "STOP") self.failUnless("QUIT" > play) if __name__ == '__main__': unittest.main() pyxine-0.1alpha2.orig/test/cstruct_test.py0100644000175000017500000000564207621051153017776 0ustar pimanpiman# $Id: cstruct_test.py,v 1.1.1.1 2003/02/08 00:42:19 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. import unittest from pyxine import cstruct, libxine class CstructTests(unittest.TestCase): def setUp(self): raw = libxine.px_make_input_event(1,2,3,4) self.e = cstruct.xine_event_t(raw) def test_simple(self): e = self.e self.failUnlessEqual(e.type, 1) def test_set_type(self): e = self.e e.type = 42 self.failUnlessEqual(e.type, 42) def test_input_event(self): e = self.e ie = cstruct.xine_input_data_t(e.data) self.failUnlessEqual(ie.button, 2) self.failUnlessEqual(ie.x, 3) self.failUnlessEqual(ie.y, 4) # FIXME: test more complicated (**) accessors. _n_TestSubclasses = 0 class SuperTests(unittest.TestCase): class TestClass(object): __p = 2 def m(self): return 1 def _get_p(self): return self.__p def _set_p(self, val): self.__p = val p = property(_get_p, _set_p) class TestSubclass(TestClass): def __init__(self): self.__super = cstruct.super(SuperTests.TestSubclass, self) global _n_TestSubclasses _n_TestSubclasses = _n_TestSubclasses + 1 def __del__(self): global _n_TestSubclasses _n_TestSubclasses = _n_TestSubclasses - 1 def m(self): return "SUPER: %d" % self.__super.m() def _set_p_sub(self, val): self.__super.p = 2 * val p = property(lambda self: "SUPER: %s" % self.__super.p, _set_p_sub) def test_method(self): ts = self.TestSubclass() self.failUnlessEqual(ts.m(), "SUPER: 1") def test_get_prop(self): ts = self.TestSubclass() self.failUnlessEqual(ts.p, "SUPER: 2") def test_set_prop(self): ts = self.TestSubclass() ts.p = 2 self.failUnlessEqual(ts.p, "SUPER: 4") def test_destruction(self): ts = self.TestSubclass() del ts self.failUnlessEqual(_n_TestSubclasses, 0) if __name__ == '__main__': unittest.main() pyxine-0.1alpha2.orig/test/event_test.py0100644000175000017500000000416307621051153017425 0ustar pimanpiman# $Id: event_test.py,v 1.1.1.1 2003/02/08 00:42:19 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. import unittest import pyxine from pyxine import event from pyxine.constants import * class EventTests(unittest.TestCase): def test_InputEvent(self): e = event.InputEvent(XINE_EVENT_INPUT_MOUSE_BUTTON, button=1, x=2, y=3) self.failUnlessEqual(e.type, XINE_EVENT_INPUT_MOUSE_BUTTON) self.failUnlessEqual(e.data.button, 1) self.failUnlessEqual(e.data.x, 2) self.failUnlessEqual(e.data.y, 3) def test_InputEvent_mutable(self): e = event.InputEvent(XINE_EVENT_INPUT_MOUSE_BUTTON, button=1, x=2, y=3) e.type = "INPUT_MOUSE_MOVE" e.data.button = 2 e.data.x = 4 e.data.y = 6 self.failUnlessEqual(e.type, XINE_EVENT_INPUT_MOUSE_MOVE) self.failUnlessEqual(e.data.button, 2) self.failUnlessEqual(e.data.x, 4) self.failUnlessEqual(e.data.y, 6) def test_wrap_event(self): e = event.InputEvent(XINE_EVENT_INPUT_MOUSE_BUTTON, button=1, x=2, y=3) w = event._wrap_event(e.this) e.data.y = 6 self.failUnlessEqual(w.type, XINE_EVENT_INPUT_MOUSE_BUTTON) self.failUnlessEqual(w.data.button, 1) self.failUnlessEqual(w.data.x, 2) self.failUnlessEqual(w.data.y, 6) if __name__ == '__main__': unittest.main() pyxine-0.1alpha2.orig/test/post_test.py0100644000175000017500000000515707621051153017275 0ustar pimanpiman# $Id: post_test.py,v 1.1.1.1 2003/02/08 00:42:19 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. import pxtest import unittest, weakref from pyxine import post class PostTests(pxtest.TestCase): def setUp(self): stream = self.getStream() self.stream = stream self.goom = post.Post(stream, "goom", audio_target=stream.ao, video_target=stream.vo) def tearDown(self): del self.goom del self.stream def test_construct_goom(self): self.failUnless(self.goom) def check_in_out(self, dict, name, length=1): self.failUnlessEqual(len(dict), length) self.failUnless(name in dict) self.failUnlessEqual(dict[name].name, name) self.failUnlessEqual(dict.get(name).name, name) self.failUnlessRaises(KeyError, dict.__getitem__, "foo") self.failUnlessEqual(dict.get("foo", "baz"), "baz") def test_inputs(self): self.check_in_out(self.goom.inputs, "audio in", 1) def test_outputs(self): self.check_in_out(self.goom.outputs, "audio out", 2) def test_destruction(self): stream = self.stream goomref = weakref.ref(self.goom) stream.audio_source.wire(self.goom.inputs["audio in"]) self.goom = None self.failUnless(goomref(), "Post(goom) deleted itself too early") stream.audio_source.wire(stream.ao) self.failIf(goomref(), "Post(goom) didn't delete itself") def test_PostOutput_destruction(self): stream = self.stream ref = weakref.ref(stream.audio_source) self.failIf(ref(), "PostOutput from Stream didn't delete itself") ref = weakref.ref(self.goom.outputs["generated video"]) self.failIf(ref(), "PostOutput from Post(goom) didn't delete itself") if __name__ == '__main__': unittest.main() pyxine-0.1alpha2.orig/test/swig_test.py0100644000175000017500000001111607621051153017251 0ustar pimanpiman# $Id: swig_test.py,v 1.1.1.1 2003/02/08 00:42:19 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. import pxtest import unittest import pyxine from pyxine.libxine import * class SwigTests(pxtest.TestCase): """Tests of the SWIG typemaps.""" def setUp(self): self.xine = self.getXine().this def get_xine_stream_t(self): return self.getStream().this # FIXME: test int64_t INPUT def test_CONSTANT_MEMBER(self): xine = self.xine cfg = xine_config_get_first_entry(xine) self.failUnlessRaises(AttributeError, xine_cfg_entry_s_key_set, cfg, "foo"); def test_INT_ARRAY256_t(self): s = self.get_xine_stream_t() osd = xine_osd_new(s,0,0,50,50) color, trans = xine_osd_get_palette(osd) self.failUnlessEqual(len(color), 256) self.failUnlessEqual(type(color[0]), int) self.failUnlessEqual(len(trans), 256) self.failUnlessEqual(type(trans[0]), int) xine_osd_set_palette(osd, color, trans) self.failUnlessRaises(ValueError, xine_osd_set_palette, osd, color, trans[:10]) self.failUnlessRaises(ValueError, xine_osd_set_palette, osd, ['2'] * 256, trans) xine_osd_free(osd) # STRING OUT gets tested by CONSTANT_MEMBER def test_FREEABLE_STRING_t(self): xine = self.xine exts = xine_get_file_extensions(xine) self.failUnless('mpg' in exts.split(' ')) def test_STRING_p(self): self.failUnless('none' in xine_list_video_output_plugins(self.xine)) # STRINGDUP INPUT # STRINGDUP *INPUT # these get tested by the Xine.config.register_* tests in test/simple.py def test_opt_STRING_t(self): self.delStream() ao = xine_open_audio_driver(self.xine, None, "NULL") xine_close_audio_driver(self.xine, ao) self.failUnlessRaises(pyxine.Error, xine_open_audio_driver, self.xine, "foo", "NULL") def xtest_STRING64_t(self): # FIXME: need a stream with a LANG? s = self.get_xine_stream_t() xine_open(s, self.getTestMRL()) print "LANG", xine_get_audio_lang(s, -1) def test_SWIGPTR_p(self): s = self.getStream() # this tests SWIGPTR *INPUT post = xine_post_init(self.xine, "goom", 1, [s.ao.this], [s.vo.this]) # this tests SWIGPTR * OUT inputs = xine_post_s_audio_input_get(post) self.failUnlessEqual(len(inputs), 1) self.failUnless(inputs[0].endswith("_xine_audio_port_t_p")) xine_post_dispose(self.xine, post) # FIXME: test xine_mrl_t ** # FIXME: test struct timeval * # FIXME: test xine_cfg_entry * def test_NONNULL_SWIGPTR(self): self.delStream() self.failUnlessRaises(pyxine.Error, xine_open_audio_driver, self.xine, "foo", "NULL") try: xine_open_audio_driver(self.xine, "foo", "NULL") self.fail() except pyxine.Error, e: self.failUnlessEqual(str(e), "xine_open_audio_driver failed") def test_OKAY(self): s = self.get_xine_stream_t() self.failUnlessRaises(pyxine.Error, xine_get_pos_length, s) def test_ITER_OKAY(self): xine = self.xine n = 0 try: xine_config_get_first_entry(xine) while 1: n = n + 1 xine_config_get_next_entry(xine) except StopIteration: pass self.failUnless(n > 0) def test_LOOKUP_OKAY(self): xine_config_lookup_entry(self.xine, "misc.memcpy_method") self.failUnlessRaises(KeyError, xine_config_lookup_entry, self.xine, "foo.junk") if __name__ == '__main__': unittest.main() pyxine-0.1alpha2.orig/test/weakmethod_test.py0100644000175000017500000000331507621051153020432 0ustar pimanpiman# $Id: weakmethod_test.py,v 1.1.1.1 2003/02/08 00:42:19 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. from pyxine.weakmethod import * import weakref, unittest argval = None class TestClass: def weak_m(self, val): global argval argval = val self.val = val weak_m = weakmethod(weak_m) def m(self, val): global argval argval = val self.val = val class Tests(unittest.TestCase): def setUp(self): self.o = TestClass() def test_a(self): m = self.o.m m(1) self.failUnlessEqual(argval, 1) del self.o m(2) self.failUnlessEqual(argval, 2) def test_b(self): m = self.o.weak_m m(1) self.failUnlessEqual(argval, 1) del self.o self.failUnlessRaises(weakref.ReferenceError, m, 2) self.failUnlessEqual(argval, 2) if __name__ == '__main__': unittest.main() pyxine-0.1alpha2.orig/test/xine_test.py0100644000175000017500000003555207621051153017255 0ustar pimanpiman# $Id: xine_test.py,v 1.1.1.1 2003/02/08 00:42:19 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. import pxtest import unittest, time import pyxine from pyxine import libxine from pyxine.constants import * class SimpleXineTests(unittest.TestCase): """Tests which can be run without instantiating a Xine object.""" def test_get_version_string(self): self.failUnlessEqual(pyxine.get_version_string(), pyxine.XINE_VERSION) def test_get_version(self): self.failUnlessEqual(pyxine.get_version(), (pyxine.XINE_MAJOR_VERSION, pyxine.XINE_MINOR_VERSION, pyxine.XINE_SUB_VERSION)) def test_check_version(self): pyxine.check_version() # shouldn't fail self.failUnlessRaises(pyxine.Error, pyxine.check_version, 42,0,1) class XineTests(pxtest.TestCase): def setUp(self): self.xine = self.getXine() def testBasic(self): repr(self.xine.config['misc.memcpy_method']) def test_open_audio_driver(self): self.delStream() self.xine.open_audio_driver() self.failUnlessRaises(pyxine.Error, self.xine.open_audio_driver, "foo-driver") def test_open_video_driver(self): self.delStream() self.xine.open_video_driver() self.failUnlessRaises(pyxine.Error, self.xine.open_video_driver, "foo-driver") def test_stream_new(self): self.delStream() ao = self.xine.open_audio_driver() vo = self.xine.open_video_driver() self.xine.stream_new(ao, vo) def test_get_browsable_plugin_ids(self): browsable_ids = self.xine.get_browsable_input_plugin_ids() self.failUnless('file' in browsable_ids) def test_get_autoplay_plugin_ids(self): autoplay_ids = self.xine.get_autoplay_input_plugin_ids() self.failUnless('DVD' in autoplay_ids) def test_get_file_extension(self): file_extensions = self.xine.get_file_extensions() self.failUnless('avi' in file_extensions) def test_get_mime_types(self): mime_types = self.xine.get_mime_types() self.failUnless('video/mpeg' in mime_types) self.failUnless('mpg' in mime_types['video/mpeg'].extensions) def test_get_demux_for_mime_type(self): xine = self.xine self.failUnlessEqual(xine.get_demux_for_mime_type('video/mpeg'), 'mpeg') self.failUnlessEqual(xine.get_demux_for_mime_type('foo/bar'), None) def test_get_input_plugin_descriptions(self): xine = self.xine desc = xine.get_input_plugin_description('file') self.failUnlessEqual(type(desc), type("")) self.failUnless(len(desc) > 0) def test_list_audio_output_plugins(self): ao_ids = self.xine.list_audio_output_plugins() self.failUnless(len(ao_ids) > 0) self.failUnlessEqual(type(ao_ids[0]), type("")) def test_list_video_output_plugins(self): vo_ids = self.xine.list_video_output_plugins() self.failUnless('none' in vo_ids) def test_list_post_plugins(self): xine = self.xine self.failUnless('goom' in xine.list_post_plugins()) self.failUnless('goom' in xine.list_post_plugins("AUDIO_VISUALIZATION")) self.failUnless('goom' not in xine.list_post_plugins("VIDEO_FILTER")) def test_get_log_names(self): xine = self.xine log_names = xine.get_log_names() self.failUnless('plugin' in log_names) log_section_count = libxine.xine_get_log_section_count(xine.this) self.failUnlessEqual(len(log_names), log_section_count) def test_get_log(self): xine = self.xine log_lines = xine.get_log('plugin') self.failUnless(log_lines[0]) self.failUnless(type(log_lines[0]) == type("")) log_lines = xine.get_log(1) self.failUnless(log_lines[0]) self.failUnless(type(log_lines[0]) == type("")) def test_log(self): xine = self.xine xine.log(0, "foo") self.failUnlessEqual(xine.get_log(0)[0], "foo\n") def xtest_register_log_cb(self): self.fail("FIXME: fill this out when xine_register_log_cb works.") class XineConfigTests(pxtest.TestCase): class ConfigTracker: def __init__(self, val=None): self.val = val def callback(self, cfg): self.val = cfg.value def setUp(self): self.xine = self.getXine() self.config = self.xine.config def test_config_num(self): val = self.config['decoder.mpeg2_priority'].default self.failUnlessEqual(val, 6) def test_config_bool(self): val = self.config['input.file_hidden_files'].default self.failUnlessEqual(val, 1) def test_config_range(self): val = self.config['codec.a52_level'].default self.failUnlessEqual(val, 100) def test_config_enum(self): val = self.config['misc.demux_strategy'].default self.failUnlessEqual(val, "default") def test_config_string(self): val = self.config['input.vcd_device'].default self.failUnlessEqual(val, '/dev/cdrom') def test_register_num(self): xine, config = self.xine, self.config name = 'junk.test_num' tracker = self.ConfigTracker() tracker.val = config.register_num(name, def_value=3, changed_cb=tracker.callback) cfg = config[name] self.failUnlessEqual(tracker.val, cfg.default) config[name] = 6 self.failUnlessEqual(tracker.val, 6) self.failUnlessEqual(config[name].value, 6) def test_register_bool(self): xine, config = self.xine, self.config name = 'junk.test_bool' tracker = self.ConfigTracker() tracker.val = config.register_bool(name, changed_cb=tracker.callback) cfg = config[name] self.failUnlessEqual(tracker.val, cfg.default) config[name] = 1 self.failUnlessEqual(tracker.val, 1) config[name] = 0 self.failUnlessEqual(tracker.val, 0) self.failUnlessEqual(config[name].value, 0) def test_register_range(self): xine, config = self.xine, self.config name = 'junk.test_range' tracker = self.ConfigTracker() tracker.val = config.register_range(name, changed_cb=tracker.callback) cfg = config[name] self.failUnlessEqual(tracker.val, cfg.default) config[name] = 6 self.failUnlessEqual(tracker.val, 6) self.failUnlessEqual(config[name].value, 6) def test_register_enum(self): xine, config = self.xine, self.config tracker = self.ConfigTracker() tracker.val = config.register_enum('junk.test_enum', values=('val-a', 'val-b', 'val-c'), changed_cb=tracker.callback) cfg = config['junk.test_enum'] self.failUnlessEqual(tracker.val, cfg.default) config['junk.test_enum'] = 'val-c' self.failUnlessEqual(tracker.val, 'val-c') config['junk.test_enum'] = 1 self.failUnlessEqual(tracker.val, 'val-b') self.failUnlessEqual(config['junk.test_enum'].value, 'val-b') def test_register_string(self): xine, config = self.xine, self.config name = 'junk.test_string' tracker = self.ConfigTracker() tracker.val = config.register_string(name, def_value='foo', changed_cb=tracker.callback) cfg = config[name] self.failUnlessEqual(tracker.val, cfg.default) config[name] = 'val-c' self.failUnlessEqual(tracker.val, 'val-c') self.failUnlessEqual(config[name].value, 'val-c') class SimpleStreamTests(pxtest.TestCase): # Get and set params def test_get_audio_volume(self): stream = self.getStream() volume = stream.audio_volume self.failUnless(0 <= volume <= 100) def test_set_audio_volume(self): stream = self.getStream() stream.audio_volume = 25 self.failUnlessEqual(stream.audio_volume, 25) stream.audio_volume = 75 self.failUnlessEqual(stream.audio_volume, 75) def test_get_speed(self): stream = self.getStream() self.failUnless(str(stream.speed).startswith('XINE_SPEED_')) # Non-existent params def test_get_foo(self): stream = self.getStream() self.failUnlessRaises(AttributeError, getattr, stream, 'foo') def test_set_foo(self): stream = self.getStream() self.failUnlessRaises(AttributeError, setattr, stream, 'foo', 1) # Stream info def test_get_has_video(self): stream = self.getStream() self.failUnlessEqual(stream.has_video, 0) def test_set_has_video(self): stream = self.getStream() self.failUnlessRaises(AttributeError, setattr, stream, 'has_video', 1) # Stream meta-info def test_get_title(self): stream = self.getStream() self.failUnless(stream.title is None) def test_set_title(self): stream = self.getStream() self.failUnlessRaises(AttributeError, setattr, stream, 'title', 'Foo') def test_get_audio_lang(self): stream = self.getStream() self.failUnlessRaises(pyxine.Error, stream.get_audio_lang) def test_get_spu_lang(self): stream = self.getStream() self.failUnlessRaises(pyxine.Error, stream.get_spu_lang) def test_get_pos_length(self): stream = self.getStream() self.failUnlessRaises(pyxine.Error, stream.get_pos_length) def test_eject(self): stream = self.getStream() self.failUnlessRaises(pyxine.Error, stream.eject) def test_get_audio_source(self): stream = self.getStream() self.failUnlessEqual(stream.audio_source.type, XINE_POST_DATA_AUDIO) def test_get_video_source(self): stream = self.getStream() #self.failUnlessEqual(stream.video_source.type, XINE_POST_DATA_VIDEO) print "TYPE", stream.video_source.type def test_send_event(self): stream = self.getStream() q = stream.new_event_queue() stream.send_input_event(XINE_EVENT_INPUT_MOUSE_BUTTON, button=1, x=2, y=3) e = q.get() self.failUnless(e) self.failUnlessEqual(e.type, XINE_EVENT_INPUT_MOUSE_BUTTON) self.failUnlessEqual(e.data.button, 1) self.failUnlessEqual(e.data.x, 2) self.failUnlessEqual(e.data.y, 3) class PlayingStreamTests(pxtest.TestCase): """Tests which require an actual input stream. Most of these involve playing a stream.""" def setUp(self): self.stream = self.getStream() self.stream.open(self.getTestMRL()) self.stream.audio_volume=50 def tearDown(self): self.stream.close() #self.delStream() # Stream meta-info def test_get_title(self): stream = self.stream self.failUnlessEqual(stream.title, "Wonderful and Strange") def test_play(self): stream = self.stream stream.play() time.sleep(0.1) def test_play2(self): stream = self.stream stream.play(start_time=20) time.sleep(0.1) def test_stop(self): stream = self.stream stream.play() time.sleep(0.1) stream.stop() stream.play() def test_close(self): stream = self.stream stream.play() time.sleep(0.1) stream.close() self.failUnlessRaises(pyxine.Error, stream.play) def test_get_status(self): stream = self.stream self.failUnlessEqual(stream.status, XINE_STATUS_STOP) stream.open(self.getTestMRL()) self.failUnlessEqual(stream.status, XINE_STATUS_STOP) stream.play(start_pos=50) self.failUnlessEqual(stream.status, XINE_STATUS_PLAY) stream.stop() self.failUnlessEqual(stream.status, XINE_STATUS_STOP) stream.play(start_pos=95) self.failUnlessEqual(stream.status, XINE_STATUS_PLAY) time.sleep(2) self.failUnlessEqual(stream.status, XINE_STATUS_STOP) stream.close() self.failUnlessEqual(stream.status, XINE_STATUS_STOP) def test_get_audio_lang(self): stream = self.stream self.failUnlessRaises(pyxine.Error, stream.get_audio_lang) def test_get_spu_lang(self): stream = self.stream self.failUnlessRaises(pyxine.Error, stream.get_spu_lang) def test_get_pos_length(self): stream = self.stream pos, time, length = stream.get_pos_length() self.failUnlessEqual(pos, 0) self.failUnlessEqual(time, 0) self.failUnless(length > 1) def checkEvents(self, events): self.failUnlessEqual(len(events), 1) self.failUnlessEqual(events[0].type, XINE_EVENT_UI_PLAYBACK_FINISHED) def test_new_event_listener(self): stream = self.stream events = [] l = stream.new_event_listener(events.append) stream.play(99) time.sleep(2) del l self.checkEvents(events) def test_new_event_queue(self): stream = self.stream events = [] q = stream.new_event_queue() stream.play(99) done = 0 while not done: e = q.wait() events.append(e) if e.type == XINE_EVENT_UI_PLAYBACK_FINISHED: done = 1 self.checkEvents(events) def test_new_event_queue_polling(self): stream = self.stream events = [] q = stream.new_event_queue() stream.play(99) done = 0 while not done: e = None while not e: e = q.get() events.append(e) if e.type == XINE_EVENT_UI_PLAYBACK_FINISHED: done = 1 self.checkEvents(events) def test_destruction(self): print "call delStream" self.delStream() self.stream = self.getStream() def test_send_vo_data(self): #FIXME: pass if __name__ == '__main__': unittest.main() pyxine-0.1alpha2.orig/test/wonderful_strange.wav0100644000175000017500000007545207621051153021153 0ustar pimanpimanRIFF"{WAVEfmt U+  qfactdataz0[!@ aPz,  ߚ΅>g"J5 +sĥ >}BVՀ )[ %u9(~E_PsȈ7ŠcΘ2D#-aVR!*kP ۑ03z }MnQݑtr]Z+ڽ]OwdnŽ$|kqEIt3jQ:AK=ʥl?GT$/ӥ>ש Rhg&6X0.d@N>W VNzFd8Qg]& u.0b$q鹉ncO,z"OzڠnC\K3l2XI7@0ENzFl OV"} eSU10TA]i*iAI"hAR >N=0]Nz)K<骘 m(G#bpǪ&StXIHmM*[U+B p ĀNVy̸̺[+g)B p pCee5 qGL(Z6 9}:=Qdl7K$J+לDg9oԁ ȄD čyȊ"] Ȋ}5>\zfazG&Ywf=ٌHC5v7U2qzۺWe#$B0|xϴm'\;;gl%^6|>{TNOFL`Ct}l, 2;mDSL,1=%18BS0čAy __smA׭]Fگ8,D !kB3[Jy&AW[4\-Gbu2\t,3֣1uˡB45bZ*fz!]. rY5܉|/_Q%v5ZZ ķ`Q瘔<ӥ0O#* rijGs!q"C ɒœAi0Kpfbg{}$HT˹0ĤcƨgM3a !VHe\3 Sաqt@bVM݈vֵ*5n!~,*1>J]4uP!`[!ATID 0ļxG$`\ÄKԲ8%y)BU4BHa=ϾRf:ڷma#DqCk9#eFAlZm^0?:rΥzw.c aDO.Kc-3#y D*]_w n ANzFV/Rʹ%WIj lPtICU2!#Z??8 ``wG{@@BP%p*NJ%HlP,0Bx[Od#$LPq838 11a/EHYԭpim~K;bI'S<Ӧy36-Xx(I=lkwmqzoGbsk+eбG@ٗ0 SLI]Vƌ$ VpUш|kLԥ :]'YPf"+ShLj;[}c'IIcaD]'tVJ{mSѯ\0jЌM4' ;Z PE#%PzIzք,#/]|lQ ȶWSfBe T2v5IH$ 0&Fn=:Wu2/t^"zRi:k-6$hɕ &y_tղZ_KR2ɰ-$ :n;7e-ɕ'! >qNe7$eurw+N=mDPH0}'VC (J+ `D>ND4Ə}3|wEF譭#υة{3T˷v/0::Rݔ22 h"UWjٜULPAvV# @JПUje MUCUЖT LU`Cɯ(IiT~0p1ʢB\FuG̨cDW90 U5Yh[ 93 ?eC!,鰕8gN䨀!"\DMN.[hW}_fxS'FiQPVuwnTZ @5Veu]Y]'u_ *VzJpV7j2s3be/@g ʟ^,9{ƕٚYr׿1`39 }L7\q-S e|xOJ0"\_1V^ϳMOHl~H~L"NCTYU03PJ*/Y|kyϳ̰M+mRbku\]+#ך΄d{my]ڶjXsvM9?׵\q *DKVMnO?ޝ1lziBu2 %E'[PlGs0]^e;hwg;L2+TWB+3db20B޼LJv*9Fy茮%o!'/m7@;+"@aº&זW/:Q[cnтdE\d*>:S]qC !-]إ˳Ggtj4$i BTL$J;$fhR"$x:9m@++[EkgrY8HU7EE:iylȵ`rI;hKb90 LIQ{#Lޠ vҫ+A?I#,Yii-RRX]py(9['ف6˩ [/֬ggMހ jhK8 [_i .cn#,3Q t4 yG~3Q}Xb4-8 V[K2+v]mՎZ<݇{Uo3=(#/;qqU]&3S0 u]z#|v+OQNw/jt)xX_]@4Sm6a#t JO9^ovitRku2*'E,}ݰLϒK3 h驪++jJGu#b VN@'|A_HqQaV,ַU2!PaB7g8D恖4t+#jײS0ĿBzeMG/X>t"\G:fV,,UAOuC7HlrT$7LkF70V>eI %,*avs%QĝYTSV2ݭ)Ξ-5bpm7l]j[b0 *x酀\S߆?"0(6PaۘbrXud/[AxDM>F|V$W,F. !dm0&N؂fs?$<(C piΒ%P!D}vܚW'xڔ\QTdD A'rOW'yE:p6muͭ~[ʧARRrilp@v0V "X bM6=1A!rOH L B8pE=Qlwj- )/N8kEm$I0ʉ%]$0ļ`LD*BCCϊpGbzPsfb{5cvL+)TbRA?q>Wa0"0yt6JI+,1-']sMȖHX Vt:XFJaĴ[" ا ~3 eS G&Q !O]V A2)av6ve0ĺzK Be,XC^v=}lPפ{V@N&\cCHS %&d#Ps/{;|){@L_5 8cvK\kӡ)jN a!R+ A6NK̰?{O@Pk #a:ækآktf1%kbnQ**Z D(t1a.0}Ƃ0A>bLiW\–^ẋpK's?RoO,Q8D;:Rzc l*\D^D<4R3|KUI4T$(vS;Jy"Eliԃ@Њ  FKQ̮y+"BT>ʁ/r2aΠyۙ)fws5oI L'.ِ`~y`C02b oMNr 61GXrQmS"b;s|]jK! 'tvI~槀rY b&ygG/a>FYOF9|%Y4<2'ڕȷװ*RN\- .xM0"~bD.n05m㜒0!\MbYY` 2dWPH)21;uk=F02Lx$X+k%*_opW %.Q*z дr|E7he.v̞uum\J>5JԐg(SJil;Yu}^CȜuolEg F Ұ[iU8~{ffj޾E5S0c]Ay͚p-GӒȭ i†+_ڋw#>0#D{ ?m9V(H 0ɡnJG(L͌0ejs DDawJ"DLAbhM$).PVMZh:D!#҈#vp'>qqR*pLˎ7C') N HȞ]90b/31(4JX]e!^"JJLFX+8<&u q|L_#jb#B/O(4y5 Kp(ӈj./g:7OʢlZÑv9C BLGMAkڨ%ct88i__GRx;GA" hڕyNZ4IH2 )j[#ӥO &hZfI-n_`1 G :jN)#"h]1PP߁aUe]EܻdF?d A ˤ;JăpJ8$9B)&`)c?Xz:kĬkރ]Nlz]dwr^o0ĭVxTV5\bA'Jyf( :%W (49w 1vHրdY=[JYZ"Tp**3G:"~JtW5"8AqJvTζv_T6vxH\FQl .x_ԗU8`z|dvEU!:W';Đh3}e4y#s)Alj0 CLf1%0Ĺ.k 8DkkV.)y$ i.?/?3"9t ĪhY8|4Ϥ򈭒hSHmż Db^sWݔ!a@@ >1_g]!|Js!Ϫ0@9 &xK,Ɵ?>y3 AHkrT{b4d K*?l7 F\E2ı1ggJWD[L`{veNKK)|+9K0BVDG ~~t>4X"\ӤM 0h>wѨۀ2:k7?;a,|R[~&TM? g2BGh,"w]$Hד%6Fs='Z:Ywf 4yFuuuu #g{O?2l5 `*߁屗lP\v3:*|3b43C t5U vwez6]>}VrC,0Ļ~4xݮjU23"J%٢ tlN)k_ li1]ߛRf7 ojNR0ľp ;àV]&UvFtrE\!Nmm 4xA ^;vo֒pX*a#ÞR{_uڐBvo,HpMi_~!Lxq 8 lz;S6lȀkR\1;TD ]-t~#SL/dKfbB%j0ĽiF @;$D*IjD,<YP1!9i%0@ogu]v&[sؐ|t챶USu&"ZE,dHTfA {,G5rie+"!S^R NyB޺K+nԾ>&MR!)S`-H;4m Vm~T(u< OP8BZ L! !f0ĹF8XDєLN]BCHۘ`x೚Y{m+f;hTsM\_DbON3PV`#0VC6Yӆ֚&&%@FqRl!NP\V)ウDŽ6 -h+ oGBfdD+O  3Q_l .w6U^vBv^/EDa ^O6dar10ļAJF },̫|j;UٌKln8, @\n"aB;V0bP56uwKձd6syܯq@8phC:lOUb7GJENc^2T h:{ކ>DR,cY5{RŽF + wdg}ypO8(E! {{1levֶ(f%/0ĿGtXijJVMAp#a+Yr'ɟaVa7S? @`4hA):f1wF WzU:.WQ,To־(TDuK,bK ꐷgoq}ko',,B}z+0S5rjHG t?i$FP l:ЪkL 6Cz4b^CV ķ x&[ڇ ]kһ⾔ Cъd7!dMV1Ҩtnд]J8(Z3L90ğx.}.V%g gJyz3?M8DaaۜϧЯX@Ub÷cC _ݡ[(8_wM`1V=AzOWy(4F9`|V#ަMIJԭ;OIZEU*Ħ,P Ŀx(/ 9I(qDe,6?_oVR_aAdV-ƤD׌XP ,hqcƄ"eTt KC黓(G4 0īA{ xUΗ=P %D4*V9-4J.4*igXTU!!)K5Xv*K}SX!-+ݐ2̾q7bVjUV4wӦC!bH xNŐm FzFxQ{Kt!SHY1jvSVf>0qk5 !c9U{Al{ ﻲdPbwB0IJ`,0>P}2UCb@c\|+)TtP?)1( hh)hK| ˗6PPƅFZDpkZjmT+ZҮWgU궈bSJ_ᵢj^Zrxp/H,"\$Ah@XD'/3-)$F!v`4^2 X`LA izq#RԶuŵƅ$0,dS̙aҡMHʖ"SNh,b[,c80ĺ!b忏Hwko{6_YwIG/&kk{wޮ}g‚B$RlRf[c2>X jK: P>Jx`6 $q-5tW t~QV`E_R 2xT4X%-.,TMJ RU<Y1n3ͼZ s3(EMoe:qckiZzc޾50ģG@ykr,j[TZw+nvVvnښ;A(LSNڦlmYfϹAU{iKHNy6E(9/{$N)!h O@I`h5I{Wվ8ݎן8>.ߗ|)2< Ŀx0㿓-('.\55eWos}*7#-<H\/=X Yq08(z0NhTu>0Ī(zFVKkƉH=}ie+}:?GVQ$!_Idog߯mJ7jGuKL&nYnrtK1d957̥4up&hFf Rz((4Z jPOr6Fe e WQPkJ(!U^r[nZV. iK( -u0Ĵ{C9~R9X0VV.qbM#U_1p*QnZ ?BGD%L)B@ĵ,h.g3B,sb_w6. `@b 1QR.**8zȹ 3Q Bfxpٕ8(K|VM{)&w@RlьJU{7?%)y27^RVreN[[ܧ^-S 1E˜@SM60AB p(,4>bBR&$! xi4rBb!&]+a@VC$$B& Zٞ]VQY9 R7nFT`25Mzע 'eI^vqtͿ'? vjH\ N*R B-'.UORf^k)7E2Ϧth\NE 0Ĺ(~K݈ȟ"߄y^$݄,ͼ-Z1elhfF?-eJ~jDXJ([ x$J@,'x\{i5,,q <ACHM s ^z{x *;h]E ʖƗ U,ly2Cߡ` ?rcj ,PE'% @` b+CBk׆S肠HX9%ί֕`&v`%DYLͨ*2Bp&t%zA ]'0ħzXQ8'~X3q8& 弹5͡).@ 2Ͷv jBN)#h߫EhhA0ZQ:HNG3 ! 4#+̵ { y_ݭ` zFeC!zx{GqO @ >Z틃E)yZr\r[(L 3S!*B' s~?7CHbo&60ijB>xJXQ[ HKbՎU\)㞝qͶQL$Yp?L3 jG.muvtTڌHQQdUu"]pA.̳ñcK)GJmũȩI&+,RK|$5LSRҼ}Z BF{VVS<+}Jp:O†A5o48f3rhg\NeB]S&E\ɩ>,X0BK2^VtLshBЪx%! /#:(򼿫 Bt;D */PW' h|܆?&:iQ}ۗlWw43ZLLKT] BL v8͇ DDޏO8ѮjE 8Q#=L2yKFHBR"X^1**0#`Tzק{FO܌v%qq:RLeL.Xj#zOM'aOiKK\C:/>ݭvVT5K,9C$ơ`43W PEGC\@ ( АWphKU+aTl՘)Fq"MH+/j&tċogn2%T(PD$.]g+\=0ľAJC`0Q8g5I&3p{?zq-JPŝ=R;nz<̆)+ҩ sŪ&W"=G0jx0D% R}ȉjB&؟˛{ƒ:0 ΥZyVXEvMxqZ-g' :xVς UCl "ť<"oj$DAxU N?8ǁ X~2 JzF|21E_Eƚ9TWrȪZ?V)pD2rts^&<ش2n0xM,1Pj' @3D TО|jnG:1WjBg<[mYnu{ffn_N~Q PU5?ݨvEDK5ȾSfEKS55Z1t( A`F8>(lOA>LW9L@Vs", cl=zkӵʧ.@}95w"[+k2,Q/&f F%(r0 R z Q,H20G Z5a`uC;=v['׍uzfRHk;rʳ4쮱 cjf/j_#&QaS#>G2NgӤɝnղQaF R ۝&b$ c  k8G (}"dn[cIb O'Lj/uu?j%!ɵĢ{kM{hS'eFY0&HFHIgM)"Ot'MZL5 ڴS v^f+FhTyyYǧ'Ǫzf_UUjoqTaF@} :6$UEEnEEV r@HcDڪlɡ.Yݨ}މ*%[ʫJ=uim-K <p&3PUg68Ta84ƽ9M{%MoF;$l~p̲k"$Q]܁cMy (] #F ՞zĦs$ t0>BѠ6щFV`%XlM(:.aV`yz> r+ *v&Ue^@\k2~]0ĽAVJZf\q$R}8qs> *9 ,TjN"A ؔp*MNR\BT(t-3@sވ2 ]~#0rskm#ġRk2:@t&a\>ӾeR| V{U.hr,>5[OVķvoƯu{;X >ihא!ƃE;5wԕA1C.Nk/30ľVcа+e:Cs3iPxկG)m1*jZ<*Ty7Y䱔Q(a zL(`hqG־qn %"4NG6wq 6n Jm(ʥyBy.LͯS>>@ 0ĽZ{KJRM ARڞ ]l|QxbA;+Ub/WI V}ktt)0$^PdhH]ޓŽ;,Y" #,s$978zV( NAd : K? $2[,X9b=Vl`N[nu)7FY'4r ҍFNiZ?gP0ĹzG@U.Tt4q'Ȕuކj֍H)ʙ?n|+Jٻ,2%{-eDZaa F!H =($~nIeë2Bf`ЊY z]3| F{ \&.z3=ė◷O HPJ 5E- [Ha#`(XAc2Hً}{js/yrrJVV+B0`S_E8| pbp%˕;i-HŘLY ȹQߠ7rDp,5ZMA;](+ yegVBYCgN $@ok3J5 \SVj "(犼M! y̩L1%d_sW|,,ͥ|$Ux;Q˜FiMMBœUV%-m=f2s4d VD 0ļ`+{2B_=!EȈHiۖ6}?GԏnUyJimTD'j s"ބED9c0˕ Q3+kZUYOc=]N#88 y ]kX6LcDLb%dj9ؙ; LlVHM+0.@0ha`ydc0®zc0B*"`)xa N[FicޛҎ͠",vdm[. (öBeL6^Mb+;_TRʼkV_5MH4c˧gs41  aU[ikWXLsIRWA硎cOzZOXb/ej)e\.'dhJ8ꩧ Lnq)e.4fe)>&wOߒXy-)[ѡ { :_.uu,Yww'x/T x=YCFMՔ}j[oaЂHs!:_PYd&wX000ľqMs>a**h!c+kvV.DRJ@ mxc&FOb1RʄbV8q,a̩=SVb%*bE_?-Ӕ>9/2Dc^0ļAzF !!yF:֡QuFcN4aKlc[<\Uh7͍$jHQd:r \4SMOf+&N 1gUT"[tڬHLLH^hH c0KiT-xm`I8 J ڀTϕ.5Ӏ^œ Ȣn.f4o-hphzU4Dž FLp;'0/ѴN|99#ّ**B&BҌj 0ĽJF9a Pۥ &@fms\iz -dD'nxP)D:Xui3]R׻D&>׻׳MtF]oGGWZ"SiUʨe&ԛ ryFIx9i{?:a&m1,Hkw ^WQu%+< nDK3dM gOu]0߫*I(IfoJƣ!GT?aӨ]nc- G69׭jvqVۦI  vA\KgE[|iM?GⰬf*. 씙Hdi̺a阱Q |Ppy A і0ĞBXdUWc(33Z0`i]sܔ(YY' ȭʥS9\&3' $>[Klhy4DIEC8tqΣϳ]U}<ŔpoGe"~Cb @vцDW]ɴ0FػTfkEij @Zm#B!&IR\5L;j/ER65I%O<"0ĪO(\H6+3y,H-ZԣD!b;&g_}Lq6T1S+ʙŧX p`R~~}i?|?Pfvw) RJҺ%Vn ,XZvZN+Ye2;R/[}MY,ˈ9eEWc8Ѫ! A1sK;h)d\E06M ~!0q( ;FodD#&~.99z_DVd!;0gg(3Af<ĪB9u; hgZۧـATd5Ð0z? qkK Ē9IXTZ42:%9AG 0(dBVHBQNV,]֛|rYEV(5bK ΋n_W0ā@F&zmfb0$ISo.՗h'<+B/y\r S ˄lR{R L<4z"’R-ZHeIM@i {* IJfx̘$計4V!HDAHƉTǽ`"D:LU%k=Xm"$@m!{ugOH''60ĞA^HҘ1vg??̻:VØA ((HAB̕LR*0BjF‹\Œm *R5,"JM}<7䔦6֘{imJG sɗIk=^F{!-] ^ʌmءwLkbZ4ɇ0ĽzFHT-@id\$(Ŕ`6hBj,EkB#@m&|n7'}Pec86!9H."0EfH,|إMU,Kk5"?hpz#`CNR'Z%MFF#n)q <yOHJ8p @p.! ,eEnYmo:P'f*q/=*wu. aVPI˽\`3EYG.3 đ$0Ľ@Tl*AFb*#o$iPn1PJA-mm :q![ٽ 4Wk *Q__6b c;'xbQTOF$(J2YUB'׵WGSM]j̎1)* JD[Yz1T cZ4ă%g,$w"É?J/Tm$D,ѼJ]nyt3#NOimEO0Ŀ̸eaLgA}Is0&'.'2AEԪ4n+-|VQt jЎbz  q,t1/jAp@8TA+R$ )c PRk1I$ˆW@ X F24gtppCsY?9J7//q*Ce:ve+]|(q2(0ĹTnKȄe,^e֩JܨM&b_Nj>FZK@l;pf/ n𻺽$9gT!pa7ٝY[S:)d;2zgPVQCD͝UQ[eqa h2J *Y xu,elVje)uD@ sӯb|&/VyemJs#R)0 򵣗>52!:С߇r ^= hp->= t"O =J\q&P\ot4Upm}*FFʆ]Rz2_cr*;󳪢6D3j6>硺[E*` BVyA'!".вj&K jkM1BƠZ"6/jPԩ(4)Z_"gl(rUIeP0ľB>'#G8'h>.)#oQIB,Kk'AKMNƼ:iD#Efܩ*L-ٖDd@G -9rJM 'H>$f!x # ^DQJAP *h Ӝ1_R  8E>*C,}gZ R2o\lb]!.vko1T>;cx8>}7`mMt[CĿ3,0ĺF&ף(֒YOTᗣǑs2 G5K{M_[ YZrB]=*-\Y{8;t~ a5cI)9hܼ++ߝ)Ъ[4=hyQp q n X>5/C/@;%ZC߀f« DΔȱl+RW⾓kjˈ;U4y$ 0ķ{@kAlBʙ8Aj" FfoATL1=ˊ؉(Q ̍c8 'zBlhFwv/2k=E,9y^̹Z"ˤXُɟSڽG^ NGUt R{7JSFӍ4uZ֭_SlYߘmY$v`/b45o 6W)a:~fL %njG0Ĵ qZÌ!?R]nooyU6~ u5BAg2oi30d%IXH)J(:nŚ O"{` \#K*p*T#Ά@I0J@0XVTA 0 $pck ,T Dc9b!+GZ9v?  ۠ ) G 1:q>XC끍b z9N5UuS*0ĭF}./nXw[USKJ> J"Լ2 $CN}$J.2y(s\ rlCBA/ gZtvkڗxa0[Q-Y.!X);NHnj])|X^TX,+Odܵuџ(80ĮF80e,q0A+u#99R c)$N1(-,:R0(n2\#deH"fXr". 3Ng#vѧ[D?\B'ѴU=_%= AN,@4BOV/j0l OsM 6dsW Q-Vy)w1_NJ c*J0į pOXdQ,ԁ!~o6԰B%+weF.-Lt"խoj80JO{{$ptuߚq C*\)c=' V2R2 CVtQ5dA)%Yae9(ڷz |xF-n.13a|cQ qT6?=˝/hLH]VVr 7CAGwU"~jdSI4W0 QgR σf9fs\(J\̠qQ87uL4nlպF![r ]ZIiڎ㍞$ D{`k/;u_av$fG+?_nۣ% rzPP1K-]]lʒBch< G3(sp ˿7u?7nq0 T ~j)ʋ[o-ĈJ9p-rJycW+GaaZ~E]#Qu䢔ۼܟu p̹>=Ncj+r7QצK#7qI Bzʼۻ接xul`VM Y!7ݐSNM\z@խQxD,{$@O%~ -*-9+n0ʼXUk(NnevŇ=$#vF|hv#rY,UZs svPIc6}蝌§B5 fDzD3ԙ=H:--iţ5ñHZ݀ߐV[\42;'÷րO :kvfIؿġuܶs'@0 Bʼ<NN1S,\bNcGnH)W J-̎1s;%YpKT9C%xNRH[K&_tfI)})hdKi+&I"p)Z+b((ޒ_.Tc E L8#S52js9EXeӡ߈_0"vx!h @[!pyxine-0.1alpha2.orig/test/wonderful_strange.mp30100644000175000017500000014521207622526705021060 0ustar pimanpiman4 Ӧ8O);bo95 N^u2TY Gwi)4. mJLR;j}1\ CLsڨFscIBX)wxHPTؗ#r1BS4e?ZrKDNRBa+~*2&wuBWNgLl!(L& $rlab}4qT2D*2(v`PM`Zl /!"@H S HsrS/Q}*TlD&ħD!e X>]E&nA9xpAByI,eĎs7im:t]gJt rvr;4ē d7̹`Xx^UcUؒr6.y3Zqb_s?I`gR/w_w;YD]Q< ` 1-h( S+unChXQsSJNEs Og34B/ &=-Qs(&"\iX̕Dj0m4hyD3kڣBC&0N 1;$TSI~Ʌ^Etw(kC:Ī[#Rt`@PĘ]N h j@ Fúl]{Ơ4J:}ʽ~I?_]ك$G3=_> 013iOS&`ϐVDWT,1E0 n3/7p1b`F[:) ݐM@ZW6IJr{=;ff   xSk4wx8u[Ą/T $ȑ° {2D!DMYZs3+ff]}`t r( #˻jnL /8+w IWsC2Sט*Cfi<M* $B@2lYYAK"J-TK=KINRjPSD͋ @D_bt Vr'$%ƔX$ٺtJ2_xpxFbI!R \~K'doED5\,$c@,XP<_JԎEUCLu!!!#*}F3\‚JD0"q @1~ՎTc#r˿IsXJDau`@lǤ ZN$傖x1I2*) D_H(Ό'Z7xhM%-("$0ap X'&OdE^ GlAI@ U$6$ŐQu)ycdjMc!jүEa'3[GHBpM6v븺}Q=+SɉD!UD#b,0ˆ/4 AF~BE-Fm4dxԁ×*L߳LfSeiA .ZºAUc.ݐD@CqK[D!m'bl0D*[H&~, H-KSD7n耇.HǤL' XѥYPl(DP<-| "%U|,aIp ՕB>L4\`%\"VD9rg<Я ~Zt bmDCT~TFݨ Ә UPՁLDoMFw("(o!Fdl2UC6aA3Wdp"D|_pGЈn @6s *^; L䫦:DPA7} `@U,|5&X٧nFSO:hD Qn( 9)D?wGJ,qҰ̀ $@w8u5&$)D#(}h(i,T븃$ 0^ˬ30eZl zܨ6 RZd 8Ďc"@:9FwV p.(QB 4-VSIQ )J-$a[٨@htUVIPJдkDdJa4?nT"8JP*m[ǫ46D3fG@ɐl*XFκ@H܊;D;hL0b)RxugZ|Ⱥ18‚>3j8Q?qb)Tdʤ!)Rmnn]7MISbAFX,i@m 3u ӭd.V7ڮD k{ hbJ{ɎCD)}9 :Q. %vӕs˫n?U@H]`578rk)ftُOB}?Y *  b\X̦0!/A *=Œ%:vT.,Dd=l/V:/J (R2IசSnjr>Aa`T=^b!hu\:1D]` =jδ|҇.Ȋ 8Pht4aq%_, \9. N2՘Qާ ,YpE[@ f;x"%]lߢr-޴~/9uT= hD܃h<끆aL6鎹Kƺ\\(Mt3#YE֓8ejByMV4 WoJfCgW]-@X_du-0`cn^fjG!Xۓ,[i8]Wʠ\EuUH4"ED@RR~ Da{`@.j0G786Au&zm/e0•:.Xp( a`L9clw%ʰEc)'/\ 0qhaQ _o46)\kޔ?թ"#~//%`D]jA `>hԮ]y3fgjzU:ɍ am+b4Q5[T1ɬ*)x`QDDtd $G@0CzG)ӟ׫Q?gH7< ISW DzO \k%PɖZ TXI$\9*D3hL= H$DN@nXRys^[\Ne7 |ʧ'CUE#pbDZbfl*UPSYG66n8<p.. aMFSlP@4%DB: *%la%a]*Ca`;zpY¨62vNFM\0=d@ܼ lD'{@9G9D=0lI.HSHK 2m:pN ՌԐ'cpTׅ,_ݖ}J/&'DyF0 ȎotITL8,;&9iy^ p:Q"(Ur0udLV=qk+*%`&DxWneD e`%D^n"tbl(%ux\_(L7D67ÀS0)3r>2E^(DxEn&`n)lVMqhKE(j #5zluF3=8')[& JDEf,h i g#ni rᩨ"eU+^J&BDQ`לLMhhƳM&r)Qٽ@8bˈNDXalg(ul9`↔tpT'`]|-T>n὾UAu##g6A (+e&Yd5+VD_{Fh0^vrI 8<'9>ɥ)o&t~ܢ~D) T5ί9ͱvQbWVs[PfSUPOW\DEyG. pGcVF߬8GvIà>AOB4˩>ePˋf3@PC1d2Rcp# h.Sx2aD@Irg :yF -*2g&(h7"FXvf&6  1 1!01H3:JrB\Eg̕V. ?f\RhD]{F I@žuRuR\\׷29/E;ï-vr[ Y#g+ǨԠ}]=nxgfYt7)ưt*j` F"E#aj=R:@ljoط.ᅵc4>tFgUiBe{GDAfXآō$YmT ^u^z Rs: v/Qc)8t5ڇȦ<%ĖFv4˪ SrI OLD8=hȔn(`%wb&%  <^R BD,\) 9FOFU8sR4>X@cuD\$/#򐰅{@ cDEp`-݄D6+ѥk{vm>'A&m:Na #&X--EkUUNW=jrJ=QEҐH#S?cDcyGȌnǘHubv[Ew}{[&"*`Fv79MF+-c.n df/Smy%,$' #IYgQӮPWË O!lLa"hPnE+\fj[2Tjx1Ӣ}*~6[Dg}f@.EPJGHq&GUIX]zk0 hLT`v%.LBF,heD!htYH޼Ku$z,`DXWdG@It>9RNo}k$Ey0:BϫF~^Uǻni| H 'f/M;ȯ{]ͅN#/(Q ;+HrDuDȈlш '2}i#@m=_?T@ޫ`v\!u5Ρ^80[DQ+ފ6dWrJbNx`%hl0NWMyN[[$e?AX뀱nh?۱]ݡB!!$u3<h&EX5nLωrJEkGfȎ S RoFvw?1~1rzsW# Y[UeƖW2`66D#pf="H 2i4R9:Gڛ!1R,ۖ/V 0r-eXgC50#00yd~Ab ĄD_yG@ Q$ATё)@.L4f`mMhLɾ4NFOys6?OaSdjq.ĉDIr װ,Uѣ1q}x*O2 !zKp7%ް7=$Ҥ dԇ_)#}窛rb¡N"H Z!bsvm6nr. PY^2ÌH/ĩD1hG@X,a1B]õJ^)+rAMhq\yJ1/m퓟c㻖s&uf̣h _0*-[įD|1f 0Ĉmg*%O:~Rofhvx@"Qwa?|m N/VvD C ƢiF؅iGi9mĵPOng1{E%(hJl'4f]f pj,EPF!%u}yjo ĻEdl(<@n0Dqƀ-k? $‚9Yb2V WU@ׯ !{oJ$h :e$8Ľ ؗb. Hd%`2Tn!<=lDŽ|e @8`0ٶgh܉ 5pg CLĬDe{& gp P(ʞu.Yc X$29 Tu461zո}ș9J%#Zt !Bה-IJDp /lpy&@@:G !bc eRMm7*cD9ǹ#/KXY:ҦĸDii UEmh7h8˩wώ|_7 05:!XSe'V0QڼqWvSNfUĽEn )Ȏ0#p8w*ۅaS>_ٕ0K䆆I%褆I*E_H͊q)H8.rU2sH ^\1jľDtsygȄh`d(>½f'֟Ps!`HС=&BJj :4),\zc"G0\KU#b@q:8֩ŀDkyFf( Yd#<tRT=E43OaΦ`t ȓm46Se}[9DaA`*q=]KeP6J,.dޢVhV@vڃČ/^ €0HA(d+>|Q- Xr`"G5[wgqU4tS! d*Fj]F\OD-^  ɄYG*,;!c6T-rRFxf=` fz1 j΂Tn^3(CH'u(E Y "FOKMؒELb̤b뉔kN=޺Dl)`d rwTʾWwSߒC7?ς44ȟkmԀ`1((!0# @GQHFhT <Ȓ -f\&gNzJaWoIW5>=ad*4(Vkd @RzQ"ߺ |D+\ ˆՄ59@ Ԉn %("U5Fb93ŅOA >vB9(k̮c%Kæg0ƵB! ~|oZ,$g+AYhMŭ A$D"[G3ZiO~SMr~4!*` NzvhP +²0"KODua 7 r :Q[AGn8cu2DK$lR`^WA7M# Lǀ 'n)_\ _v&#?\C>b-[#5Jy'3˜fH΂DkL-" ,I AE[WL \!f <"ى6̓s ͍Tj $ꓡ '*Gv DHj=zNQ\vD!sBk`WO!8SJ%FL4 )Rvp?˪ b;%>i*y@6-q"1'*ODbL0HnnjjlW2Tg$ːٖM b!˃e/>;9zBP+x-u!(wdEOlL<@X@ł $ y;xX)ИW^QQQ㑱mwuP '򫪪'n#E,eh,$A]sS9̡'⩤?T5!˧QV*wy# /a?"xu`&g'"+ 08Kd Ȩȷ+@#$|.@Ӎp'B /J(B@ǰ> P<mmgy tqޮ @[7ꭧmGy0EKrf<큇7u`Zmv,âBNIɢ-X3˨'WG`DrrK߹\gBkѯ8E;"EX=nFa/(č!'ME'/%Ъ5O*~Rx/3Հ^+_ǎXkɜNGgiXLY(rGFz1FElgH/g" q8 "/u⠮[X{/J@SPr[Ӆ}RbBV˥ ʎdu_%EqjgG QM q8A@"Є,G<"(XmQ-@',iN0+jһ?.EhEjl0f-dPF(XdANj60eX'd |[!'a}JÊn٣QH6f/ItzC;LEcjl<Ĉ-H|*tV3"RF2@p g'{6Ţ` O,)8kJP,`K!s~@4 xr1{̬s(,E@pgJ, *GWؙL\jhH8"1Qr6KD<4n aKʈATޕ-hj!E8QfLjȢ%R#˪59vռ04YĬ B8ƒL`]а@d\҉uPFt`LpH-@P8I{%&Kn Z-m+\( Oܚ$ä@w⇸"h{+KK!Mn4jC7_bzTZk[Je@XG {s2>\/JגOT`(Q̵9<ҍ@T#sD1q\.(/">4*+ DA&eJM; ˗k\:H TەHI2mQf>L42g΃DpE` bcF0ҊN(@%QGdB "K^ 'D ̇~Z -LN6JP4 Y:S=^6'6$(b07 @uuT+.D# )0!ykۀpiyNF2):prioNRDu-( K_,Xm9̮Q3z9&p¬4T1HhkA+0h׺ulE׬mLXP2,`W{ȂDqGbAQU*حDC$ce16,X Κ ]INjXj%%{ t#jRww|\=t<. xN0o"DDPʕ).NPIQ'\x,|]cRȬ֏xvB$ ꣉$ԃDKp'n%a*qnv=w:" @6@q֪$-d TݳAjR^6Ո dWI8QMu-ۃFLOjdǘR]͉0uN2(DRZ@#$sH($M0^~ Q;I#e#;L)DFS>|1HEBDx?tF ghPK4<%C~N8f'@ V"&UdH\p9]\5XmC<տ;P|"Dx3f, *@셇P=$31GD*ΉdЭjf5jE@GxgU65|[nH bÒ#gc3[EE^L0ƈ.( '0B ̓m bL D͋/㙘7vڃO[BkHXDvG-'%A| a/;-B ~B0AEfl$f@ p#*dEA+Vbog0Zk5JSacFa cF0?PG)DʩyQ̈cXoEpafED7j0ˆ쉄ѴCPE=e92c&A*ӕI/"C7@;]ry/*02%N ',cfΎAᴃmREglɆ `-#fD DJp:jH,‹^-*xaq@xzK @eGds\ * -E v"x;o+ 1jZ/ZH5 Lڤv)T3n_IH爪UK 6C>2YLF{UX=f,$f@ XMd}BG,X'U4qppH UU ‚bI4 Zl%k mQ 1[i8}r+iǞ ?%3+8{]|;E _hƈm Z5YEf,ضTR\4@ߟT՛G<M7 .b*kh ITz N vwr޸vݵ-Eph0b ن Q IfakUtZC2lu 3S*U*,yGө{w X|'!|ڵFژY )b* eGT 0@ -  mBp%֕gc;!IsUR0$9XLe6$颈q4ܛ4FDhLF,Ń0a#HG˳U*A¿T 3cCe}oWZioAt%m@`BT2yr }EtwiL0b쉃 ) bn6Ʊrݓ`2"8KL`(ʑ@ϘN}|&`6Qf<"RO\c^,g(ҤS.p8'q&[xeEN^e6 Tu B/V< Uc=b55كĈaj  wICէ?S_tF04,?Pw8BZccˉCjJ8<$CJ& 1# ހEtGf̼dHtH{4Val,B[V1o\Lt:S *$r5n_:Ȧ9& 1|zİ1 5۠Sn6\DGjL0d 51AN[+,WcDžgMHQPT);(J8()jXh`)jY/#x1D!E /jlr8GvC.P8h/H#x0@9E|qwGf@ J҇¨dJF?`ǚHj%Ov`eL~MdmU )#;1es>"L=]lzE|jl i@X+x.+FX%;XF/k7E9ـB7db =3NuauġrEoLYe2 :4md(+-e"P7?PG<%Zhi>J0%.}T 锂y$c@cE @Ov'ڿ%Dx9`,$PX#TQJ2"`bڻ _0lڟQR!TؼŠؐ!А4K~RFZTX6m MTDQud _79X(K8=qMA_tB͎?yVcj,D16>R1 (Y, (|qT a$ȇl5KckN7wVVVvfeL̥?(` F} Y 8NJ~lKDĄKd 0j@.uRքOŖǫDdbϨG{YzS6qqm CARV[_k!wdU)Z:Egk,-3Q܁½a @ 8"(݇p-r9ED;`,dȢl K9L!at udRpvy!vx,Tފ3-!F$ma8h PTG V nȎ0}N$r"=O#QN@W9l$0%T < S1^&hÝ+R=dfD(4VHt줔S .f XY-C`Sr- xE55G! 2ڤ/[٠6-Gʕ$.H4:ӐZ$dMZa.gX?D]l $g*VDn+E'veԳapNL†Hx-ArgbU+"m鞪Sf~9H؀Ddar@.䠨?BBLaqSFblWJY4T^Pq9@q.Rpx8#V9y,)0^ Ds}IH (~"!EB[& hT'غp^{m4U:J ;DjrpR4J';(TW;u,DQn*Ȍ nDLYY %%3Wej?Q d_,`nQ1lඊtIm'-A+)҉(Esty!:9P3‘E\_wGghK|4O*$a( pk/l?mW=mXz 9}!KkG5(&*EtsGd I1I2IĖAbPeXE>ɞRědEs]Ñ ;ҢrQ|}TT(܈"'PFXaZ,ȍ|W"mU˕BSmwS!PRu`D Zac +R *3Exa`L$G 4m<# C̓gSAmUH>(0R" )l%GZ]`gP+ײt!L7CEEԭE}^,fب필\ = JQXc0t2%UXo6;J4OPlUJ)Xts@HO{SOsE0_p   sr)>̥Ä1&I +K|ژ"!OĆϊ3]KK=0ag)f1ۭXDZEsrf-$-HXƽ8"54 lZ"z/8.@@r TC,: ɼu}b ~adIDgxcm!rQյmQKjU V|*-3.aq$D"`[a:idƃ ȑ3 2Dg{&b]Ѥ i?,@ilrS'-w%裷}]{B/3 iukz&6[AZeHJ>@=qĠKrg @ X{R1e&؉EܐCTo$h`,M*(.9)B {mj_%)%HiQUeyuEspl0GH( !0RqZz>v} /uSq6 9pU#a-@]i8Helz=<7d7xabEx{FvDqhEEEhH Hx)Mhb{5GABbT A1ZEYIHY)jIp&QA@R cI?Er )@.d-XQGh2q\S"᪟'lm0f I`L cȠ"ԏd^acV9r 3gG\Dudf9,zA {x=H^hА51+Ow? (MUb!Raqfc44!{0Zcu#tw{Ȝ`1)-t333.igR̾ϲ∻"[M]XH9afŭYH0DˎT]<F4}p %t`ؿn_O~%Z fS|V¥FbIa{f6-{B8h'eFQG* f#u2 PDŨolHT 1 X6P 8!Qp gjE6koY5$ ؐ:Φ-D݉tpmTE ])$\͂Dk\IV/tw`)Z8_WcS4"ID[ yt謁GaiJѤ0jRU3b(NR{{B2(zH~F}V HlE X4r^) Ʒ,90GY@ X@ NL4!P==}ߪfߙy Cfi\dNЀDti' Ï+E㦱(Efgݲ۔[֥^(0<L@X#ePxƘ"3]JHq2ߌ.<3ܩ$klmb .7Y!h† rlDdljX iTRP^k7"s a|Pw~dȬ=2W.:DDY@e6MƗ %@??61ijCsT2[n.ixŋݧ*Xq<*s 7a NHzDm|t()hR^Ud sSCPha YmĨF@KX= G~[~]ty5ځә-@ŐxDdvzhS'raE,%)ZħD)`,jN?5F"K2:QYDeo0!w0hZL)0-ĔuZٔn+ ,glSt/d/*P]"CДUgI8"m Nܛ{+#+LxRbCSDARċDT-b .tǠH#WUxi,皘9z1[6Zr,hZV!`;1 8ؗ~(qDzQ1*ēD-` $t 8P(É,oe2eb'K\M^F ΟSFƶڱ8lF)zW9Dzb QUҶ^-@hęDh+h#.0+$8lrc/jBLZ]WyAY~:j,b| !m @fsĝDOpGHmAke1zQY0L[8: ]M(ȼymr>Y21E4b:;i|Y&ĢDT?f 0g PA0J; NĬQćRb:pY%:" XnvA4bI TYĨD/fG(QgA4[Fضj}Bx">?AżC€DStcHmXڡ7(Azl2Pg 6x ݷBpmH]bT4VݸȈ6% >Q)l0SDyDh@n -pKF$m%K%IpXp{b_(ҷ)DOB}J 1@R% vƩ[n}.˂D9h'Ȋmkb+gozY>ށ՛9(M厭*`N }~U*bp^#N 4DOY|Z_S$/DD1f 0Ȏh1+pV`_@P&MsMHE:y\O]DuGDH (a=Us !8t8YtNتMOh+?VotНٸs T{&DDVFS&۬+"ТfJDw AXJxH*z ёhlP|-3kZdYV0mlNBBmE&YP7ZW/YtyF}Z-` qRvVav aZqn02&y>:\a0%R %!K[i"JVل6{E4W` hc@mi) ә! ]D^K/E: ^ \A 8v@<"IBU-9J-oJéˣCD(Sd dC .v0Z!@dHe-| *yJx(1wҐIXɩk&˪Լ[ͥSӇEA&)8fi Dq^90l&X 7 PP)>UvyÍ/#q+ fCu j'2H L.zl3jmނD#d,e4IǀFQ[S.z<%fxT HExv$R|6 'F,C,tQռ!@>E0Owdȉ,ɄМx=}uV;]M․)jmr.g߿tEH; F.Ż=u3@/hTV3 #ub# !E^,dc t pk>O[1 g|!•\k]H.D'ɔ|SEH~/KG1r"g_[, V8T Jaa5 4GH)I!Q_VGFw(!3c`Ntnɶw yM٥5c{N]qz]$YAv1Ǥ%HGV=,ЎўO QPI  2ueC@HSM"&EAji0=8[c sRDw@4Q,s,-Į ZD-: R/iQX :@nFh r#g<5du }PX!E #`ۃD'^ %솰0kĎNi JWE*2tI@e돰`f_w*JXCaIHÍ4>-6B/"D-`,dk `b^L ' *d #Nc f4(t3̀ʳĄ/^ e M2*ș  pigǭi="ۓ:7|.R@* 5+|>`Hޙa' ~F밤ryTmyO'PEtEcLfȖ+͔@"s VaTҫD%lÄ|TH$b ɸ x,DSg\bE^g AҘs/%6j֧.~[vt=)naTD`>p"\ c-ܛVʛc)jtwE +\,<Ĉ+ ʧlHr:b491pG4Ӥ#a?͒v1A*L*EZn*HsD#`H A BIE(E`$d´0 2G3⌡9YZj0!* m>2ŝȑhD7Kۍ{B p!φQم7"p9u* Hǀð bLI<^C"cfLCY!U,K1mZJZUix祤Ġ/^ Ĉm9,yt8+~(X>TTPFʵ XGܠQuL2}`I9-dG$qO d̀?ʑʀDSh$b(ÌH,; D~]3y4BD&%!ǫԝ(Ig t?Gol:1E }eD몴*lrh`bzG1|B(#=Zjy,H/㕘Ml=N]5i-\kuYɊETodLgHA`(D,;-䄌=оc$[tf  :D sTDmb* iE|]`,0cȟs"@A  P*%-98f:'Bby\ S\iPj @7dx$ i䤿|FȃZ o 57Iʇ j8FAg9oѫ:{NgRɮ= F@')"DU^$rpP|!D=h 1"@kFFh6tdg[mԴą,N-5 !iP"7B( f;TteQE0N@ͤO\!0" e6 |d$+)t5Bg)EQn,𐬍8Ch)Lգm$4S;$-Oqc  DQ)G@ k(ptGOQDwGGȊ `*V &bwBKO1mlbDK`?nJ[zh@b_$65}C> qDEwGbH °0U'DU,6%ULasD&~:es.e@ 92R,$l:,D0 k?;*eiĹ8uok8@=4f& /n9m?c׺(5Tߔhй2DJI[phy;5J@ <^?ĘDm\لIZRcN*[ 3_4A9A-]#F3LTR/͸xm)ĦD|!fHˆ!@ Z"Pcp߽C&\Di4@* I.tE =KBX;xtMI'jĬD/^,0ˆmn5ϛ+~`r$)<PX9s ۨ-x3mya% $h)^>IJDt!^ <۱*` (c}e"PYKӝiO{'_;c|08B.fU.ɹ3%o (Qc}AMķDbL1HѝAE2U wL AhjzђKQ2B2MN(NB ZrYa3$PAF% apļD#`,eH% I[ E[Y7ex@N%:ӎf `X|1Dr~9ߌ!.[t, @D "@cD/i'Q6H "gڂ0^T|7I2sEkq K5g[!r&N196[ǀDwbYI#9\!kѺ͇T%Q*6+j8:΁j 22H&-D  PBYdS+ 4)@&D-\ ˆ+œ >nX TVs%6ͿQRΉ. ZWPXZm;h.*D(84 Nð /4rmD'M;<6lgdsB#Z db%c&5V*FT1CA[U ؀,^ G4 `QMr:q_\hu&0p$)ML[&iht7"LgFpx ςD)b91@yxH4 >͙x; )H@B QȑvVaK`s;_]Ax5>)dyւDOh0bH ـe6 C3\wȯN jBLOo {nf p ;$WF*! Q;`[քb%6DOyg }%q3)tnҖS Tcq ul.2ǁ4$X=@u v}~ " #߱yzi?ʢD]b g,ՃiI7ϡĎB->?_ z$F;?o N`{:, )ܶ]?k)uAi^~FDfLI@I PE[B*j6לB.,nv JG|Y$8\eONLmͩ0ZU hxĂ|<({E$b5"6znщF9?g'q/rdmJfޛUY|W-_nU2fH\}8 E`D=yw꒫C4`ZuaTQU2ņ!ۤ U"0Z,&HcFg?*SpYdCA:MC@1I$֫Ύ-{6Ҙ)K8ҎTʑt|p}X2``*2U"^W>X2(~UvK)Z ks  PPl U63v@bPV$ J*SɧNFdhWQ̤El*غc L)F`">gQԣHļD)^ <ˆlH!G# EFβ kn/Ŋ'97'X%mZ'Ub|Zb*hG d@2JD^, GkńhU~g 8/% 9C=XK$SQ? v!!>!hKDhm]jU/&<Ä#MaeƀDskT uyc6ah !:S,Ti&#bW#9p hhܠP6Y fE[\[͙RDewglB80V$+ \hFDS3a=Es6(*P8Fnyb; m_1LF̜\Xp!EhyZ hȐlII8#p\$%Vܕnk gF}mEЦS^tJ V >1d `EUARD$K*‹ٹYZE n ea9рDP#b $Dot~;p߮< H՚gcMŖO#hApVcSDVq!1  !/-.-i>zRQ,rtPe^,g,!Io$=v͵($m! &>e0*)*  K-7f@R_pbx;aWbZ^-fW|YEaZ $gHE z͘S_`@ aD.Q~L,rИ"L\7*H huF [%d(,mz 8sE +^,(QC,9~1Q/ Ub0h =**3$2.)taG3ǼCa G32m̕ʕ7XS((ZEd\,d, Q-ؗQ Q;SӅ*l^LAJ3h2dx 0JAS  |n1>4NđEe\,dȟ끗XN*[-"'!}Gk櫒 /fm=f!@A0ˮǶ RLk? "XDŽ 1GP @n@hnAl&)K]UٛS0"fbfMƨ:(Dpni&! D,qjQrDQuCk@1As;$`x`L*<6EZX50 2a!EТYD=PbyjA<Ո5MWg1`16"e%4n[eMm71P!B9bԼ!ٽ@jG *b#,5IH _ր \>C8vZ9B–2nR#:5 ~~J[`--G}Q g F75 !-L|Ļ\+b 7t)uޤAOF <v`]b"h(s_v7ĕ$ Y`o:Vnk5%F\qZlfȓl ES3~a!# H2Hb/bi!t6U O'jeMb@M;XD3?%Ŀ X lð!PwGӑT9c&KNRKHN0ucyFT3}-(Tsތԥ51įĈad 0@ŐH=06gL6ORC!BNa(㯔z n] s-o3^#gɄsӴ}9EzwZĮDoGBZd $@*ahEV-J/ 8+K$: <9 @{ JijDhǔLmHAВ1NIQhf_(Q0'ƽCÐ|zd[ RP1_h%j2m>:äB8j 5YPĹDqFL-XpqI~Y/@d!wDB Q69zJ;#W9ѾX09J'W">rDcf 4@ДςAh"M\{Nl̊G*7$Ax3-KuM /Ҩ0E 7BM@  `cj'm@XsIp+lP` n@Du1C";ݎ3/SfQ ]Bb.i oYn$ sF-ˈA( f i #Ght¢0v7CE,wbH nobR $Ohh U93ra~VK5Ō/x|YZmݡZ)%q}xED{d'(*0:`y6k|`>bdoŝn.NV@|ټ蕰 dNH-sQE5L8EL݂DdOf' X@á.MzWq).pH.@ x!5=<7) ,&#'Iyxx}E\ 0@6 TvEu 1Ў0 %Jj\)cHGf2$JR",w5 \ꏬaK@xAULku)F}0ZHϧ5)#b X/E\ƨڷ'uL! NPXd9VʀX` n+Pۑ1yi%f51^m^ Yh6IbB\G8y?:.K2yL^A"!i'r7Qj!#RDufǤG@ mhĈ[GGuSuC\L|h 09A3U듟y'RHURR$G)&' D}uGȞ X-DMƖd?3RwS=>4*$QI"M%W͕s . ̀DOi&g 8xs'i>3ނf5}t}@Zx\s/#l5 W1y :!&Gljh΀oT *0S/Z6$/G!֓A2LH6P\6=MTE9l ;L` ܭH`Rcƃ,̿D+VL,9XC&kdC*-FSB1ШLAME3.93UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.93UUG@ UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.93UUDAOlHZ0UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.93UU &9UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.93UU 4UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.93UUUĿ4UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.93UU4UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.93UUU4UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.93UU4UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUULAME3.93UUU4UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU4UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU4UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU4UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU4UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU4UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUTAGWonderful and StrangeTwin Peaks%pyxine-0.1alpha2.orig/setup.py0100644000175000017500000000502707622533547015443 0ustar pimanpiman#!/usr/bin/env python # $Id: setup.py.in,v 1.1.1.1 2003/02/08 00:42:17 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. # Check version of python try: import sys if sys.version_info[0] < 2: raise Exception except Exception: print "You need python version 2.x (or higher) to run this" sys.exit(1) libxine_src = "pyxine/libxine_wrap.c".split(' ') pxlib_src = "pxlib/Mutex.cc pxlib/Thread.cc pxlib/XDisplay.cc pxlib/Traits.cc pxlib/Callback.cc pxlib/Geometry.cc pxlib/WindowList.cc pxlib/PxWindow.cc pxlib/pxlib_wrap.cc".split(' ') xine_libs = "xine z pthread Xext".split(' ') xine_libpath = "/usr/lib /usr/X11R6/lib".split(' ') from distutils.core import setup, Extension long_description="""Pyxine is a Python package which provides bindings to libxine, the back-end of the xine move player. Using pyxine it is possible to write simple (or complex) movie players in the Python language. """ setup(name="pyxine", version="0.1alpha2", description="Python bindings for the xine media player", long_description=long_description, license="GPL", platforms=['linux2', ''], keywords=["xine","multimedia","video player"], author="Geoffrey T. Dairiki", author_email="dairiki@dairiki.org", url="http://pyxine.sourceforge.net/", packages=['pyxine'], ext_package="pyxine", ext_modules=[ Extension("libxine", libxine_src, library_dirs = xine_libpath, libraries = xine_libs), Extension("pxlibc", pxlib_src, library_dirs = xine_libpath, libraries = xine_libs + ['stdc++']) ] ) # Local Variables: # mode: python # End: pyxine-0.1alpha2.orig/MANIFEST0100644000175000017500000000211307622533547015053 0ustar pimanpimansetup.py MANIFEST Makefile common.mak LICENSE README TODO HINTS ChangeLog setup.py.in setup.cfg get-python-defs pxlib/Makefile pxlib/pxlib.i pxlib/Mutex.cc pxlib/Thread.cc pxlib/XDisplay.cc pxlib/Traits.cc pxlib/Callback.cc pxlib/Geometry.cc pxlib/WindowList.cc pxlib/PxWindow.cc pxlib/pxlib.h pxlib/Mutex.h pxlib/Thread.h pxlib/XDisplay.h pxlib/Traits.h pxlib/Callback.h pxlib/Geometry.h pxlib/WindowList.h pxlib/PxWindow.h pxlib/pxlib.py pxlib/pxlib_wrap.cc pyxine/Makefile pyxine/libxine.i pyxine/fixed_xine.h pyxine/orig_xine.h pyxine/libxine_wrap.c pyxine/pxlib.py pyxine/config.py pyxine/constants.py pyxine/constwrap.py pyxine/cstruct.py pyxine/event.py pyxine/__init__.py pyxine/osd.py pyxine/post.py pyxine/weakmethod.py pyxine/x11.py pyxine/xine.py test/Makefile test/CREDITS test/pxtest.py test/constants_test.py test/constwrap_test.py test/cstruct_test.py test/event_test.py test/post_test.py test/swig_test.py test/weakmethod_test.py test/xine_test.py test/wonderful_strange.wav test/wonderful_strange.mp3 examples/Makefile examples/player.py examples/tkplayer.py examples/xine-info.py pyxine-0.1alpha2.orig/Makefile0100644000175000017500000000437207622533225015364 0ustar pimanpiman# $Id: Makefile,v 1.4 2003/02/12 21:03:17 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. TOP = . # FIXME PYXINE_VERSION = 0.1alpha2 SUBDIRS = pxlib pyxine test examples GEN_FILES = setup.py MANIFEST DIST_FILES= $(GEN_FILES) DIST_FILES+= Makefile common.mak DIST_FILES+= LICENSE README TODO HINTS ChangeLog DIST_FILES+= setup.py.in setup.cfg get-python-defs CLEAN_FILES = python-defs.mak DISTNAME = pyxine-$(PYXINE_VERSION) DISTDIR = $(DISTNAME) TAR_DIST = $(DISTNAME).tar.gz PYSETUP = $(PYTHON) setup.py -include $(TOP)/common.mak default : setup.py dist : sdist install build sdist bdist bdist_rpm : setup.py $(PYSETUP) $@ sdist bdist bdist_rpm : distfiles MANIFEST: Makefile $(addsuffix /Makefile, $(SUBDIRS)) @echo "Generating MANIFEST" @$(MAKE) _subdir="" _buildmanifest 3>$@ PXLIB_SRC = $(shell grep 'pxlib/.*\.cc$$' MANIFEST) LIBXINE_SRC = $(shell grep 'pyxine/.*\.c$$' MANIFEST) XINE_LIBS = $(shell xine-config --libs | tr ' ' '\n' | sed -n 's/^-l//p') XINE_LIBPATH = $(shell xine-config --libs | tr ' ' '\n' | sed -n 's/^-L//p') setup.py: setup.py.in MANIFEST @echo "Generating setup.py" @sed 's:%PXLIB_SRC%:$(PXLIB_SRC):; \ s:%LIBXINE_SRC%:$(LIBXINE_SRC):; \ s:%XINE_LIBPATH%:$(XINE_LIBPATH):; \ s:%XINE_LIBS%:$(XINE_LIBS):; \ s:%PYXINE_VERSION%:$(PYXINE_VERSION):;' \ $< > $@ .PHONY: pyclean pyclean-all pyclean: -$(PYSETUP) clean pyclean-all: -$(PYSETUP) clean --all clean : pyclean distclean : pyclean-all maintainer-clean : pyclean-all pyxine-0.1alpha2.orig/common.mak0100644000175000017500000001067407621054526015711 0ustar pimanpiman# $Id: common.mak,v 1.2 2003/02/08 01:11:50 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. .PHONY: default all check dist install blib distfiles default: @echo "If you just want to build and install pyxine, you should" @echo "probably do so using the supplied setup.py script." @echo "" @echo "Try something like:" @echo "" @echo " python setup.py build" @echo " python setup.py install" @echo "" @echo "For more in-depth hacking:" @echo "" @echo " make all -- to compile extension modules" @echo " make check -- to run tests" @echo "" @echo "See README for more." # Variables to extract from /usr/lib/python2.2/config/Makefile PYTHON_DEFS = PYTHON CC CXX OPT INCLUDEPY PYTHON_DEFS += BLDSHARED CCSHARED SO PYTHON_DEFS += INSTALL INSTALL_DATA INSTALL_SHARED $(TOP)/python-defs.mak: $(TOP)/common.mak $(TOP)/get-python-defs $(PYTHON_DEFS) > $@ # Don't need python defs (& C/C++ dependencies unless compiling. _GOALS = $(if $(MAKECMDGOALS), $(MAKECMDGOALS), default) ifneq (,$(filter-out depend _buildmanifest, $(_GOALS))) -include $(TOP)/python-defs.mak endif # Temporary lib dir (for testing) blibdir = $(TOP)/build/lib XINE_CFLAGS := $(shell xine-config --cflags) XINE_LIBS := $(shell xine-config --libs) DEFS = INCLUDES = -I$(INCLUDEPY) CPPFLAGS = $(INCLUDES) $(DEFS) CFLAGS = $(OPT) $(XINE_CFLAGS) CXXFLAGS = $(OPT) LDSHARED = $(BLDSHARED) LIBS = $(XINE_LIBS) #LIBS += -lstdc++ SWIG = swig %.o : %.cc $(CXX) $(CXXFLAGS) $(CCSHARED) $(CPPFLAGS) -c $< -o $@ %.o : %.c $(CC) $(CXXFLAGS) $(CCSHARED) $(CPPFLAGS) -c $< -o $@ all : $(SOFILES) $(GEN_FILES) distfiles: $(DIST_FILES) # # Recursive making # ifdef SUBDIRS all : all-recursive check : check-recursive blib : blib-recursive distfiles: distfiles-recursive %-recursive: for d in $(SUBDIRS); do $(MAKE) -C $$d $*; done else %-recursive: @true endif # # Build and install local lib (for testing) # BLIB_SOFILES = $(filter %$(SO), $(BLIB_FILES)) BLIB_PYFILES = $(filter-out $(BLIB_SOFILES), $(BLIB_FILES)) BLIB_PKGDIR = $(blibdir)$(if $(PACKAGE),/$(PACKAGE)) blib : $(BLIB_FILES) $(INSTALL) -d $(BLIB_PKGDIR) ifneq (,$(BLIB_PYFILES)) for f in $(BLIB_PYFILES); do \ $(INSTALL_DATA) $$f $(BLIB_PKGDIR)/$$f; \ done endif ifneq (,$(BLIB_SOFILES)) for f in $(BLIB_SOFILES); do \ $(INSTALL_SHARED) $$f $(BLIB_PKGDIR)/$$f; \ done endif # # Dist targets # .PHONY: _buildmanifest _buildmanifest: @for f in $(DIST_FILES); do \ echo $(_subdir)$$f 1>&3; \ done ifdef SUBDIRS @for d in $(SUBDIRS); do \ $(MAKE) _subdir="$(_subdir)$$d/" -C $$d $@; \ done endif # # Cleanup targets # .PHONY: mostlyclean clean distclean maintainer-clean MOSTLYCLEAN_FILES += *~ *.o CLEAN_FILES += .*.d *.py[co] DISTCLEAN_FILES += $(SOFILES) MAINTAINER_CLEAN_FILES += $(GEN_FILES) mostlyclean : mostlyclean-recursive rm -f $(MOSTLYCLEAN_FILES) clean : clean-recursive rm -f $(MOSTLYCLEAN_FILES) $(CLEAN_FILES) distclean : distclean-recursive rm -f $(MOSTLYCLEAN_FILES) $(CLEAN_FILES) $(DISTCLEAN_FILES) maintainer-clean: maintainer-clean-recursive rm -f $(MOSTLYCLEAN_FILES) $(CLEAN_FILES) $(DISTCLEAN_FILES) \ $(MAINTAINER_CLEAN_FILES) # # Auto dependency generation # DEPFILES = $(patsubst %.o, .%.d, $(OFILES)) .PHONY: depend ifneq (,$(strip $(DEPFILES))) depend: rm -f $(DEPFILES) $(MAKE) $(DEPFILES) .%.d : %.c $(CC) -M $(CPPFLAGS) $< | \ sed 's/^\(.*\)\.o:/\1.o .\1.d:/' > $@ .%.d : %.cc $(CXX) -M $(CPPFLAGS) $< | \ sed 's/^\(.*\)\.o:/\1.o .\1.d:/' > $@ # (Don't include $(DEPFILES) when targets include *clean or depend) ifneq (,$(filter-out %clean depend _buildmanifest distfiles pxlib.py, $(_GOALS))) -include $(DEPFILES) endif endif # Local Variables: # mode: Makefile # End: pyxine-0.1alpha2.orig/LICENSE0100644000175000017500000004313107621051152014716 0ustar pimanpiman GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. pyxine-0.1alpha2.orig/README0100644000175000017500000000345007622512205014573 0ustar pimanpimanOVERVIEW Pyxine is a Python package which provides Python bindings for libxine, the backend of the xine media player (see http://xinehq.de/). Using Pyxine, it is possible to write simple (or complex) user-interfaces to xine. This makes it much easier for one to write custom xine UIs. For the latest news and updates, make sure to check the Pyxine web page: http://pyxine.sourceforge.net/ REQUIREMENTS To build and install this package, you'll need: - Python 2.2 or better - Modern GNU gcc/g++ - xine-lib-1-beta4 (or better) If you want to hack the source, you'll also probably need: - SWIG (I'm using version 1.1) - GNU make INSTALLATION Installation (hopefully) is as simple as: python setup.py install See http://www.python.org/doc/current/inst/ for more details. USAGE Playing an audio file can be as simple as: >>> import pyxine >>> xine = pyxine.Xine() >>> stream = xine.stream_new() >>> stream.open("music.mp3") >>> stream.play() To play a movie, it will probably take a little more work in order to properly initialize the video output driver. For now, have a look at ``tkplayer.py`` and ``player.py`` in the ``examples`` subdirectory. E.g., if you have the Tkinter package installed:: # python tkplayer.py some_movie.avi might actually play a movie for you. (Hit 'p' to start playback.) FIXME ROADMAP pyxine.libxine This module is a raw interface to libxine which is more-or-less automatically generated by SWIG. (See http://www.swig.org/) You should probably not use this module directly, as the rest of the pyxine package provides a friendlier object-oriented wrapper over the the functions in this module. pyxine-0.1alpha2.orig/TODO0100644000175000017500000000124107621051151014374 0ustar pimanpimanBug Reports: Double xine_config_load()s => segfault XINE_DEMUX_REVERT_STRATEGY should be named XINE_DEMUX_STRATEGY_REVERSE in xine.h? XINE_STATUS_IDLE never used? arts audio driver hangs Seeking when playing logo causes segfault. Refactor player.py, tkplayer.py. Put common player abstractions into the pyxine package. Use OSD in the demo players. Work some more on the X11Visual API. Handle plugin/browse stuff... Handle XINE_EVENT_MRL_REFERENCE Handle XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, XINE_GUI_SEND_SELECT_VISUAL Handle tvmode? Handle health check stuff? Handle log stuff. (this still seems to be buggy in libxine?) Handle frame grabbing pyxine-0.1alpha2.orig/HINTS0100644000175000017500000000045307621051152014521 0ustar pimanpimanTkinter When using a Tkinter.Frame for X11 xine output, make sure to specify bg='' as an option. This keeps Tk from redrawing the background upon expose events. Make sure to stop the stream playback before the Frame is deleted. (You can do this by catching the '' event.) pyxine-0.1alpha2.orig/ChangeLog0100644000175000017500000000135707622533060015473 0ustar pimanpiman2003-02-12 Geoffrey T. Dairiki * Makefile: Increment PYXINE_VERSION * README: Instructions for playing an audio file were wrong. Added some notes about the example players. * pxlib/Geometry.cc (to_string): Add namespace to std::ostringstream * pxlib/XDisplay.cc (select_input): Remove spurious (and wrong) 'inline' declaration. 2003-02-11 Geoffrey T. Dairiki * pxlib/Callback.cc (rep_t, ~rep_t): Remove debugging calls to cerr.form(). Apparently ostream::form() is a GNU extension. Don't use it! 2003-02-07 Geoffrey T. Dairiki * README: Add xine-lib to requirements 2003-02-07 Geoffrey T. Dairiki First release: pyxine-0.1alpha1. pyxine-0.1alpha2.orig/setup.py.in0100644000175000017500000000456207621051151016034 0ustar pimanpiman#!/usr/bin/env python # $Id: setup.py.in,v 1.1.1.1 2003/02/08 00:42:17 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. # Check version of python try: import sys if sys.version_info[0] < 2: raise Exception except Exception: print "You need python version 2.x (or higher) to run this" sys.exit(1) libxine_src = "%LIBXINE_SRC%".split(' ') pxlib_src = "%PXLIB_SRC%".split(' ') xine_libs = "%XINE_LIBS%".split(' ') xine_libpath = "%XINE_LIBPATH%".split(' ') from distutils.core import setup, Extension long_description="""Pyxine is a Python package which provides bindings to libxine, the back-end of the xine move player. Using pyxine it is possible to write simple (or complex) movie players in the Python language. """ setup(name="pyxine", version="%PYXINE_VERSION%", description="Python bindings for the xine media player", long_description=long_description, license="GPL", platforms=['linux2', ''], keywords=["xine","multimedia","video player"], author="Geoffrey T. Dairiki", author_email="dairiki@dairiki.org", url="http://pyxine.sourceforge.net/", packages=['pyxine'], ext_package="pyxine", ext_modules=[ Extension("libxine", libxine_src, library_dirs = xine_libpath, libraries = xine_libs), Extension("pxlibc", pxlib_src, library_dirs = xine_libpath, libraries = xine_libs + ['stdc++']) ] ) # Local Variables: # mode: python # End: pyxine-0.1alpha2.orig/setup.cfg0100644000175000017500000000025507621054615015541 0ustar pimanpiman[sdist] formats = gztar [bdist] formats = gztar [bdist_rpm] doc-files = README LICENSE HINTS TODO ChangeLog examples/ pyxine-0.1alpha2.orig/get-python-defs0100755000175000017500000000675507621051152016667 0ustar pimanpiman#!/usr/bin/env python # $Id: get-python-defs,v 1.1.1.1 2003/02/08 00:42:18 dairiki Exp $ # # Copyright (C) 2003 Geoffrey T. Dairiki # # This file is part of Pyxine, Python bindings for xine. # # Pyxine 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. # # Pyxine 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-1307, USA. """Find the path to the python executable (version 2 or better). Usage: python-config [options] [ [...]] Options: --alternate-python-names= A comma separted list of alternate names under which Python 2.x interpreters might be found. (Default is 'python2'.) If no variable names are listed on the command line, all defined variables are extracted. """ import sys, os, getopt, string class Main: # Alternate names under which to find python interpreters. # (Default value, may be changed in parse_args().) alternates = ['python2'] # Config variables to extract. # (Default value, may be changed in parse_args().) requested_vars = [] def __init__(self): self.parse_args() self.ensure_compatible_python() config = self.get_config() vars = self.requested_vars or config.keys() vars.sort() for name in vars: print "%-14s = %s" % (name, config[name]) def parse_args(self): """Parse command-line args. """ opts, vars = getopt.getopt(sys.argv[1:], '', ['alternate-python-names=']) alternates = [] for opt, val in opts: if opt == '--alternate-python-names': alternates.extend(string.split(val, ',')) if alternates: self.alternates = alternates if vars: self.requested_vars = vars def check_python_version(self): """Raise exception if we're not running under python 2.x """ if sys.version_info[0] < 2: raise Exception, 'Bad python version' def ensure_compatible_python(self): try: self.check_python_version() except Exception: alternates = self.alternates while alternates: # doesn't return upon success self.try_exec_self(alternates.pop(0)) print "Can't find python (version 2.x)" sys.exit(1) def try_exec_self(self, python): """Try running ourself using an alternate python. """ args = [python, sys.argv[0]] args.extend(['--alternate-python-names', string.join(self.alternates, ',')]) args.extend(self.requested_vars) try: os.execvp(python, args) except OSError: pass def get_config(self): from distutils.sysconfig import get_config_vars config = get_config_vars() config['PYTHON'] = sys.executable return config Main() pyxine-0.1alpha2.orig/PKG-INFO0100644000175000017500000000103507622533572015017 0ustar pimanpimanMetadata-Version: 1.0 Name: pyxine Version: 0.1alpha2 Summary: Python bindings for the xine media player Home-page: http://pyxine.sourceforge.net/ Author: Geoffrey T. Dairiki Author-email: dairiki@dairiki.org License: GPL Description: Pyxine is a Python package which provides bindings to libxine, the back-end of the xine move player. Using pyxine it is possible to write simple (or complex) movie players in the Python language. Keywords: xine,multimedia,video player Platform: linux2 Platform: