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

Unified Diff: media/filters/ffmpeg_demuxer.h

Issue 8890071: Stop audio FFmpegDemuxerStreams if we get notified that audio rendering is disabled. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: foo Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.h
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index 36304814657cf6b670babfd02fdfcea1c9db1e36..3f2e5966623dfe79fc54d0efe9e28170565845d3 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -84,6 +84,7 @@ class FFmpegDemuxerStream : public DemuxerStream {
virtual const VideoDecoderConfig& video_decoder_config() OVERRIDE;
private:
+ friend class FFmpegDemuxerTest;
virtual ~FFmpegDemuxerStream();
// Carries out enqueuing a pending read on the demuxer thread.
@@ -217,20 +218,17 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer, public FFmpegURLProtocol {
// FFmpeg context handle.
AVFormatContext* format_context_;
- // Two vector of streams:
- // - |streams_| is indexed by type for the Demuxer interface GetStream(),
- // and contains NULLs for types which aren't present.
- // - |packet_streams_| is indexed to mirror AVFormatContext when dealing
- // with AVPackets returned from av_read_frame() and contain NULL entries
- // representing unsupported streams where we throw away the data.
+ // |streams_| mirrors the AVStream array in |format_context_|. It contains
+ // FFmpegDemuxerStreams encapsluating AVStream objects at the same index.
//
- // Ownership is handled via reference counting.
+ // Since we only support a single audio and video stream, |streams_| will
+ // contain NULL entries for additional audio/video streams as well as for
+ // stream types that we do not currently support.
//
// Once initialized, operations on FFmpegDemuxerStreams should be carried out
// on the demuxer thread.
- typedef std::vector< scoped_refptr<FFmpegDemuxerStream> > StreamVector;
+ typedef std::vector<scoped_refptr<FFmpegDemuxerStream> > StreamVector;
StreamVector streams_;
- StreamVector packet_streams_;
// Reference to the data source. Asynchronous read requests are submitted to
// this object.
« 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