Commit graph

7959 commits

Author SHA1 Message Date
Tim-Philipp Müller
d65c3bbe7e qtdemux: implement seeking in fragmented mp4 files in pull mode based on the mfra table 2014-11-30 15:33:13 +00:00
Tim-Philipp Müller
77f37a6b22 qtdemux: use track fragment decoding time (tfdt) in parse_trun() for interpolation
As fallback if we don't have any existing samples
as reference point yet.

Based on patch by David Corvoysier <david.corvoysier@orange.com>
2014-11-30 15:33:13 +00:00
Tim-Philipp Müller
e24f903b13 qtdemux: parse mfra random access box for fragmented mp4 files
If it's present, and we operate in pull mode.
2014-11-30 15:33:13 +00:00
Tim-Philipp Müller
8a0f4e74e4 qtdemux: stop parsing headers for fragmented mp4s at the first moof
Currently during header parsing, we scan through the entire file
and skip every moof+mdat chunk for fragmented mp4s, which makes
start-up incredibly slow. Instead, just stop at the first moof
chunk when have a moov, and start exposing the streams, so we
can go and start handling the moofs for real.
2014-11-30 15:30:04 +00:00
Olivier Crête
ccac1f8c0b rtprtxreceive: Use offset when copying header
The header is not always at the start of the packet, so we need to compute
the offset first.
2014-11-29 18:38:12 -05:00
Andrei Sarakeev
6348de195d aspectratiocrop: Handle resolution changes properly
When an caps-event is received, we must immediately change the crop
to videocrop correctly changed caps-event dimension, otherwise the
videocrop will first use the previous value of the crop that when
resizing video to a smaller resolution may cause an error.

https://bugzilla.gnome.org/show_bug.cgi?id=740671
2014-11-28 11:19:23 +01:00
Edward Hervey
5b5e9f320f isomp4: Check presence of mfhd in moof
The 'mfhd' atom is mandatory in 'moof'. We can later on check whether
the fragment number properly increases
2014-11-26 16:36:39 +01:00
Edward Hervey
5e3e97353d isomp4: Fix mfro and tfra atom dumping
mfro was skipping the version/flags
tfra had wrong byte_reader return value checks
2014-11-26 16:36:39 +01:00
Edward Hervey
c45533bcd7 isomp4: Add mfhd atom dumping 2014-11-26 16:36:39 +01:00
Jan Schmidt
61bbd2d226 qtdemux: Handle empty segments when seeking in reverse play.
Empty segments in an edit list have a media_start time of -1,
as they don't actually play any media. Allow for that when
aligning to the reference stream in reverse play.
2014-11-27 00:17:03 +11:00
Tim-Philipp Müller
69ec922c16 icydemux: does not need to link against zlib 2014-11-23 16:24:06 +00:00
Miguel París Díaz
6daa57868f rtpjitterbuffer: ensure rtx_retry_period >= 0
https://bugzilla.gnome.org/show_bug.cgi?id=739344
2014-11-22 14:48:57 +00:00
Arun Raghavan
45e716e75d rtpbin: Fix up new_jitterbuffer signal prototype 2014-11-20 22:42:59 +05:30
Arun Raghavan
56436ccced rtpbin: Document how to control per-SSRC retransmission 2014-11-20 20:24:42 +05:30
Wim Taymans
3d7b0f30d7 rtpgstpay: put 0-byte at the end of events
Put a 0-byte at the end of the event string. Does not break ABI because
old depayloaders will skip the 0 byte (which is included in the length).
Expect a 0-byte at the end of the event string or a ; for old
payloaders.

See https://bugzilla.gnome.org/show_bug.cgi?id=737591
2014-11-20 13:14:14 +01:00
Wim Taymans
9d2902d978 rtpgstdepay: avoid buffer overread.
Check that a caps event string is 0 terminated and the event string is
terminated with a ; to avoid buffer overreads.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=737591
2014-11-20 12:44:26 +01:00
Tim-Philipp Müller
488d0b93cd qtmux: don't limit max video resolution to 4096x4096
MAX isn't entirely correct as upper limit either,
it should really be MAXUINT32, but it's unlikely
to be a problem in the near future.

https://bugzilla.gnome.org/show_bug.cgi?id=740407
2014-11-20 10:45:53 +00:00
Aleix Conchillo Flaqué
00ca83629b rtspsrc: fix leak for mikey base64 decoded key-mgmt
https://bugzilla.gnome.org/show_bug.cgi?id=740392
2014-11-20 09:15:56 +01:00
Wim Taymans
e95da8410f videobalance: fix unhandled format in passthrough
In passthrough we can handle all formats.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740387
2014-11-20 09:02:36 +01:00
Jan Alexander Steffens (heftig)
bf73d834b2 flvdemux: Restrict resyncing to TS regressions
The behavior of resyncing video and audio indepen-
dently can cause A/V desyncs. Lets restrict resyncs
to jumps backward for now.

https://bugzilla.gnome.org/show_bug.cgi?id=736397
2014-11-19 11:58:19 -05:00
Matthew Waters
0053ad0847 videomixer: fix up QoS handling for live sources
Only attempt adaptive drop when we are not live

