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

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

Issue 229453004: Rename VideoFrame::{Get,Set}Timestamp() to {set_}timestamp(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile failure Created 6 years, 8 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
« no previous file with comments | « media/base/video_frame_unittest.cc ('k') | media/filters/skcanvas_video_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/filters/ffmpeg_video_decoder.h" 5 #include "media/filters/ffmpeg_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 *video_frame = NULL; 314 *video_frame = NULL;
315 return false; 315 return false;
316 } 316 }
317 317
318 if (!av_frame_->opaque) { 318 if (!av_frame_->opaque) {
319 LOG(ERROR) << "VideoFrame object associated with frame data not set."; 319 LOG(ERROR) << "VideoFrame object associated with frame data not set.";
320 return false; 320 return false;
321 } 321 }
322 *video_frame = static_cast<VideoFrame*>(av_frame_->opaque); 322 *video_frame = static_cast<VideoFrame*>(av_frame_->opaque);
323 323
324 (*video_frame)->SetTimestamp( 324 (*video_frame)->set_timestamp(
325 base::TimeDelta::FromMicroseconds(av_frame_->reordered_opaque)); 325 base::TimeDelta::FromMicroseconds(av_frame_->reordered_opaque));
326 326
327 return true; 327 return true;
328 } 328 }
329 329
330 void FFmpegVideoDecoder::ReleaseFFmpegResources() { 330 void FFmpegVideoDecoder::ReleaseFFmpegResources() {
331 codec_context_.reset(); 331 codec_context_.reset();
332 av_frame_.reset(); 332 av_frame_.reset();
333 } 333 }
334 334
(...skipping 18 matching lines...) Expand all
353 if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { 353 if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) {
354 ReleaseFFmpegResources(); 354 ReleaseFFmpegResources();
355 return false; 355 return false;
356 } 356 }
357 357
358 av_frame_.reset(av_frame_alloc()); 358 av_frame_.reset(av_frame_alloc());
359 return true; 359 return true;
360 } 360 }
361 361
362 } // namespace media 362 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame_unittest.cc ('k') | media/filters/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698