Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / common / gpu / media / v4l2_image_processor.cc
index 67303da..20d91f0 100644 (file)
 
 #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)
@@ -40,7 +40,7 @@
 #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 {
@@ -110,7 +110,7 @@ bool V4L2ImageProcessor::Initialize(media::VideoFrame::Format input_format,
       V4L2Device::VideoFrameFormatToV4L2PixFmt(output_format);
 
   if (!input_format_fourcc_ || !output_format_fourcc_) {
-    DLOG(ERROR) << "Unrecognized format(s)";
+    LOG(ERROR) << "Unrecognized format(s)";
     return false;
   }
 
@@ -119,9 +119,9 @@ bool V4L2ImageProcessor::Initialize(media::VideoFrame::Format input_format,
   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;
@@ -130,8 +130,8 @@ bool V4L2ImageProcessor::Initialize(media::VideoFrame::Format input_format,
                               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;
   }
 
@@ -139,7 +139,7 @@ bool V4L2ImageProcessor::Initialize(media::VideoFrame::Format input_format,
     return false;
 
   if (!device_thread_.Start()) {
-    DLOG(ERROR) << "Initialize(): encoder thread failed to start";
+    LOG(ERROR) << "Initialize(): encoder thread failed to start";
     return false;
   }
 
@@ -214,6 +214,7 @@ void V4L2ImageProcessor::DestroyTask() {
 }
 
 bool V4L2ImageProcessor::CreateInputBuffers() {
+  DVLOG(3) << __func__;
   DCHECK(child_message_loop_proxy_->BelongsToCurrentThread());
   DCHECK(!input_streamon_);
 
@@ -284,6 +285,7 @@ bool V4L2ImageProcessor::CreateInputBuffers() {
 }
 
 bool V4L2ImageProcessor::CreateOutputBuffers() {
+  DVLOG(3) << __func__;
   DCHECK(child_message_loop_proxy_->BelongsToCurrentThread());
   DCHECK(!output_streamon_);
 
@@ -501,7 +503,7 @@ void V4L2ImageProcessor::Dequeue() {
         // 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;
     }
@@ -528,7 +530,7 @@ void V4L2ImageProcessor::Dequeue() {
         // 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;
     }
@@ -646,7 +648,7 @@ bool V4L2ImageProcessor::StartDevicePoll() {
 
   // 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;
   }