https://bugzilla.gnome.org/show_bug.cgi?id=739996
2014-11-17 23:16:03 +11:00
Arun Raghavan
1c3b233fef rtpmanager: Trivial typo fix 2014-11-10 13:16:50 +05:30
Sebastian Dröge
7a909917b5 matroska-mux: Use G_DEFINE_TYPE() to register the pad instead of manually registering it 2014-11-09 11:04:33 +01:00
Göran Jönsson
ec05d3b6d8 matroskamux: make GstMatroskamuxPad get_type() function thread-safe
https://bugzilla.gnome.org/show_bug.cgi?id=739722
2014-11-07 21:20:31 +00:00
Josep Torra
038cc7b004 rtsp: fix build in gst-uninstalled setup 2014-11-06 21:38:43 +01:00
Thibault Saunier
99bbc2bbe4 imagefreeze: Handle seqnums
https://bugzilla.gnome.org/show_bug.cgi?id=739366
2014-11-06 12:20:25 +01:00
Wim Taymans
26d682d23f videomixer2: reverse order of params for converter 2014-11-03 15:26:06 +01:00
Tim-Philipp Müller
c756fd6a55 goom2k1: post QoS messages when dropping frames due to QoS 2014-11-02 19:42:03 +00:00
Tim-Philipp Müller
b03056eede goom: post QoS messages when dropping frames due to QoS 2014-11-02 19:31:01 +00:00
Tim-Philipp Müller
85c3c36712 matroskamux: tweak writing app tag string a little 2014-11-02 19:02:35 +00:00
Tim-Philipp Müller
3956f5addc Sprinkle some G_PARAM_DEPRECATED and #ifndef GST_REMOVE_DEPRECATED 2014-11-02 16:58:30 +00:00
Tim-Philipp Müller
d940c21b78 rtpjitterbuffer: implement get/set for new rtx-min-retry-timeout property
Properties are so much more useful if you can actually set
and get their values.
2014-11-02 13:06:33 +00:00
Nicolas Dufresne
0f4f948f5f rtpvp8: Use VP8 encoding name
Both Firefox and Chrome uses VP8 as the encoding in their SDP.
Adding this now defacto standard name removes the need for special
case in SDP parsing code.

https://bugzilla.gnome.org/show_bug.cgi?id=737810
2014-11-01 11:26:26 -04:00
Tim-Philipp Müller
92c1d289b8 rtpmp2tpay: fix up template caps so we can output the default pt 33
Add fixed payload type for mp2t to template caps as well, so
our output caps match the advertised default pt. Fixes a
regression from 1.2.

There's still something wrong with caps negotiation though,
rtpmp2tpay payload=96 ! fakesink will not output caps with
payload=96.
2014-11-01 12:40:07 +00:00
Aleix Conchillo Flaqué
d15ebcbf62 rtspsrc: mikey related memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=739430
2014-10-31 10:03:47 +00:00
Sebastian Dröge
4aac09e708 aacparse: Always set profile/level on the caps
We have the information already, so why not use it?
2014-10-26 11:47:25 +01:00
Tim-Philipp Müller
b02d73a0ed rtpjitterbuffer: fix crash on some 32-bit systems
Make sure to pass right number of bits to gst_structure_new()
which is a vararg function.

Fixes elements/rtpaux unit test on ppc32.
2014-10-25 12:45:31 +01:00
Tim-Philipp Müller
401782c19d interleave: intersect result with filter caps in caps query
Fixes crash in audiotestsrc because of an unsupported format
getting negotiated on big-endian systems with
audiotestsrc ! interleave ! audioconvert ! wavenc
2014-10-25 11:08:48 +01:00
Wim Taymans
bd09dc96e9 rtpjitterbuffer: limit the retry frequency
When the RTT and jitter are very low (such as on a local network), the
calculated retransmission timeout is very small. Set some sensible lower
boundary to the timeout by adding a new property. We use the packet
spacing as a lower boundary by default.
2014-10-22 15:04:24 +02:00
Miguel París Díaz
4b5243c43d gstrtpjitterbuffer: add "rtx-min-delay" property
This property is useful to set a min time to wait before sending a
retransmission event.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=735378
2014-10-22 15:00:27 +02:00
Wim Taymans
0b81b316b5 jitterbuffer: Refactor code
Refactor some code dealing with calculating various timeouts.

See https://bugzilla.gnome.org/show_bug.cgi?id=735378
2014-10-22 14:59:57 +02:00
Miguel París Díaz
e6504e3a65 rtpsession: fix Early Feedback Transmission
In early retransmission we are allowed to schedule 1 regular RTCP packet
at an earlier time. When we do that, we need to set allow_early to FALSE
and ignore/drop (or merge) all future requests for early transmission.
We now first check if we can schedule an early RTCP and if we can,
actually prepare the data for the next RTCP interval.

After we send the next regular RTCP after the early RTCP, we set
allow_early to TRUE again to allow more early requests.

