Bug 1568101 - part7 : rename 'MediaDataDecoderCodec' to 'MediaDataCodec'. r=jolin

As this class is not only used for creating decoder, also for encoder, it's more proper to rename it as `MediaDataCodec`.

Differential Revision: https://phabricator.services.mozilla.com/D41443

--HG--
rename : media/webrtc/signaling/src/media-conduit/MediaDataDecoderCodec.cpp => media/webrtc/signaling/src/media-conduit/MediaDataCodec.cpp
rename : media/webrtc/signaling/src/media-conduit/MediaDataDecoderCodec.h => media/webrtc/signaling/src/media-conduit/MediaDataCodec.h
extra : moz-landing-system : lando
This commit is contained in:
Alastor Wu 2019-08-19 08:03:55 +00:00
Родитель e0241d05dc
Коммит 0e392d0f13
5 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "MediaDataDecoderCodec.h"
#include "MediaDataCodec.h"
#include "WebrtcMediaDataDecoderCodec.h"
#include "WebrtcMediaDataEncoderCodec.h"
#include "WebrtcGmpVideoCodec.h"
@ -11,7 +11,7 @@
namespace mozilla {
/* static */
WebrtcVideoEncoder* MediaDataDecoderCodec::CreateEncoder(
WebrtcVideoEncoder* MediaDataCodec::CreateEncoder(
webrtc::VideoCodecType aCodecType) {
#ifdef MOZ_APPLEMEDIA
if (aCodecType == webrtc::VideoCodecType::kVideoCodecH264) {
@ -22,7 +22,7 @@ WebrtcVideoEncoder* MediaDataDecoderCodec::CreateEncoder(
}
/* static */
WebrtcVideoDecoder* MediaDataDecoderCodec::CreateDecoder(
WebrtcVideoDecoder* MediaDataCodec::CreateDecoder(
webrtc::VideoCodecType aCodecType) {
switch (aCodecType) {
case webrtc::VideoCodecType::kVideoCodecVP8:

Просмотреть файл

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MEDIA_DATA_DECODER_CODEC_H_
#define MEDIA_DATA_DECODER_CODEC_H_
#ifndef MEDIA_DATA_CODEC_H_
#define MEDIA_DATA_CODEC_H_
#include "MediaConduitInterface.h"
#include "webrtc/common_types.h"
@ -12,7 +12,7 @@ namespace mozilla {
class WebrtcVideoDecoder;
class WebrtcVideoEncoder;
class MediaDataDecoderCodec {
class MediaDataCodec {
public:
/**
* Create encoder object for codec type |aCodecType|. Return |nullptr| when
@ -28,4 +28,4 @@ class MediaDataDecoderCodec {
};
} // namespace mozilla
#endif // MEDIA_DATA_DECODER_CODEC_H_
#endif // MEDIA_DATA_CODEC_H_

Просмотреть файл

@ -45,7 +45,7 @@
#endif
#include "WebrtcGmpVideoCodec.h"
#include "MediaDataDecoderCodec.h"
#include "MediaDataCodec.h"
// for ntohs
#ifdef _MSC_VER
@ -1614,7 +1614,7 @@ std::unique_ptr<webrtc::VideoDecoder> WebrtcVideoConduit::CreateDecoder(
#endif
// Attempt to create a decoder using MediaDataDecoder.
decoder.reset(MediaDataDecoderCodec::CreateDecoder(aType));
decoder.reset(MediaDataCodec::CreateDecoder(aType));
if (decoder) {
return decoder;
}
@ -1684,7 +1684,7 @@ std::unique_ptr<webrtc::VideoEncoder> WebrtcVideoConduit::CreateEncoder(
#endif
if (StaticPrefs::media_webrtc_platformencoder()) {
encoder.reset(MediaDataDecoderCodec::CreateEncoder(aType));
encoder.reset(MediaDataCodec::CreateEncoder(aType));
if (encoder) {
return encoder;
}

Просмотреть файл

@ -23,7 +23,7 @@ LOCAL_INCLUDES += [
UNIFIED_SOURCES += [
'AudioConduit.cpp',
'GmpVideoCodec.cpp',
'MediaDataDecoderCodec.cpp',
'MediaDataCodec.cpp',
'RtpSourceObserver.cpp',
'VideoConduit.cpp',
'VideoStreamFactory.cpp',

Просмотреть файл

@ -1471,7 +1471,7 @@ class MediaPipelineReceiveVideo::PipelineListener
RefPtr<Image> image;
if (aBuffer.type() == webrtc::VideoFrameBuffer::Type::kNative) {
// We assume that only native handles are used with the
// WebrtcMediaDataDecoderCodec decoder.
// WebrtcMediaDataCodec decoder.
const ImageBuffer* imageBuffer =
static_cast<const ImageBuffer*>(&aBuffer);
image = imageBuffer->GetNativeImage();