The functionality of all the tests was kept exactly the same. Some tests
were renamed:
test_push_forward_seq -> test_rtxsend_rtxreceive
test_drop_one_sender -> test_rtxsend_rtxreceive_with_packet_loss
test_drop_multiple_sender -> test_multi_rtxsend_rtxreceive_with_packet_loss
test_rtxreceive_data_reconstruction was testing that retransmitted
buffer produced by rtxsend was correctly transformed to the original
buffer by rtxreceive. Now we are checking for this in all the tests
where both rtxsend & rtxreceive are involved. That's why the test was
removed.
https://github.com/mesonbuild/meson
With contributions from:
Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)
Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded
... and many more. For more details see:
http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.htmlhttp://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html
Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
Need to set max-misorder-time and max-dropout-time to 0 so the
jitterbuffer does not base them on packet rate calculations.
If it does, out gap is big enough to be considered a new stream and
we wait for a few consecutive packets just to be sure
https://bugzilla.gnome.org/show_bug.cgi?id=751311
When parsing NAL unit type in codec_data, check the 6bits of
NAL_unit_type only and do not require the array_completeness bit to be
0, since the default and mandatory value of array_completeness is 1 for
hvc1.
https://bugzilla.gnome.org/show_bug.cgi?id=768653
Handle sprop-vps, sprop-sps and sprop-pps in caps instead of
sprop-parameter-sets.
rtph265pay works with byte-stream and hvc1 formats but not hev1 yet. It
handles profile-id, tier-flag and level-id in caps query.
https://bugzilla.gnome.org/show_bug.cgi?id=753760
This is to handle cases where upstream handles the fragmented streaming in TIME
segments and sends us data with gaps within fragments. This would happen when dealing
with trick-modes.
When upstream (push-based, TIME SEGMENT) wishes to send discontinuous samples,
it must obey the following rules:
* The buffer containing the [moof] must have a valid GST_BUFFER_OFFSET
* The buffers containing the first sample after a gap:
* MUST start at the beginning of a sample,
* MUST have the DISCONT flag set,
* MUST have a valid GST_BUFFER_OFFSET relative to the beginning of the fragment.
https://bugzilla.gnome.org/show_bug.cgi?id=767354
Some endpoints (like Tandberg E20) can send BYE packet containing our
internal SSRC. I this case we would detect SSRC collision and get rid
of the source at some point. But because we are still sending packets
with that SSRC the source will be recreated immediately.
This brand new internal source will not have some variables incorrectly
set in its state. For example 'seqnum-base` and `clock-rate` values will be
-1.
The fix is not to act on BYE RTCP if it contains internal or unknown
SSRC.
https://bugzilla.gnome.org/show_bug.cgi?id=762219
Keeping the lock while emitting the stats signal introduces potential
deadlock in those situations when the signal callback wants the access
to rtpsession's properties which also requre the lock.
https://bugzilla.gnome.org/show_bug.cgi?id=762216
Avoid using soup_server_run_async and old get_port() APIs,
replace with me soup_server_listen and get the port through the
URIs list returned from the server.
When a packet arrives that has already been considered lost as part of a
large gap the "lost timer" for this will be cancelled. If the remaining
packets of this large gap never arrives, there will be missing entries
in the queue and the loop function will keep waiting for these packets
to arrive and never push another packet, effectively stalling the
pipeline.
The proposed fix conciders parts of a large gap definitely lost (since
they are calculated from latency) and ignores the late arrivals.
In practice the issue is rare since large gaps are scheduled immediately,
and for the stall to happen the late arrival needs to be processed
before this times out.
https://bugzilla.gnome.org/show_bug.cgi?id=765933
In other words, gst_pad_get_current_caps should never return NULL
in a pad-added callback from the demuxer.
Added tests for the two special cases with AAC and H.264 where this
would happen every time.
https://bugzilla.gnome.org/show_bug.cgi?id=763780
Making the event itself writable is not enough, it won't make
the actual taglist in the event writable as well. Instead, just
make a copy of the taglist and then create a new tag event from
that if required, replacing the old one. Before we would
inadvertently modify taglists upstream elements might still
be holding on to. Add unit test for this as well.
https://bugzilla.gnome.org/show_bug.cgi?id=762793
Use fail_unless and friends instead of g_assert
Factor seq-num checking out to separate function
Check more return-values from push and crank and others
https://bugzilla.gnome.org/show_bug.cgi?id=762254
Set GSETTINGS_BACKEND=memory, apparently there's something
about fork() and the dconf backend (or whatever else that
drags in or activates) that messes up locking and causes
timeouts due to deadlocks in g_mutex_lock(), since
everything works fine with CK_FORK=no as well.
The code is supposed to follow somehow what the comment above says, that
is to have one channel with a wave of freq 440 and the other channel
with a wave of freq 880, but an off by one error results in frequencies
of 0 and 440.
https://bugzilla.gnome.org/show_bug.cgi?id=735673
This way we can use -1 as special value, which is nicer than MAXUINT.
This is backwards compatible even with the GValue API, as shown by
a unit test.
https://bugzilla.gnome.org/show_bug.cgi?id=757892
By not doing this, the muxer is not effectively a rtpmuxer, rather a
funnel, since it should be a single stream that exists the muxer.
If not specified, take the first ssrc seen on a sinkpad, allowing upstream
to decide ssrc in "passthrough" with only one sinkpad.
Also, let downstream ssrc overrule internal configured one
We hence has the following order for determining the ssrc used by
rtpmux:
0. Suggestion from GstRTPCollision event
1. Downstream caps
2. ssrc-Property
3. (First) upstream caps containing ssrc
4. Randomly generated
https://bugzilla.gnome.org/show_bug.cgi?id=752694
Avoid using default accept-caps handler that will query downstream
and is more expensive. Just check if the caps is compatible with
the template and check if the channels are the same.
The time of the first RTCP packet is semi-random, so
sometimes it was produced before enough packets from
the second SSRC were received. First drop queued RTCP
packets, then advance the clock enough to ensure
that at least one new RTCP packet is produced.
https://bugzilla.gnome.org/show_bug.cgi?id=750731
The accept-caps query just does a shallow check at the current
element while at this test we want it to also look at downstream.
So use caps query there.
https://bugzilla.gnome.org/show_bug.cgi?id=753623
1) Tests that using dynamic PT instead of the default ones work
2) If we ever decide to change the codec here we don't need to
worry about change the PT for the default one of the new codec
in the test
https://bugzilla.gnome.org/show_bug.cgi?id=746445
The RTP PT for alaw is 8.
Less than 50 packets are received in the length of this test so it
would never drop a buffer or would drop only the last buffer and
it would fail sometimes when the received wouldn't receive the
retransmission packet in time.
https://bugzilla.gnome.org/show_bug.cgi?id=746445
Some of the subtitle chunks will have embedded
NUL-terminators (last three), some don't (first three),
some will have markup, some won't, some will be valid
UTF-8 (all but last), some won't (last stanza).
https://bugzilla.gnome.org/show_bug.cgi?id=752421
Replace static constants with macros to make gcc happy
CC elements/elements_rtpjitterbuffer-rtpjitterbuffer.o
elements/rtpjitterbuffer.c:387:1: error: initializer element is not constant
static const GstClockTime PCMU_BUF_DURATION = PCMU_BUF_MS * GST_MSECOND;
^
elements/rtpjitterbuffer.c:388:1: error: initializer element is not constant
static const guint PCMU_BUF_SIZE = 64000 * PCMU_BUF_MS / 1000;
^
elements/rtpjitterbuffer.c:390:5: error: initializer element is not constant
PCMU_BUF_CLOCK_RATE * PCMU_BUF_MS / 1000;
The amount of time that is completely expired and not worth waiting for,
is the duration of the packets in the gap (gap * duration) - the
latency (size) of the jitterbuffer (priv->latency_ns). This is the duration
that we make a "multi-lost" packet for.
The "late" concept made some sense in 0.10 as it reflected that a buffer
coming in had not been waited for at all, but had a timestamp that was
outside the jitterbuffer to wait for. With the rewrite of the waiting
(timeout) mechanism in 1.0, this no longer makes any sense, and the
variable no longer reflects anything meaningful (num > 0 is useless,
the duration is what matters)
Fixed up the tests that had been slightly modified in 1.0 to allow faulty
behavior to sneak in, and port some of them to use GstHarness.
https://bugzilla.gnome.org/show_bug.cgi?id=738363
Also make it so that the mtu is always set if specified, not
only in case of the rather weird bufferlist test code path.
This allows us to easily make the payloader fragment a payload
across multiple output packets by setting a small MTU on it.
Implementation according to RFC 4587.
Payloader create fragments on MB boundaries in order to match MTU size
the best it can. Some decoders/depayloaders in the wild are very strict
about receiving a continuous bit-stream (e.g. no no-op bits between
frames), so the payloader will shift the compressed bit-stream of a
frame to align with the last significant bit of the previous frame.
Depayloader does not try to be fancy in case of packet loss. It simply
drops all packets for a frame if there is a loss, keeping it simple.
https://bugzilla.gnome.org/show_bug.cgi?id=751886
If we have a clock, update "now" now with the very latest running time we have.
If timers are unscheduled below we otherwise wouldn't update now (it's only updated
when timers expire), and also for the very first loop iteration now would otherwise
always be 0.
Also the time is used for the timeout functions, e.g. to calculate any times
for the next timeouts and we would otherwise pass too old times there.
https://bugzilla.gnome.org/show_bug.cgi?id=751636
The mp4 muxer now writes a place-holder mdat as a free
atom followed by a 0-byte mdat that covers the rest of the
file, making it possible to rewrite it as 64-bit, or leave
it as-is if nothing else is written afterward
The calculations were a bit off everywhere, even before the changes done
recently to the delay for RTX of expected future packets. It only worked by
accident, but now the calculations are all correct again. Hopefully.
Both input streams in this test have a segment.start = 10s, so
output should start from 0 anyway.
Another test has both starting at non-0 segments, but the running
time of both streams should still start from 0
Commit #1018aa made rtprtxsend handle buffer lists, breaking
the test which probes for buffers, but not buffer lists.
Use a utility function to run the probe callback on each buffer
in the list in turn and remove any buffers that are dropped.
When not in fast-start or fragmented mode, we need to be able
to rewrite the size of the mdat atom, or else the output just
won't be playable - the mdat placeholder with size == 0 will
cover the rest of the file, including any moov atom we write out.
https://bugzilla.gnome.org/show_bug.cgi?id=708808
The test had a function to print the error, but was not parsing it.
This was causing warning about dbg_info being used uninitialized. If
the test was testing any errors, this would have crashed.
Implement 2 new elements - splitmuxsink and splitmuxsrc.
splitmuxsink is a bin which wraps a muxer and takes 1 video stream,
plus audio/subtitle streams, and starts a new file
whenever necessary to avoid overrunning a threshold of either bytes
or time. New files are started at a keyframe, and corresponding audio
and subtitle streams are split at packet boundaries to match
video GOP timestamps.
splitmuxsrc is a corresponding source element which handles
the splitmux:// URL and plays back all component files,
reconstructing the original elementary streams as it goes.
Our ones were expired. The new ones were copied from libsoup's
tests files.
Also sets the property to use our own cert to validate the
server, otherwise the default system certs would be used
and it would fail.
They should always be built, while the speex elements are not.
Need to check for a smaller number of buffers then (7->4) because
speexenc will add 3 header buffers while alawenc will just output
as many buffers as it receives as input.
https://bugzilla.gnome.org/show_bug.cgi?id=742098
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
Actually look for error messages on the bus and fail if there
is one before the EOS message. Disable pull mode test which is
pointless as long as matroskaparse only supports push mode
(pull mode support has not been ported over to 1.0).
Fix the raciness by iterating on a condition instead of using the gmainloop.
Don't use the EOS as the target, otherwise the retransmission of the last
packets are lost. Also count the retranmissions requests that are dropped.
Check the condition before blocking on the GCond
https://bugzilla.gnome.org/show_bug.cgi?id=728501
As we now replace the local RTPSource on a conflict, it's no longer possible
to keep local conflicts in the RTPSource, so they instead need to be kept
in the RTPSession.
Also fix the rtpcollision test to generate multiple collisions instead of
one by change the address, as otherwise we detected that it was a single one.
From libsoup docs:
Prior to 2.44 SoupStatus was called SoupKnownStatusCode,
but the individual values have always had the names they
have now.
Fixes:
https://bugzilla.gnome.org/show_bug.cgi?id=727329
Add fake audio/video sinks. Previously running the test might be flaky due to
the use of real elements (hardware in use), which we don't want to test here.
Add two more tests that check that the fakes are chosen.
Ensures the test can run on systems without alsa (or any audio output for
that matter), and will avoid people running build slaves wondering what
the hell was beeping during the night :)
Now with rtprtxsend pushing rtx buffers from a different thread,
this is necessary to ensure that the result of the test is deterministic.
This code makes use of GstCheck's global GMutex and GCond that are
being used inside GstCheck's sink pad chain() function in order
to synchronize with it.
Now with rtprtxsend pushing rtx buffers from a different thread,
this is necessary to ensure that the result of the test is deterministic.
This code makes use of GstCheck's global GMutex and GCond that are
being used inside GstCheck's sink pad chain() function in order
to synchronize with it.
Now with rtprtxsend pushing rtx buffers from a different thread,
this is necessary to ensure that the result of the test is deterministic.
This code makes use of GstCheck's global GMutex and GCond that are
being used inside GstCheck's sink pad chain() function in order
to synchronize with it.
It shows how to use "set-aux-receive" and "set-aux-send"
properties of rtpbin to set rtprtxsend and rtprtxreceive
Build 2 pipelines, one for rtpbin as a sender and one for
rtobin as a receive. Then transmit an audio stream.
It also drops some packets to activate restransmission and
check they are actually retransmited.
This unit test verifies that the rtxsend element correctly maintains
a buffer of already transmitted rtp packets and that it can
re-transmit all of them correctly on demand. It also verifies
that the limit of this buffer (max-size-packets property) is respected.
Several senders / one receiver
Similar than test_drop_one_sender but with multiple senders
mixed through the funnel element.
It drops some packets and checks that they are retransmited
correctly.
Test for one sender / one receiver
Build the pipeline
videotestsrc ! rtpvrawpay ! rtprtxsend ! rtprtxreceive ! fakesink
and drop some buffers between rtprtxsend and rtprtxreceive
Then it checks that every dropped packet has been re-sent.
It also checks that not too much requests has been sent.
Keep track of elements that are added to multiple sessions and make sure
we only add them to the rtpbin once and that we clean them when no
session refers to them anymore.
This test checks that when we have multiple internal sender sources
in rtpsession, SRs contain RBs for every other sender source, and that
they are included roundrobin when they exceed ST_RTCP_MAX_RB_COUNT,
which is the max number of RBs that can fit in a SR.
The parser can accept input that is not completely specified. Use the
ACCEPT_INTERSECT flag on the sinkpad to tweak the acceptcaps function to
check for intersection only. This allows us to proxy downstream
constraints while still allowing non-subset caps as input.
We can then also remove the appended template caps workaround.
Make a unit-test to check the new feature.
This reverts commit 26040ee38c
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=705024
These new tests send a tag event before seding the buffer. Tested case are an
empty tag list, a tag list with orientation-180 set and an invalid orientation value.
https://bugzilla.gnome.org/show_bug.cgi?id=719497
Don't reset the expected output seqnum when clearing the pt map because this
could stall the jitterbuffer forever.
Add a unit test for this.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=709800
Silencing this warning:
elements/souphttpsrc.c:533:14: error: comparison between ‘SoupKnownStatusCode’ and ‘enum <anonymous>’ [-Werror=enum-compare]
if (status != SOUP_STATUS_OK && !send_error_doc)
With gcc 4.8.2 (debian)