Remove the condition for the immediate feedback for now.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=738319
2014-10-22 13:13:47 +02:00
Wim Taymans
09f179139d rtpjitterbuffer: make debug line less confusing 2014-10-21 13:10:53 +02:00
Wim Taymans
2e7f5c08cf jitterbuffer: rework resync handling
Add a need-resync state, this is when we need to try to lock on to a
time/RTPtime pair.
Always check the RTP timestamps and if they go backwards, mark ourselves
as need-resync.
Only resync when need-resync is TRUE and we have a valid time. Otherwise
we keep the old values. This avoids locking on to an invalid time and
causing us to timestamp everything with -1.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=730417
2014-10-21 11:57:34 +02:00
Aleix Conchillo Flaqué
bd392d72ee rtspsrc: set full stream caps on internal src TCP pads
Set the complete stream caps on the TCP internal src pads. Otherwise,
ptdemux will not properly detect the caps change.

https://bugzilla.gnome.org/show_bug.cgi?id=737868
2014-10-21 11:33:01 +02:00
Sjoerd Simons
0ee384b251 rtpmux: Don't set PROXY_CAPS flag on the src pad
rtpmux behaves like a funnel in that it forwards whatever upstream is
sending buffers. So setting proxy caps doesn't make sense as the
upstream don't have to have compatible caps, thus resulting in an empty
caps set as a result of a caps query. Instead set fixed caps just
as funnel does.

https://bugzilla.gnome.org/show_bug.cgi?id=738722
2014-10-21 10:52:00 +02:00
Vineeth T M
1131db8c1f videobox: critical error when element properties set as max/min
left, right, top, bottom can be set from range of -2147483648 to 2147483647
when i launch the videobox element with that values, it gives a critical error

(gst-check-1.0:29869): GStreamer-CRITICAL **: gst_value_set_int_range_step: assertion 'start < end' failed
This happens because min cannot be equal to max.

https://bugzilla.gnome.org/show_bug.cgi?id=738838
2014-10-20 12:53:51 +02:00
Tim-Philipp Müller
f3fec86bc9 Revert "rtp: add h265 RTP payloader + depayloader"
This reverts commit d06ba9051f.

This breaks the build, as it depends on parser API in -bad.
2014-10-15 17:48:46 +01:00
Jurgen Slowack
d06ba9051f rtp: add h265 RTP payloader + depayloader 2014-10-15 17:34:50 +02:00
Peter G. Baum
b5e46c05d7 wavenc: Support RF64 format
https://bugzilla.gnome.org/show_bug.cgi?id=725145
2014-10-14 10:24:50 +02:00
David Sansome
8154c90c9b equalizer: Don't call iirequalizer's transform_ip in passthrough mode
It tries to map the read-only buffer with GST_MAP_READWRITE and crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=737886
2014-10-13 08:30:03 +02:00
Olivier Crête
51a8bedced rtpsource: Rename seqnum-base to seqnum-offset in caps
This was modified back in 1.0 in GstRtpBasePayload
2014-10-10 18:33:34 -04:00
Olivier Crête
155ed569c3 rtpdtmfsrc: clock-base and seqnum-base -> timestamp-offset and seqnum-offset
These were renamed in GstRTPBasePayload in 1.0
2014-10-10 18:12:32 -04:00
Olivier Crête
b3069634bd rtpmux: clock-base and seqnum-base -> timestamp-offset and seqnum-offset
These were renamed in GstRTPBasePayload in 1.0
2014-10-10 18:12:23 -04:00
Luis de Bethencourt
cff880401d goom2k1: removing block of code that does nothing
The loop in zoomFilterSetResolution is meant to change the values in the
zf->firedec[] array. Each iteration writes the value of decc onto the arrya,
but no conditions that change the value of decc are ever met and the array is
filled with zero for each element. Which is the initial state of the
array before the loop begins.

The loop does nothing.

https://bugzilla.gnome.org/show_bug.cgi?id=728353
2014-10-08 14:07:56 +01:00
Stefan Sauer
98222a67ff rtpjitterbuffer: don't log all clock_rate changes as warnings.
We never initialize clock_rate explicitly, therefore it is 0 by default. The
parameter is a uint32 and the only caller ensure that it is >0, therefore it
won't become -1 ever.
2014-10-04 17:17:13 +02:00
Matej Knopp
e1d275cfec aacparse: fix memory leak when prepending ADTS headers
https://bugzilla.gnome.org/show_bug.cgi?id=737761
2014-10-02 10:41:28 +03:00
Antonio Ospite
7ae7f657fa interleave: interleave samples following the Default Channel Ordering
In order to have a full mapping between channel positions in the audio
stream and loudspeaker positions, the channel-mask alone is not enough:
the channels must be interleaved following some Default Channel Ordering
as mentioned in the WAVEFORMATEXTENSIBLE[1] specification.

As a Default Channel Ordering use the one implied by
GstAudioChannelPosition which follows the ordering defined in SMPTE
2036-2-2008[2].

NOTE that the relative order in the Top Layer is not exactly the same as
the one from the WAVEFORMATEXTENSIBLE[1] specification; let's hope users
using so may channels are already aware of such discrepancies.

