Commit graph

19892 commits

Author SHA1 Message Date
Olivier Crête
9deb334251 aggregator: Remove dead code
This code will never be called as max>=min in all cases. If the upstream
latency query returned min>max, the function already returned and all
values that are added to those have max>= min.
2015-11-02 19:05:01 -05:00
Luis de Bethencourt
fa4b58f1cd mpegtsmux: use GST_STIME_ARGS for GstClockTimeDiff
No need to manually handle negative values of best->dts in
GST_DEBUG_OBJECT. Use GST_STIME_ARGS for this.
2015-11-02 17:02:51 +00:00
Luis de Bethencourt
2288b5e9ec videoaggregator: use GST_STIME_ARGS for GstClockTimeDiff
No need to manually handle negative values of diff, GST_STIME_ARGS does
exactly this.
2015-11-02 17:00:22 +00:00
Florin Apostol
19d604e92f dashdemux: remove unreachable code
The stream->cur_seg_template is set to the lowest available segment
template (representation or adaptation or period, in this order).
Because the template elements are inherited, the lowest template will
have all the elements the parents had, so there is no need to check the
parent for an element that is not found in the child (eg initialisation
or index).

https://bugzilla.gnome.org/show_bug.cgi?id=752714
2015-11-02 11:37:19 +00:00
Vincent Penquerc'h
2f8efd1ce3 tests: add a test for MPD file duration parsing
https://bugzilla.gnome.org/show_bug.cgi?id=752336
2015-11-02 11:36:12 +00:00
Vincent Penquerc'h
045a03c14a mpdparser: add some checks to duration parsing
https://bugzilla.gnome.org/show_bug.cgi?id=752336
2015-11-02 11:36:12 +00:00
Florin Apostol
7dca9fb3f4 dashdemux: added duration format validation
https://bugzilla.gnome.org/show_bug.cgi?id=752336
2015-11-02 11:36:12 +00:00
Luis de Bethencourt
f28fad6e83 dashdemux: fix memory leak
Free new_mpd, allocated with g_slice_new(), before going out of scope in
goto error.

CID 1338050
2015-11-02 11:27:43 +00:00
Alessandro Decina
5336cc9ff6 Revert "vtenc: free input buffer ASAP"
This reverts commit 6101fc57b8.

GstVideoEncoder assumes that the input buffer is available until _finish_frame.

https://bugzilla.gnome.org/show_bug.cgi?id=756951
2015-11-02 20:16:15 +11:00
Sebastian Dröge
dbd894f133 opusdec: Assume 48kHz if no sample rate is given in the header 2015-11-02 09:36:46 +02:00
Sebastian Dröge
18c8abec6d opusenc: Place 48kHz first in the caps
For all the other sample rates the encoder will have to resample internally.
2015-11-02 09:36:43 +02:00
Alessandro Decina
614ea95690 gstglutils: fix shader compilation on Mountain Lion
Make gst_gl_context_gen_shader/_compile_shader assume GST_GLSL_PROFILE_ES |
GST_GLSL_PROFILE_COMPATIBILITY as the profile. Without this, the shader compiler
doesn't inject the #version tag resulting in a compilation error on Mountain
Lion.

This is a workaround for old code using gst_gl_context_gen_shader. New code
should use the gst_glsl_stage_* API directly which allows the caller to
explicitly specify version/profile.
2015-11-02 12:10:44 +11:00
Philippe Renon
c4657f4276 ksvideosrc: don't try to align current timestamp on previous timestamp
this causes frames to be dropped.

Based on a patch by Sebastian Dröge

https://bugzilla.gnome.org/show_bug.cgi?id=748337
2015-11-01 11:16:36 +02:00
Matthew Waters
dd738842e4 glbufferpool: explicitly initialize a possibly uninitialized variable
The ret variable may be uninitialized and so its contents were undefined and
the results were erratic (failing with glvideomixer, succeeding in other cases)

