Commit graph

392 commits

Author SHA1 Message Date
philipel
a9d7c19011 Make EncodeResultCallback rvalue ref-qualified.
Bug: b/336978562
Change-Id: Icc9be7a5ad095304bf68e19ffedca77d8bc1810c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349266
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42285}
2024-05-13 10:53:48 +00:00
philipel
cf4764e062 Move EncodeResultCallback to FrameEncodeSettings.
Bug: b/336978562
Change-Id: I25cb6662a6b66fba9d22d974e1b6da48e137d0ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349225
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42284}
2024-05-13 10:16:32 +00:00
Sergey Silkin
29d4062ff6 Make SpatialLayer to be an alias of SimulcastStream
Bug: b/337757868, b/42234533
Change-Id: I3a5088c2ef64ebc48b37aa51b3ebb7cd395e537b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349960
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42280}
2024-05-13 08:05:19 +00:00
Tommi
6ab9085d19 Fix iwyu error introduced recently.
This fixes a build error introduced by:
https://webrtc-review.googlesource.com/c/src/+/349001

bot:
https://ci.chromium.org/ui/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20ios-device

Error:

../../third_party/webrtc/api/video_codecs/libaom_av1_encoder_factory.cc:494:27: error: expected ';' after expression
494 |   rtc::SimpleStringBuilder sb(buf);
|                           ^
|                           ;
../../third_party/webrtc/api/video_codecs/libaom_av1_encoder_factory.cc:494:8: error: no member named 'SimpleStringBuilder' in namespace 'rtc'

Bug: none
Change-Id: I020040f367005ab56068cf4356e5effb380b7200
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349320
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42189}
2024-04-29 07:13:44 +00:00
philipel
5ccd44b8f7 Remove EncodedData::reference_buffers.
Bug: b/336978562
Change-Id: I5ddcc6bc6dadf8ba7c22d96db125e4351338bf7a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349164
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42184}
2024-04-26 15:48:08 +00:00
philipel
b85b4c0f29 Reland "New video encoder API."
This reverts commit 56e6309749.

Reason for revert: Preparing for reland

Original change's description:
> Revert "New video encoder API."
>
> This reverts commit 42f12d5183.
>
> Reason for revert: tests fails downstream
>
> Original change's description:
> > New video encoder API.
> >
> > Also initial implementation wrapping the libaom AV1 encoder.
> >
> > Note that for now this is intended for prototype purposes.
> >
> > Bug: none
> > Change-Id: Iac42ca4aecb6a204601c9f00bfb300e3eda3c4f4
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306181
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42108}
>
> Bug: none
> Change-Id: I927260353afb91df6c7650364baee4f13a098efd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347883
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Owners-Override: Philip Eliasson <philipel@webrtc.org>
> Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42111}

Bug: none
Change-Id: Ib72ef5359ead697d27301e2ca2408e8b27165931
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349001
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42172}
2024-04-25 08:19:16 +00:00
Danil Chapovalov
2a66531b28 Delete deprecated CreateVideoEncoderSoftwareFallbackWrapper
Bug: webrtc:15860
Change-Id: I26e6401a4d56f19e059ae8cd69d75d2cdee3db94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347740
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@google.com>
Cr-Commit-Position: refs/heads/main@{#42165}
2024-04-24 19:07:56 +00:00
Danil Chapovalov
56e6309749 Revert "New video encoder API."
This reverts commit 42f12d5183.

Reason for revert: tests fails downstream

Original change's description:
> New video encoder API.
>
> Also initial implementation wrapping the libaom AV1 encoder.
>
> Note that for now this is intended for prototype purposes.
>
> Bug: none
> Change-Id: Iac42ca4aecb6a204601c9f00bfb300e3eda3c4f4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306181
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42108}

Bug: none
Change-Id: I927260353afb91df6c7650364baee4f13a098efd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347883
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Owners-Override: Philip Eliasson <philipel@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42111}
2024-04-18 13:06:36 +00:00
philipel
42f12d5183 New video encoder API.
Also initial implementation wrapping the libaom AV1 encoder.