[1] http://msdn.microsoft.com/en-us/library/windows/hardware/dn653308%28v=vs.85%29.aspx
[2] http://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BS.2159-2-2011-PDF-E.pdf

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=737127
2014-10-02 10:21:26 +03:00
Sebastian Dröge
7729f4ce81 wavenc: Send CAPS event after the pad was activated
Otherwise the CAPS event will be dropped and we never configure any caps at
all, leading to weird behaviour in many situations. Especially header
rewriting is not going to work if a capsfilter is after wavenc.

https://bugzilla.gnome.org/show_bug.cgi?id=737735
2014-10-02 10:10:11 +03:00
Sebastian Dröge
1a2adf5123 videomixer: Actually use the correct GstVideoInfo for conversion 2014-10-01 17:29:29 +03:00
Sebastian Dröge
c1a96113db videomixer: Revert the last commit and handle resolutions differences properly
This is about converting the format, not about converting any widths and
heights. Subclasses are expected to handler different resolutions themselves,
like the videomixers already do properly.
2014-10-01 17:24:59 +03:00
Sebastian Dröge
af7916ca4a videomixer: GstVideoConverter currently can't rescale and will assert
Leads to ugly assertions instead of properly erroring out:
CRITICAL **: gst_video_converter_new: assertion 'in_info->width == out_info->width' failed
2014-10-01 17:12:59 +03:00
Antonio Ospite
eca3e2474d wavenc: print channel masks in hexadecimal 2014-09-29 17:45:59 +03:00
Sebastian Dröge
d1c7f2e4d1 rtspsrc: Fix compiler warnings
gstrtspsrc.c:7939:11: error: implicit conversion from enumeration type 'GstSDPResult' to different enumeration type
      'GstRTSPResult' [-Werror,-Wenum-conversion]
    res = gst_sdp_message_new (&sdp);
        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
gstrtspsrc.c:7944:11: error: implicit conversion from enumeration type 'GstSDPResult' to different enumeration type
      'GstRTSPResult' [-Werror,-Wenum-conversion]
    res = gst_sdp_message_parse_uri (uri, sdp);
        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-09-26 13:46:16 +03:00
Jonas Holmberg
1371fa0c61 matroskademux: make demuxer reusable
Remove pads from flow combiner and reset last
flow return to FLOW_OK by resetting the flow combiner.
This prevents FLOW_FLUSHING when trying to re-use the
demuxer after setting it back to NULL/READY state.

https://bugzilla.gnome.org/show_bug.cgi?id=737359
2014-09-25 16:14:18 +01:00
Wim Taymans
84ec78bd86 videomixer: use video library code instead of copy 2014-09-24 16:46:36 +02:00
Sanjay NM
323683db96 audioparsers: Added index check before using the index
https://bugzilla.gnome.org/show_bug.cgi?id=736878
2014-09-24 10:21:35 +03:00
Matej Knopp
9f85dfd733 qtmux: Do not infer DTS on buffers from sparse streams.
DTS delta is used to calculate sample duration. If buffer has missing DTS, we take either segment start or previous buffer end time, whichever is later.
This must only be done for non sparse streams, sparse streams can have gaps between buffers (which is handled later by adding extra empty buffer with duration that fills the gap)

https://bugzilla.gnome.org/show_bug.cgi?id=737095
2014-09-23 22:25:47 -03:00
Sanjay NM
36140ccf69 goom: Clarified precedence between % and ?
https://bugzilla.gnome.org/show_bug.cgi?id=736887
2014-09-24 00:48:09 +01:00
Sanjay NM
f62076e49c rtsp: clarify expression so operator precedence is clear
https://bugzilla.gnome.org/show_bug.cgi?id=736903
2014-09-24 00:48:09 +01:00
Sanjay NM
26a1344f37 Miscellaneous minor cleanups
Fix redundant variables and assignments,
and unreachable breaks.

https://bugzilla.gnome.org/show_bug.cgi?id=736875
https://bugzilla.gnome.org/show_bug.cgi?id=736876
https://bugzilla.gnome.org/show_bug.cgi?id=736879
https://bugzilla.gnome.org/show_bug.cgi?id=736880
https://bugzilla.gnome.org/show_bug.cgi?id=736881
https://bugzilla.gnome.org/show_bug.cgi?id=736888
https://bugzilla.gnome.org/show_bug.cgi?id=736890
https://bugzilla.gnome.org/show_bug.cgi?id=736892
https://bugzilla.gnome.org/show_bug.cgi?id=736893
https://bugzilla.gnome.org/show_bug.cgi?id=736894
2014-09-24 00:45:31 +01:00
Tim-Philipp Müller
208e12dca2 videobox: remove duplicate assignments
https://bugzilla.gnome.org/show_bug.cgi?id=736897
2014-09-24 00:12:14 +01:00
Sebastian Dröge
91a3d044f0 flacparse: Only calculate with durations != -1 2014-09-23 22:56:21 +03:00
Matej Knopp
fd3e8c5672 qtmux: collect pad for sparse stream should be created with lock set to false
Avoids waiting for buffers from sparse streams

