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

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

Issue 2158923004: Convert media constants to constexpr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 queue_with_config.audio_config, queue_with_config.video_config); 543 queue_with_config.audio_config, queue_with_config.video_config);
544 RCHECK(config_cb_.Run(std::move(media_tracks), TextTrackConfigMap())); 544 RCHECK(config_cb_.Run(std::move(media_tracks), TextTrackConfigMap()));
545 queue_with_config.is_config_sent = true; 545 queue_with_config.is_config_sent = true;
546 546
547 // For Mpeg2 TS, the duration is not known. 547 // For Mpeg2 TS, the duration is not known.
548 DVLOG(1) << "Mpeg2TS stream parser initialization done"; 548 DVLOG(1) << "Mpeg2TS stream parser initialization done";
549 549
550 // TODO(wolenetz): If possible, detect and report track counts by type more 550 // TODO(wolenetz): If possible, detect and report track counts by type more
551 // accurately here. Currently, capped at max 1 each for audio and video, with 551 // accurately here. Currently, capped at max 1 each for audio and video, with
552 // assumption of 0 text tracks. 552 // assumption of 0 text tracks.
553 InitParameters params(kInfiniteDuration()); 553 InitParameters params(kInfiniteDuration);
554 params.detected_audio_track_count = 554 params.detected_audio_track_count =
555 queue_with_config.audio_config.IsValidConfig() ? 1 : 0; 555 queue_with_config.audio_config.IsValidConfig() ? 1 : 0;
556 params.detected_video_track_count = 556 params.detected_video_track_count =
557 queue_with_config.video_config.IsValidConfig() ? 1 : 0; 557 queue_with_config.video_config.IsValidConfig() ? 1 : 0;
558 base::ResetAndReturn(&init_cb_).Run(params); 558 base::ResetAndReturn(&init_cb_).Run(params);
559 is_initialized_ = true; 559 is_initialized_ = true;
560 560
561 return true; 561 return true;
562 } 562 }
563 563
(...skipping 108 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

Powered by Google App Engine
This is Rietveld 408576698