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

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

Issue 1894073002: Revert of Allow muting/unmuting audio through media track API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink-sb-tracks6
Patch Set: Rebased Created 4 years, 8 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 | « media/filters/ffmpeg_demuxer.cc ('k') | media/filters/media_source_state.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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_MEDIA_SOURCE_STATE_H_ 5 #ifndef MEDIA_FILTERS_MEDIA_SOURCE_STATE_H_
6 #define MEDIA_FILTERS_MEDIA_SOURCE_STATE_H_ 6 #define MEDIA_FILTERS_MEDIA_SOURCE_STATE_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "media/base/demuxer_stream.h" 12 #include "media/base/demuxer_stream.h"
13 #include "media/base/media_export.h" 13 #include "media/base/media_export.h"
14 #include "media/base/stream_parser.h" 14 #include "media/base/stream_parser.h"
15 #include "media/base/stream_parser_buffer.h" 15 #include "media/base/stream_parser_buffer.h"
16 16
17 namespace media { 17 namespace media {
18 18
19 using base::TimeDelta; 19 using base::TimeDelta;
20 20
21 class ChunkDemuxerStream; 21 class ChunkDemuxerStream;
22 class FrameProcessor; 22 class FrameProcessor;
23 class MediaTrack;
24 23
25 // Contains state belonging to a source id. 24 // Contains state belonging to a source id.
26 class MEDIA_EXPORT MediaSourceState { 25 class MEDIA_EXPORT MediaSourceState {
27 public: 26 public:
28 // Callback signature used to create ChunkDemuxerStreams. 27 // Callback signature used to create ChunkDemuxerStreams.
29 typedef base::Callback<ChunkDemuxerStream*(const MediaTrack&)> 28 typedef base::Callback<ChunkDemuxerStream*(DemuxerStream::Type)>
30 CreateDemuxerStreamCB; 29 CreateDemuxerStreamCB;
31 30
32 typedef base::Callback<void(ChunkDemuxerStream*, const TextTrackConfig&)> 31 typedef base::Callback<void(ChunkDemuxerStream*, const TextTrackConfig&)>
33 NewTextTrackCB; 32 NewTextTrackCB;
34 33
35 MediaSourceState(scoped_ptr<StreamParser> stream_parser, 34 MediaSourceState(scoped_ptr<StreamParser> stream_parser,
36 scoped_ptr<FrameProcessor> frame_processor, 35 scoped_ptr<FrameProcessor> frame_processor,
37 const CreateDemuxerStreamCB& create_demuxer_stream_cb, 36 const CreateDemuxerStreamCB& create_demuxer_stream_cb,
38 const scoped_refptr<MediaLog>& media_log); 37 const scoped_refptr<MediaLog>& media_log);
39 38
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 183
185 // Valid only while |parsing_media_segment_| is true. These flags enable 184 // Valid only while |parsing_media_segment_| is true. These flags enable
186 // warning when at least one frame for each A/V track is not in a parsed media 185 // warning when at least one frame for each A/V track is not in a parsed media
187 // segment. 186 // segment.
188 bool media_segment_contained_audio_frame_; 187 bool media_segment_contained_audio_frame_;
189 bool media_segment_contained_video_frame_; 188 bool media_segment_contained_video_frame_;
190 189
191 // The object used to parse appended data. 190 // The object used to parse appended data.
192 scoped_ptr<StreamParser> stream_parser_; 191 scoped_ptr<StreamParser> stream_parser_;
193 192
193 scoped_ptr<MediaTracks> media_tracks_;
194
194 ChunkDemuxerStream* audio_; // Not owned by |this|. 195 ChunkDemuxerStream* audio_; // Not owned by |this|.
195 ChunkDemuxerStream* video_; // Not owned by |this|. 196 ChunkDemuxerStream* video_; // Not owned by |this|.
196 197
197 typedef std::map<StreamParser::TrackId, ChunkDemuxerStream*> TextStreamMap; 198 typedef std::map<StreamParser::TrackId, ChunkDemuxerStream*> TextStreamMap;
198 TextStreamMap text_stream_map_; // |this| owns the map's stream pointers. 199 TextStreamMap text_stream_map_; // |this| owns the map's stream pointers.
199 200
200 scoped_ptr<FrameProcessor> frame_processor_; 201 scoped_ptr<FrameProcessor> frame_processor_;
201 scoped_refptr<MediaLog> media_log_; 202 scoped_refptr<MediaLog> media_log_;
202 StreamParser::InitCB init_cb_; 203 StreamParser::InitCB init_cb_;
203 204
(...skipping 13 matching lines...) Expand all
217 // TODO(wolenetz): Refactor this function while integrating April 29, 2014 218 // TODO(wolenetz): Refactor this function while integrating April 29, 2014
218 // changes to MSE spec. See http://crbug.com/371499. 219 // changes to MSE spec. See http://crbug.com/371499.
219 bool auto_update_timestamp_offset_; 220 bool auto_update_timestamp_offset_;
220 221
221 DISALLOW_COPY_AND_ASSIGN(MediaSourceState); 222 DISALLOW_COPY_AND_ASSIGN(MediaSourceState);
222 }; 223 };
223 224
224 } // namespace media 225 } // namespace media
225 226
226 #endif // MEDIA_FILTERS_MEDIA_SOURCE_STATE_H_ 227 #endif // MEDIA_FILTERS_MEDIA_SOURCE_STATE_H_
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | media/filters/media_source_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698