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

Side by Side Diff: media/formats/mpeg/mpeg_audio_stream_parser_base.cc

Issue 254473006: Add media::StreamParser::StreamParameter struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "media/formats/mpeg/mpeg_audio_stream_parser_base.h" 5 #include "media/formats/mpeg/mpeg_audio_stream_parser_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "media/base/buffers.h" 10 #include "media/base/buffers.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 base_timestamp = timestamp_helper_->GetTimestamp(); 217 base_timestamp = timestamp_helper_->GetTimestamp();
218 218
219 timestamp_helper_.reset(new AudioTimestampHelper(sample_rate)); 219 timestamp_helper_.reset(new AudioTimestampHelper(sample_rate));
220 timestamp_helper_->SetBaseTimestamp(base_timestamp); 220 timestamp_helper_->SetBaseTimestamp(base_timestamp);
221 221
222 VideoDecoderConfig video_config; 222 VideoDecoderConfig video_config;
223 bool success = config_cb_.Run(config_, video_config, TextTrackConfigMap()); 223 bool success = config_cb_.Run(config_, video_config, TextTrackConfigMap());
224 224
225 if (!init_cb_.is_null()) 225 if (!init_cb_.is_null())
226 base::ResetAndReturn(&init_cb_).Run( 226 base::ResetAndReturn(&init_cb_).Run(
227 success, kInfiniteDuration(), base::Time(), true); 227 success, StreamParser::StreamParameters());
acolwell GONE FROM CHROMIUM 2014/04/24 21:00:55 This changes the behavior. auto_update_timestamp_o
Sergey Ulanov 2014/04/24 22:13:43 Thanks for catching this!
228 228
229 if (!success) 229 if (!success)
230 return -1; 230 return -1;
231 } 231 }
232 232
233 if (metadata_frame) 233 if (metadata_frame)
234 return frame_size; 234 return frame_size;
235 235
236 // TODO(wolenetz/acolwell): Validate and use a common cross-parser TrackId 236 // TODO(wolenetz/acolwell): Validate and use a common cross-parser TrackId
237 // type and allow multiple audio tracks, if applicable. See 237 // type and allow multiple audio tracks, if applicable. See
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 if (end_of_segment) { 410 if (end_of_segment) {
411 in_media_segment_ = false; 411 in_media_segment_ = false;
412 end_of_segment_cb_.Run(); 412 end_of_segment_cb_.Run();
413 } 413 }
414 414
415 timestamp_helper_->SetBaseTimestamp(base::TimeDelta()); 415 timestamp_helper_->SetBaseTimestamp(base::TimeDelta());
416 return true; 416 return true;
417 } 417 }
418 418
419 } // namespace media 419 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698