Commit graph

3421 commits

Author SHA1 Message Date
Thiago Santos
1472dd3d58 dashdemux: implement queue full check function
Checks if the queue is full according to max buffering time
set by the user

https://bugzilla.gnome.org/show_bug.cgi?id=701404
2013-07-09 01:18:54 -03:00
Thiago Santos
95c2638ba5 dashdemux: minor refactor
Split one very large function into 2 smaller but still large functions.

Also change the if conditions to positive checks to improve readability.
2013-07-09 00:47:07 -03:00
Thiago Santos
5a5e66ec90 dashdemux: handle live playback resync
During a live stream it is possible for dashdemux to lag behind on a
slow connection or to rush ahead of the connection os too fast.

For the first case it is necessary to jump some segments ahead to be able to
continue playback as old segments are usually deleted from the server.

For the later, dashdemux should wait a little before attempting another
download do give time to the server to produce a new segment
2013-07-08 23:40:14 -03:00
Thiago Santos
b316d8a677 dashdemux: fix template based segment generation
When using a template based segment list, do not try to
contruct a finite segment list for the limits of the available periods.

We might not know when the period ends (for live streams) and we can
always create the segment on demand when requested by dashdemux,
avoiding use of some memory and cpu when re-creating this list.
2013-07-08 23:39:49 -03:00
Thiago Santos
a8a355108a dashdemux: use more appropriate data structures for parsing
Replaces the 2 likely larger lists with more appropriate structures
to improve performance.

Replaces S nodes GList for a GQueue, this reduces latency to startup
because of traversing the list just append an element.

Replaces the processed media segments GList for a GPtrArray as it is
constantly acessed by index during playback.
2013-07-08 23:39:49 -03:00
Thiago Santos
b8fc98849a dashdemux: answer to latency queries
Set live if stream is live and also add to the max latency the
max internal buffering
2013-07-08 23:39:49 -03:00
Thiago Santos
9a38127467 dashdemux: prevent assertion when duration is unknown
Duration from segment being unknown is a issue from the MPD and not
a programming issue, so the assert isn't useful here. Instead check
and return an error code so the caller can fallback to alternatives
2013-07-03 19:11:45 -03:00
Thiago Santos
3030c25aed dashdemux: Fix event leak when parsing manifest fails
Always remember to unref the event before proceeding, in both success
and failure cases
2013-07-03 19:11:11 -03:00
Thiago Santos
788757dc1f dashdemux: various cleanups
Removing unused function, replacing // comments with /* */ and
replacing some GST_WARNING with GST_INFO/_DEBUG as they are meant
to be
2013-07-03 15:34:41 -03:00
Alex Ashley
5ad2a2d161 dashdemux: Change first fragment selection for live streams
When dashdemux selects its first fragment, it always selects the
first fragment listed in the manifest. For on-demand content,
this is the correct behaviour. However for live content, this
behaviour is undesirable because the first fragment listed in the
manifest might be some considerable time behind "now".

The commit uses the host's idea of UTC and tries to find the
oldest fragment that contains samples for this time of day.

https://bugzilla.gnome.org/show_bug.cgi?id=701509
2013-07-03 15:34:30 -03:00
Thiago Santos
5c480dfc13 dashdemux: only generate index segment uri if there is a template
Simple fix to avoid an assertion.
2013-07-03 10:23:45 -03:00
Greg Rutz
5920ee2777 dashdemux: Implement inheritance for certain MPD elements
According to the MPEG-DASH spec, certain elements (i.e.
SegmentBase, SegmentTemplate, and SegmentList) should inherit
attributes from the same elements in the containing AdaptationSet
or Period.

Updated the SegmentBase, SegmentTemplate, and SegmentList parsers
to properly inherit attributes from the corresponding elements in
AdaptationSet and/or Period.

https://bugzilla.gnome.org/show_bug.cgi?id=702677
2013-07-03 10:23:45 -03:00
Greg Rutz
5e0ed52880 dashdemux: Properly detect presence of xml attributes
Convert all xml attribute/content parsing functions to return a
boolean value indicating whether or not the attribute/content was
present.  We need this finer-grained control in order to properly
implement the inheritance policies described in the spec

Also fixed several memory leak conditions when handling errors in
the xml attribute/content parsing functions.

