Commit graph

19 commits

Author SHA1 Message Date
philipel
d44badf409 Always include the actual decoder implementation when RTCVideoDecoderAV1 is used.
Bug: webrtc:13573, b/236814111
Change-Id: I053fcec3d85fdc9f8d3b72af1735b4091ec5f7c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37418}
2022-07-04 12:27:02 +00:00
Philip Eliasson
91c05abd9b Always include the actual encoder implementation when RTCVideoEncoderAV1 is used.
Bug: webrtc:13573, b/236813931
Change-Id: I943ce51dac23bcbd6efe10413cfa9478f4ce6f55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266485
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37352}
2022-06-28 10:28:03 +00:00
philipel
4eab9f47a5 Make the libaom AV1 encoder optional in RTCDefaultVideoEncoderFactory.
This is a partial revert of: https://webrtc-review.googlesource.com/c/src/+/262814

skip_shebang_check=True

bug: webrtc:13573
Change-Id: I08282df91446efa79ca86cc8dfe3b6daeb4eec9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264543
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37074}
2022-06-01 10:54:55 +00:00
philipel
09a2848351 Remove LibaomAv1EncoderIfSupported
Bug: webrtc:13573
Change-Id: Ia9a6d1809488d92753527350a61f0a46159ccd8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262814
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37033}
2022-05-30 09:56:54 +00:00
Artem Titov
63ee39d0be Revert "Add a prefix for objc category."
This reverts commit 181ea6e414.

Reason for revert: Breaks downstream project. Kári will help to land it next week.

Original change's description:
> Add a prefix for objc category.
>
> According to the Google Objective-C style [1], category names should
> start with an appropriate prefix. WebRTC has some category definitions
> for system interfaces, but it doesn't use prefixes.
>
> $ otool -ov WebRTC.framework/WebRTC | grep -E "^[0-9a-z]{16} 0x[0-9a-z]+ __OBJC_._CATEGORY" | grep -v "_RTC"
> 0000000002160840 0x217c3c0 __OBJC_$_CATEGORY_UIDevice_$_H264Profile
> 0000000002160850 0x21808b8 __OBJC_$_CATEGORY_AVCaptureSession_$_DevicePosition
> 0000000002160858 0x2180968 __OBJC_$_CATEGORY_NSString_$_StdString
> 0000000002160860 0x21809c8 __OBJC_$_CATEGORY_NSString_$_AbslStringView
>
> To avoid conflicts, prefix the names and methods of those categories.
> Also remove sdk/objc/Framework/Classes/Common/NSString+StdString.h as
> it is not used by any other files.
>
> [1] https://google.github.io/styleguide/objcguide.html#category-naming
>
> Bug: webrtc:13884
> Change-Id: I2cf2742af198ab4e0bfb15c0476d72971e50ceee
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262341
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36880}

Bug: webrtc:13884
Change-Id: I85257088e4a3a62e01ff925ab5e77af83b078ef3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262420
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Auto-Submit: Artem Titov <titovartem@webrtc.org>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36885}
2022-05-13 14:47:54 +00:00
Byoungchan Lee
181ea6e414 Add a prefix for objc category.
According to the Google Objective-C style [1], category names should
start with an appropriate prefix. WebRTC has some category definitions
for system interfaces, but it doesn't use prefixes.

$ otool -ov WebRTC.framework/WebRTC | grep -E "^[0-9a-z]{16} 0x[0-9a-z]+ __OBJC_._CATEGORY" | grep -v "_RTC"
0000000002160840 0x217c3c0 __OBJC_$_CATEGORY_UIDevice_$_H264Profile
0000000002160850 0x21808b8 __OBJC_$_CATEGORY_AVCaptureSession_$_DevicePosition
0000000002160858 0x2180968 __OBJC_$_CATEGORY_NSString_$_StdString
0000000002160860 0x21809c8 __OBJC_$_CATEGORY_NSString_$_AbslStringView

To avoid conflicts, prefix the names and methods of those categories.
Also remove sdk/objc/Framework/Classes/Common/NSString+StdString.h as
it is not used by any other files.

[1] https://google.github.io/styleguide/objcguide.html#category-naming

Bug: webrtc:13884
Change-Id: I2cf2742af198ab4e0bfb15c0476d72971e50ceee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262341
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36880}
2022-05-13 13:20:34 +00:00
philipel
95701503f2 Make libaom_av1_encoder always build the libaom encoder.
Currently `CreateLibaomAv1Encoder` will either return an actual libaom AV1 encoder or a nullptr depening on whether the build flag `enable_libaom` was configured to true or not. This CL updates the `libaom_av1_encoder` build target to no longer depend on `enable_libaom` so that `CreateLibaomAv1Encoder` will always return an encoder instance.

Added `CreateLibaomAv1EncoderIfSupported` as a replacement to the old `CreateLibaomAv1Encoder`.

Bug: webrtc:13573
Change-Id: Ibdcd52c609acd79feefa2b86f19d1b4ca3e91d0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242360
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35763}
2022-01-21 13:45:47 +00:00
Artem Titov
d3251968d1 Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.

Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
2021-11-15 21:44:59 +00:00
Peter Hanspers
7f854bce1f Add supportsNativeHandle to the RTCVideoEncoder protocol.
The simulcast_encoder_adapter expects codecs that specify
supports_native_handle to perform resampling/scaling (through
GetEncoderInfo).
This change adds a method to the RTCVideoEncoder to let objc encoders
specify this rather than relying on the default.

