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}
To differentiate between when a packet should be dropped or when a keyframe
is missing its SPS and/or SPS CopyAndFixBitstream now returns:
- kInsert, the packet should be inserted into the PacketBuffer.
- kDrop, the packet should be dropped.
- kRequestKeyframe, a keyframe should be requested.
BUG=webrtc:5514
Review-Url: https://codereview.webrtc.org/2477343002
Cr-Commit-Position: refs/heads/master@{#14948}
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}
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.
BUG=chromium:621691
Committed: https://crrev.com/c681250aaa2025836db7669694e323898e5c2ca7
Review-Url: https://codereview.webrtc.org/2405173006
Cr-Original-Commit-Position: refs/heads/master@{#14923}
Cr-Commit-Position: refs/heads/master@{#14935}
Reason for revert:
Still breaks internal downstream project.
Sergey: Please update internal project before relanding this.
Original issue's description:
> Remove deprected functions from EncodedImageCallback and RtpRtcp
>
> Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> These methods should no longer be used anywhere and it's safe to remove
> them.
>
> BUG=chromium:621691
>
> Committed: https://crrev.com/c681250aaa2025836db7669694e323898e5c2ca7
> Cr-Commit-Position: refs/heads/master@{#14923}
TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2479643002
Cr-Commit-Position: refs/heads/master@{#14925}
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2405173006
Cr-Commit-Position: refs/heads/master@{#14923}
Since it is unsafe to hand out a pointer to a packet that might be removed/
overwritten at any time we now return a copy of the header if it exist.
BUG=webrtc:5514
Review-Url: https://codereview.webrtc.org/2468183002
Cr-Commit-Position: refs/heads/master@{#14920}
Reason for revert:
Breaks everything
Original issue's description:
> Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (patchset #4 id:100001 of https://codereview.webrtc.org/2405173006/ )
>
> Reason for revert:
> This might be breaking projects downstream.
>
> Original issue's description:
> > Remove deprected functions from EncodedImageCallback and RtpRtcp
> >
> > Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> > These methods should no longer be used anywhere and it's safe to remove
> > them.
> >
> > BUG=chromium:621691
> >
> > Committed: https://crrev.com/fa565842718ad178a7562721b25d916fbabc2b92
> > Cr-Commit-Position: refs/heads/master@{#14902}
>
> TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:621691
>
> Committed: https://crrev.com/6c78307a21252c2dbd704f6d5e92a220fb722ed4
> Cr-Commit-Position: refs/heads/master@{#14914}
TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2467373003
Cr-Commit-Position: refs/heads/master@{#14915}
Reason for revert:
This might be breaking projects downstream.
Original issue's description:
> Remove deprected functions from EncodedImageCallback and RtpRtcp
>
> Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> These methods should no longer be used anywhere and it's safe to remove
> them.
>
> BUG=chromium:621691
>
> Committed: https://crrev.com/fa565842718ad178a7562721b25d916fbabc2b92
> Cr-Commit-Position: refs/heads/master@{#14902}
TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2474433008
Cr-Commit-Position: refs/heads/master@{#14914}
The H264SpsPpsTracker class:
- Keeps track of all received SPS/PPS.
- Decides whether a packet should be inserted into the PacketBuffer or not.
- Don't insert if this packet only contains SPS and/or PPS.
- Don't insert if this is the first packet of and IDR and we have not
received the required SPS/PPS.
- Insert start codes, and in the case of the first packet of an IDR prepend
the bitstream with the given SPS/PPS for this IDR.
BUG=webrtc:5514
Review-Url: https://codereview.webrtc.org/2466993003
Cr-Commit-Position: refs/heads/master@{#14906}
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.
BUG=chromium:621691
Review-Url: https://codereview.webrtc.org/2405173006
Cr-Commit-Position: refs/heads/master@{#14902}
This CL replaces the use of webrtc::Video as an internal
variable in the H.264 encoder with the specific fields
that are used by this encoder.
In support of refactorings discussed around:
BUG=600254
Committed: https://crrev.com/2549437b5ccf5aae2e6f1a1491c5f505d1859f9c
Review-Url: https://codereview.webrtc.org/2468903003
Cr-Original-Commit-Position: refs/heads/master@{#14887}
Cr-Commit-Position: refs/heads/master@{#14892}
Reason for revert:
Landed the wrong patchset. Nothing broken.
Original issue's description:
> Remove webrtc::Video from H264 encoder internals
>
> This CL replaces the use of webrtc::Video as an internal
> variable in the H.264 encoder with the specific fields
> that are used by this encoder.
>
> In support of refactorings discussed around:
>
> BUG=600254
>
> Committed: https://crrev.com/2549437b5ccf5aae2e6f1a1491c5f505d1859f9c
> Cr-Commit-Position: refs/heads/master@{#14887}
TBR=magjed@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=600254
Review-Url: https://codereview.webrtc.org/2472673002
Cr-Commit-Position: refs/heads/master@{#14888}
This CL replaces the use of webrtc::Video as an internal
variable in the H.264 encoder with the specific fields
that are used by this encoder.
In support of refactorings discussed around:
BUG=600254
Review-Url: https://codereview.webrtc.org/2468903003
Cr-Commit-Position: refs/heads/master@{#14887}
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}
The new code is only exercised in tests so far. The H264 profile-level-id
parsing is not complete, but it should be enough for our purposes for
now.
BUG=webrtc:6400,webrtc:6337
Review-Url: https://codereview.webrtc.org/2459633002
Cr-Commit-Position: refs/heads/master@{#14850}
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}
Reason for revert:
Internal project has been fixed
Original issue's description:
> Revert of Move bitstream parser to more appropriate directory. (patchset #4 id:60001 of https://codereview.webrtc.org/2370853005/ )
>
> Reason for revert:
> Breaks internal project
>
> Original issue's description:
> > Move current bitstream parser to more appropriate directory.
> >
> > This CL groups together the code that has to do with parsing H264 bitstreams.
> > This code logically belongs together, and having it in the same directory not
> > only simplifies things from a project structure perspective, but also makes it
> > easier to refactor out common parts incrementally.
> > An added benefit is that this simplifies modular compilation, where for example
> > one would like a build of WebRTC without the H264 codec-specific parts.
> >
> > BUG=webrtc:6338
> >
> > Committed: https://crrev.com/cc6817e9ce4a5ffc73efb660cf0368afbc7d9a4f
> > Cr-Commit-Position: refs/heads/master@{#14684}
>
> TBR=magjed@webrtc.org,stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6338
>
> Committed: https://crrev.com/f04f14e772f803de39f8a6128e5157127cd35103
> Cr-Commit-Position: refs/heads/master@{#14685}
TBR=magjed@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6338
Review-Url: https://codereview.webrtc.org/2434043002
Cr-Commit-Position: refs/heads/master@{#14783}
This refactoring allows runtime checks that functions that access
codec specific information are using the correct union member.
The API also allows replacing the union with another implementation
without changes at calling sites.
BUG=webrtc:6603
Review-Url: https://codereview.webrtc.org/2001533003
Cr-Commit-Position: refs/heads/master@{#14775}
The API has changed for the slice config of SSpatialLayerConfig as of
OpenH264 v1.6. Update H264EncoderImpl with an ifdef that uses the
correct API depending on what version of OpenH264 is being used.
BUG=webrtc:6583
Review-Url: https://codereview.webrtc.org/2440113002
Cr-Commit-Position: refs/heads/master@{#14762}
This CL makes scaling and cropping lazy in AVFoundationVideoCapturer and
provides optimized paths for SW and HW encoding. For SW encoding, an
efficient NV12 -> I420 cropping and scaling is implemented in
CoreVideoFrameBuffer::NativeToI420. For HW encoding, an efficient NV12 ->
NV12 cropping and scaling is implemented in
CoreVideoFrameBuffer::CropAndScaleTo. The performance improvement over
the existing cropping and scaling is that it is now done in one step
instead of making an intermediary copy of the Y plane.
There might still be room for improvement in the HW path using some HW
support. That will be explored in a future CL.
BUG=b/30939444
Review-Url: https://codereview.webrtc.org/2394483005
Cr-Commit-Position: refs/heads/master@{#14701}
Reason for revert:
Breaks internal project
Original issue's description:
> Move current bitstream parser to more appropriate directory.
>
> This CL groups together the code that has to do with parsing H264 bitstreams.
> This code logically belongs together, and having it in the same directory not
> only simplifies things from a project structure perspective, but also makes it
> easier to refactor out common parts incrementally.
> An added benefit is that this simplifies modular compilation, where for example
> one would like a build of WebRTC without the H264 codec-specific parts.
>
> BUG=webrtc:6338
>
> Committed: https://crrev.com/cc6817e9ce4a5ffc73efb660cf0368afbc7d9a4f
> Cr-Commit-Position: refs/heads/master@{#14684}
TBR=magjed@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6338
Review-Url: https://codereview.webrtc.org/2430353004
Cr-Commit-Position: refs/heads/master@{#14685}
This CL groups together the code that has to do with parsing H264 bitstreams.
This code logically belongs together, and having it in the same directory not
only simplifies things from a project structure perspective, but also makes it
easier to refactor out common parts incrementally.
An added benefit is that this simplifies modular compilation, where for example
one would like a build of WebRTC without the H264 codec-specific parts.
BUG=webrtc:6338
Review-Url: https://codereview.webrtc.org/2370853005
Cr-Commit-Position: refs/heads/master@{#14684}
This CL deletes the old and not used video defines in
engine_configurations.h and pre-pends voice_ to indicate there are only
voice/audio defines left in the file.
BUG=none
R=solenberg@webrtc.org
Review URL: https://codereview.webrtc.org/2401673002 .
Cr-Commit-Position: refs/heads/master@{#14558}
Remove check on entropy_coding_mode_flag in PPS parser.
Parse entropy_coding_mode_flag from PPS and store it in the parser struct. Parse out extra data in NALU slices in case of entropy_coding_mode to avoid reporting incorrect QP.
BUG=webrtc:6338
Review-Url: https://codereview.webrtc.org/2373393002
Cr-Commit-Position: refs/heads/master@{#14522}
This DCHECK is triggered by org.webrtc.PeerConnectionTest#testTrackRemoval.
BUG=webrtc:6465
Review-Url: https://codereview.webrtc.org/2389703002
Cr-Commit-Position: refs/heads/master@{#14481}
This change reduces the number of places where we first fread a I420
frame into a uint8_t buffer, followed by a copy into a frame buffer
object.
BUG=None
Review-Url: https://codereview.webrtc.org/2362683002
Cr-Commit-Position: refs/heads/master@{#14456}
This also makes it possible to drop the RTPFragmentationHeader from
the class VCMEncodedFrame.
BUG=None
Review-Url: https://codereview.webrtc.org/2380933003
Cr-Commit-Position: refs/heads/master@{#14455}