Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
d0705ecb
Commit
d0705ecb
authored
Nov 04, 2017
by
David Manouchehri
Committed by
Mark Thompson
May 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avdevice/v4l2enc: Allow writing non-rawvideos to v4l2.
Signed-off-by:
David Manouchehri
<
david.manouchehri@riseup.net
>
parent
d0bd00c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
v4l2enc.c
libavdevice/v4l2enc.c
+7
-3
No files found.
libavdevice/v4l2enc.c
View file @
d0705ecb
...
...
@@ -47,8 +47,7 @@ static av_cold int write_header(AVFormatContext *s1)
}
if
(
s1
->
nb_streams
!=
1
||
s1
->
streams
[
0
]
->
codecpar
->
codec_type
!=
AVMEDIA_TYPE_VIDEO
||
s1
->
streams
[
0
]
->
codecpar
->
codec_id
!=
AV_CODEC_ID_RAWVIDEO
)
{
s1
->
streams
[
0
]
->
codecpar
->
codec_type
!=
AVMEDIA_TYPE_VIDEO
)
{
av_log
(
s1
,
AV_LOG_ERROR
,
"V4L2 output device supports only a single raw video stream
\n
"
);
return
AVERROR
(
EINVAL
);
...
...
@@ -56,7 +55,12 @@ static av_cold int write_header(AVFormatContext *s1)
par
=
s1
->
streams
[
0
]
->
codecpar
;
v4l2_pixfmt
=
ff_fmt_ff2v4l
(
par
->
format
,
AV_CODEC_ID_RAWVIDEO
);
if
(
par
->
codec_id
==
AV_CODEC_ID_RAWVIDEO
)
{
v4l2_pixfmt
=
ff_fmt_ff2v4l
(
par
->
format
,
AV_CODEC_ID_RAWVIDEO
);
}
else
{
v4l2_pixfmt
=
ff_fmt_ff2v4l
(
AV_PIX_FMT_NONE
,
par
->
codec_id
);
}
if
(
!
v4l2_pixfmt
)
{
// XXX: try to force them one by one?
av_log
(
s1
,
AV_LOG_ERROR
,
"Unknown V4L2 pixel format equivalent for %s
\n
"
,
av_get_pix_fmt_name
(
par
->
format
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment