| Index: content/common/gpu/media/v4l2_video_device.cc
|
| diff --git a/content/common/gpu/media/v4l2_video_device.cc b/content/common/gpu/media/v4l2_video_device.cc
|
| index 92fc885a0692a956183b314acc74175ab1a98374..dbd3d1ece09a463627b79407f459b196f9606ef6 100644
|
| --- a/content/common/gpu/media/v4l2_video_device.cc
|
| +++ b/content/common/gpu/media/v4l2_video_device.cc
|
| @@ -13,30 +13,27 @@
|
|
|
| // TODO(posciak): remove this once V4L2 headers are updated.
|
| #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0')
|
| -#define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4')
|
| -#define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F')
|
|
|
| namespace content {
|
|
|
| -V4L2Device::~V4L2Device() {
|
| -}
|
| +V4L2Device::~V4L2Device() {}
|
|
|
| // static
|
| -scoped_refptr<V4L2Device> V4L2Device::Create(Type type) {
|
| +scoped_ptr<V4L2Device> V4L2Device::Create(Type type) {
|
| DVLOG(3) << __PRETTY_FUNCTION__;
|
|
|
| - scoped_refptr<GenericV4L2Device> generic_device(new GenericV4L2Device(type));
|
| + scoped_ptr<GenericV4L2Device> generic_device(new GenericV4L2Device(type));
|
| if (generic_device->Initialize())
|
| - return generic_device;
|
| + return generic_device.Pass();
|
|
|
| #if defined(ARCH_CPU_ARMEL)
|
| - scoped_refptr<TegraV4L2Device> tegra_device(new TegraV4L2Device(type));
|
| + scoped_ptr<TegraV4L2Device> tegra_device(new TegraV4L2Device(type));
|
| if (tegra_device->Initialize())
|
| - return tegra_device;
|
| + return tegra_device.Pass();
|
| #endif
|
|
|
| LOG(ERROR) << "Failed to create V4L2Device";
|
| - return scoped_refptr<V4L2Device>();
|
| + return scoped_ptr<V4L2Device>();
|
| }
|
|
|
| // static
|
| @@ -78,20 +75,13 @@
|
|
|
| // static
|
| uint32 V4L2Device::VideoCodecProfileToV4L2PixFmt(
|
| - media::VideoCodecProfile profile,
|
| - bool slice_based) {
|
| + media::VideoCodecProfile profile) {
|
| if (profile >= media::H264PROFILE_MIN &&
|
| profile <= media::H264PROFILE_MAX) {
|
| - if (slice_based)
|
| - return V4L2_PIX_FMT_H264_SLICE;
|
| - else
|
| - return V4L2_PIX_FMT_H264;
|
| + return V4L2_PIX_FMT_H264;
|
| } else if (profile >= media::VP8PROFILE_MIN &&
|
| profile <= media::VP8PROFILE_MAX) {
|
| - if (slice_based)
|
| - return V4L2_PIX_FMT_VP8_FRAME;
|
| - else
|
| - return V4L2_PIX_FMT_VP8;
|
| + return V4L2_PIX_FMT_VP8;
|
| } else if (profile >= media::VP9PROFILE_MIN &&
|
| profile <= media::VP9PROFILE_MAX) {
|
| return V4L2_PIX_FMT_VP9;
|
|
|