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

Unified Diff: media/filters/ffmpeg_glue.h

Issue 2846693002: Add UMA metrics for VideoCodec.MP4 and VideoCodec.WebM (Closed)
Patch Set: Get container name from ffmpeg_glue Created 3 years, 8 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: media/filters/ffmpeg_glue.h
diff --git a/media/filters/ffmpeg_glue.h b/media/filters/ffmpeg_glue.h
index 7d464eb37a67dce62a2c648f0b11046504ac8150..ba245cec2e429db4189832b4ce251c3a13016407 100644
--- a/media/filters/ffmpeg_glue.h
+++ b/media/filters/ffmpeg_glue.h
@@ -30,6 +30,7 @@
#include <memory>
#include "base/macros.h"
+#include "media/base/container_names.h"
#include "media/base/media_export.h"
#include "media/ffmpeg/ffmpeg_deleters.h"
@@ -71,11 +72,16 @@ class MEDIA_EXPORT FFmpegGlue {
// through the FFmpegURLProtocol provided during construction.
bool OpenContext();
AVFormatContext* format_context() { return format_context_; }
+ // Returns the container name. Note that it is only available after
+ // calling OpenContext.
+ container_names::MediaContainerName container() const { return container_; }
private:
- bool open_called_;
- AVFormatContext* format_context_;
+ bool open_called_ = false;
+ AVFormatContext* format_context_ = nullptr;
std::unique_ptr<AVIOContext, ScopedPtrAVFree> avio_context_;
+ container_names::MediaContainerName container_ =
+ container_names::CONTAINER_UNKNOWN;
DISALLOW_COPY_AND_ASSIGN(FFmpegGlue);
};

Powered by Google App Engine
This is Rietveld 408576698