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

Side by Side Diff: media/base/audio_video_metadata_extractor_unittest.cc

Issue 148113012: Media: AudioVideoMetadataParser - Parse rotation metadata. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/base/audio_video_metadata_extractor.cc ('k') | media/test/data/90rotation.mp4 » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "media/base/audio_video_metadata_extractor.h" 8 #include "media/base/audio_video_metadata_extractor.h"
9 #include "media/base/test_data_util.h" 9 #include "media/base/test_data_util.h"
10 #include "media/filters/file_data_source.h" 10 #include "media/filters/file_data_source.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 EXPECT_EQ("Amadeus Pro", extractor->encoded_by()); 54 EXPECT_EQ("Amadeus Pro", extractor->encoded_by());
55 } 55 }
56 56
57 TEST(AudioVideoMetadataExtractorTest, VideoWebM) { 57 TEST(AudioVideoMetadataExtractorTest, VideoWebM) {
58 scoped_ptr<AudioVideoMetadataExtractor> extractor = 58 scoped_ptr<AudioVideoMetadataExtractor> extractor =
59 GetExtractor("bear-320x240-multitrack.webm", true, 2, 320, 240); 59 GetExtractor("bear-320x240-multitrack.webm", true, 2, 320, 240);
60 EXPECT_EQ("Lavf53.9.0", extractor->encoder()); 60 EXPECT_EQ("Lavf53.9.0", extractor->encoder());
61 } 61 }
62 62
63 #if defined(USE_PROPRIETARY_CODECS) 63 #if defined(USE_PROPRIETARY_CODECS)
64 TEST(AudioVideoMetadataExtractorTest, AndroidRotatedMP4Video) {
65 scoped_ptr<AudioVideoMetadataExtractor> extractor =
66 GetExtractor("90rotation.mp4", true, 0, 1920, 1080);
67
68 EXPECT_EQ(90, extractor->rotation());
69 }
70
64 TEST(AudioVideoMetadataExtractorTest, AudioMP3) { 71 TEST(AudioVideoMetadataExtractorTest, AudioMP3) {
65 scoped_ptr<AudioVideoMetadataExtractor> extractor = 72 scoped_ptr<AudioVideoMetadataExtractor> extractor =
66 GetExtractor("id3_png_test.mp3", true, 1, -1, -1); 73 GetExtractor("id3_png_test.mp3", true, 1, -1, -1);
67 74
68 EXPECT_EQ("Airbag", extractor->title()); 75 EXPECT_EQ("Airbag", extractor->title());
69 EXPECT_EQ("Radiohead", extractor->artist()); 76 EXPECT_EQ("Radiohead", extractor->artist());
70 EXPECT_EQ("OK Computer", extractor->album()); 77 EXPECT_EQ("OK Computer", extractor->album());
71 EXPECT_EQ(1, extractor->track()); 78 EXPECT_EQ(1, extractor->track());
72 EXPECT_EQ("Alternative", extractor->genre()); 79 EXPECT_EQ("Alternative", extractor->genre());
73 EXPECT_EQ("1997", extractor->date()); 80 EXPECT_EQ("1997", extractor->date());
74 EXPECT_EQ("Lavf54.4.100", extractor->encoder()); 81 EXPECT_EQ("Lavf54.4.100", extractor->encoder());
75 } 82 }
76 #endif 83 #endif
77 84
78 } // namespace media 85 } // namespace media
OLDNEW
« no previous file with comments | « media/base/audio_video_metadata_extractor.cc ('k') | media/test/data/90rotation.mp4 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698