Commit graph

1222 commits

Author SHA1 Message Date
Matthew Waters
769fffa3d9 new qt5 qml GL video sink
Very much in the same spirit as the Gtk GL sink

Two things are provided
1. A QQuickItem subclass that renders out RGBA filled GstGLMemory
   buffers that is instantiated from qml.
2. A sink element that will push buffers into (1)

To use
1. Declare the GstGLVideoItem in qml with an appropriate
   objectName property set.
2. Get the aforementioned GstGLVideoItem from qml using something like

QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

QObject *rootObject = engine.rootObjects().first();
QQuickItem *videoItem = rootObject->findChild<QQuickItem *> ("videoItem");

3. Set the videoItem on the sink

https://bugzilla.gnome.org/show_bug.cgi?id=752185
2015-07-10 15:25:26 +10:00
Matthew Waters
abde710f42 gtk: add to the generic/states test 2015-07-09 16:40:19 +10:00
Sebastian Dröge
cd47556351 mpdparser: Fix some memory leaks in the MPD parser and unit test 2015-07-08 23:15:14 +03:00
Florin Apostol
d525d9c391 dashdemux: tests: added unit tests to test all functions
Added unit tests for all functions. Code coverage:
Overall coverage rate:
  lines......: 83.8% (1941 of 2316 lines)
  functions..: 100.0% (141 of 141 functions)
2015-07-08 23:15:14 +03:00
Florin Apostol
57042af9d6 dashdemux: tests: added indentation in xml strings to improve readability
https://bugzilla.gnome.org/show_bug.cgi?id=752027
2015-07-07 14:13:53 +03:00
Florin Apostol
397fa37093 dashdemux: tests: corrected code layout
deleted the empty line between gst_mpd_parse call and its check so that
the assert is next to the function it is testing

https://bugzilla.gnome.org/show_bug.cgi?id=752027
2015-07-07 14:01:03 +03:00
Stian Selnes
158f8d5b68 tests: pcapparse: add unit test for frames with eth padding
https://bugzilla.gnome.org/show_bug.cgi?id=751879
2015-07-03 10:28:34 +01:00
Florin Apostol
e2d1126391 dashdemux: corrected recognition of $$$ in segment templates
fixed recognition of $$ after a $ that ends an identifier, eg $Time$$$

