Commit 7397caf6 authored by hshi@chromium.org's avatar hshi@chromium.org

Add content API CreateVideoEncodeAccelerator.

BUG=325984

Review URL: https://codereview.chromium.org/98183007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245397 0039d316-1c4b-4281-b951-d872f2087c98
parent efad90f6
......@@ -63,6 +63,8 @@
'public/renderer/render_view_visitor.h',
'public/renderer/resource_fetcher.h',
'public/renderer/v8_value_converter.h',
'public/renderer/video_encode_accelerator.cc',
'public/renderer/video_encode_accelerator.h',
'public/renderer/web_preferences.h',
'renderer/accessibility/accessibility_node_serializer.cc',
'renderer/accessibility/accessibility_node_serializer.h',
......
include_rules = [
"+media/video",
"+v8/include/v8.h",
]
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/public/renderer/video_encode_accelerator.h"
#include "content/renderer/render_thread_impl.h"
namespace content {
scoped_ptr<media::VideoEncodeAccelerator>
CreateVideoEncodeAccelerator(media::VideoEncodeAccelerator::Client* client) {
scoped_ptr<media::VideoEncodeAccelerator> vea;
scoped_refptr<RendererGpuVideoAcceleratorFactories> gpu_factories =
RenderThreadImpl::current()->GetGpuFactories();
if (gpu_factories.get())
vea = gpu_factories->CreateVideoEncodeAccelerator(client).Pass();
return vea.Pass();
}
} // namespace content
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_PUBLIC_RENDERER_VIDEO_ENCODE_ACCELERATOR_H_
#define CONTENT_PUBLIC_RENDERER_VIDEO_ENCODE_ACCELERATOR_H_
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
#include "media/video/video_encode_accelerator.h"
namespace content {
// Generate an instance of media::VideoEncodeAccelerator.
CONTENT_EXPORT scoped_ptr<media::VideoEncodeAccelerator>
CreateVideoEncodeAccelerator(media::VideoEncodeAccelerator::Client* client);
} // namespace content
#endif // CONTENT_PUBLIC_RENDERER_VIDEO_ENCODE_ACCELERATOR_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment