423 Commits

Author SHA1 Message Date
Evan Shrubsole
0ebd67f89d Move string_builder.h to webrtc namespace
Bug: webrtc:42232595
Change-Id: Iad12b11767c3bbaddcf0e87357e8e6037608defb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/377740
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43926}
2025-02-19 06:30:53 -08:00
Evan Shrubsole
f052c432fe Move string_to_number.h to webrtc namespace
Bug: webrtc:42232595
Change-Id: I104cff12bf40509fb4554b98f7af16975263285a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/377520
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43911}
2025-02-18 01:44:39 -08:00
Henrik Boström
6b7099527a VideoEncoder: rtc::StringBuilder instead of rtc::SimpleStringBuilder.
Whenever encoding info change, this ToString() method is called for some
LS_INFO logging inside video_stream_encoder.cc. Apparently the char
buffer used for constructing this string is not large enough because I
can get WebRTC to crash in a demo page that gets and sets a lot of
parameters.

By changing to rtc::StringBuilder, we don't have to make assumptions
about how long the string can get at runtime.

Bug: None
Change-Id: I32695523282143a301c0e13e06082d55bd2796b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375520
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43805}
2025-01-27 06:14:00 -08:00
Boris Tsirkin
932e361a94 Format /api folder
At Meta, we have formatted the repo according to WebRTC .clang-format
file. Currently, those changes are stored as patch and we'd like to
apply them to the base WebRTC release instead.

I will be submitting CLs per folder. The plan is to format all h|cc|mm|m
files, while exlcuding Matlab files from the formatter as clang
misinterprets them as ObjC.

Formatting done via:

git ls-files | grep -E '^api\/.*\.(h|cc)' | xargs clang-format -i

No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I4d7470104983d5d32612f9347301354265fb34c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373520
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43671}
2025-01-07 18:41:45 -08:00
Harald Alvestrand
882b32d00f Reland "Use PayloadTypePicker for video PT assignment"
This reverts commit e046787a5a80a9d292b3aec7e946644e025a2b95.

Reason for revert: Revised codec matching to fix issue.

Changes also back out some changes that should not have been
included (using PayloadTypePicker for codec list merging).

Original change's description:
> Revert "Use PayloadTypePicker for video PT assignment"
>
> This reverts commit e5048949b0fcc275264e24f3b2a4c658fcc84aa3.
>
> Reason for revert: Broke internal tests.
>
> Original change's description:
> > Use PayloadTypePicker for video PT assignment
> >
> > This includes changes that change the order of codecs.
> > It is preparatory to doing late assignment of video PTs.
> >
> > Bug: webrtc:360058654
> > Change-Id: Id5ddaf94d4b9557c0502a373e42635108d8fdf26
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366400
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#43489}
>
> Bug: webrtc:360058654
> Change-Id: I5c94a7bafa49bdf17f665480398707155e458d26
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370240
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43490}

Bug: webrtc:360058654
Change-Id: I66b3b6bd657c66f8860c5e67a504266d7707f48d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370380
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43554}
2024-12-12 16:37:30 -08:00
Evan Shrubsole
7589689774 Replace cricket::LeastCommonMultiple and cricket::GreatestCommonDivisor with std::lcm and std::gcd.
The std::lcm and std::gcd functions are part of the C++ standard
library. The existing functions are marked as deprecated rather than
deleted in the case of possible third party uses.

#rtc_cleanup

Bug: webrtc:377205743
Change-Id: I174e663f152d750c984a35dc7136bc18dc01bc8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367440
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@google.com>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43368}
2024-11-07 13:30:28 +00:00
Dor Hen
b52416eccf Comment unused variables in implemented functions 8\n
Bug: webrtc:370878648
Change-Id: If66e079ff5e455b5c3c483c4c42ef7b38bd34307
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366262
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43316}
2024-10-28 12:05:18 +00:00
Dor Hen
90c67e7729 Comment unused variables in implemented functions 7\n
Bug: webrtc:370878648
Change-Id: Id0a2c73b7055267de93d5301bd73e6212cf64794
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366261
Commit-Queue: Dor Hen <dorhen@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43315}
2024-10-28 12:04:15 +00:00
Tom Sepez
7085a884aa Avoid string duplication when returning StringBuilder strings
The const-ref result of .str() must be copied into the returned
value, whereas the result of .Release() can be moved.

Bug: webrtc:374845009
Change-Id: I3abc98be30ce9947127c7664f5ffa6846b772ea2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366480
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43288}
2024-10-23 07:54:18 +00:00
Dor Hen
ca07d54192 Comment unused variables in implemented functions 4\n
Bug: webrtc:370878648
Change-Id: I32d472174ce4f9f31b829ea89a82a003d333d2b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364539
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#43279}
2024-10-22 11:59:50 +00:00
Dor Hen
049b43bd02 [reland] Comment unused variables in implemented functions
Compiling webrtc with `-Werror=unused-parameters` is failling duo to
those parameters.
Also, it shouldn't harm us to put those in comment for code readability as
well.

NOTE: This time I made sure to iterate over the C files in the
audio_processing folder and compile them using gcc.
On the original CL that was reverted - that failed with the same error
Danil mentioned. This time it seems fine.
I'll make sure to run the same script on the rest of my CLs for sanity

Bug: webrtc:370878648
Change-Id: I83cea3a08777e21d26a95bcad503a2d1b74566eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364537
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#43249}
2024-10-16 11:40:33 +00:00
Danil Chapovalov
678607501c Revert "Comment unused variables in implemented functions"
This reverts commit 05043e1cef47f33e81bc7ba83b4cc2c407111397.

Reason for revert: breaks compilation of .c files

Original change's description:
> Comment unused variables in implemented functions
>
> Compiling webrtc with `-Werror=unused-parameters` is failling duo to
> those parameters.
> Also, it shouldn't harm us to put those in comment for code readability as
> well.
>
> Bug: webrtc:370878648
> Change-Id: I0ab2eafd26e46312e4595f302b92006c9e23d5d2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364340
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43157}

Bug: webrtc:370878648
Change-Id: I4ea50baa2c3d0d162759c8255171e95c6199ed26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364580
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Owners-Override: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43162}
2024-10-03 11:51:29 +00:00
Dor Hen
05043e1cef Comment unused variables in implemented functions
Compiling webrtc with `-Werror=unused-parameters` is failling duo to
those parameters.
Also, it shouldn't harm us to put those in comment for code readability as
well.

Bug: webrtc:370878648
Change-Id: I0ab2eafd26e46312e4595f302b92006c9e23d5d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364340
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43157}
2024-10-03 10:36:46 +00:00
Mirko Bonadei
084f1ae4bb Revert "Disable LibaomAv1Encoder tests to unblock Chromium roll"
This reverts commit f8b3dab7c6320a9890f0b003b43d7099e2e00a5b.

Reason for revert: The fix landed in libaom (https://aomedia-review.googlesource.com/c/aom/+/193761) and it is now available in WebRTC (import CL: https://webrtc-review.googlesource.com/c/src/+/364126).

Original change's description:
> Disable LibaomAv1Encoder tests to unblock Chromium roll
>
> The tests exercise the new encoder API that is not used in prod yet.
>
> Bug: webrtc:369633254
> Change-Id: Iee6bc16ebd471f4accdd9531cdb404f159557f51
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363820
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43083}

Bug: webrtc:369633254
Change-Id: Ia02db32f7f09e3abc3d0a46605feeabd82673f06
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364281
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43120}
2024-10-01 07:36:44 +00:00
Sergey Silkin
f8b3dab7c6 Disable LibaomAv1Encoder tests to unblock Chromium roll
The tests exercise the new encoder API that is not used in prod yet.

Bug: webrtc:369633254
Change-Id: Iee6bc16ebd471f4accdd9531cdb404f159557f51
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363820
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43083}
2024-09-26 10:09:10 +00:00
Qiu Jianlin
6f90609fca Compare only profile & tier when matching HEVC codec.
Level asymmetry is implicitly enabled for HEVC. When comparing two
codec params to see if they match, we only compare profile & tier,
similar as H.264.

