Commit graph

103 commits

Author SHA1 Message Date
Antonio Ospite
80fa912b06 ximagesrc: Remove unused screen-num property
The screen number can be still specified as part of the display-name
property (e.g. for screen 1 of display 0 use display-name=":0.1").

https://bugzilla.gnome.org/show_bug.cgi?id=736122
2014-09-16 10:36:10 +03:00
Antonio Ospite
7554bd3916 ximagesrc: Draw the cursor only when it is active in the capturing region
Use XQueryPointer to check that the pointer is actually active inside
the capturing region.

This prevents drawing the cursor when the pointer is partially outside
of the captured region but not active inside the region; in particular
this avoids drawing the "window resize" cursor shapes to the captured
image when the mouse pointer crosses a window border.

NOTE that this is not only an optimization, this also happen to fix
a serious problem in multi-screen setups.

Because XFixes gives no information of what screen the pointer is on,
ximagesrc was always drawing the cursor on the captured screen even if
the mouse pointer was on another screen.

For example, when capturing from screen 1 (i.e. display-name=":0.1") the
cursor was drawn in the captured image even when the mouse pointer was
actually on screen 0, which is wrong and visually confusing.

https://bugzilla.gnome.org/show_bug.cgi?id=690646
2014-09-16 10:32:39 +03:00
Antonio Ospite
3705f08bad ximagesrc: Fix drawing the cursor when it is outside the capturing region
When the cursor is partially or totally out of the capturing region on
the top side or on the left side, it gets drawn fully inside of the
region with its coordinates rounded up to the left or to the top border.

This is immediately noticeable when using the xid property to capture
a specific window.

To fix the issue, allow negative cx and cx coordinates when checking the
boundaries before drawing the cursor.

NOTE that the boundaries checking calculations still allows the cursor
to be drawn when it is only partially outside of the capturing region,
but this makes sense and gives a more pleasing visual behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=690646
2014-09-16 10:32:33 +03:00
Antonio Ospite
cb70a7f6a7 ximagesrc: Fix the destination coordinates of the cursor
XFixes provides the cursor coordinates relative to the root window, this
is not taken into account when using the xid property to capture
a specific window, the result is that the cursor gets drawn at the wrong
position.

In order to fix this consider the window location when calculating the
cursor position in the destination image.

https://bugzilla.gnome.org/show_bug.cgi?id=690646
2014-09-16 10:32:22 +03:00
Nicolas Dufresne
2c870ff167 ximagesrc: Fix warning about missing return value 2014-07-31 09:53:53 -04:00
Nicolas Dufresne
c82052e723 ximagesrc: Add missing return value to Buffer dispose function
Depending ont he build, the method could return FALSE, hence never
free the buffers, or already TRUE and lead to a crash:

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=733695
2014-07-31 09:14:10 -04:00
Nicolas Dufresne
0746bca190 ximagesrc: Fix ximage leaks when buffer has more then one ximage
From time to time, when the image_pool list has more then 1 element
and I suppose at start, all but 1 pooled ximage are leaked. This is
due to broken algorithm in gst_ximagesink_src_ximage_get(). There was
also a risk of use after free for the case where the ximage size has
changed.

https://bugzilla.gnome.org/show_bug.cgi?id=728502
2014-05-21 12:18:01 -04:00
Tim-Philipp Müller
39fc394254 ximagesrc: only extrapolate alpha mask for 32-bit depth
Instead of passing bogus alpha mask values when there's no alpha.

