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

Side by Side Diff: media/filters/source_buffer_state.cc

Issue 2700893003: Various MimeUtil cleanups. (Closed)
Patch Set: Feedback Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/filters/source_buffer_state.h" 5 #include "media/filters/source_buffer_state.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void SourceBufferState::Init( 139 void SourceBufferState::Init(
140 const StreamParser::InitCB& init_cb, 140 const StreamParser::InitCB& init_cb,
141 const std::string& expected_codecs, 141 const std::string& expected_codecs,
142 const StreamParser::EncryptedMediaInitDataCB& encrypted_media_init_data_cb, 142 const StreamParser::EncryptedMediaInitDataCB& encrypted_media_init_data_cb,
143 const NewTextTrackCB& new_text_track_cb) { 143 const NewTextTrackCB& new_text_track_cb) {
144 DCHECK_EQ(state_, UNINITIALIZED); 144 DCHECK_EQ(state_, UNINITIALIZED);
145 new_text_track_cb_ = new_text_track_cb; 145 new_text_track_cb_ = new_text_track_cb;
146 init_cb_ = init_cb; 146 init_cb_ = init_cb;
147 147
148 std::vector<std::string> expected_codecs_parsed; 148 std::vector<std::string> expected_codecs_parsed;
149 ParseCodecString(expected_codecs, &expected_codecs_parsed, false); 149 SplitCodecsToVector(expected_codecs, &expected_codecs_parsed, false);
150 150
151 std::vector<AudioCodec> expected_acodecs; 151 std::vector<AudioCodec> expected_acodecs;
152 std::vector<VideoCodec> expected_vcodecs; 152 std::vector<VideoCodec> expected_vcodecs;
153 for (const auto& codec_id : expected_codecs_parsed) { 153 for (const auto& codec_id : expected_codecs_parsed) {
154 AudioCodec acodec = StringToAudioCodec(codec_id); 154 AudioCodec acodec = StringToAudioCodec(codec_id);
155 if (acodec != kUnknownAudioCodec) { 155 if (acodec != kUnknownAudioCodec) {
156 expected_audio_codecs_.push_back(acodec); 156 expected_audio_codecs_.push_back(acodec);
157 continue; 157 continue;
158 } 158 }
159 VideoCodec vcodec = StringToVideoCodec(codec_id); 159 VideoCodec vcodec = StringToVideoCodec(codec_id);
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 } 908 }
909 void SourceBufferState::OnSourceInitDone( 909 void SourceBufferState::OnSourceInitDone(
910 const StreamParser::InitParameters& params) { 910 const StreamParser::InitParameters& params) {
911 DCHECK_EQ(state_, PENDING_PARSER_INIT); 911 DCHECK_EQ(state_, PENDING_PARSER_INIT);
912 state_ = PARSER_INITIALIZED; 912 state_ = PARSER_INITIALIZED;
913 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; 913 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset;
914 base::ResetAndReturn(&init_cb_).Run(params); 914 base::ResetAndReturn(&init_cb_).Run(params);
915 } 915 }
916 916
917 } // namespace media 917 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | third_party/WebKit/Source/platform/network/mime/MIMETypeRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698