Index: media/filters/ffmpeg_glue.h |
diff --git a/media/filters/ffmpeg_glue.h b/media/filters/ffmpeg_glue.h |
index 7d464eb37a67dce62a2c648f0b11046504ac8150..305f27b5219d320e654bd413efda7c34a9048acc 100644 |
--- a/media/filters/ffmpeg_glue.h |
+++ b/media/filters/ffmpeg_glue.h |
@@ -29,7 +29,9 @@ |
#include <memory> |
+#include "base/logging.h" |
#include "base/macros.h" |
+#include "media/base/container_names.h" |
#include "media/base/media_export.h" |
#include "media/ffmpeg/ffmpeg_deleters.h" |
@@ -71,11 +73,19 @@ 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 { |
+ DCHECK(open_called_); |
+ 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); |
}; |