1. Replaced the OBU reader with the AV1 depacketizer to actually handle
RTP input.
2. Now explicitly constructing OBUTemporalDelimiter to ensure proper
separation of frames.
Adds the necessary wiring to get VP9 to work with `ivfwriter`.
Update the README of save-to-disk to inform users it supports
both VP8 and VP9.
ivfwriter currently assumes 30 fps but it seems that the other codecs
also assume 30 fps so that is not a net-new assumption.
#### Description
[RFC 6386](https://www.rfc-editor.org/rfc/rfc6386#section-9.1) describes
the least significant bit of the first byte of the header as:
```
A 1-bit frame type (0 for key frames, 1 for interframes).
```
The change is functionally a no-op, but the naming implies the wrong
logic (you would assume `isKeyFrame == 1` means it is a key frame, but
the opposite is true).
#### Reference issue
Fixes #...
The performance of the SampleBuilder is significantly worse when using
the SampleBuilder. It would be good to evaluate improving the
performance of the JitterBuffer. However for the time being we are just
going to revert.
Resolve#2778
If the MediaEngine contains support for them a SSRC will be generated
appropriately
Co-authored-by: aggresss <aggresss@163.com>
Co-authored-by: Kevin Wang <kevmo314@gmail.com>
Resolves#1989Resolves#1675
Replaces fa1f5d91 which returned only a head packet's header.
When the option WithRTPHeaders is set, SampleBuilder returns
RTP headers of the packets forming the sample as Sample.RTPHeaders.
This option allows inspecting head packet for
each media.Sample and then lets the user return
their custom metadata. This might be useful
in case when you need to check whether the
given sample is a keyframe.
current h264reader will not return actual error, thus, as a user, I
don't know error is caused by EOF, or socket close, or other failures.
The fix will return the error to caller for debugging and
troubleshooting
github.com/pion/rtp to v1.7.4 fixed the parsing of padding bytes as
media payload. This fix skips over RTP packets with an empty payload,
such as unmarshalled padding only packets.
Both partition head and tail checking is now done in the
depacketizer. For backwards compatibility, there are stubs
for PartitionHeadChecker and WithPartitionHeadChecker that do
nothing; these should be removed for 4.0.
This also fixes a bug with the depacketizer: if no head checker
was present, every packet would be considered as a potential
partition head, even if it was at the beginning of the buffer.
Since a partition head checker is now always present, the bug
cannot happen.
The tests assume the old bug, which is why the fakePacketizer
returns true if headBytes is empty. It would be better to adapt
the tests to do the right thing, as in jech/depacketizer.