Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <deque> | 6 #include <deque> |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 909 message_loop_.Run(); | 909 message_loop_.Run(); |
| 910 | 910 |
| 911 WaitableMessageLoopEvent event; | 911 WaitableMessageLoopEvent event; |
| 912 demuxer_->Stop(event.GetClosure()); | 912 demuxer_->Stop(event.GetClosure()); |
| 913 event.RunAndWait(); | 913 event.RunAndWait(); |
| 914 demuxer_.reset(); | 914 demuxer_.reset(); |
| 915 data_source_.reset(); | 915 data_source_.reset(); |
| 916 } | 916 } |
| 917 } | 917 } |
| 918 | 918 |
| 919 TEST_F(FFmpegDemuxerTest, Rotate_Metadata_0) { | |
| 920 const char* file = "bear_rotate_0.mp4"; | |
| 921 CreateDemuxer(file); | |
|
scherkus (not reviewing)
2014/07/09 23:01:27
any reason why you don't simply inline the "bear_r
| |
| 922 InitializeDemuxer(); | |
| 923 | |
| 924 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO); | |
| 925 ASSERT_TRUE(stream); | |
| 926 ASSERT_EQ(VIDEO_ROTATION_0, stream->video_rotation()); | |
| 927 } | |
| 928 | |
| 929 TEST_F(FFmpegDemuxerTest, Rotate_Metadata_90) { | |
| 930 const char* file = "bear_rotate_90.mp4"; | |
| 931 CreateDemuxer(file); | |
| 932 InitializeDemuxer(); | |
| 933 | |
| 934 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO); | |
| 935 ASSERT_TRUE(stream); | |
| 936 ASSERT_EQ(VIDEO_ROTATION_90, stream->video_rotation()); | |
| 937 } | |
| 938 | |
| 939 TEST_F(FFmpegDemuxerTest, Rotate_Metadata_180) { | |
| 940 const char* file = "bear_rotate_180.mp4"; | |
| 941 CreateDemuxer(file); | |
| 942 InitializeDemuxer(); | |
| 943 | |
| 944 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO); | |
| 945 ASSERT_TRUE(stream); | |
| 946 ASSERT_EQ(VIDEO_ROTATION_180, stream->video_rotation()); | |
| 947 } | |
| 948 | |
| 949 TEST_F(FFmpegDemuxerTest, Rotate_Metadata_270) { | |
| 950 const char* file = "bear_rotate_270.mp4"; | |
| 951 CreateDemuxer(file); | |
| 952 InitializeDemuxer(); | |
| 953 | |
| 954 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO); | |
| 955 ASSERT_TRUE(stream); | |
| 956 ASSERT_EQ(VIDEO_ROTATION_270, stream->video_rotation()); | |
| 957 } | |
| 958 | |
| 919 #endif | 959 #endif |
| 920 | 960 |
| 921 } // namespace media | 961 } // namespace media |
| OLD | NEW |