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

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

Issue 10447035: Introducing DecoderBuffer and general Buffer cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 8 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) 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 // Implements the Demuxer interface using FFmpeg's libavformat. At this time 5 // Implements the Demuxer interface using FFmpeg's libavformat. At this time
6 // will support demuxing any audio/video format thrown at it. The streams 6 // will support demuxing any audio/video format thrown at it. The streams
7 // output mime types audio/x-ffmpeg and video/x-ffmpeg and include an integer 7 // output mime types audio/x-ffmpeg and video/x-ffmpeg and include an integer
8 // key FFmpegCodecID which contains the CodecID enumeration value. The CodecIDs 8 // key FFmpegCodecID which contains the CodecID enumeration value. The CodecIDs
9 // can be used to create and initialize the corresponding FFmpeg decoder. 9 // can be used to create and initialize the corresponding FFmpeg decoder.
10 // 10 //
(...skipping 11 matching lines...) Expand all
22 #ifndef MEDIA_FILTERS_FFMPEG_DEMUXER_H_ 22 #ifndef MEDIA_FILTERS_FFMPEG_DEMUXER_H_
23 #define MEDIA_FILTERS_FFMPEG_DEMUXER_H_ 23 #define MEDIA_FILTERS_FFMPEG_DEMUXER_H_
24 24
25 #include <deque> 25 #include <deque>
26 #include <vector> 26 #include <vector>
27 27
28 #include "base/callback.h" 28 #include "base/callback.h"
29 #include "base/gtest_prod_util.h" 29 #include "base/gtest_prod_util.h"
30 #include "base/synchronization/waitable_event.h" 30 #include "base/synchronization/waitable_event.h"
31 #include "media/base/audio_decoder_config.h" 31 #include "media/base/audio_decoder_config.h"
32 #include "media/base/buffers.h" 32 #include "media/base/decoder_buffer.h"
33 #include "media/base/demuxer.h" 33 #include "media/base/demuxer.h"
34 #include "media/base/pipeline.h" 34 #include "media/base/pipeline.h"
35 #include "media/base/video_decoder_config.h" 35 #include "media/base/video_decoder_config.h"
36 #include "media/filters/ffmpeg_glue.h" 36 #include "media/filters/ffmpeg_glue.h"
37 37
38 // FFmpeg forward declarations. 38 // FFmpeg forward declarations.
39 struct AVFormatContext; 39 struct AVFormatContext;
40 struct AVPacket; 40 struct AVPacket;
41 struct AVRational; 41 struct AVRational;
42 struct AVStream; 42 struct AVStream;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 FFmpegDemuxer* demuxer_; 109 FFmpegDemuxer* demuxer_;
110 AVStream* stream_; 110 AVStream* stream_;
111 AudioDecoderConfig audio_config_; 111 AudioDecoderConfig audio_config_;
112 VideoDecoderConfig video_config_; 112 VideoDecoderConfig video_config_;
113 Type type_; 113 Type type_;
114 base::TimeDelta duration_; 114 base::TimeDelta duration_;
115 bool discontinuous_; 115 bool discontinuous_;
116 bool stopped_; 116 bool stopped_;
117 117
118 typedef std::deque<scoped_refptr<Buffer> > BufferQueue; 118 typedef std::deque<scoped_refptr<DecoderBuffer> > BufferQueue;
119 BufferQueue buffer_queue_; 119 BufferQueue buffer_queue_;
120 120
121 typedef std::deque<ReadCB> ReadQueue; 121 typedef std::deque<ReadCB> ReadQueue;
122 ReadQueue read_queue_; 122 ReadQueue read_queue_;
123 123
124 // Used to translate bitstream formats. 124 // Used to translate bitstream formats.
125 scoped_ptr<BitstreamConverter> bitstream_converter_; 125 scoped_ptr<BitstreamConverter> bitstream_converter_;
126 126
127 // Used to synchronize access to |buffer_queue_|, |read_queue_|, and 127 // Used to synchronize access to |buffer_queue_|, |read_queue_|, and
128 // |stopped_|. This is so other threads can get access to buffers that have 128 // |stopped_|. This is so other threads can get access to buffers that have
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // Set if we know duration of the audio stream. Used when processing end of 254 // Set if we know duration of the audio stream. Used when processing end of
255 // stream -- at this moment we definitely know duration. 255 // stream -- at this moment we definitely know duration.
256 bool duration_known_; 256 bool duration_known_;
257 257
258 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); 258 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer);
259 }; 259 };
260 260
261 } // namespace media 261 } // namespace media
262 262
263 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ 263 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698