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

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

Issue 100085: Adds a second vector of streams to FFmpegDemuxer to handle re-mapped audio/video streams. (Closed)
Patch Set: Created 11 years, 7 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
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // 142 //
143 // Safe to call on any thread. 143 // Safe to call on any thread.
144 bool StreamsHavePendingReads(); 144 bool StreamsHavePendingReads();
145 145
146 // FFmpeg context handle. 146 // FFmpeg context handle.
147 scoped_ptr_malloc<AVFormatContext, ScopedPtrAVFree> format_context_; 147 scoped_ptr_malloc<AVFormatContext, ScopedPtrAVFree> format_context_;
148 148
149 // Latest timestamp read on the demuxer thread. 149 // Latest timestamp read on the demuxer thread.
150 base::TimeDelta current_timestamp_; 150 base::TimeDelta current_timestamp_;
151 151
152 // Vector of streams. 152 // Two vector of streams:
153 // - |streams_| is indexed for the Demuxer interface GetStream(), which only
154 // contains supported streams and no NULL entries.
155 // - |packet_streams_| is indexed to mirror AVFormatContext when dealing
156 // with AVPackets returned from av_read_frame() and contain NULL entries
157 // representing unsupported streams where we throw away the data.
158 //
159 // Ownership is handled via reference counting.
153 typedef std::vector< scoped_refptr<FFmpegDemuxerStream> > StreamVector; 160 typedef std::vector< scoped_refptr<FFmpegDemuxerStream> > StreamVector;
154 StreamVector streams_; 161 StreamVector streams_;
162 StreamVector packet_streams_;
155 163
156 // Thread handle. 164 // Thread handle.
157 base::Thread thread_; 165 base::Thread thread_;
158 166
159 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); 167 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer);
160 }; 168 };
161 169
162 } // namespace media 170 } // namespace media
163 171
164 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ 172 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698