Note that for now this is intended for prototype purposes.

Bug: none
Change-Id: Iac42ca4aecb6a204601c9f00bfb300e3eda3c4f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306181
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42108}
2024-04-18 08:24:18 +00:00
Qiu Jianlin
9c95a4f704 Helper API for codec factories to calculate supported H.265 levels.
This expose a new GetSupportedH265Level API for WebRTC external
factories to calculate H.265 levels to be use for SDP negotation.

Bug: webrtc:13485
Change-Id: Ib420da2b9b1b7af00129294be5b3efec172e8faf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345544
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42079}
2024-04-16 09:23:58 +00:00
Danil Chapovalov
bdfcaba85b Propagate field trials to VideoEncoderSoftwareFallbackWrapper with Environment
Bug: webrtc:15860
Change-Id: Ief6a2eeab1713a371bc0350f6bdb5a18fb01945b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345660
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42051}
2024-04-12 12:47:10 +00:00
Danil Chapovalov
4dfe7ea5af Delete legacy VideoEncoderFactory::CreateVideoEncoder
Bug: webrtc:15860
Change-Id: I892aeba67a4ea3be6d6551ff2dc88faaca0c7bd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342940
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42033}
2024-04-10 17:11:34 +00:00
Johannes Kron
82598402e0 Use predefined SdpVideoFormats when returning supported formats
The predefined SdpVideoFormats were not used everywhere,
which caused a discrepancy between send/receive capabilities
for AV1. This CL solves the immediate problems by making sure
send/receive capabilities for AV1 are reported the same way.

Fixed: chromium:331565934
Change-Id: I073091b7b5f987c7f434c17276fd84047ec723c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344681
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41991}
2024-04-03 15:13:11 +00:00
Danil Chapovalov
71566bc802 In VideoEncoderFactoryTemplate pass webrtc::Environment to individual traits
Bug: webrtc:15860
Change-Id: I8727491e60247433db4753678c69d16b8a1d5a72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343781
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41990}
2024-04-03 15:07:42 +00:00
Danil Chapovalov
c03827db1b Cleanup SimulcastEncoderAdapter - require webrtc::Environment at construction time
Bug: webrtc:15860
Change-Id: I1a786fb4b04112197e49c883884fc4b30f8d13f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343182
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41937}
2024-03-21 11:05:32 +00:00
Danil Chapovalov
dd28f1364b In VideoEncoderFactoryTemplate pass webrtc::Environment to individual traits when supported
Bug: webrtc:15860
Change-Id: I022887e57855c072ddfb0edaf37cd96e9fc64ea6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342981
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41909}
2024-03-15 15:23:51 +00:00
Per K
0fa90887c5 Deprecate VideoFrame::timestamp() and set_timestamp
Instead, add rtp_timestamp and set_rtp_timestamp.

Bug: webrtc:13756
Change-Id: Ic4266394003e0d49e525d71f4d830f5e518299cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342781
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41894}
2024-03-13 11:08:37 +00:00
Danil Chapovalov
2725317b1f Propagate Environment through SimulcastEncoderAdapter when provided
Bug: webrtc:15860
Change-Id: Iabd7752ada2f8f774de1e2adc02a4157004bf43c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342720
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41893}
2024-03-13 10:32:31 +00:00
Harald Alvestrand
afaae4e38a Remove remaining .cc files from rtc_media_base
Also remove all dependencies on rtc_media_base except for a few
that are suspected of being linker directives.

Bug: webrtc:14775
Change-Id: Ic0daf88b5422047d3ed7079ee6af9e689853310c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341461
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41886}
2024-03-12 14:09:38 +00:00
Keiichi Enomoto
a70274a82f Remove duplicated parentheses from deprecated attribute
These lines cause an error when building a project with libwebrtc as a dependency in Microsoft Visual Studio.

