Commit graph

164 commits

Author SHA1 Message Date
Thibault Saunier
986d6d12fb example: Use do_fill in AudioTestSrc instead of do_create
With the new mapping API we can efficiently use the ->fill vmethod
which is sensibly better.
2019-12-11 08:32:44 -03:00
Thibault Saunier
d365954fc0 Subclass Exception for mapping and unmapping errors
And minor cleanup in the way errors are handled
2019-12-10 12:05:19 -03:00
Daniel Klamt
fecfe451a7 Changes the mapinfo so that the mapped data is writable
The Problem is, that in the current state it is not easily possible to
edit the buffer data in a gstreamer python element since you get a copy
of the real buffer.

This patch overrides the mapinfo and the function generating it in a way
so that mapinfo.data is now a memoryview pointing to the real buffer.
Depending on the flags given for this buffer the memoryview is r/w.
2019-12-09 09:23:55 +01:00
Mathieu Duponchelle
4ce52c0211 Examples: add audiotestsrc plugin example 2018-07-29 20:06:09 +02:00
Mathieu Duponchelle
71bb950965 Examples: add audioplot plugin example 2018-07-29 20:05:52 +02:00
Mathieu Duponchelle
6cf081fa11 Examples: add mixer plugin example 2018-07-29 19:51:34 +02:00
Mathieu Duponchelle
6fcc1433d7 examples: add a dynamic pipeline example 2018-07-20 17:00:22 +02:00
Mathieu Duponchelle
71d4c9f989 helloworld: fix typo 2018-07-20 15:58:35 +02:00
Jan Schmidt
4731dbc118 Port old helloworld.py example to GI 2017-02-21 22:02:14 +11:00
Marianna Smidth Buschle
a9cc3ed6f2 examples: Added identity example
Created a simple BaseTransform element (identity)

https://bugzilla.gnome.org/show_bug.cgi?id=772853
2016-10-17 10:03:13 +02:00
Thibault Saunier
7dffdb6864 examples: Port the sink example to GstBaseSink
Also we now need to explicitly call Gst.init() from python bindings.
2015-10-28 15:27:42 +01:00
Thibault Saunier
96b031a948 Move old example to a dedicated folder so user know it is no up to date 2014-06-06 10:35:46 +02:00
Thibault Saunier
ed1c9866a2 Add an example sink element and override the chain and event functions of pads
Otherwize we will get 2 time acces to the element in it, which does
not make much sense. The _full variant can still be used.
2014-06-06 10:35:09 +02:00
Simon Farnsworth
c889037e40 Fix zip code of new FSF address
I missed the zip code last time round - fix it. Thanks to Michael Schwendt
in https://bugzilla.redhat.com/show_bug.cgi?id=1034341#c11 for pointing this
out to me.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=720317
2013-12-12 11:35:41 +00:00
Simon Farnsworth
2ad767a74c Update FSF address
The FSF has moved since these files were created. Update the address, in
order to keep packaging tools such as rpmlint quiet.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=715182
2013-11-26 15:28:53 +00:00
Stefan Sauer
cd7e03d936 examples: add helloworld example
Add a straight 1:1 copy from cores' helloworld.c to show how the c api maps into
the pythong bindings. It would rock to have the same in other bindings.
2011-10-31 10:51:27 +01:00
Vincent Penquerc'h
160b6d1bd5 remuxer.py: allow more than one stream of the same type
Queue names would collide otherwise, so just pass None for now. Also
guarantees that we don't get silly names like "queue_audio/x-foobar".

https://bugzilla.gnome.org/show_bug.cgi?id=639427
2011-09-26 17:57:51 +01:00
Vincent Penquerc'h
3e3795068e remuxer.py: do not crash when clicking open without having selected a file
https://bugzilla.gnome.org/show_bug.cgi?id=639421
2011-09-26 17:13:58 +01:00
Vincent Penquerc'h
bbeaad89bd remuxer.py: list files named *.og[gvax], not only *.ogg
These are all recommended extensions for Ogg streams.

https://bugzilla.gnome.org/show_bug.cgi?id=639423
2011-09-26 17:11:45 +01:00
Jan Schmidt
ce850ed9a8 filesrc.py: Call gobject.threads_init() in the example
Fixes: #633033
2010-10-27 09:46:06 +01:00
Артём Попов
b921832369 examples: add an example to show looping using segments
Fixes #339772.
2010-09-07 14:29:28 +03:00
Zaheer Abbas Merali
ee6de7c245 examples: add a simple Maemo 5 example 2009-10-15 14:15:37 +01:00
Jan Schmidt
113959d55a examples: Port switch.py to input-selector
The switch element hasn't existed for a while now - use the
replacement element input-selector instead.

Partially (and finally) fixes #581737
2009-05-07 14:48:42 +02:00
Jan Schmidt
7743f1ad1e examples: Make xoverlay installation thread safe using the GDK lock.
We can't call into the GDK functions in our sync-message handler
without taking the GDK lock, so do so.

