Commit graph

19446 commits

Author SHA1 Message Date
Matthew Waters
1a6fe3db40 glcontext/wgl: implement gl3 core profile context selection 2015-08-10 15:46:13 +02:00
Lubosz Sarnecki
80d77aa0a5 gltransformation: implement pivot point for rotation and scale
https://bugzilla.gnome.org/show_bug.cgi?id=744763

Add a pivot vector for setting the origin of rotations and scales.

With the pivot point the rotation and scale operations can have
different origins. This adds the ability to rotate around different points.
Currently the default (0, 0) pivot point is possible,
a rotation around the center, and zooming into and out of the center.

With an pivot point this is optional.
I defined the following image coordinates for the pivot point:

	 (-1,1) ------------------------- (1,1)
		|			|
		|			|
		|			|
		|	  (0,0)		|
		|			|
		|			|
		|			|
	(-1,-1) ------------------------- (1,-1)

Example:

	Rotate the video at the bottom left corner

	gst-launch-1.0 videotestsrc \
			! gltransformation \
		 		scale-x=0.5 \
				scale-y=0.5 \
				rotation-z=25.0 \
				pivot-x=-1.0 \
				pivot-y=-1.0 \
			! glimagesink

The pivot-z option defines the pivot point in 3D space.
This only affects rotation, since we have no Z data to scale.
With this option a video can be rotated around a point in 3D space.

Example:

	Rotate around point behind the video:

    	gst-launch-1.0 videotestsrc \
			! gltransformation \
				rotation-x=10.0 \
				pivot-z=-4.0 \
			! glimagesink
2015-08-08 16:32:53 -04:00
Nicolas Dufresne
d6baf8dcc7 gloverlaycompositor: Add shader to convert BGRA/ARGB -> RGBA
Depending on the bytes order we will get BGRA (little) and ARGB (big)
from the composition overlay buffer while our GL code expects RGBA. Add
a fragment shader that do this conversion.

https://bugzilla.gnome.org/show_bug.cgi?id=752842
2015-08-08 16:32:53 -04:00
Matthew Waters
6b8cf8419d qml: implement the required multiple GL context synchonisation
From GStreamer's GL context into the QML context
2015-08-08 17:30:42 +02:00
Matthew Waters
69a90b5bfe gl/syncmeta: implement synchronisation without glFenceSync
Uses glFinish as that's the best we have for lesser OpenGL versions.
2015-08-08 17:30:42 +02:00
Tim-Philipp Müller
424426f486 asfmux: output TIME segment if we output a stream and won't seek back later
Check if downstream is seekable via a SEEKING query and output a
BYTE segment if we want to seek back to fix up the headers later,
but if we're streaming send a TIME segment instead (which goes
down better with e.g. asfmux ! rtpasfpay).

https://bugzilla.gnome.org/show_bug.cgi?id=719553
2015-08-08 16:19:09 +01:00
Matthew Waters
4fd7b2408e tests/glcontext: fix INVALID_ENUM GL error in test 2015-08-08 15:32:17 +02:00
Matthew Waters
83995c0935 context/glx: only use glXCreateContextAttribs for OpenGL 3 contexts
mesa for example when creating a GL 3.1 compatibility context
overrides our context profile selection to create a core context.
2015-08-08 15:32:17 +02:00
Luis de Bethencourt
c895f3f3b3 examples: facedetect: only set to playing when it's not already 2015-08-08 13:19:47 +01:00
Luis de Bethencourt
d7fbb72c72 examples: opencv: remove unnecessary setting of a property
"/dev/video0" is the default device of v4l2src, setting it to this is
redundant.
2015-08-08 12:52:38 +01:00
Luis de Bethencourt
3a765e0805 facedetect: fix profile loading check
Since the profile gchar depends on DEFAULT_FACE_PROFILE, it should never be
NULL. Furthermore CascadeClassifier accepts any input, even
an empty one, but if the profile fails to load it returns an empty cascade.
Check for this instead, and inform the user if there was an Error.
2015-08-07 15:51:40 +01:00
Thiago Santos
bc33d22635 hlsdemux: don't warn about duration if it is not known
And also print the values in case of warning
2015-08-07 11:24:52 -03:00
Luis de Bethencourt
0553559fd2 gitignore: add new example file
Commit 02b9daafdf added a new example file
tests/examples/opencv/gstfacedetect_test, adding it to .gitignore
2015-08-07 13:17:25 +01:00
Luis de Bethencourt
316657a2f8 configure: update OpenCV requirements to 2.3.0
With facedetect ported to C++ the minimum version of OpenCV
supported is 2.3.0