https://bugzilla.gnome.org/show_bug.cgi?id=737095
2014-09-23 15:25:45 -03:00
Matej Knopp
6695341583 qtmux: fix subtitle buffer duration and strip null termination
Strip the \0 off the subtitle as we already know the size and also remember
to set the duration as buffer copying doesn't do it.

https://bugzilla.gnome.org/show_bug.cgi?id=737095
2014-09-23 15:25:28 -03:00
Matej Knopp
f57e9c4516 qtmux: move subtitle layer above video and set alternate group
layer -1 is above video, that is 0
And having all subtitles in alternate group 2 means that only one
should be selected at a time.

https://bugzilla.gnome.org/show_bug.cgi?id=737095
2014-09-23 15:20:37 -03:00
Matej Knopp
8a4931726d qtdemux: Handle mp4a without ESDS atom
https://bugzilla.gnome.org/show_bug.cgi?id=736986
2014-09-22 13:04:52 -03:00
Sanjay NM
89eb378598 dtmf: Removed unused structure members
https://bugzilla.gnome.org/show_bug.cgi?id=736883
2014-09-19 15:42:04 -04:00
Reynaldo H. Verdejo Pinochet
e655d47dfc isomp4: fix wrong DAR calculation for PAR <= 1
CID #1226452

https://bugzilla.gnome.org/show_bug.cgi?id=736396
2014-09-18 18:53:38 -03:00
Sanjay NM
ba4b9b22d0 flv: Removed unreachable break statements
https://bugzilla.gnome.org/show_bug.cgi?id=736884
2014-09-18 09:42:43 -04:00
Ognyan Tonchev
f7ae4288a2 rtpbin: do not leak encsink pad in error case
https://bugzilla.gnome.org/show_bug.cgi?id=736807
2014-09-18 12:49:53 +03:00
Ognyan Tonchev
3bf81ad12c multipartdemux: do not leak new stream event
https://bugzilla.gnome.org/show_bug.cgi?id=736805
2014-09-18 12:49:53 +03:00
Ravi Kiran K N
5480f6d2dd y4menc: port y4menc to use GstVideoEncoder base class
https://bugzilla.gnome.org/show_bug.cgi?id=735085
2014-09-17 18:28:00 -03:00
Ognyan Tonchev
7cd335e9b9 flacparse: do not leak uid after parsing TOC event
https://bugzilla.gnome.org/show_bug.cgi?id=736739
2014-09-17 09:51:15 +03:00
Sebastian Dröge
4bc10e755a rtpvrawdepay: Declare some more required caps fields in the sink template caps
Now only missing are width and height, which are expressed as strings
for RTP... so we can't put them into the template caps.
2014-09-16 22:47:13 +03:00
Wim Taymans
711e1407a1 capssetter: update to 1.0 transform_caps sematics
In 1.0, we pass the complete caps to transform_caps to allow for better
optimizations. Make this function actually work on non-simple caps
instead of just ignoring the configured filter caps.
2014-09-15 18:14:06 +02:00
Peter G. Baum
f8f61237f8 wavenc: use WAVE_FORMAT_EXTENSIBLE for more than 2 channels
https://bugzilla.gnome.org/show_bug.cgi?id=733444
2014-09-15 11:19:23 +03:00
Sebastian Dröge
a9d7c1d95e wavparse: Fix parsing of adtl chunks
We have to skip 12 bytes of data for the chunk, and the data size
passed to the sub-chunk parsing functions should have 4 bytes less
than the data size.

Also when parsing the sub-chunks, check if we actually have enough
data to read instead of just crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=736266
2014-09-12 15:08:23 +03:00
Sanjay NM
66810a32f6 udp: include string.h for memcmp and memset
https://bugzilla.gnome.org//show_bug.cgi?id=736528
2014-09-12 10:45:39 +01:00
Anuj Jaiswal
4242495ea7 matroskamux: don't bitwise OR the same flag twice
https://bugzilla.gnome.org//show_bug.cgi?id=736543
2014-09-12 10:37:31 +01:00
Tim-Philipp Müller
4c08f2694d matroskademux: handle real audio 28_8
Fixes duplicate check for 14_4.

https://bugzilla.gnome.org//show_bug.cgi?id=736543
2014-09-12 10:35:36 +01:00
Anuj Jaiswal
86579c59bf multifilesink: don't OR the same flag twice
https://bugzilla.gnome.org/show_bug.cgi?id=736462
2014-09-11 11:05:35 +01:00
Tim-Philipp Müller
e6f77948ac udpsrc: more efficient memory handling
Drop use of g_socket_get_available_bytes() which is
not useful on all systems (where it returns the size
of the entire buffer not that of the next pending
packet), and is yet another syscall and apparently
very inefficient on Windows in the UDP case.

Instead, when reading UDP packets, use the more featureful
g_socket_receive_message() call that allows to read into
scattered memory, and allocate one memory chunk which is
likely to be large enough for a packet, while also providing
a larger allocated memory chunk just in case the packet
is larger than expected. If the received data fits into the
first chunk, we'll just add that to the buffer we return
and re-use the fallback buffer for next time, otherwise we
add both chunks to the buffer.

