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

Side by Side Diff: media/filters/audio_file_reader.h

Issue 311373004: Consolidate and improve audio decoding test for all decoders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Megapatch! Created 6 years, 6 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef MEDIA_FILTERS_AUDIO_FILE_READER_H_ 5 #ifndef MEDIA_FILTERS_AUDIO_FILE_READER_H_
6 #define MEDIA_FILTERS_AUDIO_FILE_READER_H_ 6 #define MEDIA_FILTERS_AUDIO_FILE_READER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // read. The Read() method returns the actual number of sample-frames it has 53 // read. The Read() method returns the actual number of sample-frames it has
54 // read. 54 // read.
55 base::TimeDelta GetDuration() const; 55 base::TimeDelta GetDuration() const;
56 int GetNumberOfFrames() const; 56 int GetNumberOfFrames() const;
57 57
58 // Helper methods which allows AudioFileReader to double as a test utility for 58 // Helper methods which allows AudioFileReader to double as a test utility for
59 // demuxing audio files. Returns true if a packet could be demuxed from the 59 // demuxing audio files. Returns true if a packet could be demuxed from the
60 // first audio stream in the file, |output_packet| will contain the demuxed 60 // first audio stream in the file, |output_packet| will contain the demuxed
61 // packet then. 61 // packet then.
62 bool ReadPacketForTesting(AVPacket* output_packet); 62 bool ReadPacketForTesting(AVPacket* output_packet);
63 bool SeekForTesting(base::TimeDelta seek_time);
63 64
64 const AVCodecContext* codec_context_for_testing() const { 65 const AVCodecContext* codec_context_for_testing() const {
65 return codec_context_; 66 return codec_context_;
66 } 67 }
67 68
68 private: 69 private:
69 bool ReadPacket(AVPacket* output_packet); 70 bool ReadPacket(AVPacket* output_packet);
70 71
71 scoped_ptr<FFmpegGlue> glue_; 72 scoped_ptr<FFmpegGlue> glue_;
72 AVCodecContext* codec_context_; 73 AVCodecContext* codec_context_;
73 int stream_index_; 74 int stream_index_;
74 FFmpegURLProtocol* protocol_; 75 FFmpegURLProtocol* protocol_;
75 int channels_; 76 int channels_;
76 int sample_rate_; 77 int sample_rate_;
77 78
78 // AVSampleFormat initially requested; not Chrome's SampleFormat. 79 // AVSampleFormat initially requested; not Chrome's SampleFormat.
79 int av_sample_format_; 80 int av_sample_format_;
80 81
81 DISALLOW_COPY_AND_ASSIGN(AudioFileReader); 82 DISALLOW_COPY_AND_ASSIGN(AudioFileReader);
82 }; 83 };
83 84
84 } // namespace media 85 } // namespace media
85 86
86 #endif // MEDIA_FILTERS_AUDIO_FILE_READER_H_ 87 #endif // MEDIA_FILTERS_AUDIO_FILE_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698