| Index: services/media/framework_ffmpeg/av_codec_context.cc
|
| diff --git a/services/media/framework_ffmpeg/ffmpeg_type_converters.cc b/services/media/framework_ffmpeg/av_codec_context.cc
|
| similarity index 97%
|
| rename from services/media/framework_ffmpeg/ffmpeg_type_converters.cc
|
| rename to services/media/framework_ffmpeg/av_codec_context.cc
|
| index 9b421ecd97216fd498e96540c7f6e9594534e437..cd8a3a019366ad36362485c0ae8c915941a5ae59 100644
|
| --- a/services/media/framework_ffmpeg/ffmpeg_type_converters.cc
|
| +++ b/services/media/framework_ffmpeg/av_codec_context.cc
|
| @@ -3,7 +3,8 @@
|
| // found in the LICENSE file.
|
|
|
| #include "base/logging.h"
|
| -#include "services/media/framework_ffmpeg/ffmpeg_type_converters.h"
|
| +#include "services/media/framework_ffmpeg/av_codec_context.h"
|
| +#include "services/media/framework_ffmpeg/ffmpeg_init.h"
|
| extern "C" {
|
| #include "third_party/ffmpeg/libavformat/avformat.h"
|
| }
|
| @@ -334,7 +335,8 @@ AvCodecContextPtr AVCodecContextFromVideoStreamType(
|
|
|
| } // namespace
|
|
|
| -std::unique_ptr<StreamType> StreamTypeFromAVCodecContext(
|
| +// static
|
| +std::unique_ptr<StreamType> AvCodecContext::GetStreamType(
|
| const AVCodecContext& from) {
|
| switch (from.codec_type) {
|
| case AVMEDIA_TYPE_AUDIO:
|
| @@ -367,7 +369,10 @@ std::unique_ptr<StreamType> StreamTypeFromAVCodecContext(
|
| }
|
| }
|
|
|
| -AvCodecContextPtr AVCodecContextFromStreamType(const StreamType& stream_type) {
|
| +// static
|
| +AvCodecContextPtr AvCodecContext::Create(const StreamType& stream_type) {
|
| + InitFfmpeg();
|
| +
|
| switch (stream_type.scheme()) {
|
| case StreamType::Scheme::kLpcm:
|
| return CodecContextFromLpcmDetails(*stream_type.lpcm());
|
|
|