Commit Graph

25 Commits

Author SHA1 Message Date
dca1e09db7 Revert "Update includes for webrtc/{base => rtc_base} rename (1/3)"
This reverts commit c8fa692ec44fd6ba4fa3d085ac3161a262fc18c5.

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2964773002 .
Cr-Commit-Position: refs/heads/master@{#18872}
2017-07-01 14:42:25 +00:00
c8fa692ec4 Update includes for webrtc/{base => rtc_base} rename (1/3)
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`

The only manual edit is to add an include of webrtc/rtc_base/checks.h in
webrtc/modules/audio_device/android/opensles_common.h, which likely
was needed due to changed include paths due to 'git cl format'.

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2969653002
Cr-Commit-Position: refs/heads/master@{#18871}
2017-06-30 21:02:00 +00:00
2c9f9f2bc9 Only create H264 frames if there are no gaps in the packet sequence number.
In the case of H264 we can't know which packet that is the fist packet of a
frame. In order to avoid creating incomplete frames we keep track of which
packets that we haven't received, and if there is a gap in the packet sequence
number leading up to this frame then a frame wont be created.

BUG=chromium:716558

Review-Url: https://codereview.webrtc.org/2926083002
Cr-Commit-Position: refs/heads/master@{#18559}
2017-06-13 09:47:28 +00:00
7d79e63a48 Cast sequence number in RtpFrameObject.
BUG=webrtc:7700

Review-Url: https://codereview.webrtc.org/2902743002
Cr-Commit-Position: refs/heads/master@{#18237}
2017-05-23 15:19:11 +00:00
3184f8e329 Dont request keyframes if the stream is inactive or if we are currently receiving a keyframe.
BUG=webrtc:7520

Review-Url: https://codereview.webrtc.org/2853503002
Cr-Commit-Position: refs/heads/master@{#18199}
2017-05-18 15:08:53 +00:00
539107175a Break backwards traversal loop if we have looped around all packets in the PacketBuffer for H264 frames.
BUG=webrtc:7532

Review-Url: https://codereview.webrtc.org/2868723003
Cr-Commit-Position: refs/heads/master@{#18191}
2017-05-18 09:24:40 +00:00
c703dc21a6 Clear PacketBuffer when full.
BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2769963003
Cr-Commit-Position: refs/heads/master@{#17362}
2017-03-23 13:50:37 +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
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
36928454fa Allocate extra buffer space in FrameObject in case of H264.
Since ffmpeg use an optimized bitstream reader that reads in chunks of 32/64
bits the bitstream buffer has to be increased in order for the reader to not
read out of bounds.

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

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

Cr-Commit-Position: refs/heads/master@{#14941}
2016-11-07 09:42:43 +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
37abf53116 Delete FrameObject::size member.
Replaced with a size() method, returning the corresponding attribute
(_length) of the underlying EncodedImage.

BUG=None

Review-Url: https://codereview.webrtc.org/2444193010
Cr-Commit-Position: refs/heads/master@{#14809}
2016-10-28 07:37:34 +00:00
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +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
c9b27d56c0 Bugfix for Vp9 GOF and missing frames.
In order to correctly determine the references of a frame when using Vp9
with GOF one has to wait for all frames on the lower temporal layers
to make sure no up-switch point is missed.

This patch fix a bug where upon receiving a frame the RtpFrameReferenceFinder
would try to add missing frame for a group with a not yet knows scalability
structure.

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2127073002
Cr-Commit-Position: refs/heads/master@{#13487}
2016-07-15 13:50:34 +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
bde418d84c Renamed video_coding/packet_buffer_unittest.cc.
Renamed video_coding/packet_buffer_unittest.cc to
video_coding/video_packet_buffer_unittest.cc

BUG=webrtc:5949
TBR=stefan@webrtc.org

Review-Url: https://codereview.webrtc.org/2049693002
Cr-Commit-Position: refs/heads/master@{#13074}
2016-06-08 19:09:45 +00:00