Commit graph

267 commits

Author SHA1 Message Date
Gavin Stark b00f8a5b36 xvimagesink: Use gst_caps_can_intersect() instead of gst_caps_intersect()
Fixes a memory leak and bug #636827.
2010-12-09 08:40:25 +01:00
Sebastian Dröge 28da26e670 xvimagesink: Add docs for the new property
Including Since markers
2010-12-02 19:04:28 +01:00
Sebastian Dröge f8f1aa2160 xvimagesink: Use PROP_ instead of ARG_ for the property enums 2010-12-02 19:04:28 +01:00
Andrea Sebastianutti 72d6f7f4d6 xvimagesink: Add read-only properties window-width and window-height 2010-12-02 19:04:27 +01:00
Sebastian Dröge 96006aded8 xvimagesink: Make sure that the caps for upstream negotiation are simple caps
Fixes bug #631774.
2010-10-10 18:35:54 +02:00
René Stadler 578a7ef950 xvimagesink: allow render rectangle coordinates to be negative
Useful for cropped zooming.
2010-09-28 15:20:37 +03: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
Sebastian Dröge 59ba05a95d xvimagesink: Suggest caps with different width/height if bufferalloc is called with impossible width/height 2010-08-11 18:10:45 +02:00
Sebastian Dröge 2a08bcc53f xvimagesink: It's not a bad thing if the preferred video format needs less bytes per frame 2010-08-11 18:10:44 +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 3ec87ee221 xvimagesink: init geometry when setting new xid
Don't rely on expose event to query geomentry after new xid is set.

Fixes #615647.
2010-04-14 15:19:19 +01:00
Tim-Philipp Müller 37d000d175 xoverlay: change new set_render_rectangle() vfunc to take four arguments so we don't depend on libgstvideo
Don't make libgstinterfaces (and thus libgstaudio etc.) indirectly depend
on libgstvideo by using the GstVideoRectangle helper structure in the API,
which causes undesirable dependencies, esp. with the gobject-introspection
(people will point and laugh at us if they find out that libgstaudio
depends on libgstvideo). Instead, pass the x, y, width and height parameters
directly to the function.

