New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 882339 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature



Sign in to add a comment

Convert V4L2 format to human readable string for logging purpose.

Project Member Reported by deanliao@chromium.org, Sep 10

Issue description

We sometimes need to output v4l2_format in logs for debug purpose. We need a function to coverts v4l2_format struct to string for logging.

Also, we output pixel format, type uint32, to log, which is not easily to read. We need a function to convert pixel format (fourcc code) to string.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bde9a576b94edf60705b1d0e6f343a95a7227bdb

commit bde9a576b94edf60705b1d0e6f343a95a7227bdb
Author: Dean Liao <deanliao@chromium.org>
Date: Wed Sep 12 01:59:00 2018

media/base: Add FourccToString().

In Chrome media codebase, it sometimes outputs fourcc value to log.
However, we need to table lookup to know which format it refers to.
If we convert the 32bit value into four character code (what fourcc
stands for), it is easier to get what the format is.

BUG=chromium:882339
TEST=Build and run media_unittests --gtest_filter=VideoTypesTest*

Change-Id: I806699ff93646640b69d328e2dffae0ba4e84067
Reviewed-on: https://chromium-review.googlesource.com/1216763
Commit-Queue: Shuo-Peng Liao <deanliao@google.com>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590571}
[modify] https://crrev.com/bde9a576b94edf60705b1d0e6f343a95a7227bdb/media/base/BUILD.gn
[modify] https://crrev.com/bde9a576b94edf60705b1d0e6f343a95a7227bdb/media/base/video_types.cc
[modify] https://crrev.com/bde9a576b94edf60705b1d0e6f343a95a7227bdb/media/base/video_types.h
[add] https://crrev.com/bde9a576b94edf60705b1d0e6f343a95a7227bdb/media/base/video_types_unittest.cc
[modify] https://crrev.com/bde9a576b94edf60705b1d0e6f343a95a7227bdb/media/capture/video/linux/v4l2_capture_delegate.cc
[modify] https://crrev.com/bde9a576b94edf60705b1d0e6f343a95a7227bdb/media/gpu/v4l2/generic_v4l2_device.cc
[modify] https://crrev.com/bde9a576b94edf60705b1d0e6f343a95a7227bdb/media/gpu/v4l2/v4l2_device.cc
[modify] https://crrev.com/bde9a576b94edf60705b1d0e6f343a95a7227bdb/media/gpu/v4l2/v4l2_image_processor.cc
[modify] https://crrev.com/bde9a576b94edf60705b1d0e6f343a95a7227bdb/media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc
[modify] https://crrev.com/bde9a576b94edf60705b1d0e6f343a95a7227bdb/media/gpu/v4l2/v4l2_video_decode_accelerator.cc
[modify] https://crrev.com/bde9a576b94edf60705b1d0e6f343a95a7227bdb/media/gpu/v4l2/v4l2_video_encode_accelerator.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Sep 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/960ca51c36cb1a98164ce2a34887dd7f655087d5

commit 960ca51c36cb1a98164ce2a34887dd7f655087d5
Author: Dean Liao <deanliao@chromium.org>
Date: Thu Sep 13 14:15:02 2018

v4l2: Add V4L2FormatToString().

V4L2FormatToString() converts v4l2_format struct to human
readable string to facilitate debugging.

BUG=chromium:882339
TEST=None

Change-Id: I9637d57a3f7c85e17195a224a6fa20ba86fe54ed
Reviewed-on: https://chromium-review.googlesource.com/1189313
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Shuo-Peng Liao <deanliao@google.com>
Cr-Commit-Position: refs/heads/master@{#591000}
[modify] https://crrev.com/960ca51c36cb1a98164ce2a34887dd7f655087d5/media/gpu/v4l2/v4l2_device.cc
[modify] https://crrev.com/960ca51c36cb1a98164ce2a34887dd7f655087d5/media/gpu/v4l2/v4l2_device.h

Sign in to add a comment