This reduces memory waste more reliably on systems where
get_available_bytes() doesn't work properly.

In a multimedia streaming scenario, incoming UDP packets
are almost never fragmented and thus almost always smaller
than the MTU size, which is also why we don't try to do
something smarter with more fallback memory chunks of
different sizes. The fallback scenario is just for when
someone built a broken sender pipeline (not using a
payloader or somesuch)

https://bugzilla.gnome.org/show_bug.cgi?id=610364
2014-09-09 17:38:52 +01:00
Tim-Philipp Müller
39505584e1 udpsrc: rework memory allocation bits and ensure we always have two chunks of memories to read into
First chunk is the likely/expected buffer size, second is as
fallback in case the packet is larger in the end.

Next step: actually use these.
2014-09-09 17:35:38 +01:00
Tim-Philipp Müller
305e4c2f46 udpsrc: track max packet size and save allocator negotiated by GstBaseSrc 2014-09-09 17:35:14 +01:00
Tim-Philipp Müller
8e28994207 audioecho: fix example command line 2014-09-08 16:15:32 +01:00
Tim-Philipp Müller
7271ff253b avidemux: fix crash with certain videos
This is a regression from 1.2 caused by the port
to the pad flow combiner.

https://bugzilla.gnome.org/show_bug.cgi?id=736192
2014-09-07 12:48:16 +01:00
Sebastian Dröge
a3a5530518 matroska-demux: Don't handle parse errors at the end of file as an error
But only if they happen after the Matroska segment.

https://bugzilla.gnome.org/show_bug.cgi?id=735833
2014-09-05 11:36:30 +03:00
Andrei Sarakeev
558f9a2a6f videomixer: Fix synchronization if dynamically changing the FPS
https://bugzilla.gnome.org/show_bug.cgi?id=735859
2014-09-04 11:34:26 +03:00
Ravi Kiran K N
ea43ef214a smpte: Check if input caps are the same and create output caps from video info
This makes sure that also properties like the pixel-aspect-ratio are the same
between both streams and that the output caps contain all fields necessary for
complete video caps.

https://bugzilla.gnome.org/show_bug.cgi?id=735804
2014-09-04 10:47:34 +03:00
Vineeth T M
6ff397eccc imagefreeze: replace with gst_buffer_copy
gst_buffer_ref and gst_buffer_writable is being used to create a writable copy of source buffer.

replacing the same with gst_buffer_copy as the functionality is same.

https://bugzilla.gnome.org/show_bug.cgi?id=735880
2014-09-03 21:33:09 -03:00
Tim-Philipp Müller
884f81ba28 qtdemux: mark jpeg and png as parsed so avdec_mjpeg can be used too
https://bugzilla.gnome.org/show_bug.cgi?id=735971
2014-09-03 23:08:16 +01:00
Jan Schmidt
9375e90203 qtdemux: Silence some warnings for normal file contents 2014-09-03 23:47:49 +10:00
Nicolas Huet
15894c1853 aacparse: Fix parsing issue when the buffer does not have a complete ADTS/LOAS frame
https://bugzilla.gnome.org/show_bug.cgi?id=735520
2014-09-02 09:43:14 +03:00
Vineeth T M
3a1e010221 imagefreeze: Don't call gst_caps_unref() on template caps when already unreferenced
Adding an extra condition while calling gst_caps_unref (templ)
and replacing gst_caps_make_writable (gst_caps_ref (caps)) with
gst_caps_copy (caps) in line 177, since the functionality is same.

https://bugzilla.gnome.org/show_bug.cgi?id=735795
2014-09-01 14:34:43 +03:00
Sebastian Dröge
f5df8af59e wavparse: Store size of data tag in a 64 bit integer locally too
Otherwise we will clip the DS64 value of RF64 files to 32 bits again.
2014-08-29 11:55:26 +03:00
Sebastian Dröge
d924f8a955 wavparse: Use 64 bit scaling functions now that fact is a 64 bit integer 2014-08-29 11:53:23 +03:00
Peter G. Baum
5c838af300 wavparse: support rf64 format
https://bugzilla.gnome.org/show_bug.cgi?id=735627
2014-08-29 11:49:42 +03:00
Jason Litzinger
bcbdcbf638 multipartdemux: Ensure caps before pad added.
This stores the stream-start, sets caps, and then adds the pad,
which ensures that the caps are set for the "pad-added" callback.

https://bugzilla.gnome.org/show_bug.cgi?id=735626
2014-08-29 11:38:19 +03:00
Nicolas Dufresne
356defdfea flvmux: Fallback to PTS if DTS is missing
Fixing a regression introduce when fixing:
https://bugzilla.gnome.org/show_bug.cgi?id=731352
2014-08-28 15:05:56 -04:00
Vineeth T M
d46631c5c7 imagefreeze: Remove impossible error condition
We return EOS after the first buffer, and GstPad will make sure now that we
won't get any other buffer afterwards until a flush happens. No need to check
for it ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=735581
2014-08-28 14:55:00 +03:00
Nicolas Dufresne
a7a3cb343a flvmux: Correctly offset timestamp
The previous method would break AV sync in the case audio or video
didn't start at the same point in running time.

