Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b608fba6
Commit
b608fba6
authored
Oct 29, 2014
by
Andrey Utkin
Committed by
Carl Eugen Hoyos
Oct 29, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use v4l2 input format automatically if filename starts with "/dev/video"
Signed-off-by:
Carl Eugen Hoyos
<
cehoyos@ag.or.at
>
parent
19a6431e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
v4l2.c
libavdevice/v4l2.c
+8
-0
No files found.
libavdevice/v4l2.c
View file @
b608fba6
...
...
@@ -806,6 +806,13 @@ static int device_try_init(AVFormatContext *ctx,
return
ret
;
}
static
int
v4l2_read_probe
(
AVProbeData
*
p
)
{
if
(
av_strstart
(
p
->
filename
,
"/dev/video"
,
NULL
))
return
AVPROBE_SCORE_MAX
-
1
;
return
0
;
}
static
int
v4l2_read_header
(
AVFormatContext
*
ctx
)
{
struct
video_data
*
s
=
ctx
->
priv_data
;
...
...
@@ -1033,6 +1040,7 @@ AVInputFormat ff_v4l2_demuxer = {
.
name
=
"video4linux2,v4l2"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Video4Linux2 device grab"
),
.
priv_data_size
=
sizeof
(
struct
video_data
),
.
read_probe
=
v4l2_read_probe
,
.
read_header
=
v4l2_read_header
,
.
read_packet
=
v4l2_read_packet
,
.
read_close
=
v4l2_read_close
,
...
...
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