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
eb040dbb
Commit
eb040dbb
authored
May 23, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dv1394: add a private option for video standard.
parent
e199eb44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
+25
-5
dv1394.c
libavdevice/dv1394.c
+25
-5
No files found.
libavdevice/dv1394.c
View file @
eb040dbb
...
...
@@ -30,6 +30,8 @@
#include <time.h>
#include <strings.h>
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavformat/avformat.h"
#undef DV1394_DEBUG
...
...
@@ -38,6 +40,7 @@
#include "dv1394.h"
struct
dv1394_data
{
AVClass
*
class
;
int
fd
;
int
channel
;
int
format
;
...
...
@@ -90,10 +93,12 @@ static int dv1394_read_header(AVFormatContext * context, AVFormatParameters * ap
if
(
!
dv
->
dv_demux
)
goto
failed
;
if
(
ap
->
standard
&&
!
strcasecmp
(
ap
->
standard
,
"pal"
))
dv
->
format
=
DV1394_PAL
;
else
dv
->
format
=
DV1394_NTSC
;
if
(
ap
->
standard
)
{
if
(
!
strcasecmp
(
ap
->
standard
,
"pal"
))
dv
->
format
=
DV1394_PAL
;
else
dv
->
format
=
DV1394_NTSC
;
}
if
(
ap
->
channel
)
dv
->
channel
=
ap
->
channel
;
...
...
@@ -227,6 +232,20 @@ static int dv1394_close(AVFormatContext * context)
return
0
;
}
static
const
AVOption
options
[]
=
{
{
"standard"
,
""
,
offsetof
(
struct
dv1394_data
,
format
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DV1394_NTSC
},
DV1394_PAL
,
DV1394_NTSC
,
AV_OPT_FLAG_DECODING_PARAM
,
"standard"
},
{
"PAL"
,
""
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
DV1394_PAL
},
0
,
0
,
AV_OPT_FLAG_DECODING_PARAM
,
"standard"
},
{
"NTSC"
,
""
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
DV1394_NTSC
},
0
,
0
,
AV_OPT_FLAG_DECODING_PARAM
,
"standard"
},
{
NULL
},
};
static
const
AVClass
dv1394_class
=
{
.
class_name
=
"DV1394 indev"
,
.
item_name
=
av_default_item_name
,
.
option
=
options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
};
AVInputFormat
ff_dv1394_demuxer
=
{
.
name
=
"dv1394"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"DV1394 A/V grab"
),
...
...
@@ -234,5 +253,6 @@ AVInputFormat ff_dv1394_demuxer = {
.
read_header
=
dv1394_read_header
,
.
read_packet
=
dv1394_read_packet
,
.
read_close
=
dv1394_close
,
.
flags
=
AVFMT_NOFILE
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
dv1394_class
,
};
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