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

Side by Side Diff: media/ffmpeg/ffmpeg_unittest.cc

Issue 12321062: base: Move MemoryMappedFile out of file_util.h and into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chrome_frame again Created 7 years, 9 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 | « courgette/ensemble_apply.cc ('k') | media/filters/file_data_source.h » ('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 (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 // ffmpeg_unittests verify that the parts of the FFmpeg API that Chromium uses 5 // ffmpeg_unittests verify that the parts of the FFmpeg API that Chromium uses
6 // function as advertised for each media format that Chromium supports. This 6 // function as advertised for each media format that Chromium supports. This
7 // mostly includes stuff like reporting proper timestamps, seeking to 7 // mostly includes stuff like reporting proper timestamps, seeking to
8 // keyframes, and supporting certain features like reordered_opaque. 8 // keyframes, and supporting certain features like reordered_opaque.
9 // 9 //
10 10
11 #include <limits> 11 #include <limits>
12 #include <queue> 12 #include <queue>
13 13
14 #include "base/base_paths.h" 14 #include "base/base_paths.h"
15 #include "base/file_util.h" 15 #include "base/file_util.h"
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
17 #include "base/files/memory_mapped_file.h"
17 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
18 #include "base/path_service.h" 19 #include "base/path_service.h"
19 #include "base/perftimer.h" 20 #include "base/perftimer.h"
20 #include "base/string_util.h" 21 #include "base/string_util.h"
21 #include "base/test/perf_test_suite.h" 22 #include "base/test/perf_test_suite.h"
22 #include "media/base/media.h" 23 #include "media/base/media.h"
23 #include "media/ffmpeg/ffmpeg_common.h" 24 #include "media/ffmpeg/ffmpeg_common.h"
24 #include "media/filters/ffmpeg_glue.h" 25 #include "media/filters/ffmpeg_glue.h"
25 #include "media/filters/in_memory_url_protocol.h" 26 #include "media/filters/in_memory_url_protocol.h"
26 #include "testing/gtest/include/gtest/gtest.h" 27 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 386
386 scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFree> audio_buffer_; 387 scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFree> audio_buffer_;
387 scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFree> video_buffer_; 388 scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFree> video_buffer_;
388 389
389 int64 decoded_audio_time_; 390 int64 decoded_audio_time_;
390 int64 decoded_audio_duration_; 391 int64 decoded_audio_duration_;
391 int64 decoded_video_time_; 392 int64 decoded_video_time_;
392 int64 decoded_video_duration_; 393 int64 decoded_video_duration_;
393 int64 duration_; 394 int64 duration_;
394 395
395 file_util::MemoryMappedFile file_data_; 396 base::MemoryMappedFile file_data_;
396 scoped_ptr<InMemoryUrlProtocol> protocol_; 397 scoped_ptr<InMemoryUrlProtocol> protocol_;
397 scoped_ptr<FFmpegGlue> glue_; 398 scoped_ptr<FFmpegGlue> glue_;
398 399
399 DISALLOW_COPY_AND_ASSIGN(FFmpegTest); 400 DISALLOW_COPY_AND_ASSIGN(FFmpegTest);
400 }; 401 };
401 402
402 #define FFMPEG_TEST_CASE(name, extension) \ 403 #define FFMPEG_TEST_CASE(name, extension) \
403 INSTANTIATE_TEST_CASE_P(name##_##extension, FFmpegTest, \ 404 INSTANTIATE_TEST_CASE_P(name##_##extension, FFmpegTest, \
404 testing::Values(#name "." #extension)); 405 testing::Values(#name "." #extension));
405 406
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 EXPECT_TRUE(StepDecodeVideo()); 582 EXPECT_TRUE(StepDecodeVideo());
582 VLOG(1) << decoded_video_time(); 583 VLOG(1) << decoded_video_time();
583 584
584 SeekTo(0.4); 585 SeekTo(0.4);
585 ReadRemainingFile(); 586 ReadRemainingFile();
586 EXPECT_TRUE(StepDecodeVideo()); 587 EXPECT_TRUE(StepDecodeVideo());
587 VLOG(1) << decoded_video_time(); 588 VLOG(1) << decoded_video_time();
588 } 589 }
589 590
590 } // namespace media 591 } // namespace media
OLDNEW
« no previous file with comments | « courgette/ensemble_apply.cc ('k') | media/filters/file_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698