Bug: webrtc:15864
Change-Id: I1abfe257d0ea1c16c4c5b718594e8085036f7763
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342320
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41881}
2024-03-12 10:58:59 +00:00
Jeremy Leconte
83d29d5988 Remove GetScalabilityMode2.
Change-Id: Ibe3162dbcaca31c3c22df0fdc8fe55b78ad7990b
Bug: b/327381318
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342400
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41878}
2024-03-12 09:20:48 +00:00
Danil Chapovalov
9a9f6a8441 Add VideoEncoderFactory::Create to pass Environment for VideoEncoder construction
Bug: webrtc:15860
Change-Id: I6197780aaaa9c29717cb94df5790645b674c3bc2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41873}
2024-03-08 11:46:39 +00:00
Jeremy Leconte
51f98ccb5d Prepare the removal of GetScalabilityMode2.
Change-Id: I4b41fd1faee0e27b2b05842d7825b6b0785735ec
Bug: b/327381318
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341600
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#41870}
2024-03-07 17:57:16 +00:00
Danil Chapovalov
38c1ab1e6c Delete CreateVideoDecoder from VideoDecoderFactory interface
Instead require Create to be implemented

Bug: webrtc:15791
Change-Id: I17477b5f047d86b6a05bda594c66d20f8f43a2c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340480
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41857}
2024-03-04 16:05:51 +00:00
Jeremy Leconte
3afa1b2ce8 Add a SimulcastStream::GetScalabilityMode2 method that returns an optional.
A call to GetScalabilityMode was added for logging purpose and causes an expectation failure for tests using 4 temporal layers.
Plan is to remove the old GetScalabilityMode and keep only the one that returns an optional.

Change-Id: I0e37a496bb621d9754d6572ef5838b58193aa183
Bug: b/327381318
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341520
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#41838}
2024-02-28 17:38:46 +00:00
Philipp Hancke
bbff58d935 Introduce "well-known" SdpVideoFormat codecs
describing video codecs with their parameters as static members of SdpVideoFormat:
  static const SdpVideoFormat VP8();
  static const SdpVideoFormat H264();
  static const SdpVideoFormat VP9Profile0();
  static const SdpVideoFormat VP9Profile1();
  static const SdpVideoFormat VP9Profile2();
  static const SdpVideoFormat VP9Profile3();
  static const SdpVideoFormat AV1Profile0();
  static const SdpVideoFormat AV1Profile1();
This removes the need to craft instances of these by hand.

BUG=webrtc:15703

Change-Id: I2171e08b48ec98f18424f53f3b5d6d148130532e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337441
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41833}
2024-02-28 06:57:10 +00:00
Markus Handell
97df932ecc Remove multiplex codec.
The feature isn't in use by Google and has proven to contain security
issues. It's time to remove it.

Bug: b/324864439
Change-Id: I80344eb2f2060469d2d69a54dc4519fdd02ab4ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340324
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41808}
2024-02-26 11:26:04 +00:00
Danil Chapovalov
9cd5c3f48e Pass webrtc::Environment through VideoDecoderFactoryTemplate::Create
Bug: webrtc:15791
Change-Id: Ia648995b7edd53a59f64afde0d74994b68524d39
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340142
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41783}
2024-02-22 10:03:20 +00:00
Danil Chapovalov
fa01e3fdc0 Delete deprecated variant of the VideoDecoderSoftwareFallbackWrapper without Environment
Bug: webrtc:15791
Change-Id: I8efa1eb7a8393f322f5adaa7c62d8f6bb7d090a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340061
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41779}
2024-02-21 12:21:31 +00:00
Danil Chapovalov
56d3cf0c6d Make VideoDecoderFactory::CreateVideoDecoder private
To ensure CreateVideoDecoder is only used as a fallback when Create is not implemented,
and thus make it safer to migrate VideoDecoderFactory implementations to Create.

