Reland "Distinguish between send and receive codecs"

This reverts commit 8e8b36a94a7a7a1fd0f8093979a406afa56e18c1.

Reason for revert: The CL has been improved with the following changes,
  - Fixed negotiation of send/receive only clients.
  - Handles the implicit assumption that any H264 decoder also can
    decode H264 constraint baseline.

Original change's description:
> Distinguish between send and receive codecs
>
> Even though send and receive codecs may be the same, they might have
> different support in HW. Distinguish between send and receive codecs
> to be able to keep track of which codecs have HW support.
>
> Bug: chromium:1029737
> Change-Id: Id119560becadfe0aaf861c892a6485f1c2eb378d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165763
> Commit-Queue: Johannes Kron <kron@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30284}

Change-Id: I834ed48ee78d04922c73e2836165e476925e1cc5
Bug: chromium:1029737
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168605
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30932}
This commit is contained in:
Johannes Kron
2020-03-29 22:17:00 +02:00
committed by Commit Bot
parent 8e1824a0d1
commit 3e98368ec5
29 changed files with 956 additions and 349 deletions

View File

@ -16,7 +16,6 @@
#include "absl/types/optional.h"
#include "api/video_codecs/sdp_video_format.h"
#include "media/base/h264_profile_level_id.h"
#include "media/base/media_constants.h"
#if defined(WEBRTC_USE_H264)
@ -44,6 +43,8 @@ bool IsH264CodecSupported() {
#endif
}
} // namespace
SdpVideoFormat CreateH264Format(H264::Profile profile,
H264::Level level,
const std::string& packetization_mode) {
@ -57,8 +58,6 @@ SdpVideoFormat CreateH264Format(H264::Profile profile,
{cricket::kH264FmtpPacketizationMode, packetization_mode}});
}
} // namespace
void DisableRtcUseH264() {
#if defined(WEBRTC_USE_H264)
g_rtc_use_h264 = false;

View File

@ -13,9 +13,11 @@
#define MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_
#include <memory>
#include <string>
#include <vector>
#include "media/base/codec.h"
#include "media/base/h264_profile_level_id.h"
#include "modules/video_coding/include/video_codec_interface.h"
#include "rtc_base/system/rtc_export.h"
@ -23,6 +25,12 @@ namespace webrtc {
struct SdpVideoFormat;
// Creates an H264 SdpVideoFormat entry with specified paramters.
RTC_EXPORT SdpVideoFormat
CreateH264Format(H264::Profile profile,
H264::Level level,
const std::string& packetization_mode);
// Set to disable the H.264 encoder/decoder implementations that are provided if
// |rtc_use_h264| build flag is true (if false, this function does nothing).
// This function should only be called before or during WebRTC initialization