Commit graph

249 commits

Author SHA1 Message Date
Sebastian Dröge 061c4eb9e3 ximagesink: Send reconfigure event upstream if the window geometry changes 2011-05-05 15:23:24 +02:00
Sebastian Dröge 092438200c ximagesink: Add caps with the current window geometry to the top in getcaps 2011-05-05 15:23:17 +02:00
Wim Taymans 86a4771f8e remove buffer_alloc 2011-04-29 13:28:17 +02:00
Sebastian Dröge 8336e2027d sys: Use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-19 11:44:14 +02:00
Sebastian Dröge 0759ce8533 Merge branch 'master' into 0.11 2011-04-18 13:23:32 +02:00
Sebastian Dröge 75c337c726 x(v)imagesink: If NULL caps are passed to buffer_alloc() do fallback allocation
Fixes bug #647857.
2011-04-18 11:24:57 +02:00
Wim Taymans c8fee4a4b3 ximage: don't share the memory
We can't share the memory on the buffer with other buffers because the metadata
X(v)Image points to it and we don't want it to go away.
2011-04-07 16:07:57 +02:00
Wim Taymans 1ae67927cc ximage: more fixes 2011-04-06 17:54:28 +02:00
Wim Taymans 518ededd16 ximage: more fixes 2011-04-06 16:26:12 +02:00
benjamin gaignard 15c49a4d63 xvimagesink: use bufferpool
Improve bufferpool handling in ximagesink.
Implement bufferpool handling on xvimagesink.

Based on patches from benjamin gaignard <benjamin.gaignard@linaro.org>
2011-04-06 12:28:46 +02:00
Wim Taymans 5244770775 plugins: fix for new memory API 2011-03-27 17:16:10 +02:00
Wim Taymans f246c0e97d meta: update for new API 2011-03-08 17:01:41 +00:00
Wim Taymans 92f9995d98 ximagesink: make metadata methods more like core 2011-03-04 18:32:53 +01:00
Wim Taymans 825c650964 ximagesink: reset the pool 2011-03-04 16:21:55 +01:00
Wim Taymans e993bde873 ximagesink: implement buffer_alloc from the pool
Use the bufferpool for pad_alloc when we are asked for the same caps as the
bufferpool.
2011-03-04 16:21:54 +01:00
Wim Taymans ea05fe1278 ximage: rewrite the buffer pool in ximagesink
Rewrite the pooling in ximagesink to extend from the bufferpool base class in
core. Move some code to a comon place and refactor.
2011-03-04 16:21:54 +01:00
Wim Taymans c7c8f3e13d meta: fix for new API 2011-02-28 11:50:04 +01:00
Wim Taymans ce7498e7c3 ximagesink: experiment with convenience macros 2011-02-28 11:50:04 +01:00
Wim Taymans a1a237d0ea ximage: fix macros 2011-02-28 11:50:04 +01:00
Wim Taymans 08bfcad434 ximage: reimplement buffer pooling with metadata
Use the buffer metadata to get back to the extra info we can use to optimize the
video rendering.
2011-02-28 11:50:04 +01:00
Wim Taymans 55c9ca592f metadata: implement extra buffer data with metadata
Use buffer metadata to attach arbitrary extra data to buffers.
2011-02-28 11:50:04 +01:00
Wim Taymans e78903e662 X11: port imagesinks to new miniobjects
Remove the subbuffer from X11 sinks and use the private pointer to store a
single buffer metadata with the extra info.
2011-02-28 11:50:04 +01:00
Sebastian Dröge 334a739083 ximagesink: Add docs for the new property
Including Since markers
2010-12-02 19:04:28 +01:00
Andrea Sebastianutti 2ad9966163 ximagsink: Add read-only properties window-width and window-height 2010-12-02 19:04:27 +01:00
David Schleef 6dc02137fb xoverlay: Add guintptr versions of functions
And deprecate the gulong versions.  This is to support platforms
where sizeof(unsigned long) < sizeof(void *).  Fixes #627565.