Bug: webrtc:15791
Change-Id: Ifb15cf1d303348949ba51a3bb4c91b855a06627f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339841
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41777}
2024-02-21 11:07:04 +00:00
Philipp Hancke
bc9af41e8f Sync definitions of IsSameCodecSpecific
until the code duplication can be removed which requires breaking
up the circular dependency.

BUG=webrtc:15847

Change-Id: Icc5f27dfcda26b1fcf16b19f79005d8b52fb6af3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339903
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41771}
2024-02-20 14:27:28 +00:00
Danil Chapovalov
d99da2c5f8 Allow to use propagated field trials in VideoDecoderSoftwareFallbackWrapper
Bug: webrtc:15791
Change-Id: Ida5e1c6f46e5aa9530af441b345abb80d2a5349e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339862
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41760}
2024-02-19 12:55:31 +00:00
Danil Chapovalov
b158537a4f Allow to propagate field trials into Vp8 Decoder
Bug: webrtc:15791
Change-Id: I0cd279006924c7a4859697b26a2271c3dc63ea6d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337400
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41741}
2024-02-15 10:36:05 +00:00
henrika
414c94290a Reland "Extends WebRTC logs for software encoder fallback"
This is a reland of commit 050ffefd85

Original change's description:
> Extends WebRTC logs for software encoder fallback
>
> This CL extends logging related to HW->SW fallbacks on the encoder
> side in WebRTC. The goal is to make it easier to track down the
> different steps taken when setting up the video encoder and why/when
> HW encoding fails.
>
> Current logs are added on several lines which makes regexp searching
> difficult. This CL adds all related information on one line instead.
>
> Three new search tags are also added VSE (VideoStreamEncoder), VESFW
> (VideoEncoderSoftwareFallbackWrapper) and SEA (SimulcastEncoderAdapter). The idea is to allow searching for the tags to see correlated logs.
>
> It has been verified that these added logs also show up in WebRTC
> logs in Meet.
>
> Logs from the GPU process are not included due to the sandboxed
> nature which makes it much more complex to add to the native
> WebRTC log. I think that these simple logs will provide value as is.
>
> Example: https://gist.github.com/henrik-and/41946f7f0b10774241bd14d7687f770b
>
> Bug: b/322132132
> Change-Id: Iec58c9741a9dd6bab3236a88e9a6e45440f5d980
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339260
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41733}

NOTRY=true

Bug: b/322132132
Change-Id: I25dd34b9ba59ea8502e47b4c89cd111430636e08
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339680
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41736}
2024-02-14 17:15:29 +00:00
Mirko Bonadei
23c32da48a Revert "Extends WebRTC logs for software encoder fallback"
This reverts commit 050ffefd85.

Reason for revert: Breaks downstream project.

Original change's description:
> Extends WebRTC logs for software encoder fallback
>
> This CL extends logging related to HW->SW fallbacks on the encoder
> side in WebRTC. The goal is to make it easier to track down the
> different steps taken when setting up the video encoder and why/when
> HW encoding fails.
>
> Current logs are added on several lines which makes regexp searching
> difficult. This CL adds all related information on one line instead.
>
> Three new search tags are also added VSE (VideoStreamEncoder), VESFW
> (VideoEncoderSoftwareFallbackWrapper) and SEA (SimulcastEncoderAdapter). The idea is to allow searching for the tags to see correlated logs.
>
> It has been verified that these added logs also show up in WebRTC
> logs in Meet.
>
> Logs from the GPU process are not included due to the sandboxed
> nature which makes it much more complex to add to the native
> WebRTC log. I think that these simple logs will provide value as is.
>
> Example: https://gist.github.com/henrik-and/41946f7f0b10774241bd14d7687f770b
>
> Bug: b/322132132
> Change-Id: Iec58c9741a9dd6bab3236a88e9a6e45440f5d980
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339260
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41733}