Partially fixes #581737
2009-05-07 14:48:25 +02:00
Stefan Kost
378bddc8c5 Add progress report element to cp example. 2009-01-26 11:11:18 +02:00
Stefan Kost
3cb127e9d9 Add an example for using the tagsetter iface. 2009-01-23 22:17:21 +02:00
Edward Hervey
7ebe9f4fe4 examples/gst-discover: Beautify output of discoverer's duration.
Original commit message from CVS:
* examples/gst-discover:
Beautify output of discoverer's duration.
2008-12-06 14:13:55 +00:00
Brian Cameron
94a232fdbf examples/pipeline-tester: Don't hardcode audio/video source and sinks, and instead use more generic sources.
Original commit message from CVS:
* examples/pipeline-tester:
Don't hardcode audio/video source and sinks, and instead use more
generic sources.
Based on a patch by Brian Cameron <brian.cameron@sun.com>
Fixes #517993
2008-09-04 17:57:50 +00:00
Jan Schmidt
468cb05597 gst/gstbuffer.override: the GstBuffer overrides seem to be confused about whether they're mini-objects or a GBoxed, a...
Original commit message from CVS:
* gst/gstbuffer.override:
the GstBuffer overrides seem to be confused about whether they're
mini-objects or a GBoxed, and it makes copy_on_write no actually
return a usable gst.Buffer. Fix up places where GstBuffers are
treated as GBoxed to use pygstminiobject functions.
Makes gst.Buffer('blah').copy_on_write() work.
* testsuite/test_buffer.py:
Add test for copy-on-write writability
* examples/buffer-draw.py:
Add an example of drawing on a GStreamer buffer with cairo
* gst/gstpad.override:
Make function static
2008-06-27 08:39:37 +00:00
Jan Schmidt
839bc5b0d4 examples/: Sync with the X server before giving an XID to our sink with a different display connection. This avoids s...
Original commit message from CVS:
* examples/play.py:
* examples/remuxer.py:
* examples/switch.py:
* examples/synchronizer.py:
Sync with the X server before giving an XID to our sink with a different
display connection. This avoids spurious X servers where the sink's
display connection doesn't know the XID that the GDK thread's does.
2008-04-24 11:35:38 +00:00
Stefan Kost
98211a80e9 examples/video-controller.py: Demo how to use the controller on videomixer.
Original commit message from CVS:
* examples/video-controller.py:
Demo how to use the controller on videomixer.
2008-01-31 19:57:26 +00:00
Andy Wingo
535e724574 examples/switch.py: New file, a basic demo for a single-stream switcher. Could be expanded later -- look at flumotion...
Original commit message from CVS:
2007-12-18  Andy Wingo  <wingo@pobox.com>

* examples/switch.py: New file, a basic demo for a single-stream
switcher. Could be expanded later -- look at
flumotion.component.combiners.switch.switch for some inspiration.
2007-12-18 16:48:32 +00:00
Johan Dahlin
5b5311a64f Add a new module, gstoption which allows you to fetch the
Original commit message from CVS:
2007-11-05  Johan Dahlin  <johan@gnome.org>

* gstoptionmodule.c:
* Makefile.am:
* configure.ac:
Add a new module, gstoption which allows you to fetch the
GOptionGroup from gstreamer without initializing and parsing
the command line arguments. Requires PyGObject 2.15.0
Fixes #425847

* examples/option-parser.py (main): Example
2007-11-08 10:51:07 +00:00
Jan Schmidt
eb8637606b examples/play.py: Fix the sample player slightly so that the expose method actually gets called by pyGTK.
Original commit message from CVS:
* examples/play.py:
Fix the sample player slightly so that the expose method
actually gets called by pyGTK.
2007-10-18 15:10:44 +00:00
Edward Hervey
c2a593851e examples/gst-discover: Show duration of audio/video streams.
Original commit message from CVS:
reviewed by: Edward Hervey  <bilboed@bilboed.com>
* examples/gst-discover:
Show duration of audio/video streams.
Specify units for values.
Fixes #432521
2007-07-27 11:04:55 +00:00
Jan Schmidt
cfef9679c9 examples/sinkelement-registry.py: A quick modification of the sinkelement.py example that shows how to register a pur...
Original commit message from CVS:
* examples/sinkelement-registry.py:
A quick modification of the sinkelement.py example that
shows how to register a pure-python gst.Element into the
registry for use in autoplugging or parse_launch lines.
2007-06-14 14:14:12 +00:00
Jan Schmidt
d3a4c03c2b Implement pad query proxying so that python elements can answer pad queries. Fixes: #428299
Original commit message from CVS:
* examples/pyidentity.py:
* gst/common.h:
* gst/gstpad.override:
Implement pad query proxying so that python elements can
answer pad queries. Fixes: #428299
2007-04-10 18:01:25 +00:00
Jan Schmidt
4ecf760ec1 examples/pyidentity.py: Add a simple example that implements an identity-like element in python and passes buffers th...
Original commit message from CVS:
* examples/pyidentity.py:
Add a simple example that implements an identity-like element in
python and passes buffers through. It lacks buffer-alloc & query
handling at the moment, because the required gstreamer funcs aren't
wrapped.
* examples/sinkelement.py:
Make sure to call gobject.threads_init() in the example.
2007-04-10 12:44:44 +00:00
Thomas Vander Stichele
7a27ebbd79 wrap mixer set_volume, use tuple to match get_volume
Original commit message from CVS:
* examples/mixer.py:
* gst/interfaces.override:
wrap mixer set_volume, use tuple to match get_volume
2007-01-17 11:22:04 +00:00
Thomas Vander Stichele
7e94773d0f gst/interfaces.*: wrap mixer get_volume
Original commit message from CVS:
* gst/interfaces.defs:
* gst/interfaces.override:
wrap mixer get_volume
* examples/Makefile.am:
* examples/mixer.py:
add an example using it
2007-01-17 06:27:38 +00:00
Edward Hervey
d4a8830b7b examples/audio-controller.py: Fix example, use proper property name. Doesn't change anything to the way it used to wo...
Original commit message from CVS:
* examples/audio-controller.py:
Fix example, use proper property name. Doesn't change anything to the
way it used to work, but since it's an example it should be done
properly.
2006-11-22 17:31:02 +00:00
Andy Wingo
0650a27089 examples/: New tool, runs the discoverer on a file and prints out what we get.
Original commit message from CVS:
2006-11-07  Andy Wingo  <wingo@pobox.com>

