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

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: Buffer Bonanza! 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 FFmpegDemuxer* demuxer_; 105 FFmpegDemuxer* demuxer_;
106 AVStream* stream_; 106 AVStream* stream_;
107 AudioDecoderConfig audio_config_; 107 AudioDecoderConfig audio_config_;
108 VideoDecoderConfig video_config_; 108 VideoDecoderConfig video_config_;
109 Type type_; 109 Type type_;
110 base::TimeDelta duration_; 110 base::TimeDelta duration_;
111 bool discontinuous_; 111 bool discontinuous_;
112 bool stopped_; 112 bool stopped_;
113 113
114 typedef std::deque<scoped_refptr<Buffer> > BufferQueue; 114 typedef std::deque<scoped_refptr<DecoderBuffer> > BufferQueue;
115 BufferQueue buffer_queue_; 115 BufferQueue buffer_queue_;
116 116
117 typedef std::deque<ReadCB> ReadQueue; 117 typedef std::deque<ReadCB> ReadQueue;
118 ReadQueue read_queue_; 118 ReadQueue read_queue_;
119 119
120 // Used to translate bitstream formats. 120 // Used to translate bitstream formats.
121 scoped_ptr<BitstreamConverter> bitstream_converter_; 121 scoped_ptr<BitstreamConverter> bitstream_converter_;
122 122
123 // Used to synchronize access to |buffer_queue_|, |read_queue_|, and 123 // Used to synchronize access to |buffer_queue_|, |read_queue_|, and
124 // |stopped_|. This is so other threads can get access to buffers that have 124 // |stopped_|. This is so other threads can get access to buffers that have
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // Whether audio has been disabled for this demuxer (in which case this class 246 // Whether audio has been disabled for this demuxer (in which case this class
247 // drops packets destined for AUDIO demuxer streams on the floor). 247 // drops packets destined for AUDIO demuxer streams on the floor).
248 bool audio_disabled_; 248 bool audio_disabled_;
249 249
250 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); 250 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer);
251 }; 251 };
252 252
253 } // namespace media 253 } // namespace media
254 254
255 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ 255 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698