Bug: b/322132132
Change-Id: I24d0a4e71a43ac192485f1af208563a51d919865
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339661
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41735}
2024-02-14 13:45:39 +00:00
henrika
050ffefd85 Extends WebRTC logs for software encoder fallback
This CL extends logging related to HW->SW fallbacks on the encoder
side in WebRTC. The goal is to make it easier to track down the
different steps taken when setting up the video encoder and why/when
HW encoding fails.

Current logs are added on several lines which makes regexp searching
difficult. This CL adds all related information on one line instead.

Three new search tags are also added VSE (VideoStreamEncoder), VESFW
(VideoEncoderSoftwareFallbackWrapper) and SEA (SimulcastEncoderAdapter). The idea is to allow searching for the tags to see correlated logs.

It has been verified that these added logs also show up in WebRTC
logs in Meet.

Logs from the GPU process are not included due to the sandboxed
nature which makes it much more complex to add to the native
WebRTC log. I think that these simple logs will provide value as is.

Example: https://gist.github.com/henrik-and/41946f7f0b10774241bd14d7687f770b

Bug: b/322132132
Change-Id: Iec58c9741a9dd6bab3236a88e9a6e45440f5d980
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339260
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41733}
2024-02-14 12:29:55 +00:00
Philipp Hancke
6de9d6add0 Add default AV1 parameters to SdpVideoFormat comparison
BUG=webrtc:15703

Change-Id: Ib3195b61b27c38a27d851119cdbf55c679b839c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337540
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41681}
2024-02-07 08:15:52 +00:00
Philipp Hancke
c1cc6a36b2 sdp: backfill default codec parameters for AV1
as required by
  https://aomediacodec.github.io/av1-rtp-spec/#72-sdp-parameters
Also unify usage of profile fmtp parameter. Most notably this causes
SDP answers to include the default values.

These default values correspond to libaom's default values for AV1E_SET_TARGET_SEQ_LEVEL_IDX, AV1E_SET_TIER_MASK as used in
https://source.chromium.org/chromium/chromium/src/+/main:third_party/libaom/source/libaom/aom/aomcx.h
and g_profile in aom_codec_enc_cfg
https://source.chromium.org/chromium/chromium/src/+/main:third_party/libaom/source/libaom/aom/aom_encoder.h;l=415;drc=b58207f5aecc39db7d3da766e7d171e5d2c3598e

Note: AV1 is inconsistently cased in variable/struct/method/class names. The canonical casing should probably be "Av1" since it is an acronym standing for "AOMedia Video 1".

BUG=webrtc:15703

Change-Id: I11864b7666fea906cd1a0759c7ad45997beab90e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331360
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41654}
2024-02-01 13:11:09 +00:00
Danil Chapovalov
c708c00f95 Add VideoDecoderFactory function to pass Environment for VideoDecoder construction
Bug: webrtc:15791
Change-Id: I3fa962ae13d8b36092a5b910f1ce6e946689daea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335680
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41600}
2024-01-23 09:26:36 +00:00
Alfred E. Heggestad
b330a79559 video_codecs: fix h265_profile line-endings
Bug: None
Change-Id: I6e1cf7139e0a86ce3690f2480622199e05bc204a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333802
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41499}
2024-01-10 12:46:30 +00:00
Philipp Hancke
de17252e8e Reland "Unify access to SDP codec parameters"
This is a reland of commit 63d03f586b

Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
>   std::map<std::string, std:string>
> with three aliases,
>   cricket::CodecParameterMap
>   SdpAudioFormat::Parameters
>   SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}

Bug: None
Change-Id: I5f8f45688df232eb37b12fa3e56a893a1c754e17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331402
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41467}
2024-01-03 12:03:11 +00:00
Mirko Bonadei
6c9c958c69 Revert "Unify access to SDP codec parameters"
This reverts commit 63d03f586b.