https://bugzilla.gnome.org/show_bug.cgi?id=731352
2014-08-27 21:09:57 -04:00
Nicolas Dufresne
aa5bd99127 flvmux: Save dts from buffer
We no longer set dts in muxed buffer. This would lead to encoding tags
with timestamp 0 instead of the timestamp of previous buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=731352
2014-08-27 21:08:21 -04:00
Nicolas Dufresne
c1e7bec616 flvmux: Ensure Timestamp starts at 0
FLV documentation stipulates that timestamp must start at zero.
In order to respect this rule, keep the first timestamp around
and offset the timestamp from this value. This allow for longer
recording time in presence of timestamp that does not start
at 0 already.

https://bugzilla.gnome.org/show_bug.cgi?id=731352
2014-08-26 16:46:03 -04:00
Nicolas Dufresne
ff2bce7b26 flv: Tag timestamp are DTS not PTS
The tags in FLV are DTS. In audio cases, and for many video format this makes
no difference, but for AVC with B-Frames, PTS need to be computed from
composition timestamp CTS, with PTS = DTS + CTS.

https://bugzilla.gnome.org/show_bug.cgi?id=731352
2014-08-26 16:45:59 -04:00
Youness Alaoui
a98341397d jitterbuffer: Allow rtp caps without clock-rate
The jitterbuffer shouldn't force clock-rate on its sink pad, this will cause a negotiation issue since rtpssrcdemux doesn't have the clock-rate and doesn't add it to the caps. The documentation states that the clock-rate can either be specified through the caps or through the request-pt-map signal, so we must remove clock-rate from the pad templates and we must accept the GST_EVENT_CAPS if the caps don't have the clock-rate.

https://bugzilla.gnome.org/show_bug.cgi?id=734322
2014-08-21 18:32:58 -04:00
Thiago Santos
fa103ca5ad qtdemux: avoid crashing on dash streams
DASH/fragmented moov might have no samples as those are carried
in moof fragments. Avoid crashing or failing the stream because
of that.
2014-08-18 14:05:52 -03:00
Víctor Manuel Jáquez Leal
419332e287 udp: fix udpsrc documentation
udpsrc gtk-doc documentation refers to sockfd and closefd properties which has
been removed. This patch replaces those references to socket and close-socket
respectively.

https://bugzilla.gnome.org/show_bug.cgi?id=734987
2014-08-18 11:01:31 +01:00
Jan Schmidt
6e7930a10c qtmux: Make the default timescale 1/1800 second
The old default timescale of 1 millisecond produces irrational
numbers for a lot of framerate/audio-packet-duration multiples.
1/1800 is a nicer number, as it tends to produce better fractions
and therefore slightly higher accuracy overall
2014-08-15 13:03:52 +10:00
Jan Schmidt
f1c3a40547 matroska: Use gst_video_guess_framerate() function
Remove local framerate guessing function in favour of
the new gst_video_guess_framerate() function.
2014-08-15 01:17:27 +10:00
Jan Schmidt
ca068865c3 qtdemux: Improve framerate calculation/guessing
Change the way the output framerate is calculated
to ignore the first sample (which is sometimes truncated
in my testing) and use the new gst_video_guess_framerate()
function to recognise common standard framerates better.

Remove the code that was sorting the first 20 sample
durations and then ignoring the result.
2014-08-15 01:12:20 +10:00
Sebastian Dröge
ce1d4d9f21 videomixer: Use the best width/height/etc if downstream can handle that
Before it was always using whatever downstream preferred, while
the code and documentation claimed something different.

https://bugzilla.gnome.org/show_bug.cgi?id=727180
2014-08-14 16:36:44 +03:00
Ravi Kiran K N
61fe02a018 videomixer: Avoid double free of VideoConvert
https://bugzilla.gnome.org/show_bug.cgi?id=734764
2014-08-14 15:31:48 +03:00
Tim-Philipp Müller
6ee2665b7c flvdemux: fix indentation 2014-08-13 11:59:39 +01:00
Tim-Philipp Müller
9afeb9652b flvdemux: un-break duration querying
Commit 2b9493b5 broke this in two ways: a) we should only
pass duration queries in TIME format upstream (or at least
not those in DEFAULT or BYTE format), and b) we mustn't
overwrite the default value of 'res' from TRUE to FALSE
and not set it again later. This led to bogus durations
being reported for FLV playback from file, because TIME
queries would fail (as 'res' had been set to FALSE) and
parsers then do a BYTE query as fallback and try to
guesstimate something in return, which of course goes
horribly wrong since the BYTE size returned is for the
muxed file.
2014-08-13 11:59:39 +01:00
Sebastian Dröge
0911307d7d videobalance: Allow any raw caps in passthrough mode, not just the ones we handle 2014-08-13 13:25:36 +03:00
Sebastian Dröge
a9eda81978 videobalance: Allow ANY capsfeatures, but only in passthrough mode
When changing the properties to not be in passthrough mode anymore,
we will only accept caps we can process ourselves, potentially causing
a not-negotiated error.

