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
e4dd03f3
Commit
e4dd03f3
authored
May 10, 2007
by
Luca Abeni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reindent code after last commit
Originally committed as revision 8973 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
82dc348b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
34 deletions
+34
-34
v4l2.c
libavformat/v4l2.c
+34
-34
No files found.
libavformat/v4l2.c
View file @
e4dd03f3
...
...
@@ -430,48 +430,48 @@ static int v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap )
int
i
;
if
(
ap
->
channel
>=
0
)
{
/* set tv video input */
memset
(
&
input
,
0
,
sizeof
(
input
));
input
.
index
=
ap
->
channel
;
if
(
ioctl
(
s
->
fd
,
VIDIOC_ENUMINPUT
,
&
input
)
<
0
)
{
av_log
(
s1
,
AV_LOG_ERROR
,
"The V4L2 driver ioctl enum input failed:
\n
"
);
return
AVERROR_IO
;
}
/* set tv video input */
memset
(
&
input
,
0
,
sizeof
(
input
));
input
.
index
=
ap
->
channel
;
if
(
ioctl
(
s
->
fd
,
VIDIOC_ENUMINPUT
,
&
input
)
<
0
)
{
av_log
(
s1
,
AV_LOG_ERROR
,
"The V4L2 driver ioctl enum input failed:
\n
"
);
return
AVERROR_IO
;
}
av_log
(
s1
,
AV_LOG_DEBUG
,
"The V4L2 driver set input_id: %d, input: %s
\n
"
,
ap
->
channel
,
input
.
name
);
if
(
ioctl
(
s
->
fd
,
VIDIOC_S_INPUT
,
&
input
.
index
)
<
0
)
{
av_log
(
s1
,
AV_LOG_ERROR
,
"The V4L2 driver ioctl set input(%d) failed
\n
"
,
ap
->
channel
);
return
AVERROR_IO
;
}
av_log
(
s1
,
AV_LOG_DEBUG
,
"The V4L2 driver set input_id: %d, input: %s
\n
"
,
ap
->
channel
,
input
.
name
);
if
(
ioctl
(
s
->
fd
,
VIDIOC_S_INPUT
,
&
input
.
index
)
<
0
)
{
av_log
(
s1
,
AV_LOG_ERROR
,
"The V4L2 driver ioctl set input(%d) failed
\n
"
,
ap
->
channel
);
return
AVERROR_IO
;
}
}
if
(
ap
->
standard
)
{
av_log
(
s1
,
AV_LOG_DEBUG
,
"The V4L2 driver set standard: %s
\n
"
,
ap
->
standard
);
/* set tv standard */
memset
(
&
standard
,
0
,
sizeof
(
standard
));
for
(
i
=
0
;;
i
++
)
{
standard
.
index
=
i
;
if
(
ioctl
(
s
->
fd
,
VIDIOC_ENUMSTD
,
&
standard
)
<
0
)
{
av_log
(
s1
,
AV_LOG_DEBUG
,
"The V4L2 driver set standard: %s
\n
"
,
ap
->
standard
);
/* set tv standard */
memset
(
&
standard
,
0
,
sizeof
(
standard
));
for
(
i
=
0
;;
i
++
)
{
standard
.
index
=
i
;
if
(
ioctl
(
s
->
fd
,
VIDIOC_ENUMSTD
,
&
standard
)
<
0
)
{
av_log
(
s1
,
AV_LOG_ERROR
,
"The V4L2 driver ioctl set standard(%s) failed
\n
"
,
ap
->
standard
);
return
AVERROR_IO
;
}
if
(
!
strcasecmp
(
standard
.
name
,
ap
->
standard
))
{
break
;
}
}
av_log
(
s1
,
AV_LOG_DEBUG
,
"The V4L2 driver set standard: %s, id: %"
PRIu64
"
\n
"
,
ap
->
standard
,
standard
.
id
);
if
(
ioctl
(
s
->
fd
,
VIDIOC_S_STD
,
&
standard
.
id
)
<
0
)
{
av_log
(
s1
,
AV_LOG_ERROR
,
"The V4L2 driver ioctl set standard(%s) failed
\n
"
,
ap
->
standard
);
return
AVERROR_IO
;
}
if
(
!
strcasecmp
(
standard
.
name
,
ap
->
standard
))
{
break
;
}
}
av_log
(
s1
,
AV_LOG_DEBUG
,
"The V4L2 driver set standard: %s, id: %"
PRIu64
"
\n
"
,
ap
->
standard
,
standard
.
id
);
if
(
ioctl
(
s
->
fd
,
VIDIOC_S_STD
,
&
standard
.
id
)
<
0
)
{
av_log
(
s1
,
AV_LOG_ERROR
,
"The V4L2 driver ioctl set standard(%s) failed
\n
"
,
ap
->
standard
);
return
AVERROR_IO
;
}
}
return
0
;
...
...
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