* examples/Makefile.am (examples_DATA):
* examples/gst-discover: New tool, runs the discoverer on a file
and prints out what we get.
2006-11-07 11:47:26 +00:00
Edward Hervey
c8e5fc7402 examples/Makefile.am: Remove gst123 and vorbisplay.py from sources, and add decodebin.py
Original commit message from CVS:
* examples/Makefile.am:
Remove gst123 and vorbisplay.py from sources, and add decodebin.py
2006-10-20 09:51:25 +00:00
Edward Hervey
5b2c08ac37 examples/: Removed gst123 and vorbisplay examples which weren't working with 0.10, and replaced them with decodebin.py
Original commit message from CVS:
reviewed by: Edward Hervey  <edward@fluendo.com>
* examples/decodebin.py:
* examples/gst123:
* examples/vorbisplay.py:
Removed gst123 and vorbisplay examples which weren't working with
0.10, and replaced them with decodebin.py
Closes #362183 and #362202
2006-10-20 09:47:16 +00:00
Edward Hervey
71f58a44b4 examples/: Closes #362290 and #362272
Original commit message from CVS:
* examples/audioconcat.py:
* examples/cp.py:
Port to 0.10 by Jason Gerard DeRose <jderose@jasonderose.org>
Closes #362290 and #362272
* examples/bps.py:
Indentation fixes by Jason Gerard DeRose <jderose@jasonderose.org>
Closes #362011
Also small fix for Usage string
2006-10-20 09:27:43 +00:00
Andy Wingo
e462546b9a examples/synchronizer.py: Actually appears to work now, will have to try with guadec videos on Monday.
Original commit message from CVS:
2006-08-05  Andy Wingo  <wingo@pobox.com>

* examples/synchronizer.py: Actually appears to work now, will
have to try with guadec videos on Monday.

* examples/remuxer.py (PlayerWindow.create_ui): Disable the
auto-adjusting of cut in and cut out times, it's annoying.
2006-08-05 17:15:52 +00:00
Andy Wingo
ee44607e9f small updates, still ui only
Original commit message from CVS:
small updates, still ui only
2006-08-04 17:04:27 +00:00
Andy Wingo
3274a3ac03 examples/synchronizer.py: New file, a bit of a hack to remuxer.py, but for resyncing a bad ogg. Only UI at the moment..
Original commit message from CVS:
2006-08-04  Andy Wingo  <wingo@pobox.com>

* examples/synchronizer.py: New file, a bit of a hack to
remuxer.py, but for resyncing a bad ogg. Only UI at the moment..
2006-08-04 16:42:15 +00:00
James Doc Livingston
fd2078bb04 examples/remuxer.py (RemuxBin._do_seek, Remuxer._bus_watch): Use normal seeks instead of segment seeks so that EOS is...
Original commit message from CVS:
2006-07-28  Andy Wingo  <wingo@pobox.com>

* examples/remuxer.py (RemuxBin._do_seek, Remuxer._bus_watch): Use
normal seeks instead of segment seeks so that EOS is handled
properly. Patch by James "Doc" Livingston <doclivingston at
gmail.com>. (#348416)

* examples/remuxer.py (RemuxBin._new_demuxed_pad): Increase the
buffer size for dealing with terribly muxed files.
2006-07-28 13:56:20 +00:00
Edward Hervey
78e97adb23 examples/filesrc.py: Port to 0.10.
Original commit message from CVS:
reviewed by: Edward Hervey <edward@fluendo.com>
* examples/filesrc.py: Port to 0.10.
2006-05-27 12:13:46 +00:00