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

Side by Side Diff: media/formats/mp2t/mp2t_stream_parser.cc

Issue 195973006: Allow StreamParsers to request automatic timestampOffset updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unittest. Created 6 years, 9 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/mp2t/mp2t_stream_parser.h" 5 #include "media/formats/mp2t/mp2t_stream_parser.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "media/base/audio_decoder_config.h" 10 #include "media/base/audio_decoder_config.h"
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 return true; 477 return true;
478 478
479 // Pass the config before invoking the initialization callback. 479 // Pass the config before invoking the initialization callback.
480 RCHECK(config_cb_.Run(queue_with_config.audio_config, 480 RCHECK(config_cb_.Run(queue_with_config.audio_config,
481 queue_with_config.video_config, 481 queue_with_config.video_config,
482 TextTrackConfigMap())); 482 TextTrackConfigMap()));
483 queue_with_config.is_config_sent = true; 483 queue_with_config.is_config_sent = true;
484 484
485 // For Mpeg2 TS, the duration is not known. 485 // For Mpeg2 TS, the duration is not known.
486 DVLOG(1) << "Mpeg2TS stream parser initialization done"; 486 DVLOG(1) << "Mpeg2TS stream parser initialization done";
487 init_cb_.Run(true, kInfiniteDuration()); 487 init_cb_.Run(true, kInfiniteDuration(), false);
488 is_initialized_ = true; 488 is_initialized_ = true;
489 489
490 return true; 490 return true;
491 } 491 }
492 492
493 void Mp2tStreamParser::OnEmitAudioBuffer( 493 void Mp2tStreamParser::OnEmitAudioBuffer(
494 int pes_pid, 494 int pes_pid,
495 scoped_refptr<StreamParserBuffer> stream_parser_buffer) { 495 scoped_refptr<StreamParserBuffer> stream_parser_buffer) {
496 DCHECK_EQ(pes_pid, selected_audio_pid_); 496 DCHECK_EQ(pes_pid, selected_audio_pid_);
497 497
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 BufferQueueWithConfig queue_with_config( 613 BufferQueueWithConfig queue_with_config(
614 true, last_audio_config, last_video_config); 614 true, last_audio_config, last_video_config);
615 buffer_queue_chain_.push_back(queue_with_config); 615 buffer_queue_chain_.push_back(queue_with_config);
616 616
617 return true; 617 return true;
618 } 618 }
619 619
620 } // namespace mp2t 620 } // namespace mp2t
621 } // namespace media 621 } // namespace media
622 622
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698