https://bugzilla.gnome.org/show_bug.cgi?id=748377
2015-08-07 13:14:11 +01:00
Sreerenj Balachandran
69becd734d h265parse: expose compatible profiles to downstream
Some video bitstreams report a too restrictive set of profiles. If a video
decoder was to strictly follow the indicated profile, it wouldn't support that
stream, whereas it could in theory and in practice. So we should relax the
profile restriction for allowing the decoder to get connected with parser.

https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-08-07 13:11:53 +02:00
Nicolas Dufresne
ef7a074fa0 rgb2bayer: Use mapped frame stride 2015-08-06 18:12:07 -04:00
Nicolas Dufresne
97a0d9d72d rgb2bayer: Protect against failing map 2015-08-06 18:11:53 -04:00
Nicolas Dufresne
6bd93bd7e5 bayer2rgb: Read stride from the video info 2015-08-06 18:04:58 -04:00
Nicolas Dufresne
7d6fd42726 bayer2rgb: Protect against failing map 2015-08-06 18:04:41 -04:00
Ilya Averyanov
be1e9daff5 element-template: Fix wrong pad in videoencoder
https://bugzilla.gnome.org/show_bug.cgi?id=753326
2015-08-06 16:24:43 -04:00
Florin Apostol
93c10d3f0e dashdemux: Fix leak in gst_dash_demux_stream_update_fragment_info()
The gst_dash_demux_stream_update_fragment_info function could call
gst_dash_demux_stream_update_headers_info function twice. The
gst_dash_demux_stream_update_headers_info function will set header_uri and
index_uri to some newly allocated strings. The values set by the first call of
gst_dash_demux_stream_update_headers_info will leak when the function is
called for a second time.

The solution is to call gst_adaptive_demux_stream_fragment_clear before the
second call of gst_dash_demux_stream_update_headers_info

https://bugzilla.gnome.org/show_bug.cgi?id=753188
2015-08-06 01:24:28 +03:00
Nicolas Dufresne
3757e507f3 pcapparse: Segment should start at base ts
Instead we would use cur_ts which matches the last TS store
in the buffer list.

https://bugzilla.gnome.org/show_bug.cgi?id=753037
2015-08-05 14:54:05 -04:00
Anders Jonsson
3fb2222470 camerabin2: Fix string typo
https://bugzilla.gnome.org/show_bug.cgi?id=753241
2015-08-05 09:15:07 -04:00
Luis de Bethencourt
0113029fb9 opencv: facedetect: free IplImage with cvReleaseImage
Using delete() with IplImage will fail to free some of the structure's
contents. cvReleaseImage() is the proper way of freeing the memory.
2015-08-05 11:56:37 +01:00
Luis de Bethencourt
cc8af753b9 opencv: facedetect: check pointer before using it
Check if profile is NULL before dereferencing it with new. Also, new will
never return NULL; if allocation fails, a std::bad_alloc exception will be
thrown instead. Remove check for a NULL return.

CID #1315258
2015-08-05 11:39:03 +01:00
Luis de Bethencourt
ca52600ccb x265enc: remove dead code
level_ok is only used in a check that will never be true, removing it.

CID #1315255
2015-08-05 11:14:51 +01:00
Luis de Bethencourt
54b317ef78 x265enc: fix memory leak
Free vps_nal before returning.

CID #1315257
2015-08-05 11:11:14 +01:00
Carlos Garnacho
3129396643 rsvg: Don't leak a GstVideoCodecState
There's already the output_state variable with it, no need to
call gst_video_decoder_get_output_state() and get a new ref.

https://bugzilla.gnome.org/show_bug.cgi?id=753262
2015-08-04 19:14:43 -04:00
Jimmy Ohn
be714c7441 rawparse: fix duplicated format in handle_seek_pull
GstFormat variable are duplicated in handle_seek_pull function.
So we need to move this variable in condition statement.

https://bugzilla.gnome.org/show_bug.cgi?id=753243
2015-08-04 12:29:40 -03:00
Tim-Philipp Müller
0e70f8c94f opencv: facedetect: fix crashes in finalize
Fixes gst-inspect-1.0 -a crashing.
2015-08-04 14:30:17 +01:00
Sebastian Dröge
d3dbb69c8e winscreencap: Properly timestamp buffers with the current clock running time instead of doing magic
Also implement framerate handling correctly by borrowing the code from
ximagesrc. GstBaseSrc::get_times() can't be used for that, we have to
implement proper waiting ourselves.
2015-08-03 19:42:56 +03:00
Jan Schmidt
bd30d516a8 opencv: Fix 32-bit build / format strings.
Use G_GSIZE_FORMAT for format strings where relevant
2015-08-04 00:20:27 +10:00
Matthew Waters
374cd2a570 glvideomixer: swap control binding proxy
The ref_object and object parameters were the wrong way around.

For the typical use case where an application is setting a
GstControlBinding on the returned ghost pad:
1. our control binding would be removed when the new one was set
2. sync_values calls were not being forwarded from the internal
   pad to the ghost pad.

