Commit Graph

21 Commits

Author SHA1 Message Date
8c61924b56 video_coding::PacketBuffer now group all H264 packets with the same timestamp into the same frame.
Since we can't know when a H264 frame really starts we instead group all packets together by timestamp when a frame seems to be complete (only in the case of H264).

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2675693002
Cr-Commit-Position: refs/heads/master@{#16419}
2017-02-02 16:51:29 +00:00
ea142f8de3 Don't detect a new frame if a previous packet is used in a previous frame.
In this CL:
 - Removed unused variable |last_seq_num_|.
 - Fixed bug where a new incomplete frame was detected as a complete frame.
 - Added fuzzer to video_coding::PacketBuffer.

BUG=chromium:677101

Review-Url: https://codereview.webrtc.org/2613833003
Cr-Commit-Position: refs/heads/master@{#16003}
2017-01-11 10:01:56 +00:00
0d1b2b6880 Reland of Rename RTPVideoHeader.isFirstPacket to .is_first_packet_in_frame.
Add RTC_DEPRACATed anonymous unions to not break downstream projects.

Orignal issue's description:
> commit 0ad21111fcc57a7e978edba3c4263f0062d7f9ff
> Author: danilchap <danilchap@webrtc.org>
> Date:   Mon Dec 19 09:36:33 2016 -0800
>
>     Revert of Rename RTPVideoHeader.isFirstPacket to
>     .is_first_packet_in_frame. (patchset #1 id:1 of
>     https://codereview.webrtc.org/2574943003/ )
>
>     Reason for revert:
>     breaks downstream project.
>
>     Can you make this change in a compatible way using anonymous
>     union:
>     union {
>       bool is_first_packet_in_frame;
>       RTC_DEPRECATED bool isFirstPacket;
>     };
>     (unfortunetly this this treak breaks braced initialization in
>     rtp_rtcp_impl_unittest.cc,
>     so that should be rewritting in a more classic way)
>
>     Original issue's description:
>     > Rename RTPVideoHeader.isFirstPacket to
>     > .is_first_packet_in_frame.
>     >
>     > Name should represent the actual meaning.
>     >
>     > BUG=None
>     >
>     > Review-Url: https://codereview.webrtc.org/2574943003
>     > Cr-Commit-Position: refs/heads/master@{#15684}
>     > Committed:
>     > efde908380
>
>     TBR=stefan@webrtc.org,sprang@webrtc.org,johan@webrtc.org
>     # Skipping CQ checks because original CL landed less than 1 days
>     ago.
>     NOPRESUBMIT=true
>     NOTREECHECKS=true
>     NOTRY=true
>     BUG=None
>
>     Review-Url: https://codereview.webrtc.org/2589783003
>     Cr-Commit-Position: refs/heads/master@{#15686}
>

BUG=None

Review-Url: https://codereview.webrtc.org/2614503002
Cr-Commit-Position: refs/heads/master@{#15987}
2017-01-10 12:21:35 +00:00
2c2f34c1ca PacketBuffer now correctly cast sequence numbers to uint16_t.
BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2603223002
Cr-Commit-Position: refs/heads/master@{#15885}
2017-01-03 13:55:34 +00:00
0ad21111fc Revert of Rename RTPVideoHeader.isFirstPacket to .is_first_packet_in_frame. (patchset #1 id:1 of https://codereview.webrtc.org/2574943003/ )
Reason for revert:
breaks downstream project.

Can you make this change in a compatible way using anonymous union:
union {
  bool is_first_packet_in_frame;
  RTC_DEPRECATED bool isFirstPacket;
};
(unfortunetly this this treak breaks braced initialization in rtp_rtcp_impl_unittest.cc,
so that should be rewritting in a more classic way)

Original issue's description:
> Rename RTPVideoHeader.isFirstPacket to .is_first_packet_in_frame.
>
> Name should represent the actual meaning.
>
> BUG=None
>
> Review-Url: https://codereview.webrtc.org/2574943003
> Cr-Commit-Position: refs/heads/master@{#15684}
> Committed: efde908380

TBR=stefan@webrtc.org,sprang@webrtc.org,johan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=None

Review-Url: https://codereview.webrtc.org/2589783003
Cr-Commit-Position: refs/heads/master@{#15686}
2016-12-19 17:36:33 +00:00
efde908380 Rename RTPVideoHeader.isFirstPacket to .is_first_packet_in_frame.
Name should represent the actual meaning.

BUG=None

Review-Url: https://codereview.webrtc.org/2574943003
Cr-Commit-Position: refs/heads/master@{#15684}
2016-12-19 16:32:24 +00:00
759e0b7241 Fix memory leak in video_coding::PacketBuffer::InsertPacket.
BUG=webrtc:6788

Review-Url: https://codereview.webrtc.org/2535203002
Cr-Commit-Position: refs/heads/master@{#15314}
2016-11-30 09:32:11 +00:00
20dce34578 Fixed bug in PacketBuffer to correctly detect new complete frames after ClearTo has been called.
BUG=webrtc:5514
R=stefan@webrtc.org, terelius@webrtc.org

Review URL: https://codereview.webrtc.org/2527903002 .

Cr-Commit-Position: refs/heads/master@{#15269}
2016-11-28 15:15:04 +00:00
fd5a20fd68 New jitter buffer experiment.
BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2480293002
Cr-Commit-Position: refs/heads/master@{#15077}
2016-11-15 08:58:06 +00:00
41b8ca0420 PacketBuffer no longer copy the bitstream data of incoming packets.
This change the interface of the PacketBuffer since the bitstream data of the packet has to be persistent when inserted into the PacketBuffer.

BUG=webrtc:5514
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/2476283002 .

Cr-Commit-Position: refs/heads/master@{#14949}
2016-11-07 14:42:32 +00:00
aee3e0eb32 Only advance |first_seq_num_| if packets are explicitly cleared from the PacketBuffer.
In this CL:
 - Don't insert a packet if we have explicitly cleared past it.
 - Added some logging to ExpandBufferSize.
 - Renamed IsContinuous to PotentialNewFrame.
 - Unittests updated/added for this new behavior.
 - Refactored TestPacketBuffer unittests.

BUG=webrtc:5514
R=danilchap@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/2399373002 .

Cr-Commit-Position: refs/heads/master@{#14871}
2016-11-01 10:45:43 +00:00
1f39ba1cd9 Copy payload data when inserting packets into video_coding::PacketBuffer.
The payload pointed to by |dataPtr| is volatile and needs to be copied
to its own buffer.

BUG=webrtc:5514
R=brandtr@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/2302763002 .

Cr-Commit-Position: refs/heads/master@{#14321}
2016-09-21 09:27:56 +00:00
17deeb47ed PacketBuffer is now ref counted.
Since all FrameObjects have a reference to its PacketBuffer and since
the PacketBuffer can be thrown away at any moment the PacketBuffer
has to be ref counted in order to avoid FrameObjects dereferencing a potentially
destroyed object.

BUG=webrtc:5514
R=danilchap@webrtc.org, mflodman@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/2199133004 .

Cr-Commit-Position: refs/heads/master@{#13725}
2016-08-11 13:09:40 +00:00
b4d31085b4 Added various timestamps to FrameObject.
Added various timestamps to the FrameObject class which are needed to calculate
the jitter delay.

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2124943002
Cr-Commit-Position: refs/heads/master@{#13434}
2016-07-11 15:46:35 +00:00
9b2ce6be09 Padding is now used to check for continuity in the packet sequence.
BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2051453002
Cr-Commit-Position: refs/heads/master@{#13383}
2016-07-05 12:04:52 +00:00
5ceaaae368 PacketBuffer now can save how many times a packet has been nacked.
Also save size/max nack count in the FrameObject/RtpFrameObject.

BUG=webrtc:5514
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1988653002 .

Cr-Commit-Position: refs/heads/master@{#12863}
2016-05-24 08:21:00 +00:00
02447bc408 Logic for finding frame references moved from PacketBuffer to new class
RtpFrameReferenceFinder.

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/1961053002
Cr-Commit-Position: refs/heads/master@{#12725}
2016-05-13 13:01:11 +00:00
a1059874a6 Convert Vp9 Rtp headers to frame references.
R=mflodman@webrtc.org, stefan@webrtc.org

BUG=webrtc:5514

Review URL: https://codereview.webrtc.org/1903523003 .

Cr-Commit-Position: refs/heads/master@{#12660}
2016-05-09 09:41:57 +00:00
2ddf09397f Fix missing-break-fallthrough warning.
Adds a break; after RTC_NOTREACHED(). Also removes default case to catch
if any other codec type is added.

BUG=
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1905573002 .

Cr-Commit-Position: refs/heads/master@{#12443}
2016-04-20 12:06:55 +00:00
f41393376a Convert Vp8 Rtp headers to frame references.
R=stefan@webrtc.org, pbos@webrtc.org

BUG=webrtc:5514

Review URL: https://codereview.webrtc.org/1847193003 .

Cr-Commit-Position: refs/heads/master@{#12437}
2016-04-20 08:26:45 +00:00
c707ab7cb0 Packet buffer for the new jitter buffer.
BUG=webrtc:5514
R=stefan@webrtc.org, mflodman@webrtc.org

Review URL: https://codereview.webrtc.org/1772383002

Cr-Commit-Position: refs/heads/master@{#12194}
2016-04-01 09:02:00 +00:00