P.S. No idea why gcc/clang et al never picked up on this like they normally do
(probably due to some optimisation pass figuring out it's only set once...)
2015-10-31 23:32:55 +11:00
Vincent Penquerc'h
e48e68416c mpdparser: make durations unsigned where appropriate
The standard does not seem to make any particular explicit not
implicit reference to the signedness of durations, and the code
does not rely on such, nor on the negativity of the -1 value
that's used as a placeholder when a duration property is not
present in the XML.

https://bugzilla.gnome.org/show_bug.cgi?id=750847
2015-10-30 16:29:46 +00:00
Florin Apostol
d6e805a283 dashdemux: inherit bitstreamSwitching from Period to AdaptationSet
https://bugzilla.gnome.org/show_bug.cgi?id=752340
2015-10-30 15:58:36 +00:00
Florin Apostol
fe6adec702 dashdemux: marked PROP_BANDWIDTH_USAGE property as deprecated
https://bugzilla.gnome.org/show_bug.cgi?id=753890
2015-10-30 15:25:14 +00:00
Florin Apostol
590df23cb1 dashdemux: unit testing reproducing inherited segment duration overflow
unit test reproducing https://bugzilla.gnome.org/show_bug.cgi?id=751832
2015-10-30 15:05:28 +00:00
Florin Apostol
013655d886 dashdemux: inherited segment URLs are ignored if they are defined again in a lower SegmentList
According to the standard:
"SegmentBase, SegmentTemplate and SegmentList shall inherit
attributes and elements from the same element on a higher level.
If the same attribute or element is present on both levels,
the one on the lower level shall take precedence over the one
on the higher level."

gst_mpdparser_parse_segment_list_node will now discard any inherited
segment URLs if the parsed element defines some too.

https://bugzilla.gnome.org/show_bug.cgi?id=751832
2015-10-30 14:31:21 +00:00
Florin Apostol
77f4776acb adaptivedemux: tests: added test for fragment download error
https://bugzilla.gnome.org/show_bug.cgi?id=757361
2015-10-30 13:28:09 +00:00
Florin Apostol
695ec674c6 adaptivedemux: tests: made adaptive demux test thread safe
https://bugzilla.gnome.org/show_bug.cgi?id=757361
2015-10-30 13:28:04 +00:00
Florin Apostol
7254747bbe adaptivedemux: tests: added query test
Testing if adaptive demux responds to queries.

https://bugzilla.gnome.org/show_bug.cgi?id=757361
2015-10-30 13:27:54 +00:00
Florin Apostol
dc04d3d261 dashdemux: tests: added test for multiple BaseURL entries
https://bugzilla.gnome.org/show_bug.cgi?id=757245
2015-10-30 13:00:53 +00:00
Florin Apostol
4632dbe3ae dashdemux: tests: added unit test for 6d1eda9391
Commit 6d1eda9391 fixed the period start
time scaling. This patch updates the unit tests to cover that scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=755105
2015-10-30 12:57:54 +00:00
Florin Apostol
7aa81d78a7 adaptivedemux: tests: added download error test
Tests adaptive demux behaviour when the uri is wrong and download does
not happen.
2015-10-30 12:50:10 +00:00
Florin Apostol
a2ffe7e979 adaptivedemux: stop task on multiple download errors
On multiple download errors, we stop the download task and change the src
element state to NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=756240
2015-10-30 12:50:10 +00:00
Vincent Penquerc'h
7d909966e5 adaptivedemux: fix a missing lock in write to stream->last_ret
https://bugzilla.gnome.org/show_bug.cgi?id=757359
2015-10-30 12:24:22 +00:00
Florin Apostol
ef466b46d3 adaptivedemux: return error if src element cannot start
https://bugzilla.gnome.org/show_bug.cgi?id=756209
2015-10-30 12:17:40 +00:00
Florin Apostol
519165e461 adaptivedemux: fixed waiting for fragment updates
https://bugzilla.gnome.org/show_bug.cgi?id=756237
2015-10-30 11:52:18 +00:00
Florin Apostol
a85b64bb6d adaptivedemux: fix header redownload in case of errors
https://bugzilla.gnome.org/show_bug.cgi?id=756239
2015-10-30 11:47:17 +00:00
Florin Apostol
e0ef335426 adaptivedemux: release manifest lock before sending flush stop event
https://bugzilla.gnome.org/show_bug.cgi?id=757337
2015-10-30 09:46:41 +00:00
Florin Apostol
e29514ea3d adaptivedemux: reset download_finished before starting the src element
https://bugzilla.gnome.org/show_bug.cgi?id=757336
2015-10-30 09:46:41 +00:00
Florin Apostol
ac58216f05 adaptivedemux: release manifest lock before changing element state
https://bugzilla.gnome.org/show_bug.cgi?id=757335
2015-10-30 09:46:41 +00:00
Matthew Waters
34c523c3b9 vtdec: fix compilation error
Undefined symbols for architecture x86_64:
  "__gl_target_to_gst", referenced from:
      __do_get_gl_buffer in libgstapplemedia_la-corevideotexturecache.o
2015-10-30 16:38:17 +11:00
Matthew Waters
8779144826 gl/tests: update for glmemory api changes 2015-10-30 15:00:23 +11:00
Matthew Waters
1c05479715 glcolorconvert: remove unused ret variable 2015-10-30 14:43:23 +11:00
Matthew Waters
d07c59170a glslstage: remove typedefs from the header
They are already defined in the forward decleration header and defining them
more than once will give an error with OSX's clang about typedef redefinition
being a C11 feature.
2015-10-30 14:40:35 +11:00
Matthew Waters
8106a0931a glcolorconvert: follow the correct texture target names 2015-10-30 14:38:05 +11:00
Matthew Waters
d707038101 glupload: explicitly configure the texture target on the gl buffer pool
If we don't, then the pool could end up allocating 2D textures when the
caps explictly state they should be rectangle textures.
2015-10-30 14:24:54 +11:00
Matthew Waters
b429654a37 glbufferpool: add bufferpool options for the various texture targets
This was chosen over relying solely on the caps as glupload needs to propose an
allocation and set the texture target based on the output caps.  Setting the
caps in the config is currently pointless as they are overwritten in a lot of
element's decide_allocation functions.

This provides a mechanism for the buffer pool to be configured for a certain
texture target when none has been configured.
2015-10-30 14:24:54 +11:00
Matthew Waters
ccce217502 glcolorconvert: add support for converting texture targets
Solved with a simple shader templating mechanism and string replacements
of the necessary sampler types/texture accesses and texture coordinate
mangling for rectangular and external-oes textures.
2015-10-30 14:24:53 +11:00
Matthew Waters
e61d504556 glmemory: add support for rectangle textures
Add the various tokens/strings for the differnet texture types (2D, rect, oes)

Changes the GLmemory api to include the GstGLTextureTarget in all relevant
functions.

Update the relevant caps/templates for 2D only textures.
2015-10-30 14:24:53 +11:00
Matthew Waters
ff87ffe6e6 glcolorconvert: order the caps template so that RGBA is first
glcolorconvert ! glcolorconvert would sometimes negotiated RGB
(the first list entry) otherwise.
2015-10-30 14:24:53 +11:00
Matthew Waters
e96f454b30 glbufferpool: move typedef's into the forward decleration file
Otherwise, for example, clang will warn about typedef redefinitions
being a C11 feature.
2015-10-30 14:24:53 +11:00
Florin Apostol
78ce34b37f tests: fixed fake soup http src plugin
The soup http src changed the way it interprets the seek segment stop value.
Previously it was inclusive, now it is not (see commit
21c6da6764,
bug https://bugzilla.gnome.org/show_bug.cgi?id=748316)

Updated fake soup http src to also consider segment stop not inclusive.

https://bugzilla.gnome.org/show_bug.cgi?id=756322
2015-10-29 16:01:40 +00:00
Florin Apostol
0e1f5a0385 adaptivedemux: tests: added unit test for adaptivedemux
Created a unit test for dashdemux. It relies on a fake SOUP HTTP src plugin
that will feed data to dashdemux. The test controls the data to be
generated and checks the correct data was received for each expected
stream.

https://bugzilla.gnome.org/show_bug.cgi?id=756322
2015-10-29 16:01:34 +00:00
Alex Ashley
a38a9ba50d tests: added fake http src plugin
Added a fake http src plugin capable of generating data buffers for a
request of a http url. Can be used in tests to simulate http accesses.

https://bugzilla.gnome.org/show_bug.cgi?id=756322
2015-10-29 16:01:18 +00:00
Alex Ashley
c8ef39cac7 dashdemux: provide a default suggestedPresentationDelay
If MPD@suggestedPresentationDelay is not present in the manifest,
dashdemux selects the fragment closest to the most recently generated
fragment. This causes a playback issue because this choice does not allow
the DASH client to build up any buffer of downloaded fragments without
pausing playback. This is because by definition new fragments appear on
the server in real-time (e.g. if segment duration is 4 seconds, a new
fragment will appear on the server every 4 seconds). If the starting
playback position was n*segmentDuration seconds behind "now", the DASH
client could download up to 'n' fragments faster than realtime before it
reached the point where it needed to wait for fragments to appear on the
server.

The MPD@suggestedPresentationDelay attribute allows a content publisher
to provide a suggested starting position that is behind the current
"live" position.

If the MPD@suggestedPresentationDelay attribute is not present, provide
a suitable default value as a property of the dashdemux element. To
allow the default presentation delay to be specified either using
fragments or seconds, the property is a string that contains a number
and a unit (e.g. "10 seconds", "4 fragments", "2500ms").
2015-10-29 13:26:46 +00:00
Sreerenj Balachandran
d7a167c5b4 ivfparse: Add vp9 support
Differentiate the vp8/vp9 bitstream based on fourcc.

https://bugzilla.gnome.org/show_bug.cgi?id=757251
2015-10-29 13:23:22 +00:00
Florin Apostol
e7745a5720 dashdemux: improve detection of stream language
Improved the detection of stream's language if the AdaptationSet
contains more than 1 ContentComponent

https://bugzilla.gnome.org/show_bug.cgi?id=752367
2015-10-29 12:14:50 +00:00