Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: services/media/framework_ffmpeg/av_codec_context.cc

Issue 1814583002: Motown: New wrapper classes for ffmpeg format context and io context (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Tweaks based on feedback. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
« no previous file with comments | « services/media/framework_ffmpeg/av_codec_context.h ('k') | services/media/framework_ffmpeg/av_format_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698