This change will allow for a audio source to report its sampling rate
to the audio mixer. It is needed in order to mix at a lower sampling
rate. Mixing at a lower sampling rate can in many cases lead to big
efficiency improvements, as reported by experiments.
The code affected is all implementations of the Source interface:
AudioReceiveStream and a mock class. The AudioReceiveStream now
queries its underlying voe::Channel object for the needed frequency.
Note that the changes to the mixing algorithm are done in a later CL.
BUG=webrtc:6346
NOTRY=True
TBR=solenberg@webrtc.org
Review-Url: https://codereview.webrtc.org/2448113009
Cr-Commit-Position: refs/heads/master@{#14839}
This test was expecting tones to be sent at specific times, with a 100ms
margin of error, causing slower bots or bots with less precise timing to
fail the test occasionally.
BUG=webrtc:4219,webrtc:5657
Review-Url: https://codereview.webrtc.org/2447013007
Cr-Commit-Position: refs/heads/master@{#14828}
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}
Introduce a convention on categorizing GN targets:
1. Production code
2. Tests
3. Examples
4. Tools
The first two have targets spread out all over the tree,
while the latter are isolated to examples/ and tools/ directories.
Another new convention: Each directory's BUILD.gn file shall contain
a target named similar to the directory name. This target shall
contain the 'most common' production code, i.e. so that most
consumers of the directory can depend on only the directory
(which implicitly means that target in GN).
//webrtc:webrtc_tests is changed to depend on all WebRTC tests.
From now on, it's necessary to add new test targets to this dependency
tree in order to get them compiled.
Two new group targets are created:
//webrtc/modules/audio_coding:audio_coding_tests
//webrtc/modules/audio_processing:audio_processing_tests
to reduce the long list of tests in //webrtc:webrtc_tests.
Visibility on //webrtc:webrtc and //webrtc:webrtc_tests is restricted
to the root target, to avoid circular dependencies due to the monolithic
property of these targets (a problem we've had in the past).
The 'root' target at the top level is renamed to 'default', which means GN will
build this target instead of _all_ generated targets
(see https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/faq.md#Can-I-control-what-targets-are-built-by-default).
This target now depends on everything we want to build, meaning all targets now
explicitly needs to be wired up from the root target in order to get build.
Having this, the number of compiled objects on Android is decreased from 8855 to 6276. It also gives us better control over our build.
BUG=webrtc:6440
TESTED=git cl try --clobber
NOTRY=True
Review-Url: https://codereview.webrtc.org/2441383002
Cr-Commit-Position: refs/heads/master@{#14821}
Simple refactoring.
Moved ProduceCertificateStatsFromSSLCertificateStats_s and
ProduceIceCandidateStats_s from member section of RTCStatsCollector
to the anonymous namespace of rtcstatscollector.cc.
The thread check is removed as a result, which makes sense because
the helper function does not know about which thread its input
parameter lives on, that is up to the calling place (which has a thread
check already).
This makes rtcstatscollector.h cleaner, and all ProduceBlahStats
functions are starting points of collecting various stats. (Call all
of them and you get a complete set of stats.)
(Not moving PrepareTransportCertificateStats_s because it is using a
private struct of RTCStatsCollector.)
BUG=627816
Review-Url: https://codereview.webrtc.org/2462573002
Cr-Commit-Position: refs/heads/master@{#14818}
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}
As a side effect:
- Moved the AudioSendStream::Config::SendCodecSpec methods into the .cc.
- Which exposed an issue with event_visualizer_utils not having a dependency on api:call_api set up.
- Which further exposed clang warnings about large inlined default methods in webrtc/config.h.
BUG=webrtc:4690
Committed: https://crrev.com/1836fd6257a692959b3b49ba99ef587ad9995871
Review-Url: https://codereview.webrtc.org/2446963003
Cr-Original-Commit-Position: refs/heads/master@{#14771}
Cr-Commit-Position: refs/heads/master@{#14780}
Reason for revert:
Breaks downstream project
Original issue's description:
> Clean up logging in AudioSendStream::SetupSendCodec().
>
> As a side effect:
> - Moved the AudioSendStream::Config::SendCodecSpec methods into the .cc.
> - Which exposed an issue with event_visualizer_utils not having a dependency on api:call_api set up.
> - Which further exposed clang warnings about large inlined default methods in webrtc/config.h.
>
> BUG=webrtc:4690
>
> Committed: https://crrev.com/1836fd6257a692959b3b49ba99ef587ad9995871
> Cr-Commit-Position: refs/heads/master@{#14771}
TBR=kwiberg@webrtc.org,solenberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4690
Review-Url: https://codereview.webrtc.org/2452643002
Cr-Commit-Position: refs/heads/master@{#14774}
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}
As a side effect:
- Moved the AudioSendStream::Config::SendCodecSpec methods into the .cc.
- Which exposed an issue with event_visualizer_utils not having a dependency on api:call_api set up.
- Which further exposed clang warnings about large inlined default methods in webrtc/config.h.
BUG=webrtc:4690
Review-Url: https://codereview.webrtc.org/2446963003
Cr-Commit-Position: refs/heads/master@{#14771}
This will be helpful in unittests to EXPECT_EQ reports. It should be a
useful operator to have outside of testing as well.
BUG=chromium:627816
NOTRY=True
Review-Url: https://codereview.webrtc.org/2441543002
Cr-Commit-Position: refs/heads/master@{#14767}
or not being collected correctly.
These TODOs are already documented and in greater detail in
rtcstatscollector.cc, but if every discrepency is listed in
rtcstats_objects.h it is easier to get an overview of the progress of
the new GetStats API.
BUG=chromium:627816
TBR=hta@webrtc.org
NOTRY=True
Review-Url: https://codereview.webrtc.org/2443163002
Cr-Commit-Position: refs/heads/master@{#14749}
Since WebRtcVideoSendStream have reconfigures the send codec to match the incoming captured frames widht and height they have not been used.
Framerate has just been set when parsing sdp to 60fps and not changed elsewhere.
This cl require some upstream projects to change first.
BUG=webrtc:5332
Review-Url: https://codereview.webrtc.org/2408153002
Cr-Commit-Position: refs/heads/master@{#14733}
Reason for revert:
This was a workaround to help Chrome wire up the googNoiseReduction constraint. However, it was fixed in a different way in Chrome, and this hack is not actually needed.
Original issue's description:
> Add method cricket::VideoCapturer::NeedsDenoising, use in VideoCapturerTrackSource.
>
> BUG=chromium:645907
>
> Committed: https://crrev.com/0d14c6abba19295725519ce38105688ae0a62513
> Cr-Commit-Position: refs/heads/master@{#14219}
TBR=pbos@webrtc.org,hta@webrtc.org,perkj@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:645907
Review-Url: https://codereview.webrtc.org/2433293003
Cr-Commit-Position: refs/heads/master@{#14729}
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}
The stat is currently always set to zero until the residual echo detector has landed.
BUG=webrtc:6525
Review-Url: https://codereview.webrtc.org/2431443003
Cr-Commit-Position: refs/heads/master@{#14721}
Simplify the AudioMixer::Source interface and update the mixer
implementation to the new interface.
Instead of asking a mixer source to provide a pointer to an AudioFrame
during each mixing iteration, a mixer should supply a pointer to its
own AudioFrame.
This simplifies lifetime issues as sources do not give away an
internal pointer.
Implementation: when an audio source is added, the mixer allocates a
new AudioFrame. The audio frame is kept together in the internal class
SourceStatus together with the audio source pointer until the source
is removed.
NOTRY=True
BUG=webrtc:6346
Review-Url: https://codereview.webrtc.org/2420913002
Cr-Commit-Position: refs/heads/master@{#14713}
The AudioMixer is now split in a mixer and audio source interface part, which has moved to webrtc/api, and a default implementation part, which lies in webrtc/modules.
This change makes it possible to create other mixer implementations and is a first step to facilitate passing down a mixer from outside of WebRTC.
It will also create less build dependencies when the new mixer has replaced the old one.
NOTRY=True
TBR=henrik.lundin@webrtc.org
BUG=webrtc:6346
Review-Url: https://codereview.webrtc.org/2411313003
Cr-Commit-Position: refs/heads/master@{#14705}
This class is logically parallel with the {Audio,Video}ReceiveStream
classes. Its purpose is to describe a receive stream of FlexFEC packets,
through the corresponding config.
Functionally, this class simply forwards the received RTP packets
to its FlexfecReceiver, which returns recovered packets to the
Call level, for appropriate demultiplexing based on SSRC.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2397843005
Cr-Commit-Position: refs/heads/master@{#14704}
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}
An audio track with a level controller with the correct initialization
value can be created by a combination of
PeerConnectionFactory::CreateAudioTrack(..., audio_source) and
either
audio_source = PeerConnectionFactory::CreateAudioSource(constraints) or
audio_source = PeerConnectionFactory::CreateAudioSource(audio_options).
NOTRY=True
BUG=webrtc:6386
Review-Url: https://codereview.webrtc.org/2408143003
Cr-Commit-Position: refs/heads/master@{#14693}
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}
This makes it possible for external applications to use this class.
BUG=webrtc:6524
NOTRY=True
Review-Url: https://codereview.webrtc.org/2430693002
Cr-Commit-Position: refs/heads/master@{#14679}
This cl now makes cricket::VideoFrame and cricket::WebRtcVideoFrame aliases for webrtc::VideoFrame.
Reason for revert:
Fixing backwards compatibility issues.
Original issue's description:
> Revert of Make cricket::VideoFrame inherit webrtc::VideoFrame. (patchset #9 id:160001 of https://codereview.webrtc.org/2315663002/ )
>
> Reason for revert:
> Breaks compile for Chromium builds:
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/10761
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/18142
>
> FAILED: obj/remoting/protocol/protocol/webrtc_video_renderer_adapter.o
> ../../remoting/protocol/webrtc_video_renderer_adapter.cc:110:52: error: no member named 'transport_frame_id' in 'cricket::VideoFrame'
> weak_factory_.GetWeakPtr(), frame.transport_frame_id(),
> ~~~~~ ^
> 1 error generated.
>
> Please run chromium trybots as described at https://webrtc.org/contributing/#tryjobs-on-chromium-trybots before relanding.
>
> Original issue's description:
> > Make cricket::VideoFrame inherit webrtc::VideoFrame. Delete
> > all methods but a few constructors. And similarly for the
> > subclass cricket::WebRtcVideoFrame.
> >
> > TBR=tkchin@webrtc.org # Added an include line
> > BUG=webrtc:5682
> >
> > Committed: https://crrev.com/dda6ec008a0fc8d52e118814fb779032e8931968
> > Cr-Commit-Position: refs/heads/master@{#14576}
>
> TBR=perkj@webrtc.org,pthatcher@webrtc.org,pthatcher@chromium.org,tkchin@webrtc.org,nisse@webrtc.org
> NOTRY=True
> NOPRESUBMIT=True
> BUG=webrtc:5682
>
> Committed: https://crrev.com/d36dd499c8f253cbcf37364c2a070c2e8c7100e9
> Cr-Commit-Position: refs/heads/master@{#14583}
TBR=perkj@webrtc.org,pthatcher@webrtc.org,pthatcher@chromium.org,tkchin@webrtc.org,kjellander@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5682
Review-Url: https://codereview.webrtc.org/2411953002
Cr-Commit-Position: refs/heads/master@{#14678}
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 default implementations are provided as to not break Chromium mocks,
as soon as we have done a successful roll they should be updated and the
default implementations removed.
TBR=hta@webrtc.org, deadbeef@webrtc.org
NOTRY=True
BUG=chromium:654927
Review-Url: https://codereview.webrtc.org/2414613003
Cr-Commit-Position: refs/heads/master@{#14617}
- Rename the data codec payload types to end with "PlType" instead of "Id", for consistency.
BUG=webrtc:2795
Review-Url: https://codereview.webrtc.org/2397413002
Cr-Commit-Position: refs/heads/master@{#14581}