This CL makes a number of intervowen changes:
* Add BitrateAllocation struct, that contains a codec independent view
of how the target bitrate is distributed over spatial and temporal
layers.
* Adds the BitrateAllocator interface, which takes a bitrate and frame
rate and produces a BitrateAllocation.
* A default (non layered) implementation is added, and
SimulcastRateAllocator is extended to fully handle VP8 allocation.
This includes capturing TemporalLayer instances created by the
encoder.
* ViEEncoder now owns both the bitrate allocator and the temporal layer
factories for VP8. This allows allocation to happen fully outside of
the encoder implementation.
This refactoring will make it possible for ViEEncoder to signal the
full picture of target bitrates to the RTCP module.
BUG=webrtc:6301
Review-Url: https://codereview.webrtc.org/2434073003
Cr-Commit-Position: refs/heads/master@{#14998}
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}
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}
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}
Before only C420 as format name was accepted, now C420mpeg2 is also
accepted. Both means the same thing.
BUG=webrtc:6545
NOTRY=True
Review-Url: https://codereview.webrtc.org/2468943002
Cr-Commit-Position: refs/heads/master@{#14897}
Reason for revert:
Breaks chrome, see https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/19019/steps/compile/logs/stdio
Analysis: Chrome uses cricket::VideoFrame, without explicitly including webrtc/media/base/videoframe.h, and breaks when that file is no longer included by any other webrtc headers. Will reland after updating Chrome.
Original issue's description:
> Delete all use of cricket::VideoFrame and cricket::WebRtcVideoFrame.
>
> Replaced with webrtc::VideoFrame.
>
> TBR=mflodman@webrtc.org
> BUG=webrtc:5682
>
> Committed: https://crrev.com/45c8b8940042bd2574c39920804ade8343cefdba
> Cr-Commit-Position: refs/heads/master@{#14885}
TBR=perkj@webrtc.org,pthatcher@webrtc.org,tkchin@webrtc.org,mflodman@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:5682
Review-Url: https://codereview.webrtc.org/2471783002
Cr-Commit-Position: refs/heads/master@{#14886}
This CL introduces two new functions to the WebRtcVideoEncoderFactory
interface based on cricket::VideoFormat instead of
WebRtcVideoEncoderFactory::VideoCodec. The functions are:
WebRtcVideoEncoderFactory::CreateVideoEncoder() and
WebRtcVideoEncoderFactory::supported_codecs(). In order to make a smooth
transition to the new interface, the old functions are kept, and default
implementations are provided for both the old and new functions so that
external clients can switch from the old to the new functions in peace.
The default implementations will just convert between
cricket::VideoFormat and WebRtcVideoEncoderFactory::VideoCodec. Once all
external clients have updated their code, the plan is to remove the old
functions and all default implementations to make
WebRtcVideoEncoderFactory a pure interface again.
BUG=webrtc:6402,webrtc:6337
Review-Url: https://codereview.webrtc.org/2449993003
Cr-Commit-Position: refs/heads/master@{#14826}
On some recent Android devices camera switch is completed in 400 ms.
Need to adjust key frame generation threshold to ensure HW encoder
still generates a key frame after camera switch to workaround video
distortions.
BUG=b/32238476
Review-Url: https://codereview.webrtc.org/2447163003
Cr-Commit-Position: refs/heads/master@{#14791}
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}
Main thread is waiting for an operation on the render thread to complete
while holding the handler lock. Something can be waiting on the render
thread for this lock. This CL changes the behaviour so that the lock
is released before waiting for the operation to complete.
BUG=webrtc:6602,webrtc:6470
R=magjed@webrtc.org
Review-Url: https://codereview.webrtc.org/2449693003
Cr-Commit-Position: refs/heads/master@{#14773}
We need to wait for posted frames to be rendered first in release()
instead of abruptly quitting, in order to simplify testing.
BUG=webrtc:6545
R=sakal@webrtc.org
Review URL: https://codereview.webrtc.org/2440703002 .
Cr-Commit-Position: refs/heads/master@{#14722}
This CL changes YuvConverter to use an OpenGL Framebuffer as rendering
target instead of an EGL pixel buffer surface. The purpose is to reduce
the number of EGL contexts and to be able to use YuvConverter from
EglRenderer without having to detach the EGL surface.
BUG=webrtc:6470
Review-Url: https://codereview.webrtc.org/2436653003
Cr-Commit-Position: refs/heads/master@{#14699}
The purpose is to prepare for a TextureViewRenderer that will need the
new functionality.
The new functionality is:
* Be able to create an EglRenderer using a SurfaceTexture.
* Fps reduction logic.
* Log statistics every 4 seconds regardless of framerate.
* Include swap buffer time in statistics.
* Use EglBase10 if texture frames are disabled.
* Function for printing stack trace of render thread.
* Public clearImage() function for clearing the EGLSurface.
BUG=webrtc:6470
Review-Url: https://codereview.webrtc.org/2428933002
Cr-Commit-Position: refs/heads/master@{#14698}
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}
YuvConverter is complex class that deserves its own file. It is also used outside of SurfaceTextureHelper.
BUG=webrtc:6470
R=sakal@webrtc.org
Review URL: https://codereview.webrtc.org/2426023002 .
Cr-Commit-Position: refs/heads/master@{#14683}
Reason for revert:
Breaks internal project.
Original issue's description:
> Support for video file instead of camera and output video out to file
>
> When video out to file is enabled the remote video which is recorded is
> not show on screen.
>
> You can use this command line for file input and output:
> monkeyrunner ./webrtc/examples/androidapp/start_loopback_stubbed_camera_saved_video_out.py --devname 02157df28cd47001 --videoin /storage/emulated/0/reference_video_1280x720_30fps.y4m --videoout /storage/emulated/0/output.y4m --videoout_width 1280 --videoout_height 720 --videooutsave /tmp/out.y4m
>
> BUG=webrtc:6545
>
> Committed: https://crrev.com/44666997ca912705f8f96c9bd211e719525a3ccc
> Cr-Commit-Position: refs/heads/master@{#14660}
TBR=magjed@webrtc.org,sakal@webrtc.org,jansson@chromium.org,mandermo@google.com,mandermo@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6545
Review-Url: https://codereview.webrtc.org/2425763003
Cr-Commit-Position: refs/heads/master@{#14664}
When video out to file is enabled the remote video which is recorded is
not show on screen.
You can use this command line for file input and output:
monkeyrunner ./webrtc/examples/androidapp/start_loopback_stubbed_camera_saved_video_out.py --devname 02157df28cd47001 --videoin /storage/emulated/0/reference_video_1280x720_30fps.y4m --videoout /storage/emulated/0/output.y4m --videoout_width 1280 --videoout_height 720 --videooutsave /tmp/out.y4m
BUG=webrtc:6545
Review-Url: https://codereview.webrtc.org/2273573003
Cr-Commit-Position: refs/heads/master@{#14660}
The purpose is to prepare for a TextureViewRenderer that will share the
EGL rendering code.
Two functional changes are also included:
* The implementation of SurfaceHolder.Callback.surfaceDestroyed will now
block until the EGL surface is released. This is done in order to
comply with the documentation that says: "If you have a rendering
thread that directly accesses the surface, you must ensure that thread
is no longer touching the Surface before returning from this function."
* We will no longer try to hide render glitches during layout changes.
This was a lost cause anyway.
BUG=webrtc:6407
Review-Url: https://codereview.webrtc.org/2399463006
Cr-Commit-Position: refs/heads/master@{#14570}
This should allow us to enable Intel HW VP8 encoder again.
BUG=webrtc:6232,b/30947951
Review-Url: https://codereview.webrtc.org/2263043003
Cr-Commit-Position: refs/heads/master@{#14552}
Changing this constant has been empirically proven to solve the issue.
BUG=webrtc:6455,b/31827852
Review-Url: https://codereview.webrtc.org/2382733006
Cr-Commit-Position: refs/heads/master@{#14479}
Remove onOutputFormatRequest from the VideoCapturer interface and from
all implementations of that interface. Apps should now use
VideoSource.adaptOutputFormat() instead.
BUG=webrtc:6391
Review-Url: https://codereview.webrtc.org/2373353002
Cr-Commit-Position: refs/heads/master@{#14428}
Also provide a new set of thresholds for the VideoToolbox encoder. The new thresholds were experimentally determined to work well on the iPhone 6S, and also adequately on the iPhone 5S.
BUG=webrtc:5678
Review-Url: https://codereview.webrtc.org/2309743002
Cr-Commit-Position: refs/heads/master@{#14420}
The old method is marked deprecated and will be removed soon. The new
method checks if all cameras on the device support better than legacy
implementation of the camera2 API.
BUG=webrtc:6390
Review-Url: https://codereview.webrtc.org/2354883002
Cr-Commit-Position: refs/heads/master@{#14350}
The Java VideoSource class wraps the C++ AndroidVideoTrackSource.
AndroidVideoTrackSource is the object actually owning the VideoAdapter.
We currently control the VideoAdapter through the Java VideoCapturer,
but it is more natural and direct to control it through the Java
VideoSource class. This CL adds the necessary function to do this, and
the function in VideoCapturer is deprecated.
BUG=webrtc:6391
R=sakal@webrtc.org
Review URL: https://codereview.webrtc.org/2350933006 .
Cr-Commit-Position: refs/heads/master@{#14332}
Reason for revert:
Fix bugs causing the new code to fail.
Original issue's description:
> Revert of Release camera statistics after switching camera on CameraCapturer. (patchset #1 id:1 of https://codereview.webrtc.org/2353263002/ )
>
> Reason for revert:
> Breaks bots.
>
> Original issue's description:
> > Release camera statistics after switching camera on CameraCapturer.
> >
> > BUG=webrtc:6397
> > TBR=magjed@webrtc.org
> > NOTRY=True
> >
> > Committed: https://crrev.com/d5e9237b303e5fe253dc6530fbcf939921f4eaed
> > Cr-Commit-Position: refs/heads/master@{#14323}
>
> TBR=magjed@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6397
>
> Committed: https://crrev.com/ad5d65845f5c859d0564811a4eea68e1efdb8450
> Cr-Commit-Position: refs/heads/master@{#14324}
TBR=magjed@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6397
Review-Url: https://codereview.webrtc.org/2357893002
Cr-Commit-Position: refs/heads/master@{#14330}
Reason for revert:
Breaks bots.
Original issue's description:
> Release camera statistics after switching camera on CameraCapturer.
>
> BUG=webrtc:6397
> TBR=magjed@webrtc.org
> NOTRY=True
>
> Committed: https://crrev.com/d5e9237b303e5fe253dc6530fbcf939921f4eaed
> Cr-Commit-Position: refs/heads/master@{#14323}
TBR=magjed@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6397
Review-Url: https://codereview.webrtc.org/2353163003
Cr-Commit-Position: refs/heads/master@{#14324}