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

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

Issue 1235793005: Deprecate LogCB in favor of using MediaLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and attempt to fix Android compilation Created 5 years, 5 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/frame_processor_unittest.cc ('k') | media/filters/source_buffer_stream.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) 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 // SourceBufferStream is a data structure that stores media Buffers in ranges. 5 // SourceBufferStream is a data structure that stores media Buffers in ranges.
6 // Buffers can be appended out of presentation order. Buffers are retrieved by 6 // Buffers can be appended out of presentation order. Buffers are retrieved by
7 // seeking to the desired start point and calling GetNextBuffer(). Buffers are 7 // seeking to the desired start point and calling GetNextBuffer(). Buffers are
8 // returned in sequential presentation order. 8 // returned in sequential presentation order.
9 9
10 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ 10 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 kEndOfStream 47 kEndOfStream
48 }; 48 };
49 49
50 enum Type { 50 enum Type {
51 kAudio, 51 kAudio,
52 kVideo, 52 kVideo,
53 kText 53 kText
54 }; 54 };
55 55
56 SourceBufferStream(const AudioDecoderConfig& audio_config, 56 SourceBufferStream(const AudioDecoderConfig& audio_config,
57 const LogCB& log_cb, 57 const scoped_refptr<MediaLog>& media_log,
58 bool splice_frames_enabled); 58 bool splice_frames_enabled);
59 SourceBufferStream(const VideoDecoderConfig& video_config, 59 SourceBufferStream(const VideoDecoderConfig& video_config,
60 const LogCB& log_cb, 60 const scoped_refptr<MediaLog>& media_log,
61 bool splice_frames_enabled); 61 bool splice_frames_enabled);
62 SourceBufferStream(const TextTrackConfig& text_config, 62 SourceBufferStream(const TextTrackConfig& text_config,
63 const LogCB& log_cb, 63 const scoped_refptr<MediaLog>& media_log,
64 bool splice_frames_enabled); 64 bool splice_frames_enabled);
65 65
66 ~SourceBufferStream(); 66 ~SourceBufferStream();
67 67
68 // Signals that the next buffers appended are part of a new media segment 68 // Signals that the next buffers appended are part of a new media segment
69 // starting at |media_segment_start_time|. 69 // starting at |media_segment_start_time|.
70 // TODO(acolwell/wolenetz): This should be changed to a presentation 70 // TODO(acolwell/wolenetz): This should be changed to a presentation
71 // timestamp. See http://crbug.com/402502 71 // timestamp. See http://crbug.com/402502
72 void OnNewMediaSegment(DecodeTimestamp media_segment_start_time); 72 void OnNewMediaSegment(DecodeTimestamp media_segment_start_time);
73 73
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 // Called by PrepareRangesForNextAppend() before pruning overlapped buffers to 321 // Called by PrepareRangesForNextAppend() before pruning overlapped buffers to
322 // generate a splice frame with a small portion of the overlapped buffers. If 322 // generate a splice frame with a small portion of the overlapped buffers. If
323 // a splice frame is generated, the first buffer in |new_buffers| will have 323 // a splice frame is generated, the first buffer in |new_buffers| will have
324 // its timestamps, duration, and fade out preroll updated. 324 // its timestamps, duration, and fade out preroll updated.
325 void GenerateSpliceFrame(const BufferQueue& new_buffers); 325 void GenerateSpliceFrame(const BufferQueue& new_buffers);
326 326
327 // If |out_buffer| has splice buffers or preroll, sets |pending_buffer_| 327 // If |out_buffer| has splice buffers or preroll, sets |pending_buffer_|
328 // appropriately and returns true. Otherwise returns false. 328 // appropriately and returns true. Otherwise returns false.
329 bool SetPendingBuffer(scoped_refptr<StreamParserBuffer>* out_buffer); 329 bool SetPendingBuffer(scoped_refptr<StreamParserBuffer>* out_buffer);
330 330
331 // Callback used to report log messages that can help the web developer figure 331 // Used to report log messages that can help the web developer figure out what
332 // out what is wrong with the content. 332 // is wrong with the content.
333 LogCB log_cb_; 333 scoped_refptr<MediaLog> media_log_;
334 334
335 // List of disjoint buffered ranges, ordered by start time. 335 // List of disjoint buffered ranges, ordered by start time.
336 RangeList ranges_; 336 RangeList ranges_;
337 337
338 // Indicates which decoder config is being used by the decoder. 338 // Indicates which decoder config is being used by the decoder.
339 // GetNextBuffer() is only allows to return buffers that have a 339 // GetNextBuffer() is only allows to return buffers that have a
340 // config ID that matches this index. If there is a mismatch then 340 // config ID that matches this index. If there is a mismatch then
341 // it must signal that a config change is needed. 341 // it must signal that a config change is needed.
342 int current_config_index_; 342 int current_config_index_;
343 343
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 // Indicates that splice frame generation is enabled. 419 // Indicates that splice frame generation is enabled.
420 const bool splice_frames_enabled_; 420 const bool splice_frames_enabled_;
421 421
422 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); 422 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream);
423 }; 423 };
424 424
425 } // namespace media 425 } // namespace media
426 426
427 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ 427 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_
OLDNEW
« no previous file with comments | « media/filters/frame_processor_unittest.cc ('k') | media/filters/source_buffer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698