API: Add gst_x_overlay_set_window_handle()
API: Deprecate: gst_x_overlay_set_xwindow_id()
API: Add gst_x_overlay_got_window_handle()
API: Deprecate: gst_x_overlay_got_xwindow_id()
API: Add GstXOverlay::set_window_handle()
API: Deprecate: GstXOverlay::set_xwindow_id()
2010-09-15 00:10:23 -07:00
Philippe Normand 0ee588a3a6 ximagesink: Ask pad peer to accept new caps once only
In buffer_alloc, if the buffer caps are new, call
gst_pad_peer_accept_caps once only, it's useless to call it in the
cases where we know it will always fail.

Fixes bug #621190
2010-06-18 06:11:36 +02:00
Sebastian Dröge 6914986cb3 ximagesink: Check if the X context is allocated before using it
It should be allocated at these places already or the state changes
would have failed... but better add an additional check here.
2010-05-10 12:44:41 +02:00
Sebastian Dröge df5c772c44 ximagesink: Post an error message on the bus if no supported pixmap formats can be found
Might fix bug #615851.
2010-05-10 12:28:29 +02:00
Stefan Kost f5469d42de x(v)imagesink: use gst_caps_can_intersect() more
In place where we just need to know whether caps intersect, we can use this
quicker function.
2010-05-06 08:22:36 +03:00
Stefan Kost 6c51803dc8 x(v)imagesink: gracefully handle ximagesink>xwindow == NULL
Expose could be called before we have set the xwindow. Handle this gracefully
like we do in image_put.
Fixes #615789
2010-04-16 15:52:26 +03:00
Stefan Kost 656573757e ximagesink: refactor _update_geometry()
Refactor like in xvimagesink. Remove the extra parameter and adjust the assert check.
2010-04-16 15:52:25 +03:00
Reuben Dowle 621705f475 ximagesink: Fix caps leak
Unref caps when peer doesn't accept caps

Fixes #613198
2010-03-17 19:24:27 -03:00
Benjamin Otte 5e21fa5e0e gst_element_class_set_details => gst_element_class_set_details_simple
Also change my email from the old university one to the current one.
2010-03-16 17:41:50 +01:00
Stefan Kost 7b13aeee32 x(v)imagesink: take new size from event thread and do not poll for every frame
We can update the geometry in ConfigureNotify (unless we disable event-
handling). If event handling is disabled, one should use _expose() to trigger a
redraw and update the geometry.
2010-03-11 10:23:19 +02:00
Stefan Kost 1e004cd363 ximagesink: only start event thread if needed
The event thread is doing 20 wakeups per second to poll the events. If one
runs ximagesink with handle-events=false and handle-expose=false then we can
avoid the extra thread.
2009-10-07 17:57:54 +03:00
Tim-Philipp Müller 78b0413c5f ximagesink, xvimagesink: use new GstVideoSink::show_frame() vfunc 2009-09-08 18:20:11 +01:00
René Stadler f308675fc8 ximagesink: fix small memory leak when setting window title 2009-09-06 15:21:43 +03:00
Stefan Kost 8b0da4bfe8 x(v)imagesink: pass the xwindow along to not look at the yet unset var.
When we call this from xwindow_new, x(v)imagesink->xwindow is not yet set.
2009-06-22 16:17:10 +03:00
Stefan Kost 8946be1f0b x(v)imagesink: catch tags and show title in own window
Refactor the code that sets the window title. Catch tag-events and use title
metadata for the window title.
2009-06-22 11:40:33 +03:00
Hannes Bistry 77050a72f8 ximagesink: fix mouse pointer offsets in navigation event if window is smaller than the image
Fixes #570768.
2009-04-14 12:26:10 +01:00
Stefan Kost a47949b2ba ximagesink: use GST_FLOW_NOT_NEGOTIATED for partial caps 2009-02-26 18:01:04 +02:00
Stefan Kost bc4388c413 ximagsink: do not access uninitialized height variable.
Exit like in xvimagesink, if we have partial caps.
2009-02-26 10:09:59 +02:00
Sebastian Dröge 8c74d858ba x(v)imagesink: Correctly cast to GstBuffer * before passing to gst_buffer_unref() 2009-02-22 19:18:41 +01:00
Wim Taymans e7f910e0fc Fix buffer_alloc in ximagesink
Remove some useless debug info that reported wrong image sizes.

