All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Ran Shalit <ranshalit@gmail.com>, linux-media@vger.kernel.org
Subject: Re: v4l2 kernel module debugging methods
Date: Sat, 05 Dec 2015 19:23:47 -0500	[thread overview]
Message-ID: <1449361427.31991.17.camel@collabora.com> (raw)
In-Reply-To: <CAJ2oMhKbYfqz1Vy5-ERPTZAkNZt=9+rzr6yNduQiyfAWM_Zfug@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]

Le dimanche 06 décembre 2015 à 00:00 +0200, Ran Shalit a écrit :
> Hello,
> 
> I would like to ask a general question regarding methods to debug a
> v4l2 device driver.
> Since I assume that the kernel driver will probably won't work in
> first try after coding everything inside the device driver...
> 
> 1. Do you think qemu/kgdb debugger is a good method for the device
> driver debugging , or is it plain printing ?
> 
> 2. Is there a simple way to display the image of a YUV-like buffer in
> memory ?

Most Linux distribution ships GStreamer. You can with GStreamer read
and display a raw YUV images (you need to know the specific format)
using videoparse element.

  gst-launch-1.0 filesrc location=my.yuv ! videoparse format=yuy2 width=320 height=240 ! imagefreeze ! videoconvert ! autovideosink

You could also encode and store to various formats, replacing the
imagefreeze ... section with an encoder and a filesink. Note that
videoparse unfortunatly does not allow passing strides array or
offsets. So it will work only if you set the width/height to padded
width/height.

regards,
Nicolas

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2015-12-06  0:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-05 22:00 v4l2 kernel module debugging methods Ran Shalit
2015-12-06  0:23 ` Nicolas Dufresne [this message]
2015-12-10 21:46   ` Ran Shalit
2015-12-11  0:22     ` Nicolas Dufresne
2015-12-11  8:50     ` Fabien DESSENNE
2015-12-12 11:40       ` Ran Shalit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449361427.31991.17.camel@collabora.com \
    --to=nicolas.dufresne@collabora.com \
    --cc=linux-media@vger.kernel.org \
    --cc=ranshalit@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.