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

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

Issue 1833053005: Remove MediaTracks::getFirstAudio/VideoConfig (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control
Patch Set: Avoid crashes in tests Created 4 years, 6 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
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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 << stream_parser_buffer->data_size() 572 << stream_parser_buffer->data_size()
573 << " dts=" 573 << " dts="
574 << stream_parser_buffer->GetDecodeTimestamp().InMilliseconds() 574 << stream_parser_buffer->GetDecodeTimestamp().InMilliseconds()
575 << " pts=" 575 << " pts="
576 << stream_parser_buffer->timestamp().InMilliseconds() 576 << stream_parser_buffer->timestamp().InMilliseconds()
577 << " dur=" 577 << " dur="
578 << stream_parser_buffer->duration().InMilliseconds(); 578 << stream_parser_buffer->duration().InMilliseconds();
579 579
580 // Ignore the incoming buffer if it is not associated with any config. 580 // Ignore the incoming buffer if it is not associated with any config.
581 if (buffer_queue_chain_.empty()) { 581 if (buffer_queue_chain_.empty()) {
582 NOTREACHED() << "Cannot provide buffers before configs"; 582 LOG(ERROR) << "Cannot provide buffers before configs";
583 return; 583 return;
584 } 584 }
585 585
586 buffer_queue_chain_.back().audio_queue.push_back(stream_parser_buffer); 586 buffer_queue_chain_.back().audio_queue.push_back(stream_parser_buffer);
587 } 587 }
588 588
589 void Mp2tStreamParser::OnEmitVideoBuffer( 589 void Mp2tStreamParser::OnEmitVideoBuffer(
590 int pes_pid, 590 int pes_pid,
591 scoped_refptr<StreamParserBuffer> stream_parser_buffer) { 591 scoped_refptr<StreamParserBuffer> stream_parser_buffer) {
592 DCHECK_EQ(pes_pid, selected_video_pid_); 592 DCHECK_EQ(pes_pid, selected_video_pid_);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 // so that buffers with the same config can be added later on. 672 // so that buffers with the same config can be added later on.
673 BufferQueueWithConfig queue_with_config( 673 BufferQueueWithConfig queue_with_config(
674 true, last_audio_config, last_video_config); 674 true, last_audio_config, last_video_config);
675 buffer_queue_chain_.push_back(queue_with_config); 675 buffer_queue_chain_.push_back(queue_with_config);
676 676
677 return true; 677 return true;
678 } 678 }
679 679
680 } // namespace mp2t 680 } // namespace mp2t
681 } // namespace media 681 } // 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