#define NOTIFY_ERROR() \
do { \
- DLOG(ERROR) << "calling NotifyError()"; \
+ LOG(ERROR) << "calling NotifyError()"; \
NotifyError(); \
} while (0)
#define IOCTL_OR_ERROR_RETURN_VALUE(type, arg, value) \
do { \
if (device_->Ioctl(type, arg) != 0) { \
- DPLOG(ERROR) << __func__ << "(): ioctl() failed: " << #type; \
+ PLOG(ERROR) << __func__ << "(): ioctl() failed: " << #type; \
return value; \
} \
} while (0)
#define IOCTL_OR_LOG_ERROR(type, arg) \
do { \
if (device_->Ioctl(type, arg) != 0) \
- DPLOG(ERROR) << __func__ << "(): ioctl() failed: " << #type; \
+ PLOG(ERROR) << __func__ << "(): ioctl() failed: " << #type; \
} while (0)
namespace content {
V4L2Device::VideoFrameFormatToV4L2PixFmt(output_format);
if (!input_format_fourcc_ || !output_format_fourcc_) {
- DLOG(ERROR) << "Unrecognized format(s)";
+ LOG(ERROR) << "Unrecognized format(s)";
return false;
}
output_allocated_size_ = output_allocated_size;
input_planes_count_ = media::VideoFrame::NumPlanes(input_format);
- DCHECK_LE(input_planes_count_, VIDEO_MAX_PLANES);
+ DCHECK_LE(input_planes_count_, static_cast<size_t>(VIDEO_MAX_PLANES));
output_planes_count_ = media::VideoFrame::NumPlanes(output_format);
- DCHECK_LE(output_planes_count_, VIDEO_MAX_PLANES);
+ DCHECK_LE(output_planes_count_, static_cast<size_t>(VIDEO_MAX_PLANES));
// Capabilities check.
struct v4l2_capability caps;
V4L2_CAP_VIDEO_OUTPUT_MPLANE | V4L2_CAP_STREAMING;
IOCTL_OR_ERROR_RETURN_FALSE(VIDIOC_QUERYCAP, &caps);
if ((caps.capabilities & kCapsRequired) != kCapsRequired) {
- DLOG(ERROR) << "Initialize(): ioctl() failed: VIDIOC_QUERYCAP: "
- "caps check failed: 0x" << std::hex << caps.capabilities;
+ LOG(ERROR) << "Initialize(): ioctl() failed: VIDIOC_QUERYCAP: "
+ "caps check failed: 0x" << std::hex << caps.capabilities;
return false;
}
return false;
if (!device_thread_.Start()) {
- DLOG(ERROR) << "Initialize(): encoder thread failed to start";
+ LOG(ERROR) << "Initialize(): encoder thread failed to start";
return false;
}
}
bool V4L2ImageProcessor::CreateInputBuffers() {
+ DVLOG(3) << __func__;
DCHECK(child_message_loop_proxy_->BelongsToCurrentThread());
DCHECK(!input_streamon_);
}
bool V4L2ImageProcessor::CreateOutputBuffers() {
+ DVLOG(3) << __func__;
DCHECK(child_message_loop_proxy_->BelongsToCurrentThread());
DCHECK(!output_streamon_);
// EAGAIN if we're just out of buffers to dequeue.
break;
}
- DPLOG(ERROR) << "ioctl() failed: VIDIOC_DQBUF";
+ PLOG(ERROR) << "ioctl() failed: VIDIOC_DQBUF";
NOTIFY_ERROR();
return;
}
// EAGAIN if we're just out of buffers to dequeue.
break;
}
- DPLOG(ERROR) << "ioctl() failed: VIDIOC_DQBUF";
+ PLOG(ERROR) << "ioctl() failed: VIDIOC_DQBUF";
NOTIFY_ERROR();
return;
}
// Start up the device poll thread and schedule its first DevicePollTask().
if (!device_poll_thread_.Start()) {
- DLOG(ERROR) << "StartDevicePoll(): Device thread failed to start";
+ LOG(ERROR) << "StartDevicePoll(): Device thread failed to start";
NOTIFY_ERROR();
return false;
}