v4l2


Where I can find example in using v4l2 codec driver


in Raspberry-Pi code, there is a s5p-jpeg codec driver.
drivers/media/platform/s5p-jpeg/jpeg-core.c
Can sombody please tell me where I can find an example of how to use it?
Or any other v4l2 codec driver?
I have googled for it, but I cannot find any example which uses a v4l2 codec driver.
(adding another answer, since it's completely different :-))
A "codec" API in the V4L2 specs, refers to hardware codecs.
such a codec is a device that has the following features:
the hardware codec shows up as a /dev/videoX device
it has a video input, where you're userland application can send a video-stream - e.g. containing JPEG-encoded video frames - to, so it has the V4L2_CAP_VIDEO_OUTPUT capability and
it has a video output, where you're userland application can read a video-stream - e.g. containing the uncompressed frames - from, so it also has the V4L2_CAP_VIDEO_CAPTURE capability.
There are numerous applications that can write video to a v4l2 OUTPUT device, here are a few that i know of:
GStreamer's v4l2sink element
LiVeS
Gem
...
afaik, these application don't have any specific code to deal with "v4l2 codec devices", but can write to/read from v4l2 devices, which is all that you should need.
Also check the v4l-utils.git: Look in utils/v4l2-ctl/v4l2-ctl-streaming.cpp
v4l2 is very liberal when it comes to formats: e.g. capture devices can deliver frames in virtually any format.
So if you are writing a user-land tool (application, library,...; as opposed to a kernel-driver), though shalt not fiddle with codecs (if you can avoid it).
Imagine each and every application in the world that wants to read v4l2-streams, having to add code to decode frames in SQ905C or MJPEG or whatnot codec (each application adding their own set of buggy implementation)
Instead, smart people created a library which will decompress the frames delivered by your capture device and provide these frames in a standard way: libv4l2.
Incidentally, if you insist on writing your own code, libv4l2 is a good reference implementation.
Oh, and if you were thinking about simpy loading a module to the encoding/decoding in kernel-space (e.g. you have webcam "foo" which delivers images in format "XYZ" but you want it to deliver images in format "ABC" by means of adding a kernel-module) then you are out of luck.
Linus T. has been quite clear [missing reference] that codec conversion code is not to be run within kernel-space.

Related Links

V4L2 frame rate maxes out at ~10FPS… why?
Any known-to-work example in C using VIDIOC_S_CROP in V4L2?
Getting framesize in V4L2 with VIDIOC_ENUM_FRAMESIZES
A4Tech webcam and avconv (ffmpeg) captures same frame all the time
yavta cause kernel panic (ov5640 with DM3730)
V4L2 preview with callback instead of polling-loop
Function call ioctl with VIDIOC_QUERYCAP request doesn't return
V4L2 difference between JPEG and MJPEG pixel formats
v4l2-ctl not changing from default webcam
Where I can find example in using v4l2 codec driver
Timestamp for v4l2 image capture
Where does v4l2_buffer->timestamp value starts counting?

Categories

HOME
qlikview
repository
ckan
stata
ssh
fortran
grpc
latex
snmp
thermal-printer
localhost
perl6
flowtype
procmon
qt4
clip-path
wkhtmltopdf
dynamics-crm-2011
resharper
yui
exchange-transport-agents
luis
openscad
alert
google-street-view
ejb-3.1
hololens
jira-zephyr
suitescript
inspec
traveling-salesman
gulp-jshint
libxml2
ocl
xlib
deferred
ios-autolayout
slim-lang
log4net-configuration
qt-designer
circle
favorites
angularjs-resource
http-proxy
wit-ai
dotnetnuke-module
quartz
qt-quick
pyopenssl
perldoc
enet
bioperl
playframework-2.3
activesupport
copy-constructor
cedar-bdd
easy68k
objectify
gdi
factorization
markerspiderfier
newlib
biginsights
om
exchange-server-2007
xml-simple
page-refresh
pymol
sat4j
nest-initiative
data-layers
mysql-error-1146
lastinsertid
google-voice
grunt-contrib-imagemin
fade
pechkin
cocotron
bho
gmail-imap
zepto
rfc822
cryptarithmetic-puzzle
doxia
databus
systrace
erlide
scriptmanager
rjs
soapexception
functional-specifications
response-time
rollover
web-search
dgml
retrospectiva
jgrowl
cross-cutting-concerns
high-load

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile