From: David I. L. <dl...@us...> - 2002-06-17 02:02:06
|
CVS Root: /cvsroot/gstreamer Module: gst-python Changes by: dlehn Date: Sun Jun 16 2002 19:02:06 PDT Log message: various updates to work with cvs code Modified files: . : configure.ac examples/gstreamer: Makefile.am cp.py dvdplay.py ilat.py gstreamer : Makefile.am gstreamer-extra.defs gstreamer-fixes.c gstreamer-fixes.h Removed files: gstreamer : gstreamer-base.defs tmp-enum-types.c tmp-enum-types.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/configure.ac.diff?r1=1.2&r2=1.3 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/examples/gstreamer/Makefile.am.diff?r1=1.3&r2=1.4 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/examples/gstreamer/cp.py.diff?r1=1.5&r2=1.6 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/examples/gstreamer/dvdplay.py.diff?r1=1.5&r2=1.6 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/examples/gstreamer/ilat.py.diff?r1=1.3&r2=1.4 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gstreamer/Makefile.am.diff?r1=1.1&r2=1.2 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gstreamer/gstreamer-base.defs http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gstreamer/gstreamer-extra.defs.diff?r1=1.1&r2=1.2 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gstreamer/gstreamer-fixes.c.diff?r1=1.2&r2=1.3 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gstreamer/gstreamer-fixes.h.diff?r1=1.2&r2=1.3 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gstreamer/tmp-enum-types.c http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gstreamer/tmp-enum-types.h ====Begin Diffs==== Index: configure.ac =================================================================== RCS file: /cvsroot/gstreamer/gst-python/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- configure.ac 15 Apr 2002 17:14:30 -0000 1.2 +++ configure.ac 17 Jun 2002 02:01:52 -0000 1.3 @@ -58,6 +58,11 @@ AC_SUBST(PYGTK_DEFSDIR) AC_MSG_RESULT($PYGTK_DEFSDIR) +AC_MSG_CHECKING(for pygtk h2def) +PYGTK_H2DEF=`$PKG_CONFIG --variable=datadir pygtk-2.0`/pygtk/2.0/codegen/h2def.py +AC_SUBST(PYGTK_H2DEF) +AC_MSG_RESULT($PYGTK_H2DEF) + dnl required version substitutions for use in the spec file PYGTK_VERSION=pygtk_required_version GTK_VERSION=gtk_required_version @@ -73,6 +78,11 @@ dnl check to make sure we can find gstreamer PKG_CHECK_MODULES(GST, gstreamer >= gstreamer_required_version, HAVE_GST="yes", HAVE_GST="no") + +AC_MSG_CHECKING(for gstreamer include dir) +GST_INCLUDEDIR=`$PKG_CONFIG --variable=includedir gstreamer` +AC_SUBST(GST_INCLUDEDIR) +AC_MSG_RESULT($GST_INCLUDEDIR) if test "x$HAVE_GST" = "xno"; then AC_MSG_ERROR(need GStreamer $gstreamer_required_version) Index: Makefile.am =================================================================== RCS file: /cvsroot/gstreamer/gst-python/examples/gstreamer/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 24 Mar 2002 11:40:06 -0000 1.3 +++ Makefile.am 17 Jun 2002 02:01:53 -0000 1.4 @@ -2,4 +2,8 @@ f2f.py \ oggplay.py \ cp.py \ - dvdplay.py + dvdplay.py \ + identity.py \ + ilat.py \ + lat.py \ + rot13.py Index: cp.py =================================================================== RCS file: /cvsroot/gstreamer/gst-python/examples/gstreamer/cp.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- cp.py 15 Apr 2002 23:51:21 -0000 1.5 +++ cp.py 17 Jun 2002 02:01:53 -0000 1.6 @@ -44,9 +44,9 @@ return -1 filesrc.set_property('location', sys.argv[1]) - filesink = gst_element_factory_make ('disksink', 'sink') + filesink = gst_element_factory_make ('filesink', 'sink') if not filesink: - print 'could not find plugin \"disksink\"' + print 'could not find plugin \"filesink\"' return -1 filesink.set_property('location', sys.argv[2]) Index: dvdplay.py =================================================================== RCS file: /cvsroot/gstreamer/gst-python/examples/gstreamer/dvdplay.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- dvdplay.py 10 May 2002 05:41:51 -0000 1.5 +++ dvdplay.py 17 Jun 2002 02:01:53 -0000 1.6 @@ -27,7 +27,7 @@ from gobject import GObject import gtk -class DVDPlay(object): +class DVDPlayer(object): def __init__(self): pass @@ -77,8 +77,22 @@ if ret: return ret - ret = self.run() - return ret + return self.run() + + def run(self): + print 'setting to PLAYING state' + + self.pipeline.set_state(STATE_PLAYING) + + gtk.idle_add(self.idle,self.pipeline) + + #gtk.threads_enter() + gtk.main() + #gtk.threads_leave() + + self.pipeline.set_state(STATE_NULL) + + return 0 def build_video_thread(self): # ***** pre-construct the video thread ***** @@ -94,15 +108,43 @@ self.color = gst_element_factory_make('colorspace','color') assert self.color - self.show = gst_element_factory_make('sdlvideosink','show') + self.efx = gst_element_factory_make('identity','identity') + #self.efx = gst_element_factory_make('edgeTV','EdgeTV') + #self.efx = gst_element_factory_make('agingTV','AgingTV') + #effectv: diceTV: DiceTV + #effectv: warpTV: WarpTV + #effectv: shagadelicTV: ShagadelicTV + #effectv: vertigoTV: VertigoTV + #self.efx = gst_element_factory_make('revTV','RevTV') + #self.efx = gst_element_factory_make('quarkTV','QuarkTV') + assert self.efx + + self.color2 = gst_element_factory_make('colorspace','color2') + assert self.color2 + + self.show = gst_element_factory_make('videosink','show') + #self.show = gst_element_factory_make('sdlvideosink','show') + #self.show = gst_element_factory_make('fakesink','fakesinkv') assert self.show + #self.show.set_property('silent', 0) + #self.show.set_property('sync', 1) - for e in (self.v_queue, self.v_decode, self.color, self.show): + #self.deinterlace = gst_element_factory_make('deinterlace','deinterlace') + self.deinterlace = gst_element_factory_make('identity','deinterlace') + assert self.deinterlace + + last = None + for e in (self.v_queue, self.v_decode, self.color, self.efx, self.color2, self.deinterlace, self.show): self.v_thread.add(e) + if last: + last.connect(e) + last = e - self.v_queue.connect(self.v_decode) - self.v_decode.connect(self.color) - self.color.connect(self.show) + #self.v_queue.connect(self.v_decode) + #self.v_decode.connect(self.color) + #self.color.connect(self.efx) + #self.efx.connect(self.color2) + #self.color2.connect(self.show) def build_audio_thread(self): # ***** pre-construct the audio thread ***** @@ -116,7 +158,10 @@ assert self.a_decode self.osssink = gst_element_factory_make('osssink','osssink') + #self.osssink = gst_element_factory_make('fakesink','fakesinka') assert self.osssink + #self.osssink.set_property('silent', 0) + #self.osssink.set_property('sync', 0) for e in (self.a_queue, self.a_decode, self.osssink): self.a_thread.add(e) @@ -129,9 +174,10 @@ self.pipeline = gst_pipeline_new('pipeline') assert self.pipeline - self.src = gst_element_factory_make('dvdsrc','src'); + self.src = gst_element_factory_make('dvdreadsrc','src'); assert self.src + #GObject.connect(self.src,'deep_notify',self.dnprint) self.src.set_property('location', self.location) self.src.set_property('title', self.title) self.src.set_property('chapter', self.chapter) @@ -139,6 +185,7 @@ self.parse = gst_element_factory_make('mpegdemux','parse') assert self.parse + self.parse.set_property('sync', 0) self.pipeline.add(self.src) self.pipeline.add(self.parse) @@ -166,26 +213,21 @@ GObject.connect(self.src,'eos',self.eof) #GObject.connect(show,'have_size',self.mpegparse_have_size, self.pipeline) - return 0 - - def run(self): - print 'setting to PLAYING state' - - self.pipeline.set_state(STATE_PLAYING) - - gtk.idle_add(self.idle,self.pipeline) + #GObject.connect(self.pipeline,'error',self.pipeline_error) + #GObject.connect(self.pipeline,'deep_notify',self.dnprint) - #gtk.threads_enter() - gtk.main() - #gtk.threads_leave() + return 0 - self.pipeline.set_state(STATE_NULL) + def pipeline_error(self, sender, obj, error): + print "(%s) ERROR: %s: %s" % (self, obj.name(), error) - return 0 + def dnprint(self, sender, obj, param): + str = obj.get_property(param.name) + print '%s: %s = %s' % (sender.get_name(), param.name, str) if __name__ == '__main__': - #gst_debug_set_categories(-1) - #gst_info_set_categories(-1) - player = DVDPlay() + #gst_debug_set_categories(0xFFFFFFFFL) + #gst_info_set_categories(0xFFFFFFFFL) + player = DVDPlayer() ret = player.main() sys.exit(ret) Index: ilat.py =================================================================== RCS file: /cvsroot/gstreamer/gst-python/examples/gstreamer/ilat.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ilat.py 15 Apr 2002 23:51:21 -0000 1.3 +++ ilat.py 17 Jun 2002 02:01:54 -0000 1.4 @@ -95,7 +95,7 @@ def main(): "Identity timer and latency check" - gst_debug_set_categories(0) + gst_debug_set_categories(0L) if len(sys.argv) < 3: print 'usage: %s identites buffers' % (sys.argv[0],) Index: Makefile.am =================================================================== RCS file: /cvsroot/gstreamer/gst-python/gstreamer/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 24 Mar 2002 04:32:10 -0000 1.1 +++ Makefile.am 17 Jun 2002 02:01:54 -0000 1.2 @@ -14,10 +14,18 @@ _gstreamermodule_la_LIBADD = $(GST_LIBS) _gstreamermodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex initgstreamer nodist__gstreamermodule_la_SOURCES = gstreamer.c -CLEANFILES = gstreamer.c -EXTRA_DIST = gstreamer.defs gstreamer.override +CLEANFILES = gstreamer.c gstreamer-base.defs +EXTRA_DIST = gstreamer-extra.defs gstreamer.override gstreamer.c: gstreamer.defs gstreamer.override +GST_INCLUDES=$(wildcard $(GST_INCLUDEDIR)/gst/*.h) + +gstreamer-base.defs: $(GST_INCLUDES) + $(PYTHON) $(PYGTK_H2DEF) $(GST_INCLUDES) > gstreamer-base.defs + +gstreamer.defs: gstreamer-base.defs gstreamer-extra.defs + cat gstreamer-base.defs gstreamer-extra.defs > gstreamer.defs + .defs.c: (cd $(srcdir) \ && $(PYGTK_CODEGEN) \ @@ -32,21 +40,3 @@ # --register $(PYGTK_DEFSDIR)/gtk-types.defs \ # --register $(top_srcdir)/bonobo/bonobo-types.defs \ # --register $(top_srcdir)/bonobo/bonoboui-types.defs \ - -# this should go in core - -enums: - glib-mkenums \ - --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \ - --fprod "/* enumerations from \"@filename@\" */\n" \ - --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ - --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \ - /usr/include/gst/*.h > tmp-enum-types.h - - glib-mkenums \ - --fhead "#include <gst/gst.h>" \ - --fprod "\n/* enumerations from \"@filename@\" */" \ - --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ - --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ - --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ - /usr/include/gst/*.h > tmp-enum-types.c --- gstreamer-base.defs DELETED --- Index: gstreamer-extra.defs =================================================================== RCS file: /cvsroot/gstreamer/gst-python/gstreamer/gstreamer-extra.defs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gstreamer-extra.defs 10 May 2002 03:59:33 -0000 1.1 +++ gstreamer-extra.defs 17 Jun 2002 02:01:54 -0000 1.2 @@ -18,11 +18,3 @@ '("char*" "data") ) ) - -(define-function gst_info_set_categories - (c-name "gst_info_set_categories") - (return-type "none") - (parameters - '("guint32" "categories") - ) -) Index: gstreamer-fixes.c =================================================================== RCS file: /cvsroot/gstreamer/gst-python/gstreamer/gstreamer-fixes.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gstreamer-fixes.c 15 Apr 2002 17:14:30 -0000 1.2 +++ gstreamer-fixes.c 17 Jun 2002 02:01:54 -0000 1.3 @@ -22,5 +22,3 @@ #include <gst/gst.h> #include "gstreamer-fixes.h" - -#include "tmp-enum-types.c" Index: gstreamer-fixes.h =================================================================== RCS file: /cvsroot/gstreamer/gst-python/gstreamer/gstreamer-fixes.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gstreamer-fixes.h 15 Apr 2002 17:14:30 -0000 1.2 +++ gstreamer-fixes.h 17 Jun 2002 02:01:54 -0000 1.3 @@ -24,4 +24,3 @@ #include <gst/gstqueue.h> #include <gst/gsttypefind.h> -#include "tmp-enum-types.h" --- tmp-enum-types.c DELETED --- --- tmp-enum-types.h DELETED --- |