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

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

Issue 7203002: Adding ChunkDemuxer implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit tests and nits Created 9 years, 5 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/ffmpeg/ffmpeg_common.cc ('k') | media/filters/audio_file_reader.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <vector> 8 #include <vector>
9 #include "media/filters/ffmpeg_glue.h" 9 #include "media/filters/ffmpeg_glue.h"
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 private: 48 private:
49 FFmpegURLProtocol* protocol_; 49 FFmpegURLProtocol* protocol_;
50 AVFormatContext* format_context_; 50 AVFormatContext* format_context_;
51 AVCodecContext* codec_context_; 51 AVCodecContext* codec_context_;
52 AVCodec* codec_; 52 AVCodec* codec_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(AudioFileReader); 54 DISALLOW_COPY_AND_ASSIGN(AudioFileReader);
55 }; 55 };
56 56
57 class InMemoryDataReader : public FFmpegURLProtocol {
58 public:
59 // Ownership of |data| is not taken, instead it simply maintains
60 // a weak reference.
61 InMemoryDataReader(const char* data, int64 size);
62
63 virtual int Read(int size, uint8* data);
64 virtual bool GetPosition(int64* position_out);
65 virtual bool SetPosition(int64 position);
66 virtual bool GetSize(int64* size_out);
67 virtual bool IsStreaming();
68
69 private:
70 const char* data_;
71 int64 size_;
72 int64 position_;
73
74 DISALLOW_COPY_AND_ASSIGN(InMemoryDataReader);
75 };
76
77 } // namespace media 57 } // namespace media
78 58
79 #endif // MEDIA_FILTERS_AUDIO_FILE_READER_H_ 59 #endif // MEDIA_FILTERS_AUDIO_FILE_READER_H_
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_common.cc ('k') | media/filters/audio_file_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698