Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_BASE_MEDIA_FFMPEG_METADATA_EXTRACTOR_H_ | |
| 6 #define MEDIA_BASE_MEDIA_FFMPEG_METADATA_EXTRACTOR_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/basictypes.h" | |
| 12 #include "media/base/media_export.h" | |
| 13 | |
| 14 namespace media { | |
| 15 | |
| 16 class DataSource; | |
| 17 | |
| 18 // This class extracts a string dictionary of metadata tags for audio and video | |
| 19 // files. It also provides the format name. | |
| 20 class MEDIA_EXPORT AudioVideoMetadataExtractor { | |
| 21 public: | |
| 22 explicit AudioVideoMetadataExtractor(media::DataSource* source); | |
| 23 ~AudioVideoMetadataExtractor(); | |
| 24 | |
| 25 // Returns whether or not the fields were successfully extracted. | |
| 26 bool Extract(); | |
| 27 | |
| 28 const std::map<std::string, std::string>& GetTags(); | |
| 29 const std::string& GetFormat(); | |
|
acolwell GONE FROM CHROMIUM
2014/01/03 19:14:04
nit: I think this should be removed. It unnecessar
tommycli
2014/01/03 23:08:36
Done.
| |
| 30 int GetDurationSeconds(); | |
|
acolwell GONE FROM CHROMIUM
2014/01/03 19:14:04
Use double or TimeDelta for this like the other me
tommycli
2014/01/03 23:08:36
Done.
| |
| 31 | |
| 32 // These functions return zero for containers with no video streams. | |
| 33 int GetWidth(); | |
|
acolwell GONE FROM CHROMIUM
2014/01/03 19:14:04
nit: s/GetWidth/width/ to match Chromium style for
tommycli
2014/01/03 23:08:36
Done.
| |
| 34 int GetHeight(); | |
| 35 | |
| 36 private: | |
| 37 media::DataSource* source_; | |
| 38 | |
| 39 bool extracted_; | |
| 40 std::map<std::string, std::string> tags_; | |
| 41 std::string format_; | |
| 42 int duration_; | |
| 43 | |
| 44 int width_; | |
| 45 int height_; | |
| 46 | |
| 47 DISALLOW_COPY_AND_ASSIGN(AudioVideoMetadataExtractor); | |
| 48 }; | |
| 49 | |
| 50 } // namespace media | |
| 51 | |
| 52 #endif // MEDIA_BASE_MEDIA_FFMPEG_METADATA_EXTRACTOR_H_ | |
| OLD | NEW |