https://bugzilla.gnome.org/show_bug.cgi?id=702677
2013-07-03 10:23:45 -03:00
Thiago Santos
467b22c567 dashdemux: change debug message from warning to info
It isn't a warning/issue.
2013-07-03 10:23:45 -03:00
Thiago Santos
94c6497dfa dashdemux: protect from access to empty list data
Check if the list has elements before trying to access the last one
and causing a segfault
2013-07-03 10:23:45 -03:00
Thiago Santos
0a88daaf8e dashdemux: protect against failed header downloads
Avoids criticals when downloaded fragment is NULL
2013-07-03 10:23:45 -03:00
Olivier Crête
3f26bb9154 dashdemux: Handle case without an initialization segment
If no initialization segment is defined, then don't print a
critical or a warning, just ignore it.

https://bugzilla.gnome.org/show_bug.cgi?id=701961
2013-07-02 01:30:24 -03:00
Thiago Santos
4c89fab390 dash: save 1 or 2 string copies when getting fragment uris
Only create new string if required, saving maybe 1 or 2 str copies per
fragment.
2013-07-01 18:52:08 -03:00
Thiago Santos
aa1fe88a08 dashdemux: each fragment can have its own index
Return index URI/range to dashdemux from the mpdparser to be able
to download and deliver them downstream for playback.
2013-07-01 18:52:08 -03:00
Thiago Santos
d68fffc217 dashdemux: handle top-level index urls
Parse and provide access to top-level index segments if available.
dashdemux should push those whenever a header is pushed.

