| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 | 
| OLD | NEW | 
|---|