Pass selected cricket::VideoCodec down to internal H264 encoder

Pass the selected cricket::VideoCodec to H264EncoderImpl::H264EncoderImpl. The cricket::VideoCodec contains relevant information for H264 about selected profile and packetization mode.

BUG=chromium:600254,webrtc:6402, webrtc:6337

Review-Url: https://codereview.webrtc.org/2474993002
Cr-Commit-Position: refs/heads/master@{#15270}
This commit is contained in:
magjed
2016-11-28 07:20:21 -08:00
committed by Commit bot
parent 20dce34578
commit ceecea4559
9 changed files with 14 additions and 17 deletions

View File

@ -44,7 +44,7 @@ bool IsH264CodecSupported() {
#endif
}
H264Encoder* H264Encoder::Create() {
H264Encoder* H264Encoder::Create(const cricket::VideoCodec& codec) {
RTC_DCHECK(H264Encoder::IsSupported());
#if defined(WEBRTC_USE_H264)
RTC_CHECK(g_rtc_use_h264);

View File

@ -12,16 +12,7 @@
#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_INCLUDE_H264_H_
#if defined(WEBRTC_IOS) || defined(WEBRTC_MAC)
#include <Availability.h>
#if defined(WEBRTC_IOS) || \
defined(__MAC_10_8) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_8
#define WEBRTC_VIDEO_TOOLBOX_SUPPORTED 1
#endif
#endif // defined(WEBRTC_IOS) || defined(WEBRTC_MAC)
#include "webrtc/media/base/codec.h"
#include "webrtc/modules/video_coding/include/video_codec_interface.h"
namespace webrtc {
@ -34,7 +25,7 @@ void DisableRtcUseH264();
class H264Encoder : public VideoEncoder {
public:
static H264Encoder* Create();
static H264Encoder* Create(const cricket::VideoCodec& codec);
// If H.264 is supported (any implementation).
static bool IsSupported();

View File

@ -155,7 +155,7 @@ class VideoProcessorIntegrationTest : public testing::Test {
void SetUpCodecConfig() {
if (codec_type_ == kVideoCodecH264) {
encoder_ = H264Encoder::Create();
encoder_ = H264Encoder::Create(cricket::VideoCodec("H264"));
decoder_ = H264Decoder::Create();
VideoCodingModule::Codec(kVideoCodecH264, &codec_settings_);
} else if (codec_type_ == kVideoCodecVP8) {