From: Hans Verkuil <hverkuil@xs4all.nl>
To: Ran Shalit <ranshalit@gmail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: PCIe capture driver
Date: Sun, 25 Oct 2015 23:55:30 +0100 [thread overview]
Message-ID: <562D5DE2.5020406@xs4all.nl> (raw)
In-Reply-To: <CAJ2oMhJ1FhMqm_P0h+dzmTUJuvfK=DawPAO-R3duS6-XncsrMQ@mail.gmail.com>
On 10/25/2015 21:16, Ran Shalit wrote:
> On Sat, Oct 24, 2015 at 11:38 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>>
>>
>> On 10/23/2015 23:57, Ran Shalit wrote:
>>> On Tue, Oct 20, 2015 at 9:23 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>>>> On 10/19/2015 10:26 PM, Ran Shalit wrote:
>>>>> Hello,
>>>>>
>>>>> When writing a device driver for capturing video coming from PCIe,
>>>>> does it need to be used as v4l device (video for linux) , ?
>>>>
>>>> Yes. If you don't then 1) you will never be able to upstream the driver,
>>>> 2) any application that wants to use your driver will need custom code to
>>>> talk to your driver, 3) it will be a lot more work to write the driver
>>>> since you can't use the V4L2 kernel frameworks it provides or ask for
>>>> help.
>>>>
>>>> Basically, by deciding to reinvent the wheel you're screwing over your
>>>> customers and yourself.
>>>>
>>>> Here is a nice PCI(e) template driver that you can use as your starting
>>>> point: Documentation/video4linux/v4l2-pci-skeleton.c
>>>>
>>>> Regards,
>>>>
>>>> Hans
>>>
>>> Hi Hans,
>>>
>>> I now understand, that I will be using media sdk (Intel) which is
>>> based on DRM framework, and does not use v4l.
>>
>> DRM is for video output, not video capture. So this seems irrelevant.
>>
>>> So I probably need to do some custom driver for delivering video with PCIe.
>>
>> There is only one linux API for video capture: V4L2. What PCIe card are we
>> talking about here? What are you trying to achieve?
>>
>
> I need to capture video from PCIe . The video stream will be delivered
> from PC through PCIe to a custom board with Intel cpu using media sdk.
> The purpose is to encode the raw video and save the encoded stream to
> a file.
> I guess I can build some custom driver which waits for frames and
> deliver the received frames to the media sdk encoder.
So the capture driver captures the video to memory and passes it on to
the media sdk for encoding? That's V4L2: that API capures video into
memory.
So don't reinvent the wheel but use V4L2 for your PCIe driver.
> Since media sdk does not use v4l anyway, so I guess such custom driver
> is the best under this conditions, Right ?
No, use V4L2. What you do with the frame after it has been captured
into memory has no relevance to the API you use to capture into memory.
Regards,
Hans
next prev parent reply other threads:[~2015-10-25 22:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 20:26 PCIe capture driver Ran Shalit
2015-10-20 6:23 ` Hans Verkuil
2015-10-20 6:38 ` Ran Shalit
2015-10-23 21:57 ` Ran Shalit
2015-10-24 9:38 ` Hans Verkuil
2015-10-25 20:16 ` Ran Shalit
2015-10-25 22:55 ` Hans Verkuil [this message]
2015-10-26 11:46 ` Steven Toth
2015-10-26 17:04 ` Ran Shalit
2015-10-26 17:10 ` Jean-Michel Hautbois
2015-10-26 17:22 ` Steven Toth
2015-10-26 22:21 ` Hans Verkuil
2015-10-27 13:56 ` Ran Shalit
2015-10-27 22:50 ` Hans Verkuil
2015-10-30 9:18 ` Ran Shalit
2015-11-11 6:04 ` Ran Shalit
2015-11-11 7:22 ` Hans Verkuil
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=562D5DE2.5020406@xs4all.nl \
--to=hverkuil@xs4all.nl \
--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.