Bug: webrtc:13044
Change-Id: I2efcbd42aa4f2048285f451c7b691fdeca111e62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227641
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34683}
2021-08-09 15:21:52 +00:00
Peter Hanspers
5981bf2eb6 Add resolution alignment properties to RTCVideoEncoder protocol.
With this change, RTCVideoEncoder can specify:
- requested_resolution_alignment,
- apply_alignment_to_all_simulcast_layers
in the same way scaling_settings is specified.

Change-Id: I3de79a2eabaae581d6a9f2ef3e39496b9545a4f5

Bug: webrtc:12829
Change-Id: I3de79a2eabaae581d6a9f2ef3e39496b9545a4f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220933
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Abby Yeh <abbyyeh@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34196}
2021-06-02 09:30:06 +00:00
Yura Yaroshevich
8cfb287735 Add AV1 encoder&decoder wrappers for iOS SDK.
It is now possible to use AV1 encoder and decoder on iOS and test
them in apps like AppRTCMobile.

Bug: None
Change-Id: Ifae221020e5abf3809010676862eecd9ffeec5e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208400
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33378}
2021-03-03 20:08:17 +00:00
Mirko Bonadei
5923083657 RTC_OBJC_TYPE RTCWrappedNativeVideo{Decoder,Encoder}.
Some versionss of WebKit.framework export these symbols. Even if they
are private symbols, WebRTC needs to provide a way to prefix them like
the OBJC API symbols (see [1]).

[1] - https://webrtc-review.googlesource.com/c/src/+/173781

Bug: None
Change-Id: Ibb9ca2c89796a0d5e2ca65c549ba8799f24bbe7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182421
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31987}
2020-08-25 08:58:29 +00:00
Mirko Bonadei
a81e9c82fc Wrap WebRTC OBJC API types with RTC_OBJC_TYPE.
This CL introduced 2 new macros that affect the WebRTC OBJC API symbols:

- RTC_OBJC_TYPE_PREFIX:
  Macro used to prepend a prefix to the API types that are exported with
  RTC_OBJC_EXPORT.

  Clients can patch the definition of this macro locally and build
  WebRTC.framework with their own prefix in case symbol clashing is a
  problem.

  This macro must only be defined by changing the value in
  sdk/objc/base/RTCMacros.h  and not on via compiler flag to ensure
  it has a unique value.

- RCT_OBJC_TYPE:
  Macro used internally to reference API types. Declaring an API type
  without using this macro will not include the declared type in the
  set of types that will be affected by the configurable
  RTC_OBJC_TYPE_PREFIX.

Manual changes:
https://webrtc-review.googlesource.com/c/src/+/173781/5..10

The auto-generated changes in PS#5 have been done with:
https://webrtc-review.googlesource.com/c/src/+/174061.

Bug: None
Change-Id: I0d54ca94db764fb3b6cb4365873f79e14cd879b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173781
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31153}
2020-05-04 15:01:26 +00:00
Kári Tristan Helgason
d4ea8c90cd Remove deprecated method from video decoder interface.
Bug: webrtc:9107
Change-Id: Ice022ff5887d27516eef38f9a0db7391c8acbaef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133905
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27732}
2019-04-24 09:18:35 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Mirko Bonadei
e8d5724cc5 Rename RTC_EXPORT to RTC_OBJC_EXPORT.
A new version of RTC_EXPORT will be introduced by [1] and it will be
used by WebRTC native code.

This CL renames the current RTC_EXPORT to RTC_OBJC_EXPORT in order
to avoid to mix them. It has been decided to avoid to unify them because
RTC_OBJC_EXPORT always marks symbols with default visibility, while
RTC_EXPORT will do it only when COMPONENT_BUILD is defined.

[1] - https://webrtc-review.googlesource.com/c/src/+/97960 is

Bug: webrtc:9419
Change-Id: I56a3fc6601c72d3ad6a58f9961a00e3761dfb5da
Reviewed-on: https://webrtc-review.googlesource.com/100521
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24754}
2018-09-17 10:06:57 +00:00
Anders Carlsson
2ac2739d06 Scaling settings nullability in Obj-C SDK.
This method is allowed to return nil but was not annotated as such.

Bug: webrtc:8560
Change-Id: If54aa94d6ff83b7bdb87b526244616e2627a8999
Reviewed-on: https://webrtc-review.googlesource.com/97380
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24568}
2018-09-05 08:51:12 +00:00
Anders Carlsson
4e5af96606 Include i420 buffers in Obj-C framework again.
These headers was lost in the cleanup CL for the Obj-C directories. This
puts them back in the framework headers.

Note that since the protocol and interface was split into two different
headers, and all public framework headers are put into a flat directory
structure, I had to rename the implementation files so they would not collide
in the framework header directory.

Bug: webrtc:9701
Change-Id: I42d4c1e02bdfa4e114575f527c4c42a19be8fb52
Reviewed-on: https://webrtc-review.googlesource.com/97330
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24539}
2018-09-03 15:06:18 +00:00
Anders Carlsson
7bca8ca4e2 Obj-C SDK Cleanup
This CL separates the files under sdk/objc into logical directories, replacing
the previous file layout under Framework/.

A long term goal is to have some system set up to generate the files under
sdk/objc/api (the PeerConnection API wrappers) from the C++ code. In the shorter
term the goal is to abstract out shared concepts from these classes in order to
make them as uniform as possible.

The separation into base/, components/, and helpers/ are to differentiate between
the base layer's common protocols, various utilities and the actual platform
specific components.

The old directory layout that resembled a framework's internal layout is not
necessary, since it is generated by the framework target when building it.

Bug: webrtc:9627
Change-Id: Ib084fd83f050ae980649ca99e841f4fb0580bd8f
Reviewed-on: https://webrtc-review.googlesource.com/94142
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24493}
2018-08-30 10:42:41 +00:00