https://bugzilla.gnome.org/show_bug.cgi?id=720345
2014-08-13 13:24:38 +03:00
George Kiagiadakis
9dd48c503c qtdemux: forward DISCONT from upstream to the output streams
This makes sense in DASH reverse playback, where the upstream dashdemux
will download DASH segments in reverse order, but push their buffers
forward to qtdemux and mark each segment start as DISCONT. This needs
to be forwarded downstream to the parser/decoder, otherwise it won't work.

https://bugzilla.gnome.org/show_bug.cgi?id=734443
2014-08-11 10:28:14 +02:00
Sebastian Rasmussen
70a43758bb shapewipe: Unref caps and element after usage
https://bugzilla.gnome.org/show_bug.cgi?id=734478
2014-08-10 11:09:09 +01:00
Tim-Philipp Müller
e8321af983 qtdemux: improve debug logging of fourccs
If we can't show ASCII, at least show them
in big endian order.
2014-08-09 20:50:01 +01:00
Tim-Philipp Müller
f41d03cd4d qtdemux: add support for 'wma ' mapping as found in some ismv files
e.g. To_The_Limit_720_2962.ismv
2014-08-09 20:49:53 +01:00
Tim-Philipp Müller
6183f83190 qtdemux: add support for 'vc-1' mapping as found in some ismv files
e.g. To_The_Limit_720_2962.ismv
2014-08-09 20:49:49 +01:00
Sebastian Rasmussen
276269d956 rtph263ppay: Unref pad template caps after use
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734435
2014-08-08 16:02:24 -03:00
Sebastian Rasmussen
1fa61632fe videomixer: Unref allowed caps after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734474
2014-08-08 15:59:36 -03:00
Sebastian Rasmussen
c85ae43a6e imagefreeze: Unref pad template caps after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734475
2014-08-08 15:54:39 -03:00
Sebastian Rasmussen
edf8728016 navseek: Unref peer pad after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734476
2014-08-08 15:50:55 -03:00
Sebastian Rasmussen
1a35bf9647 rtpmux: Unref pad template caps after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734473
2014-08-08 15:38:32 -03:00
Srimanta Panda
421b00cd17 rtph264pay: append packetization mode parameter to SDP
Append packetization-mode parameter to SDP description.
Packetization mode signals the properties of an RTP payload type.

https://bugzilla.gnome.org/show_bug.cgi?id=733556
2014-08-08 13:41:36 +01:00
Jan Schmidt
d9e1aa4959 isomp4/qtmux: Write correct file duration when gaps exist.
When writing out a trak with an edit list, make sure the
overall file duration is also updated to reflect the
lengthening of the stream.

Add some more debug to qtdemux to warn about streams that
are longer than the file and get truncated.
2014-08-08 04:01:19 +10:00
Sebastian Dröge
add40de469 rtspsrc: Push the correct segment in TCP mode when seeking 2014-08-05 16:28:04 +02:00
Mark Nauwelaerts
d5d28055c1 rtph264pay: unbreak au aligned byte-stream payloading 2014-08-03 14:42:45 +02:00
Srimanta Panda
dd9f716892 rtph264pay: append profile-level-id to SDP
Append profile-level-id to SDP if available.

https://bugzilla.gnome.org/show_bug.cgi?id=733539
2014-08-01 16:01:07 +01:00
Philippe Normand
b8b5704445 interleave: set output caps layout to interleaved
Set output caps layout independently from input caps layout which can
be either non-interleaved or interleaved.

https://bugzilla.gnome.org/show_bug.cgi?id=733866
2014-07-29 11:49:32 +02:00
Tim-Philipp Müller
5122410f11 qtdemux: fix language code parsing for 3-letter codes starting with 'a'
And handle special value for 'unspecified' explicitly.

https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap4/qtff4.html
2014-07-21 18:21:50 +01:00
Sebastian Dröge
b1f7681555 videobox: Don't overwrite the first component with the alpha value for BGRx
Instead leave the x component unset when filling the borders.

https://bugzilla.gnome.org/show_bug.cgi?id=733380
2014-07-19 11:31:45 +02:00
Sebastian Dröge
638a700463 aacparse: Properly report in the CAPS query that we can convert ADTS<->RAW
https://bugzilla.gnome.org/show_bug.cgi?id=733190
2014-07-16 17:27:57 +02:00
Sebastian Rasmussen
f45657f604 rgvolume: Avoid taking unnecessary refs
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733122
2014-07-16 16:45:43 +02:00
Sebastian Rasmussen
ca22ad8da9 rtpdtmfmux: Avoid taking an unnecessary ref
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733122
2014-07-16 16:45:31 +02:00
Tim-Philipp Müller
c2614e5253 rtspsrc: fix query leak
https://bugzilla.gnome.org/show_bug.cgi?id=733003
2014-07-10 17:19:42 +01:00
Sebastian Dröge
dd5144fd4e wavenc: Return not-negotiated if we got no caps or caps negotiation failed
And do it always, not inside a g_return_val_if_fail().

See https://bugzilla.gnome.org/show_bug.cgi?id=732939
2014-07-10 14:37:31 +02:00