зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e0241d05dc
Коммит
0e392d0f13
|
@ -2,7 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
* 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/. */
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "MediaDataDecoderCodec.h"
|
#include "MediaDataCodec.h"
|
||||||
#include "WebrtcMediaDataDecoderCodec.h"
|
#include "WebrtcMediaDataDecoderCodec.h"
|
||||||
#include "WebrtcMediaDataEncoderCodec.h"
|
#include "WebrtcMediaDataEncoderCodec.h"
|
||||||
#include "WebrtcGmpVideoCodec.h"
|
#include "WebrtcGmpVideoCodec.h"
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
WebrtcVideoEncoder* MediaDataDecoderCodec::CreateEncoder(
|
WebrtcVideoEncoder* MediaDataCodec::CreateEncoder(
|
||||||
webrtc::VideoCodecType aCodecType) {
|
webrtc::VideoCodecType aCodecType) {
|
||||||
#ifdef MOZ_APPLEMEDIA
|
#ifdef MOZ_APPLEMEDIA
|
||||||
if (aCodecType == webrtc::VideoCodecType::kVideoCodecH264) {
|
if (aCodecType == webrtc::VideoCodecType::kVideoCodecH264) {
|
||||||
|
@ -22,7 +22,7 @@ WebrtcVideoEncoder* MediaDataDecoderCodec::CreateEncoder(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
WebrtcVideoDecoder* MediaDataDecoderCodec::CreateDecoder(
|
WebrtcVideoDecoder* MediaDataCodec::CreateDecoder(
|
||||||
webrtc::VideoCodecType aCodecType) {
|
webrtc::VideoCodecType aCodecType) {
|
||||||
switch (aCodecType) {
|
switch (aCodecType) {
|
||||||
case webrtc::VideoCodecType::kVideoCodecVP8:
|
case webrtc::VideoCodecType::kVideoCodecVP8:
|
|
@ -2,8 +2,8 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
* 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/. */
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#ifndef MEDIA_DATA_DECODER_CODEC_H_
|
#ifndef MEDIA_DATA_CODEC_H_
|
||||||
#define MEDIA_DATA_DECODER_CODEC_H_
|
#define MEDIA_DATA_CODEC_H_
|
||||||
|
|
||||||
#include "MediaConduitInterface.h"
|
#include "MediaConduitInterface.h"
|
||||||
#include "webrtc/common_types.h"
|
#include "webrtc/common_types.h"
|
||||||
|
@ -12,7 +12,7 @@ namespace mozilla {
|
||||||
|
|
||||||
class WebrtcVideoDecoder;
|
class WebrtcVideoDecoder;
|
||||||
class WebrtcVideoEncoder;
|
class WebrtcVideoEncoder;
|
||||||
class MediaDataDecoderCodec {
|
class MediaDataCodec {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Create encoder object for codec type |aCodecType|. Return |nullptr| when
|
* Create encoder object for codec type |aCodecType|. Return |nullptr| when
|
||||||
|
@ -28,4 +28,4 @@ class MediaDataDecoderCodec {
|
||||||
};
|
};
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif // MEDIA_DATA_DECODER_CODEC_H_
|
#endif // MEDIA_DATA_CODEC_H_
|
|
@ -45,7 +45,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "WebrtcGmpVideoCodec.h"
|
#include "WebrtcGmpVideoCodec.h"
|
||||||
|
|
||||||
#include "MediaDataDecoderCodec.h"
|
#include "MediaDataCodec.h"
|
||||||
|
|
||||||
// for ntohs
|
// for ntohs
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
@ -1614,7 +1614,7 @@ std::unique_ptr<webrtc::VideoDecoder> WebrtcVideoConduit::CreateDecoder(
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Attempt to create a decoder using MediaDataDecoder.
|
// Attempt to create a decoder using MediaDataDecoder.
|
||||||
decoder.reset(MediaDataDecoderCodec::CreateDecoder(aType));
|
decoder.reset(MediaDataCodec::CreateDecoder(aType));
|
||||||
if (decoder) {
|
if (decoder) {
|
||||||
return decoder;
|
return decoder;
|
||||||
}
|
}
|
||||||
|
@ -1684,7 +1684,7 @@ std::unique_ptr<webrtc::VideoEncoder> WebrtcVideoConduit::CreateEncoder(
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (StaticPrefs::media_webrtc_platformencoder()) {
|
if (StaticPrefs::media_webrtc_platformencoder()) {
|
||||||
encoder.reset(MediaDataDecoderCodec::CreateEncoder(aType));
|
encoder.reset(MediaDataCodec::CreateEncoder(aType));
|
||||||
if (encoder) {
|
if (encoder) {
|
||||||
return encoder;
|
return encoder;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ LOCAL_INCLUDES += [
|
||||||
UNIFIED_SOURCES += [
|
UNIFIED_SOURCES += [
|
||||||
'AudioConduit.cpp',
|
'AudioConduit.cpp',
|
||||||
'GmpVideoCodec.cpp',
|
'GmpVideoCodec.cpp',
|
||||||
'MediaDataDecoderCodec.cpp',
|
'MediaDataCodec.cpp',
|
||||||
'RtpSourceObserver.cpp',
|
'RtpSourceObserver.cpp',
|
||||||
'VideoConduit.cpp',
|
'VideoConduit.cpp',
|
||||||
'VideoStreamFactory.cpp',
|
'VideoStreamFactory.cpp',
|
||||||
|
|
|
@ -1471,7 +1471,7 @@ class MediaPipelineReceiveVideo::PipelineListener
|
||||||
RefPtr<Image> image;
|
RefPtr<Image> image;
|
||||||
if (aBuffer.type() == webrtc::VideoFrameBuffer::Type::kNative) {
|
if (aBuffer.type() == webrtc::VideoFrameBuffer::Type::kNative) {
|
||||||
// We assume that only native handles are used with the
|
// We assume that only native handles are used with the
|
||||||
// WebrtcMediaDataDecoderCodec decoder.
|
// WebrtcMediaDataCodec decoder.
|
||||||
const ImageBuffer* imageBuffer =
|
const ImageBuffer* imageBuffer =
|
||||||
static_cast<const ImageBuffer*>(&aBuffer);
|
static_cast<const ImageBuffer*>(&aBuffer);
|
||||||
image = imageBuffer->GetNativeImage();
|
image = imageBuffer->GetNativeImage();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче