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

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

Issue 254473006: Add media::StreamParser::StreamParameter struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 return true; 478 return true;
479 479
480 // Pass the config before invoking the initialization callback. 480 // Pass the config before invoking the initialization callback.
481 RCHECK(config_cb_.Run(queue_with_config.audio_config, 481 RCHECK(config_cb_.Run(queue_with_config.audio_config,
482 queue_with_config.video_config, 482 queue_with_config.video_config,
483 TextTrackConfigMap())); 483 TextTrackConfigMap()));
484 queue_with_config.is_config_sent = true; 484 queue_with_config.is_config_sent = true;
485 485
486 // For Mpeg2 TS, the duration is not known. 486 // For Mpeg2 TS, the duration is not known.
487 DVLOG(1) << "Mpeg2TS stream parser initialization done"; 487 DVLOG(1) << "Mpeg2TS stream parser initialization done";
488 base::ResetAndReturn(&init_cb_).Run( 488 base::ResetAndReturn(&init_cb_)
489 true, kInfiniteDuration(), base::Time(), false); 489 .Run(true, InitParameters(kInfiniteDuration()));
490 is_initialized_ = true; 490 is_initialized_ = true;
491 491
492 return true; 492 return true;
493 } 493 }
494 494
495 void Mp2tStreamParser::OnEmitAudioBuffer( 495 void Mp2tStreamParser::OnEmitAudioBuffer(
496 int pes_pid, 496 int pes_pid,
497 scoped_refptr<StreamParserBuffer> stream_parser_buffer) { 497 scoped_refptr<StreamParserBuffer> stream_parser_buffer) {
498 DCHECK_EQ(pes_pid, selected_audio_pid_); 498 DCHECK_EQ(pes_pid, selected_audio_pid_);
499 499
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 // so that buffers with the same config can be added later on. 614 // so that buffers with the same config can be added later on.
615 BufferQueueWithConfig queue_with_config( 615 BufferQueueWithConfig queue_with_config(
616 true, last_audio_config, last_video_config); 616 true, last_audio_config, last_video_config);
617 buffer_queue_chain_.push_back(queue_with_config); 617 buffer_queue_chain_.push_back(queue_with_config);
618 618
619 return true; 619 return true;
620 } 620 }
621 621
622 } // namespace mp2t 622 } // namespace mp2t
623 } // namespace media 623 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/common/stream_parser_test_base.cc ('k') | media/formats/mp2t/mp2t_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698