Bug: chromium:41480904
Change-Id: I9e9debdf1b34f33986da9344b9fee14071b1ed60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363205
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Cr-Commit-Position: refs/heads/main@{#43069}
2024-09-23 14:27:10 +00:00
Qiu Jianlin
295758848c Export scalability mode helper APIs.
This will help to reduce redundant ScalabilityMode to temporal layer
count mapping in blink.

Bug: chromium:40763991
Change-Id: Ida3e6abb91383e27465eb1b697ad9431935cf9ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362486
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Cr-Commit-Position: refs/heads/main@{#43031}
2024-09-17 11:58:08 +00:00
Ilya Nikolaevskiy
9f096a8707 Allow VideoEncoderSoftwareFallbackWrapper to return SIMULCAST_PARAMS_NOT_SUPPORTED
Now some HW encoders support simulcast. If parameters are not suitable for
single encoder simulcast, the error code should be forwarded back to
SimulcastEncoderAdapter instead of trying software fallback.

Bug: webrtc:347737882
Change-Id: Id02ff1afc012cd46761d9530b1ce368d5dc480bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361744
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42972}
2024-09-06 12:26:43 +00:00
Florent Castelli
8037fc6ffa Migrate absl::optional to std::optional
Bug: webrtc:342905193
No-Try: True
Change-Id: Icc968be43b8830038ea9a1f5f604307220457807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361021
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42911}
2024-09-02 12:16:47 +00:00
Christoffer Dewerin
a6fad74043 Add missing optional deps
Bug: webrtc:42226242
Change-Id: If09580139acb52b11ac4827f68aba46929cc5755
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360080
Commit-Queue: Christoffer Dewerin <jansson@google.com>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Auto-Submit: Christoffer Dewerin <jansson@google.com>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42813}
2024-08-20 14:50:36 +00:00
Dor Hen
d7d940ea59 Apply include-cleaner to api/video_codecs
Bug: webrtc:42226242
Change-Id: I7292811f782ec9a6710c84b1fc36e42ae7ea2c17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359840
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#42802}
2024-08-19 11:23:44 +00:00
Sergey Silkin
7a6053ae62 Rename minimum_qp to min_qp
For better consistency with the rest codebase (it is min_/max_ for all params in video_encoder.h; only qp is for some reason prefixed with minimum_).

Also fixed constant names in libaom AV1 encoder wrapper (moved min from suffix to prefix, minimum -> min_).

Bug: chromium:328598314
Change-Id: I6d8521a3abff3a0595a5241c02ef4746eb4694df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356600
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42604}
2024-07-08 15:37:23 +00:00
Johannes Kron
216cce5f49 Add minimum_qp to VideoEncoder::EncoderInfo
The minimum QP field will be used to signal what the QP value will be
once the encoder reach its target video quality. This will be used
in the generalized QP convergence detection.

Bug: chromium:328598314
Change-Id: I82299cd921e3c091e651218d1e3f337875176567
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355701
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Markus Handell <handellm@google.com>
Cr-Commit-Position: refs/heads/main@{#42559}
2024-06-28 10:48:22 +00:00
Artem Titov
eb3da2b1ec Extract video writing into separate target
Bug: None
Change-Id: I3af192606eb623e21a4d648fb69bb62c14ab8b0d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355560
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42541}
2024-06-26 12:47:15 +00:00
Hirokazu Honda
48ae22f631 Mark SimulcastStream RTC_EXPORT
Bug: b:320555128
Test: Build
Change-Id: Ia0a8b7a3e49c8791fe240b2ab38e4779c2af9f24
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351440
Commit-Queue: Hirokazu Honda <hiroh@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42434}
2024-06-05 08:31:14 +00:00
Florent Castelli
99c519b3fd Mass removal of absl_deps in all BUILD.gn files
Bug: webrtc:341803749
Change-Id: Id73844ba8d63b9f2f2c9391d8d8116ad0864c36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351540
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42372}
2024-05-23 15:09:46 +00:00
philipel
af0c18c594 Use absl::Cleanup to perform callbacks on encoding error.
Bug: b/336978562
Change-Id: I8cf9bbea5192fd470c02b7f40dafce00f199cada
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351040
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42357}
2024-05-21 09:07:02 +00:00
philipel
d194ec398b Add OutputFunctions to FrameEncodeSettings.
Bug: b/336978562
Change-Id: I9fe2d78368f4619532e64670fc9167ddfe253ffe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350920
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42350}
2024-05-20 15:32:44 +00:00
philipel
7518ae9ac9 Moved effort_level to FrameEncodeSettings.
Bug: b/336978562
Change-Id: Ie902b3ecc45939ae6bc5b61f8ff8a26b68c5d440
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350604
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42337}
2024-05-17 11:59:02 +00:00
Danil Chapovalov
fd89ff5d93 Provide Environment to SimulcastRateAllocator at construction
So that this class can use propagated field trials instead of the global

Bug: webrtc:42220378
Change-Id: Ic1dba0c4967735606904329f7e9e6c09f186b809
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350641
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42326}
2024-05-16 13:32:54 +00:00
philipel
7db2a85697 Add Performance::encode_on_calling_thread flag.
Bug: b/336978562
Change-Id: Id6edf45e80efb99ace46299ef36082f280cb8921
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350622
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42311}
2024-05-15 12:57:54 +00:00
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 56e63097498d0ad6fe2eca779b7df173cc6a0fca.

Reason for revert: Preparing for reland

Original change's description:
> Revert "New video encoder API."
>
> This reverts commit 42f12d5183016060dcddc0b515a53294853559fe.
>
> 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 42f12d5183016060dcddc0b515a53294853559fe.

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