If an application attempts to perform other control binding
operations (get_* family of functions) on the internal pad, they
will also be forwarded to the ghost pad where a possible
GstControlBinding will provide the necessary values.
2015-08-03 20:08:52 +10:00
Thiago Santos
620af5b04b dash: mpdparser: plug leak in segmenttemplate parsing
Only copy the values from the parent if the current node doesn't
have that value, they were being copied from the parent and
then overwriten by the child node, leaking the parent's copy
2015-08-01 16:11:07 -03:00
Thiago Santos
9d431e605f tests: dash_mpd: add check for segmenttemplate inheritance
Checks if the values are properly inherited and overwriten
2015-08-01 16:11:07 -03:00
Thiago Santos
9c291904f5 tests: dash_mpd: add one more baseURL test
This other type of baseURL test was replaced by a more complex one,
better have both to keep both options working

Also adds another 2 variations of how baseURL can be generated

https://bugzilla.gnome.org/show_bug.cgi?id=752776
2015-08-01 16:11:01 -03:00
Florin Apostol
6ce65709bd dashdemux: tests: added duration format test
https://bugzilla.gnome.org/show_bug.cgi?id=752776
2015-08-01 16:10:55 -03:00
Florin Apostol
86c12c7357 dashdemux: tests: update unit test for baseURL
Update the unit test for baseURL to test that it is properly
resolved taking into account parent baseURL elements.

https://bugzilla.gnome.org/show_bug.cgi?id=752776
2015-08-01 11:52:26 -03:00
Thiago Santos
2df67f9da0 templatematch: revert rename of property
The property doesn't need to have its name changed because of C++,
just the instance variables.
2015-08-01 11:52:12 -03:00
Vanessa Chipirrás
02b9daafdf facedetect: Add unit test
I created four utilities of the detected features:
1- If you hide your mouth, the volume of video is low.
2- If you hide the nose, the volume of the video is up.
3- If you hide the full face, the video stops.

You can see proof of this here:
https://www.youtube.com/watch?v=pxzejNKV_WQ

https://bugzilla.gnome.org/show_bug.cgi?id=748377
2015-07-31 17:43:56 +01:00
Luis de Bethencourt
2111f50a6f templatematch: rename conflicting variable
With the switch of gstopencv.c to C++, all OpenCV elements are built with
g++. The template variable clashes with C++'s feature of the same name.
Rename template to templ to avoid any clash.
2015-07-31 16:49:35 +01:00
Vanessa Chipirrás
78d0c5f01e facedetect: need to migrate to C++
The cascade classifier changes its structure on new version of OpenCV.
The need to migrate to C++ to utilize the new load method of OpenCV which
allows to load the new classifiers.

https://bugzilla.gnome.org/show_bug.cgi?id=748377
2015-07-31 16:49:17 +01:00
Vineeth TM
9115a750f7 dtsdec: fix taglist leak
taglist merge doesnt take ownership. So should free the tags after use

https://bugzilla.gnome.org/show_bug.cgi?id=753086
2015-07-31 10:00:13 +01:00
Heinrich Fink
0cc6d16c94 applemedia/avsample: Fix racy cleanup of CA layer
The block that is dispatched async to the main thread assumed the
wrapping GstAvSampleVideoSink to be alive. However, at the time of
the block execution the GstObject instance that is deferenced to access
the CA layer might already be freed, which caused occasional crashes.
Instead, we now only pass the CoreAnimation layer that needs to be
released to the block. We use __block to make sure the block is not
increasing the refcount of the CA layer again on its own.

https://bugzilla.gnome.org/show_bug.cgi?id=753081
2015-07-31 12:59:00 +10:00
Olivier Crête
035e51b010 tests: Add test for seeking live pipelines
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête
1cb49c429b tests: Make source live to re-enable aggregator timeout tests
The live mode is only enabled if one of the sources if live.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête
ce6206388c tests: Add audiointerleave test to show that queuing works
This tests fails without the queuing patch because incoming buffers are
not delivered before they are needed.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête
10ef6403b6 audiointerleave: Avoid caps processing if not yet negotiated
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête
3f2bc1e4b2 audioaggregator: On timeout, resync pads with not enough data
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête
6efc106a67 aggregator: Queue "latency" buffers at each sink pad.
In the case where you have a source giving the GstAggregator smaller
buffers than it uses, when it reaches a timeout, it will consume the
first buffer, then try to read another buffer for the pad. If the
previous element is not fast enough, it may get the next buffer even
though it may be queued just before. To prevent that race, the easiest
solution is to move the queue inside the GstAggregatorPad itself. It
also means that there is no need for strange code cause by increasing
the min latency without increasing the max latency proportionally.

This also means queuing the synchronized events and possibly acting
on them on the src task.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00