https://bugzilla.gnome.org/show_bug.cgi?id=726833
2014-03-27 16:32:13 -04:00
Nicolas Dufresne
0918662624 ximagesrc: Add ARGB/BGRA support 2014-03-27 15:10:12 -04:00
Tim-Philipp Müller
d506409af5 docs: get rid of 'Since: 0.10.x' markers
And some gtk-doc markup fixes.
2013-11-18 14:47:35 +00:00
Tim-Philipp Müller
c03efd3894 ximagesrc: clear dts on buffer acquired from pool
When setting timestamps on outgoing buffers, clear the
dts explicitly, otherwise it may end up being set to a
bogus value from last time it was used. Avoids every
second or so buffer's dts being set to 0. Not that it
should matter for raw video.
2013-06-21 00:47:06 +01:00
Sebastian Dröge
b0b0557c48 gst: Add better support for static plugins 2013-04-15 15:54:11 +02:00
Olivier Crête
a31649e357 ximagesrc: Set the pixel aspect ratio correctly in the caps 2013-01-23 21:35:25 -05:00
Tim-Philipp Müller
230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Michael Smith
b04b1b5089 meta info: threadsafe registration using g_once 2012-10-03 10:51:45 -07:00
Tim-Philipp Müller
4bb52bbadf docs: gst-launch -> gst-launch-1.0 and ffmpegcolorspace -> videoconvert 2012-08-27 21:20:30 +01:00
Tim-Philipp Müller
e09ae5736d Use new gst_element_class_set_static_metadata() 2012-04-10 00:51:41 +01:00
Sebastian Dröge
aa2cd462da gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 17:36:38 +02:00
Sebastian Dröge
5cdd49bf25 gst: Update versioning 2012-04-04 14:37:47 +02:00
Wim Taymans
3d61d12e03 update for buffer api change 2012-03-30 18:15:34 +02:00
Wim Taymans
e310ee8218 caps: improve caps handling
Avoid caps copy and leaks
2012-03-27 16:42:41 +02:00
Wim Taymans
c44cd8f55b Merge branch 'master' into 0.11
unport gdkpixbuf
not merged: https://bugzilla.gnome.org/show_bug.cgi?id=654850

Conflicts:
	docs/plugins/Makefile.am
	docs/plugins/gst-plugins-good-plugins-docs.sgml
	docs/plugins/gst-plugins-good-plugins-sections.txt
	docs/plugins/gst-plugins-good-plugins.hierarchy
	docs/plugins/inspect/plugin-avi.xml
	docs/plugins/inspect/plugin-png.xml
	ext/flac/gstflacdec.c
	ext/flac/gstflacdec.h
	ext/libpng/gstpngdec.c
	ext/libpng/gstpngenc.c
	ext/speex/gstspeexdec.c
	gst/audioparsers/gstflacparse.c
	gst/flv/gstflvmux.c
	gst/rtp/gstrtpdvdepay.c
	gst/rtp/gstrtph264depay.c
2012-03-22 11:53:24 +01:00
Wim Taymans
a32d944a38 fix for caps api changes 2012-03-11 19:06:37 +01:00
Sebastian Dröge
9d5e5ea553 ximagesrc: Fix 'comparison of unsigned expression >= 0 is always true'
This variable can never be below zero anyway.
2012-03-06 14:23:05 +01:00
Wim Taymans
1dada15ccf ximage: use new style caps 2012-03-05 12:03:01 +01:00
Wim Taymans
9c789aa434 update for metadata API changes 2012-02-29 17:26:01 +01:00
Wim Taymans
dda3219e4c update for metadata tags 2012-02-28 11:38:59 +01:00
Wim Taymans
0ab5677107 update for metadata change 2012-02-24 10:26:26 +01:00
Wim Taymans
ca9532ccc5 update for new memory api 2012-02-22 02:10:33 +01:00
Wim Taymans
9365f12d6e GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:43:30 +01:00
Wim Taymans
b4630dd3e0 more memory API porting 2012-01-25 12:30:29 +01:00
Wim Taymans
1584806634 port to new gthread API 2012-01-19 11:33:53 +01:00
Sebastian Dröge
93e3ed5a86 Merge branch 'master' into 0.11
Conflicts:
	ext/cairo/gsttextoverlay.c
	ext/pulse/pulseaudiosink.c
	gst/audioparsers/gstaacparse.c
	gst/avi/gstavimux.c
	gst/flv/gstflvmux.c
	gst/interleave/interleave.c
	gst/isomp4/gstqtmux.c
	gst/matroska/matroska-demux.c
	gst/matroska/matroska-mux.c
	gst/matroska/matroska-mux.h
	gst/matroska/matroska-read-common.c
	gst/multifile/gstmultifilesink.c
	gst/multipart/multipartmux.c
	gst/shapewipe/gstshapewipe.c
	gst/smpte/gstsmpte.c
	gst/udp/gstmultiudpsink.c
	gst/videobox/gstvideobox.c
	gst/videocrop/gstaspectratiocrop.c
	gst/videomixer/videomixer.c
	gst/videomixer/videomixer2.c
	gst/wavparse/gstwavparse.c
	po/ja.po
	po/lv.po
	po/sr.po
	tests/check/Makefile.am
	tests/check/elements/qtmux.c
	tests/check/elements/rgvolume.c