https://bugzilla.gnome.org/show_bug.cgi?id=751682
2015-06-29 19:28:56 -03:00
Florin Apostol
87a4d523b9 tests: dashdemux: renamed functions
Renamed 2 testcase functions:
- dash_mpdparser_program_information
- dash_mpdparser_base_URL
2015-06-25 10:13:23 +02:00
Florin Apostol
b8cb37f04d tests: dashdemux: added explicit type conversions
flexelint (http://www.gimpel.com/html/flex.htm) static code analyser
complained about implicit conversions from unsigned to signed, so I added
explicit conversions.

Ideally, the size parameter of gst_mpd_parse function should be unsigned,
but I don't want to change the API.
2015-06-24 12:22:44 +02:00
Florin Apostol
d02f9d30af tests: dashdemux: corrected return type for duration_to_ms function
The duration_to_ms function converts a time specified by year, month, day,
hour, minute, second, millisecond to a millisecond value. Because all the
arguments are positive numbers, the result must also be positive.

This patch changes the returned value from a gint64 to a guint64 type.
2015-06-24 12:22:33 +02:00
Florin Apostol
d310a1edcf tests: dashdemux: added parsing of period element
Improved dash_mpd unit tests by adding new tests that parse the Period element.

Code coverage reported by lcov for dash/gstmpdparser.c is:
  lines......: 43.0% (985 of 2290 lines)
  functions..: 47.5% (67 of 141 functions)
2015-06-22 18:22:57 +02:00
Florin Apostol
05198e2df1 tests: dashdemux: extended MPD element test to test xml namespaces
Extended the dash_mpdparser_mpd testcase to also test parsing the xml
namespace attribute.

https://bugzilla.gnome.org/show_bug.cgi?id=750863
2015-06-22 13:55:46 +02:00
Florin Apostol
8336d7a60b dashdemux: corrected computation of period's duration
According to ISO/IEC 23009-1:2014(E), chapter 5.3.2.1
"The Period extends until the PeriodStart of the next Period, or until
the end of the Media Presentation in the case of the last Period."

This means that a configured value for optional attribute period duration
should be ignored if the next period contains a start attribute or it is
the last period and the MPD contains a mediaPresentationDuration attribute.

https://bugzilla.gnome.org/show_bug.cgi?id=750797
2015-06-22 13:47:54 +02:00
Tim-Philipp Müller
e7512329ca examples: move vp8 parser test to codecparser example directory 2015-06-21 11:51:38 +01:00
Tim-Philipp Müller
82be4ad395 examples: add small jpeg codecparser test
https://bugzilla.gnome.org/show_bug.cgi?id=673925
2015-06-21 11:34:39 +01:00
Jan Schmidt
3ea9f51dd7 3dvideo: Add simple gtk example stereoscopic video player
https://bugzilla.gnome.org/show_bug.cgi?id=611157
2015-06-19 01:49:33 +10:00
Florin Apostol
9f56cc27ab dashdemux: fixed getting representation based on max bandwidth
The gst_mpdparser_get_rep_idx_with_max_bandwidth function assumes
representations are ordered by bandwidth and incorrectly returns the
first one when wanting the one with minimum bandwidth.

Corrected gst_mpdparser_get_rep_idx_with_max_bandwidth function to get the
correct representation in case max_bandwidth parameter is 0.

https://bugzilla.gnome.org/show_bug.cgi?id=751153
2015-06-18 11:29:45 -03:00
Matthew Waters
f600a8ac9a gl/examples: update qt examples for api changes 2015-06-15 16:47:15 +10:00
Florin Apostol
b23e4452a2 dashdemux: fixed segfault for missing default namespace
Added a check for a_node->ns before accessing a_node->ns->href in
gst_mpdparser_get_xml_node_namespace. This could happen if the xml
is missing the default namespace.

https://bugzilla.gnome.org/show_bug.cgi?id=750866
2015-06-12 22:45:51 +02:00
Nirbheek Chauhan
f8137dd8a6 examples: playout: Add better help text
This should help people figure out how to use the example a bit better
2015-06-12 21:15:03 +01:00
Nirbheek Chauhan
4d42704312 examples: playout: Decrement the currently-playing counter correctly
Only do that when we're removing an item that was playing, otherwise we'll mess
things up while trying to edit the play queue (playlist).
2015-06-12 21:14:57 +01:00
Nirbheek Chauhan
5da10b4f57 playout: New example for seamless audio/video playback
An example app that takes video URIs as command line arguments and switches
between them seamlessly one after the other using compositor and audiomixer.
Both audio-video and video-only media files are valid inputs, but mixing files
of both types in a single invocation is cumbersome to support, and hence does
not work. The example attempts to keep the audio stream moving along perfectly,
and duplicates video frames where necessary to cover gaps in the video
timestamps using the 'ignore-eos' videoaggregator pad property.

Ensuring seamless (and mostly-glitch-free) switching is harder than it sounds,
and hence the example contains plenty of pad probes and running time
calculations to make things work.

The GPtrArray play_queue contains items that are being played back, have been
prepared for playback, and will be played back in the future. The queue itself
is mutable besides the first two items (playing and prepared). The item that has
been prepared should not be edited or removed since it has been prepared in
advance to be activated immediately on the current item's EOS.

The example also has support for switching to the next item in the queue
prematurely; see the --switch-after/-s flag to the application.

Note: the output video is hard-coded at 1280x720, and input video is scaled as
needed to fit this size. Set OUTPUT_VIDEO_WIDTH/HEIGHT to change this.

https://bugzilla.gnome.org/show_bug.cgi?id=748947
2015-06-12 20:32:25 +01:00
Nirbheek Chauhan
220a133479 tests: Add test for the 'ignore-eos' compositor sink pad property
When the 'ignore-eos' property is set on a pad, compositor will keep resending
the last buffer on the pad till the pad is unlinked. We count the buffers
received on appsink, and if it's more than the buffers sent by videotestsrc, the
test passes.
2015-06-12 19:45:41 +01:00
Matthew Waters
97dfc5f5a6 gl/tests: remove reference to undefined buffer test 2015-06-12 21:31:48 +10:00
Matthew Waters
c3a47c910d glmemory: separate pbo transfer from texture transfers
When supported, the potentially longer pbo upload/download can be
initiated before the texture upload/download, potentially increasing
throughput.
2015-06-12 16:59:20 +10:00
Matthew Waters
7d8d1f8206 glmemory: implement on top of glbasebuffer
Provides convenient access to PBO usage.

Currently texture updates are coupled tightly to data transfers.
2015-06-12 16:59:20 +10:00
Nicolas Dufresne
0c647ec8a7 gstgtk: No need to realize the widget
The widget already does that.
2015-06-11 12:41:49 -04:00
Nicolas Dufresne
1f9bdcad87 gstgtk: Don't leak the widget
g_object_get() returns a ref, gtk_container_add() only ref_sink().
That mean we still need to unref afterward. This leak was hiding
a reference bug previously present.
2015-06-11 12:41:49 -04:00
Sebastian Dröge
b9d8d83ca4 gtk: Add missing CFLAGS to example 2015-06-11 14:58:27 +02:00
Matthew Waters
23fb666dd7 Implement gtk sinks
two sinks are provided.  gtksink which is a cairo/software based renderer
and gtkglsink which utilises the GL support in gtk and gstreamer.
2015-06-11 22:01:03 +10:00
Florin Apostol
8b18be5bfb tests: dashdemux: add unit tests for checking the parsing of MPD element
Create a dash test target and add unit tests that check the parsing of
attributes of the MPD element and the following child elements:
 - baseURL
 - program information
 - location
 - metrics

These tests check the compliance of parts of the MPD parser in the
dashdemux element against the DASH specification [1].

    [1] http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014_Electronic_inserts.zip
        http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014.zip

https://bugzilla.gnome.org/show_bug.cgi?id=750390
2015-06-08 13:17:49 -03:00
Stefan Sauer
4243db850c zbar: split test
Lets not cram everything into a single test - this would render the test name
useless for quick diagnosis. Having separate tests for the optional feature is
also verifying the behaviour when the feature is off.
2015-06-07 16:27:13 +02:00
Thiago Santos
045bfa10fe Fix a common typo: retreive -> retrieve
Seems to have been copy pasted around a few places
2015-06-05 09:43:35 -03:00
Julien Isorce
6d04b62e85 gl/example: fix build error when compiling cocoa-videooverlay
libtool: error: ignoring unknown tag OBJC
and
clang: error: argument unused during compilation: '-pthread'
2015-06-04 08:04:13 +01:00
Luis de Bethencourt
16f61e7b2d examples: gst-camerabin2-test: protect from division by zero
Highly unlikely to have 0 captures, but protect from crashes in the future by
doing none of the math if there is no data.
2015-06-03 14:58:13 +01:00
Olivier Crête
06d9b61fc2 tests: audiointerleave: test not setting positions
Disable "channel-positions-from-input", but without actually giving
a position table, so every position should be NONE
2015-06-02 15:45:13 -04:00
Olivier Crête
8dcb1c6df6 tests: Fix indentation in audiointerleave test 2015-06-02 15:44:57 -04:00
Edward Hervey
e899abea14 check: Use GST_CHECK_MAIN () macro everywhere
Makes source code smaller, and ensures we go through common initialization
path (like the one that sets up XML unit test output ...)
2015-06-02 16:04:40 +02:00
Reynaldo H. Verdejo Pinochet
8f2b65c74d tests: zbar: check for frame field on attach-frame=true
Also check for the sample to have a buffer and caps
associated with it.

Related to:

https://bugzilla.gnome.org/show_bug.cgi?id=747557
2015-06-01 12:33:41 -03:00
Edward Hervey
5fe88f7ed7 examples: Fix gl usage without wayland support
Not all platforms have wayland support. Handle that gracefully at
compile time
2015-06-01 14:05:06 +02:00
Matthew Waters
5f0c006a82 gl/examples: update gtk examples for glupload 2015-05-31 16:09:34 +10:00
Matthew Waters
21cbf763b0 gl/examples: update gtk examples for wayland 2015-05-31 16:09:34 +10:00
Matthew Waters
349685ad27 tests/gl/gtk: implement setting a wayland display/surface 2015-05-31 16:04:13 +10:00
Jan Schmidt
cdff13e07b Fix flags order in GL examples for uninstalled build 2015-05-21 13:42:35 +10:00
Matthew Waters
904cdf3f58 tests/gl: fix typo 2015-05-14 18:35:35 +10:00
Matthew Waters
0870e8785e gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
We are using shaders everywhere and so they are not needed
2015-05-14 16:42:09 +10:00
Matthew Waters
c519169052 compositor: fix rectangle obscure test to clamp against the output frame size
Rather than one of the input pad video info's.

The test checking this was not constraining the output frame size
to ensure that the out of frame stream was not being displayed.
2015-05-13 17:44:30 +10:00
Nirbheek Chauhan
105a5cce92 tests: Add a check for the new compositor pad-is-obscured optimization
We verify that all the buffers on an obscured sinkpad are skipped by overriding
the map() function in the GstVideoMeta of the buffers to set a variable when
called. We also test that the buffers do get mapped when they're not obscured.

Blame^WCredit for the GstVideoMeta map() idea goes to Tim.

https://bugzilla.gnome.org/show_bug.cgi?id=746147
2015-05-01 11:57:00 +01:00
Thiago Santos
cb56a6b32b examples: gst-camera: add zoom property to UI
Add a slider to modify the zoom in camerabin
2015-04-27 21:14:09 -03:00