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

Side by Side Diff: content/common/gpu/media/mac_video_decode_accelerator.mm

Issue 10837023: MacVideoDecodeAccelerator::Initialize() needs to inspect its |profile| param. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | 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 "content/common/gpu/media/mac_video_decode_accelerator.h" 5 #include "content/common/gpu/media/mac_video_decode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #import "base/mac/foundation_util.h" 9 #import "base/mac/foundation_util.h"
10 #import "base/memory/ref_counted_memory.h" 10 #import "base/memory/ref_counted_memory.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 MacVideoDecodeAccelerator::MacVideoDecodeAccelerator( 95 MacVideoDecodeAccelerator::MacVideoDecodeAccelerator(
96 CGLContextObj cgl_context, media::VideoDecodeAccelerator::Client* client) 96 CGLContextObj cgl_context, media::VideoDecodeAccelerator::Client* client)
97 : client_(client), 97 : client_(client),
98 cgl_context_(cgl_context), 98 cgl_context_(cgl_context),
99 did_build_config_record_(false) { 99 did_build_config_record_(false) {
100 } 100 }
101 101
102 bool MacVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile) { 102 bool MacVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile) {
103 DCHECK(CalledOnValidThread()); 103 DCHECK(CalledOnValidThread());
104 104
105 if (profile < media::H264PROFILE_MIN || profile > media::H264PROFILE_MAX)
106 return false;
107
105 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize(); 108 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize();
106 if (!io_surface_support) 109 if (!io_surface_support)
107 return false; 110 return false;
108 111
109 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( 112 MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
110 &MacVideoDecodeAccelerator::NotifyInitializeDone, base::AsWeakPtr(this))); 113 &MacVideoDecodeAccelerator::NotifyInitializeDone, base::AsWeakPtr(this)));
111 return true; 114 return true;
112 } 115 }
113 116
114 void MacVideoDecodeAccelerator::Decode( 117 void MacVideoDecodeAccelerator::Decode(
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 371 }
369 372
370 MacVideoDecodeAccelerator::UsedPictureInfo::~UsedPictureInfo() { 373 MacVideoDecodeAccelerator::UsedPictureInfo::~UsedPictureInfo() {
371 } 374 }
372 375
373 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() { 376 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() {
374 } 377 }
375 378
376 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() { 379 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() {
377 } 380 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698