When upstream does not accept out suggested size, fall back to allocating an
image of the requested width/height instead of the currently configured size.
The problem is that an image is reused from the pool because the width/height
match but the caps on the new buffer are the requested caps with possibly
different height/width resulting in errors.
2009-02-02 13:30:42 +01:00
Edward Hervey 98c2c8a052 sys/: Clear all flags on buffers returned from the image pool.
Original commit message from CVS:
* sys/ximage/ximagesink.c: (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_buffer_alloc):
Clear all flags on buffers returned from the image pool.
Fixes #563143
2008-12-03 17:47:44 +00:00
Stefan Kost 2aaf298543 sys/: Don't mark as gtk-doc docs as they aren't public.
Original commit message from CVS:
* sys/ximage/ximagesink.h:
* sys/xvimage/xvimagesink.h:
Don't mark as gtk-doc docs as they aren't public.
2008-10-22 12:29:30 +00:00
Stefan Kost 2cd4c7e2b9 Don't install static libs for plugins. Fixes #550851 for base.
Original commit message from CVS:
* ext/alsa/Makefile.am:
* ext/cdparanoia/Makefile.am:
* ext/gio/Makefile.am:
* ext/gnomevfs/Makefile.am:
* ext/libvisual/Makefile.am:
* ext/ogg/Makefile.am:
* ext/pango/Makefile.am:
* ext/theora/Makefile.am:
* ext/vorbis/Makefile.am:
* gst/adder/Makefile.am:
* gst/audioconvert/Makefile.am:
* gst/audiorate/Makefile.am:
* gst/audioresample/Makefile.am:
* gst/audiotestsrc/Makefile.am:
* gst/ffmpegcolorspace/Makefile.am:
* gst/gdp/Makefile.am:
* gst/playback/Makefile.am:
* gst/subparse/Makefile.am:
* gst/tcp/Makefile.am:
* gst/typefind/Makefile.am:
* gst/videorate/Makefile.am:
* gst/videoscale/Makefile.am:
* gst/videotestsrc/Makefile.am:
* gst/volume/Makefile.am:
* sys/v4l/Makefile.am:
* sys/ximage/Makefile.am:
* sys/xvimage/Makefile.am:
Don't install static libs for plugins. Fixes #550851 for base.
2008-10-16 15:07:00 +00:00
Jan Schmidt 6d641640bb sys/: it's not legal to ask the
Original commit message from CVS:
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new):
Apparently on Solaris and OS/X (at least), it's not legal to ask the
X server to attach to a shared memory segment after we've deleted it,
with the result that MIT-SHM is disabled. Instead, remove it only after
X succeeds in attaching too.
2008-07-17 13:57:33 +00:00
Stefan Kost 4f699b7f80 Cleanup Plugin docs. Link to signals and properties. Fix sub-section titles. Drop mentining that all our example pipe...
Original commit message from CVS:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-overrides.txt:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
* docs/plugins/gst-plugins-base-plugins.args:
* docs/plugins/gst-plugins-base-plugins.hierarchy:
* docs/plugins/gst-plugins-base-plugins.interfaces:
* docs/plugins/gst-plugins-base-plugins.prerequisites:
* docs/plugins/gst-plugins-base-plugins.signals:
* docs/plugins/inspect/plugin-adder.xml:
* docs/plugins/inspect/plugin-alsa.xml:
* docs/plugins/inspect/plugin-audioconvert.xml:
* docs/plugins/inspect/plugin-audiorate.xml:
* docs/plugins/inspect/plugin-audioresample.xml:
* docs/plugins/inspect/plugin-audiotestsrc.xml:
* docs/plugins/inspect/plugin-cdparanoia.xml:
* docs/plugins/inspect/plugin-decodebin.xml:
* docs/plugins/inspect/plugin-ffmpegcolorspace.xml:
* docs/plugins/inspect/plugin-gdp.xml:
* docs/plugins/inspect/plugin-gnomevfs.xml:
* docs/plugins/inspect/plugin-libvisual.xml:
* docs/plugins/inspect/plugin-ogg.xml:
* docs/plugins/inspect/plugin-pango.xml:
* docs/plugins/inspect/plugin-playback.xml:
* docs/plugins/inspect/plugin-queue2.xml:
* docs/plugins/inspect/plugin-subparse.xml:
* docs/plugins/inspect/plugin-tcp.xml:
* docs/plugins/inspect/plugin-theora.xml:
* docs/plugins/inspect/plugin-typefindfunctions.xml:
* docs/plugins/inspect/plugin-uridecodebin.xml:
* docs/plugins/inspect/plugin-video4linux.xml:
* docs/plugins/inspect/plugin-videorate.xml:
* docs/plugins/inspect/plugin-videoscale.xml:
* docs/plugins/inspect/plugin-videotestsrc.xml:
* docs/plugins/inspect/plugin-volume.xml:
* docs/plugins/inspect/plugin-vorbis.xml:
* docs/plugins/inspect/plugin-ximagesink.xml:
* docs/plugins/inspect/plugin-xvimagesink.xml:
* ext/alsa/gstalsamixer.c:
* ext/alsa/gstalsasink.c:
* ext/alsa/gstalsasrc.c:
* ext/gio/gstgiosink.c:
* ext/gio/gstgiosrc.c:
* ext/gio/gstgiostreamsink.c:
* ext/gio/gstgiostreamsrc.c:
* ext/gnomevfs/gstgnomevfssink.c:
* ext/gnomevfs/gstgnomevfssrc.c:
* ext/ogg/gstoggdemux.c:
* ext/ogg/gstoggmux.c:
* ext/pango/gstclockoverlay.c:
* ext/pango/gsttextoverlay.c:
* ext/pango/gsttextrender.c:
* ext/pango/gsttimeoverlay.c:
* ext/theora/theoradec.c:
* ext/theora/theoraenc.c:
* ext/theora/theoraparse.c:
* ext/vorbis/vorbisdec.c:
* ext/vorbis/vorbisenc.c:
* ext/vorbis/vorbisparse.c:
* ext/vorbis/vorbistag.c:
* gst/adder/gstadder.c:
* gst/audioconvert/gstaudioconvert.c:
* gst/audioresample/gstaudioresample.c:
* gst/audiotestsrc/gstaudiotestsrc.c:
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
* gst/gdp/gstgdpdepay.c:
* gst/gdp/gstgdppay.c:
* gst/playback/gstdecodebin2.c:
* gst/playback/gstplaybin.c:
* gst/playback/gstplaybin2.c:
* gst/playback/gstqueue2.c:
* gst/playback/gsturidecodebin.c:
* gst/tcp/gstmultifdsink.c:
* gst/tcp/gsttcpserversink.c:
* gst/videorate/gstvideorate.c:
* gst/videoscale/gstvideoscale.c:
* gst/videotestsrc/gstvideotestsrc.c:
* gst/volume/gstvolume.c:
* sys/ximage/ximagesink.c:
* sys/xvimage/xvimagesink.c:
Cleanup Plugin docs. Link to signals and properties. Fix sub-section
titles. Drop mentining that all our example pipelines are "simple"
pipelines.
2008-07-11 06:10:24 +00:00
Jan Schmidt 4b5e729246 sys/ximage/ximagesink.h: When the caps change, make sure to re-draw borders in force-aspect-ratio=true mode.
Original commit message from CVS:
* sys/ximage/ximagesink.c (gst_ximagesink_ximage_put),
(gst_ximagesink_setcaps):
* sys/ximage/ximagesink.h:
When the caps change, make sure to re-draw borders in
force-aspect-ratio=true mode.
* sys/xvimage/xvimagesink.c (gst_xvimagesink_xvimage_put):
Don't clear the border_draw flag until we actually draw the border.
* tests/check/Makefile.am:
Ignore alsasink/src during the states test too, so it doesn't fail
when running without access to the sound device.
2008-06-24 01:14:40 +00:00