Reason for revert: Breaks downstream project (not backwards compatible API change)

Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
>   std::map<std::string, std:string>
> with three aliases,
>   cricket::CodecParameterMap
>   SdpAudioFormat::Parameters
>   SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}

Bug: None
Change-Id: I841735d98533d3b66850b9cfcf7ee0a99ddde078
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331400
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41377}
2023-12-13 16:28:44 +00:00
Philipp Hancke
63d03f586b Unify access to SDP codec parameters
which come from the a=fmtp:<pt> lines in the SDP and were used as either
  std::map<std::string, std:string>
with three aliases,
  cricket::CodecParameterMap
  SdpAudioFormat::Parameters
  SdpVideoFormat::Parameters

Use webrtc::CodecParameterMap in all places.

BUG=None

Change-Id: If47692bde7347834c349c6539b43309d8770e67b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41375}
2023-12-13 14:22:15 +00:00
Qiu Jianlin
b3488d08db Add SDP negotiation support for HEVC.
This adds neccessary checks for SDP negotiation with HEVC.

Test: Manually apply the CL on Chromium and enable HEVC HW encoder,
and add HEVC profiles in rtc video decoder/encoder factory, H265 is
negotiated in SDP with correct FMTP lines added.

Bug: webrtc:13485
Change-Id: I5557b20b646cc96c5acb578521204fe10df0dcf0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330202
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Cr-Commit-Position: refs/heads/main@{#41357}
2023-12-12 02:09:11 +00:00
qwu16
ae82df718c Add codec name H265 to support H265 in WebRTC
Bug: webrtc:13485
Change-Id: I352b15a65867f0d56fc8e9a9e03081bd3258108e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316283
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40773}
2023-09-20 09:25:32 +00:00
philipel
31718d7ce2 Reland "Add option to disable quality scaling for AV1."
This reverts commit 83102d3907.

Reason for revert: reland with fix

Original change's description:
> Revert "Add option to disable quality scaling for AV1."
>
> This reverts commit 446dbc66fd.
>
> Reason for revert: downstream break
>
> Original change's description:
> > Add option to disable quality scaling for AV1.
> >
> > The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
> >
> > Bug: b/295129711
> > Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40709}
>
> Bug: b/295129711
> Change-Id: Iaeb13951d1b839bc0426120436035843bb3ee98f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320081
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Owners-Override: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40742}

Bug: b/295129711
Change-Id: Iab4846c2cd6074f50a3ebe9551432d449243b5d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320120
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40743}
2023-09-13 15:19:36 +00:00
Philip Eliasson
83102d3907 Revert "Add option to disable quality scaling for AV1."
This reverts commit 446dbc66fd.

Reason for revert: downstream break

Original change's description:
> Add option to disable quality scaling for AV1.
>
> The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
>
> Bug: b/295129711
> Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40709}

Bug: b/295129711
Change-Id: Iaeb13951d1b839bc0426120436035843bb3ee98f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320081
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Owners-Override: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40742}
2023-09-13 12:21:31 +00:00
philipel
46bbf7ec48 Add ScalabilityModeStringToEnum helper function.
Bug: none
Change-Id: Iea602c88afbfe1f8f8e94b353eda96d62b651bd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319882
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40732}
2023-09-11 17:04:27 +00:00
philipel
446dbc66fd Add option to disable quality scaling for AV1.
The main goal of this change is to disable the quality scaler when multiple spatial layers are used.

Bug: b/295129711
Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40709}
2023-09-06 12:37:22 +00:00
Tony Herre
55b593fb6b Remove EncodedFrame::MissingFrame and start removing Decode() param
Remove EncodedFrame::MissingFrame, as it was always false in actual
in-use code anyway, and remove usages of the Decode missing_frames param
within WebRTC. Uses/overrides in other projects will be cleaned up
shortly, allowing that variant to be removed from the interface.

Bug: webrtc:15444
Change-Id: Id299d82e441a351deff81c0f2812707a985d23d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317802
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40662}
2023-08-30 10:38:35 +00:00