2012-01-10 14:32:32 +01:00
Tim-Philipp Müller
66f6e12888 Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We'll change these
over to the new API once we depend on glib >= 2.32.
2011-12-12 09:46:27 +00:00
Vincent Penquerc'h
c0e101e93f various: fix pad template leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:30:27 +00:00
Tim-Philipp Müller
736a484129 More printf format warning fixes 2011-11-22 01:40:39 +00:00
Matej Knopp
1e5dd9e315 Fix printf format compiler warnings on OS X / 64bit
https://bugzilla.gnome.org/show_bug.cgi?id=662615
2011-11-22 01:28:22 +00:00
Wim Taymans
88e398b0ea update for removed fixate function 2011-11-10 11:03:18 +01:00
Wim Taymans
586ef0babd Merge branch 'master' into 0.11
Conflicts:
	ext/speex/gstspeexdec.c
	ext/speex/gstspeexenc.c
	gst/isomp4/atoms.c
	gst/isomp4/gstqtmux.c
2011-10-06 12:23:39 +02:00
Stas Sergeev
73fac4e5bc v4l2, ximagesrc: fix some printf format compiler warnings
https://bugzilla.gnome.org/show_bug.cgi?id=660150
2011-09-30 18:05:32 +01:00
Wim Taymans
87fbd1e784 Merge branch 'master' into 0.11
Conflicts:
	common
	ext/pulse/pulsesink.c
	ext/soup/gstsouphttpclientsink.c
	gst/audioparsers/gstaacparse.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtpmanager/gstrtpjitterbuffer.c
	gst/rtpmanager/rtpjitterbuffer.c
	gst/rtsp/gstrtspsrc.c
	sys/ximage/gstximagesrc.c
2011-09-28 12:44:59 +02:00
Vincent Penquerc'h
82927d6bdd ximagesrc: add xid and xname properties to allow capturing a particular window
A particular window may be selected using the new xid (X-Window
XID, eg a pointer) and xname (window title) properties. If both
are specified, the XID is used in preference, falling back to
xname if not found.

Default (if none of xid and xname are specified, or if no such
window is found) is to capture the root window.

https://bugzilla.gnome.org/show_bug.cgi?id=546932
2011-09-20 13:09:35 +01:00
Wim Taymans
4bb2b140e9 Merge branch 'master' into 0.11
Conflicts:
	sys/v4l2/v4l2src_calls.c
2011-08-16 18:35:53 +02:00
Vincent Penquerc'h
26993420c0 ximagesrc: clear flags on buffer reuse
This will ensure a logically new buffer does not keep flags from
a previous use of that buffer (eg, DISCONT would be set on the first
buffer, and mistakenly kept when reused).

https://bugzilla.gnome.org/show_bug.cgi?id=653709
2011-08-09 10:19:46 +02:00
Wim Taymans
9e276e4f81 ximage: port to 0.11 2011-07-10 14:56:00 +02:00
Wim Taymans
0b1bdcf7cb Merge branch 'master' into 0.11
Conflicts:
	sys/ximage/ximageutil.c
2011-06-02 18:51:29 +02:00
Sebastian Dröge
1f707ac3e0 xvimagesink: Fallback to non-XShm mode if allocating the XShm image failed
Fixes bug #630456.
2011-05-26 12:48:36 +02:00
Wim Taymans
c63dc97adf meta: update for new API 2011-03-08 17:02:30 +00:00
Wim Taymans
9c08bde90b meta: fix for new API 2011-02-28 11:58:49 +01:00
Wim Taymans
f229f4d192 metadata: use metadata for private buffer data
Use buffer metadata to store element private data.
2011-02-28 11:58:49 +01:00