| Index: media/filters/chunk_demuxer.cc
|
| diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
|
| index c8543577c7e769c3bcfccba62bf1bde6e106099f..17a538d01fb0672ce688511ee34ce7460ce759ea 100644
|
| --- a/media/filters/chunk_demuxer.cc
|
| +++ b/media/filters/chunk_demuxer.cc
|
| @@ -186,8 +186,8 @@ class SourceState {
|
| const VideoDecoderConfig& video_config,
|
| const StreamParser::TextTrackConfigMap& text_configs);
|
|
|
| - // Called by the |stream_parser_| at the beginning of a new media segment.
|
| - void OnNewMediaSegment();
|
| + // Called by the |stream_parser_| at the start of a new media segment.
|
| + void OnStartOfMediaSegment();
|
|
|
| // Called by the |stream_parser_| at the end of a media segment.
|
| void OnEndOfMediaSegment();
|
| @@ -225,16 +225,6 @@ class SourceState {
|
| TimeDelta append_window_start_during_append_;
|
| TimeDelta append_window_end_during_append_;
|
|
|
| - // Set to true if the next buffers appended within the append window
|
| - // represent the start of a new media segment. This flag being set
|
| - // triggers a call to |new_segment_cb_| when the new buffers are
|
| - // appended. The flag is set on actual media segment boundaries and
|
| - // when the "append window" filtering causes discontinuities in the
|
| - // appended data.
|
| - // TODO(wolenetz/acolwell): Investigate if we need this, or if coded frame
|
| - // processing's discontinuity logic is enough. See http://crbug.com/351489.
|
| - bool new_media_segment_;
|
| -
|
| // Keeps track of whether a media segment is being parsed.
|
| bool parsing_media_segment_;
|
|
|
| @@ -273,7 +263,6 @@ SourceState::SourceState(scoped_ptr<StreamParser> stream_parser,
|
| const scoped_refptr<MediaLog>& media_log)
|
| : create_demuxer_stream_cb_(create_demuxer_stream_cb),
|
| timestamp_offset_during_append_(NULL),
|
| - new_media_segment_(false),
|
| parsing_media_segment_(false),
|
| stream_parser_(stream_parser.release()),
|
| audio_(NULL),
|
| @@ -306,7 +295,7 @@ void SourceState::Init(
|
| allow_audio, allow_video),
|
| base::Bind(&SourceState::OnNewBuffers, base::Unretained(this)),
|
| new_text_track_cb_.is_null(), encrypted_media_init_data_cb,
|
| - base::Bind(&SourceState::OnNewMediaSegment, base::Unretained(this)),
|
| + base::Bind(&SourceState::OnStartOfMediaSegment, base::Unretained(this)),
|
| base::Bind(&SourceState::OnEndOfMediaSegment, base::Unretained(this)),
|
| media_log_);
|
| }
|
| @@ -819,16 +808,14 @@ bool SourceState::OnNewConfigs(
|
| return success;
|
| }
|
|
|
| -void SourceState::OnNewMediaSegment() {
|
| - DVLOG(2) << "OnNewMediaSegment()";
|
| +void SourceState::OnStartOfMediaSegment() {
|
| + DVLOG(2) << "OnStartOfMediaSegment()";
|
| parsing_media_segment_ = true;
|
| - new_media_segment_ = true;
|
| }
|
|
|
| void SourceState::OnEndOfMediaSegment() {
|
| DVLOG(2) << "OnEndOfMediaSegment()";
|
| parsing_media_segment_ = false;
|
| - new_media_segment_ = false;
|
| }
|
|
|
| bool SourceState::OnNewBuffers(
|
| @@ -863,7 +850,6 @@ bool SourceState::OnNewBuffers(
|
| text_map,
|
| append_window_start_during_append_,
|
| append_window_end_during_append_,
|
| - &new_media_segment_,
|
| timestamp_offset_during_append_)) {
|
| return false;
|
| }
|
| @@ -1016,11 +1002,12 @@ size_t ChunkDemuxerStream::GetBufferedSize() const {
|
| return stream_->GetBufferedSize();
|
| }
|
|
|
| -void ChunkDemuxerStream::OnNewMediaSegment(DecodeTimestamp start_timestamp) {
|
| - DVLOG(2) << "ChunkDemuxerStream::OnNewMediaSegment("
|
| +void ChunkDemuxerStream::OnStartOfCodedFrameGroup(
|
| + DecodeTimestamp start_timestamp) {
|
| + DVLOG(2) << "ChunkDemuxerStream::OnStartOfCodedFrameGroup("
|
| << start_timestamp.InSecondsF() << ")";
|
| base::AutoLock auto_lock(lock_);
|
| - stream_->OnNewMediaSegment(start_timestamp);
|
| + stream_->OnStartOfCodedFrameGroup(start_timestamp);
|
| }
|
|
|
| bool ChunkDemuxerStream::UpdateAudioConfig(
|
|
|