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

Side by Side Diff: media/mp4/mp4_stream_parser.cc

Issue 10704175: Add config change support to FFmpegVideoDecoder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/mp4/mp4_stream_parser.h" 5 #include "media/mp4/mp4_stream_parser.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // No decoder-specific buffer needed for AVC; 193 // No decoder-specific buffer needed for AVC;
194 // SPS/PPS are embedded in the video stream 194 // SPS/PPS are embedded in the video stream
195 NULL, 0, false); 195 NULL, 0, false);
196 has_video_ = true; 196 has_video_ = true;
197 video_track_id_ = track->header.track_id; 197 video_track_id_ = track->header.track_id;
198 198
199 size_of_nalu_length_ = entry.avcc.length_size; 199 size_of_nalu_length_ = entry.avcc.length_size;
200 } 200 }
201 } 201 }
202 202
203 // TODO(strobe): For now, we avoid sending new configs on a new 203 RCHECK(config_cb_.Run(audio_config, video_config));
204 // reinitialization segment, and instead simply embed the updated parameter
205 // sets into the video stream. The conditional should be removed when
206 // http://crbug.com/122913 is fixed.
207 if (!init_cb_.is_null())
208 RCHECK(config_cb_.Run(audio_config, video_config));
209 204
210 base::TimeDelta duration; 205 base::TimeDelta duration;
211 if (moov_->extends.header.fragment_duration > 0) { 206 if (moov_->extends.header.fragment_duration > 0) {
212 duration = TimeDeltaFromFrac(moov_->extends.header.fragment_duration, 207 duration = TimeDeltaFromFrac(moov_->extends.header.fragment_duration,
213 moov_->header.timescale); 208 moov_->header.timescale);
214 } else if (moov_->header.duration > 0) { 209 } else if (moov_->header.duration > 0) {
215 duration = TimeDeltaFromFrac(moov_->header.duration, 210 duration = TimeDeltaFromFrac(moov_->header.duration,
216 moov_->header.timescale); 211 moov_->header.timescale);
217 } else { 212 } else {
218 duration = kInfiniteDuration(); 213 duration = kInfiniteDuration();
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 return true; 359 return true;
365 } 360 }
366 361
367 void MP4StreamParser::ChangeState(State new_state) { 362 void MP4StreamParser::ChangeState(State new_state) {
368 DVLOG(2) << "Changing state: " << new_state; 363 DVLOG(2) << "Changing state: " << new_state;
369 state_ = new_state; 364 state_ = new_state;
370 } 365 }
371 366
372 } // namespace mp4 367 } // namespace mp4
373 } // namespace media 368 } // namespace media
OLDNEW
« media/filters/ffmpeg_video_decoder.cc ('K') | « media/filters/video_renderer_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698