Fixes #700489
2013-07-01 18:52:08 -03:00
Arthur Shipkowski
54d87f071c dashdemux: Fix critical error output when Initialization has no URL
Issue evinced by
http://yt-dash-mse-test.commondatastorage.googleapis.com/car-20120827-manifest.mpd
which produces output like ** (gst-launch-1.0:8060): CRITICAL **:
gst_mpdparser_get_initializationURL: assertion `InitializationURL->sourceURL
!= NULL' failed

https://bugzilla.gnome.org/show_bug.cgi?id=700489
2013-07-01 18:51:30 -03:00
Thiago Santos
d9c324c6c7 dashdemux: prevent crash by checking if the segment node is present
Do not try to access range data if there is no segment node
2013-07-01 14:35:02 -03:00
Thiago Santos
d0befd39f0 dash: use same debug category for dashdemux and the mpd parser
Makes debugging easier
2013-07-01 14:22:02 -03:00
Thiago Santos
4f17112392 dashdemux: add support for range based segments
Use the mediaRange information and pass it to the uridownloader
to correctly download only the segment ranges indicated in the
MPD

https://bugzilla.gnome.org/show_bug.cgi?id=702206
2013-07-01 14:22:01 -03:00
Olivier Crête
ad7ffe64a6 srtp: Don't require a key if both auth and cipher are null 2013-06-28 20:35:16 -04:00
Olivier Crête
47a6118fbc srtp: Move the enums to the common header
The types are used in both the encoder and decoder
2013-06-28 20:35:15 -04:00
Olivier Crête
4d7a186513 srtp: Remove unused code 2013-06-28 20:13:38 -04:00
Greg Rutz
45111f2efe dashdemux: Cleanup memory allocation/deallocation
Ensure that g_free/xmlFree is used correctly based on how the
memory was allocated.

When deallocating GLists, there were many places that were using
g_list_foreach and g_list_free.  Converted these occurrences to
call g_list_free_full.

Add NULL checks to all xmlFree calls since the documentation does
not guarantee that passing NULL is safe

In places where we are strdup'ing memory allocated by libxml2,
changed those calls to use xmlMemStrdup().

There were several places where we were missing g_slice_free when
deallocating a top-level node structure.

https://bugzilla.gnome.org/show_bug.cgi?id=702837
2013-06-25 20:53:17 -03:00
Sebastian Dröge
21ccbbffe5 daaladec: Add decoder element 2013-06-23 11:32:42 +02:00
Sebastian Dröge
da47131cd6 daalaenc: Add encoder element 2013-06-23 11:32:42 +02:00
Sebastian Dröge
07053e5c53 daala: Initial version of a Daala plugin 2013-06-23 11:32:42 +02:00
Edward Hervey
f88f1d0a35 srtp: Fix dist
The enums should not be dist-ed and instead be re-generated when
compiling.
2013-06-23 09:06:29 +02:00
Benjamin Gaignard
3fc6f1d9b7 wayland: Add support for RGBx and RGBA formats
Wayland interface could offer two buffers pixels formats: WL_SHM_FORMAT_XRGB8888 and WL_SHM_FORMAT_ARGB8888.
Update waylandsink to support them and check if the format is really available.

https://bugzilla.gnome.org/show_bug.cgi?id=702112
2013-06-18 14:03:13 +02:00
Tim-Philipp Müller
67e71d7931 opencv: fix CFLAGS order and add plugins base libs includes to CXXFLAGS
https://bugzilla.gnome.org/show_bug.cgi?id=702297
2013-06-18 12:47:34 +01:00
Alban Browaeys
90b51562ab opencv: fixes build by moving the c++ header to gstsegmentation.cpp
Fixes:
In file included from gstsegmentation.h:51:0,
                 from gstopencv.c:42:
/usr/include/opencv2/video/background_segm.hpp:47:16: fatal error: list:
No such file or directory
 #include <list>
                ^
compilation terminated.

https://bugzilla.gnome.org/show_bug.cgi?id=702297
2013-06-18 13:37:26 +02:00
Patricia Muscalu
0d6fc0215c curlsmtpsink: removed an incorrect assert
https://bugzilla.gnome.org/show_bug.cgi?id=702036
2013-06-11 21:08:28 +02:00
Miguel Casas-Sanchez
c313e1d3b8 opencv: add foreground/background segmentation element
Add an element to the opencv plugin for foregroung/background image
sequence segmentation, using one out of 3 algorithms.

https://bugzilla.gnome.org/show_bug.cgi?id=701421
2013-06-11 14:32:43 +02:00
Olivier Crête
5732c53c81 dashdemux: Make gst-indent happy 2013-06-10 18:01:09 -04:00
Sebastian Dröge
aad0992ae6 eglglessink: Remove workaround for a bug in the RPi EGL implementation
It's fixed in the latest firmware since a few weeks.
2013-06-08 14:49:34 +02:00
Arthur Shipkowski
3d50af3e4b dashdemux: Fix issue with get returning a value for max-buffering-time
It was not properly divided by GST_SECONDS. Also fix issue with
max-buffering-time being multiplied by GST_SECONDS every time the
property is retrieved.

https://bugzilla.gnome.org/show_bug.cgi?id=700487
2013-06-07 22:58:33 -03:00
Sebastian Dröge
a7889b05b3 dash: Add to Makefile.am for make dist 2013-06-05 18:01:10 +02:00
Stefan Sauer
3d72bc2bd9 ladspa: fix typos in launch examples 2013-05-28 10:27:17 +02:00
Stefan Sauer
f65bdac49b ladspa: use the registry cache for plugin details
Split the introspection and registration part. This way we only need to open all
plugins when updating the registry. When reading the registry we can register
the elements entierly from the cache.
2013-05-28 10:27:17 +02:00
Miguel Casas-Sanchez
407f3e1856 opencv: Add colour image enhancement element based on Retinex algorithm
Add colour image enhancement element based on Retinex algorithm. Two types
exist, namely basic and multiscale; both are described in this article:

Rahman, Zia-ur, Daniel J. Jobson, and Glenn A. Woodell. "Multi-scale retinex
for color image enhancement." Image Processing, 1996. Proceedings.,
International Conference on. Vol. 3. IEEE, 1996

Visually speaking the result looks a bit funny, but is pretty invariable to
lightning changes, which is good for some applications, like image
segmentation.

https://bugzilla.gnome.org/show_bug.cgi?id=700977
2013-05-27 11:27:20 +02:00
Patricia Muscalu
8303561bd9 curlsmtpsink: terminate transfer thread properly
If no EOS has been sent, the curl readfunc callback will
return ABORT. The media file in that case will not be properly
finalized.

https://bugzilla.gnome.org/show_bug.cgi?id=700886
2013-05-24 23:47:50 +01:00
Miguel Casas-Sanchez
ac4efd2914 opencv: Add skin color detection element
https://bugzilla.gnome.org/show_bug.cgi?id=700654
2013-05-23 11:05:28 +02:00
David Schleef
127fcf05a7 flitetestsrc: audio format is "S16" not "s16" 2013-05-18 14:02:18 -07:00
Thiago Santos
d434f36245 dashdemux: send stream start event
Removes warnings about strict sticky events ordering
2013-05-17 21:23:55 -03:00
Thiago Santos
750137c4be mssdemux: fix wma pro caps creation
WmaPro is actually wmaversion 3, and can also be found by the
WMAP fourcc.

Some manifests also contain the block_align field as "PacketSize"
in the audio track description, the libav decoders require it
to be present in caps.

Fixes #699921
2013-05-17 12:08:10 -03:00
Thiago Santos
504142ea93 mssdemux: fix assertions when a stream caps can't be created
Fixes two assertions related to cleanup for a pad that couldn't
be exposed because the caps couldn't be identified from the
Manifest

Fixes #699921
2013-05-17 11:37:30 -03:00