Re-fixes #610249.
2010-03-28 20:21:10 +01:00
Benjamin Otte 3bd4aa26ff Add -Wwrite-strings to configure
Fixes for the code included
2010-03-16 17:41:51 +01: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 a982dc0480 xvimagesink: implement set_render_rectangle
Previously we hardcoded the target rectangle passes to Xv(Shm)PutImage. Extend
the implementation to use a full rectangle and don't assume 0,0 for top,left.
2010-03-11 10:24:57 +02: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 99b4483b8c xvimagesink: only start event thread if needed
The event thread is doing 20 wakeups per second to poll the events. If one runs
xvimagesink with handle-events=false and handle-expose=false then we can avoid
the extra thread.
2009-10-07 11:18:09 +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 a533ae303b xvimagesink: fix small memory leak when setting window title 2009-09-06 01:44:23 +03:00
Stefan Kost 8e5a0000dc xvimagesink: use core performance log category 2009-07-06 09:42:12 +01: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
Stefan Kost 483a955e89 xvimagesink: appname might be NULL
Don't set title if appname is unknown.
2009-06-18 18:13:22 +03:00
Stefan Kost 192efaf1d0 xvimagesink: set window title from application name 2009-06-18 17:58:06 +03:00
Stefan Kost 2f90615d14 xvimagesink: use xcontext->depth instead of bits in attr.max_value for colorkey
According to the drivers in http://cgit.freedesktop.org/xorg/driver/ we should
format the colorkey depending on xcontext->depth. This is what they will use to
interprete the value. The max_value in turn is usualy a constant regardless of
the depth.
2009-03-31 12:27:09 +03:00
Stefan Kost 492b8861c4 xvimagesink: scale the colorkey components in case of 16bit visuals
Use a default that won't be scales to 0,0,0
2009-03-25 14:40:42 +02:00
Wim Taymans 81b7470ab8 xvimageink: protect buffer_alloc from shutdown
Use the pool_lock in the buffer_alloc function to detect shutdown. Avoids
crashes when the sink is shutdown.
2009-02-25 13:16:32 +01: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
Stefan Kost 26e4e3dcfe xvimagesink: do not call _xwindow_clear on ready->paused.
Calling clear at that transition does things like stopping xvideo (which is not
running at that time) and also clearing anything what the application might have drawn.
This breaks handle-expose and autopaint-colorkey features.
2009-02-05 15:51:25 +02:00
Wim Taymans e327bbcd7d Add some more debugging to the Xv strides
Add some more debugging to the strides as they are received from the server and
the expected strides.
2009-01-23 11:44:53 +01:00
Stefan Kost f67b07cfd8 sys/xvimage/xvimagesink.c: Don't reset the colorkey when element is reused. Fixes #567511.
Original commit message from CVS:
* sys/xvimage/xvimagesink.c:
Don't reset the colorkey when element is reused. Fixes #567511.
2009-01-13 06:51:54 +00: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
Wim Taymans e02bde49f2 sys/xvimage/xvimagesink.*: Avoid typechecking when we do trivial casts.
Original commit message from CVS:
* sys/xvimage/xvimagesink.c: (gst_xvimage_buffer_finalize),
(gst_xvimagesink_xvimage_put), (gst_xvimagesink_setcaps),
(gst_xvimagesink_show_frame), (gst_xvimagesink_buffer_alloc):
* sys/xvimage/xvimagesink.h:
Avoid typechecking when we do trivial casts.
Move error handling out of the main program flow.
Sneak in the display-region caps property, not completely correct yet.
Cache the width/height in buffer_alloc instead of parsing it from the
caps all the time.
2008-11-13 18:18:32 +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 6b3c69fa01 Allow setting colorkey if possible. Implement property probe interface for optional X features (autopaint-colorkey, d...
Original commit message from CVS:
* sys/xvimage/xvimagesink.c:
* sys/xvimage/xvimagesink.h:
* tests/icles/Makefile.am:
* tests/icles/test-colorkey.c:
Allow setting colorkey if possible. Implement property probe interface
for optional X features (autopaint-colorkey, double-buffer and
colorkey). Fixes #554533
2008-10-22 12:25:02 +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
Stefan Kost 13759bcbff sys/xvimage/xvimagesink.c: Don't assert on caps==NULL.
Original commit message from CVS:
* sys/xvimage/xvimagesink.c:
Don't assert on caps==NULL.
2008-10-11 16:27:28 +00:00
Tim-Philipp Müller 76330d35c7 sys/xvimage/xvimagesink.c: No really, the next release is 0.10.21 (fix Since: tags in docs).
Original commit message from CVS:
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_class_init):
No really, the next release is 0.10.21 (fix Since: tags in docs).
2008-09-05 10:24:05 +00:00
Stefan Kost fb3d85f292 sys/xvimage/xvimagesink.*: Add a "draw-border" property that can be set to false to disable drawing borders.
Original commit message from CVS:
* sys/xvimage/xvimagesink.c:
* sys/xvimage/xvimagesink.h:
Add a "draw-border" property that can be set to false to disable
drawing borders.
* tests/icles/test-colorkey.c:
* tests/icles/Makefile.am:
Add new test application for the colorkey handling.
2008-09-04 13:46:52 +00:00
Edward Hervey d7e7103b52 sys/xvimage/xvimagesink.c: Fix a "may be used uninitialized in this function" which weirdly only appears on macosx (?).
Original commit message from CVS:
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support):
Fix a "may be used uninitialized in this function" which weirdly only
appears on macosx (?).
2008-07-30 15:29:44 +00:00
Stefan Kost 329de8cfc5 sys/xvimage/Makefile.am: floor() needs linking to $(LIBM).
Original commit message from CVS:
* sys/xvimage/Makefile.am:
floor() needs linking to $(LIBM).
2008-07-29 13:01:13 +00:00
Stefan Kost feea3e0b1c gst/playback/gstplaybasebin.c: Fix property doc markup (its not a signal).
Original commit message from CVS:
* gst/playback/gstplaybasebin.c:
Fix property doc markup (its not a signal).
* sys/xvimage/xvimagesink.c:
Add since tag for new proeprties (also add sice tags fro the last two
other additions).
2008-07-29 10:26:28 +00:00
Stefan Kost 95376f9130 sys/xvimage/xvimagesink.*: Add autofill/colorkey properties. Fixes #538656.
Original commit message from CVS:
* sys/xvimage/xvimagesink.c:
* sys/xvimage/xvimagesink.h:
Add autofill/colorkey properties. Fixes #538656.
2008-07-29 08:59:32 +00:00
David Schleef e98057986b sys/xvimage/xvimagesink.c: Fix rounding errors when converting colorbalance values between hardware and object proper...
Original commit message from CVS:
* sys/xvimage/xvimagesink.c:
Fix rounding errors when converting colorbalance values
between hardware and object property ranges.  Partial
fix for #537889, however, there still seems to be a small
drift problem that could be totem's fault.
2008-07-29 01:58:05 +00:00
Jan Schmidt 2b8f4868ee sys/xvimage/xvimagesink.c: Oops - set the size of the image used for probing back to 1x1, for consistency with ximage...
Original commit message from CVS:
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls):
Oops - set the size of the image used for probing back to 1x1, for
consistency with ximagesink
2008-07-17 14:21:30 +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
Michael Smith 23f5a075ab sys/xvimage/xvimagesink.c: Don't set colour balance values on the Xv port if the user hasn't changed them (via proper...
Original commit message from CVS:
* sys/xvimage/xvimagesink.c:
Don't set colour balance values on the Xv port if the user hasn't
changed them (via properties or the interface). Avoids accumulating
rounding errors for the common case.
Partial fix for bug #537889.
2008-06-20 17:02:48 +00:00