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
826cc58d
Commit
826cc58d
authored
Feb 10, 2019
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/img2dec: Split img2 and img2pipe options.
parent
21858b06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
img2dec.c
libavformat/img2dec.c
+16
-10
No files found.
libavformat/img2dec.c
View file @
826cc58d
...
...
@@ -564,29 +564,29 @@ static int img_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
#define OFFSET(x) offsetof(VideoDemuxData, x)
#define DEC AV_OPT_FLAG_DECODING_PARAM
#define COMMON_OPTIONS \
{ "framerate", "set the video framerate", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, DEC }, \
{ "pixel_format", "set video pixel format", OFFSET(pixel_format), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, \
{ "video_size", "set video size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, DEC }, \
{ NULL },
#if CONFIG_IMAGE2_DEMUXER
const
AVOption
ff_img_options
[]
=
{
{
"framerate"
,
"set the video framerate"
,
OFFSET
(
framerate
),
AV_OPT_TYPE_VIDEO_RATE
,
{.
str
=
"25"
},
0
,
INT_MAX
,
DEC
},
{
"loop"
,
"force loop over input file sequence"
,
OFFSET
(
loop
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
0
},
0
,
1
,
DEC
},
{
"pattern_type"
,
"set pattern type"
,
OFFSET
(
pattern_type
),
AV_OPT_TYPE_INT
,
{.
i64
=
PT_DEFAULT
},
0
,
INT_MAX
,
DEC
,
"pattern_type"
},
{
"glob_sequence"
,
"select glob/sequence pattern type"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
PT_GLOB_SEQUENCE
},
INT_MIN
,
INT_MAX
,
DEC
,
"pattern_type"
},
{
"glob"
,
"select glob pattern type"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
PT_GLOB
},
INT_MIN
,
INT_MAX
,
DEC
,
"pattern_type"
},
{
"sequence"
,
"select sequence pattern type"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
PT_SEQUENCE
},
INT_MIN
,
INT_MAX
,
DEC
,
"pattern_type"
},
{
"none"
,
"disable pattern matching"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
PT_NONE
},
INT_MIN
,
INT_MAX
,
DEC
,
"pattern_type"
},
{
"pixel_format"
,
"set video pixel format"
,
OFFSET
(
pixel_format
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
0
,
0
,
DEC
},
{
"start_number"
,
"set first number in the sequence"
,
OFFSET
(
start_number
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
INT_MIN
,
INT_MAX
,
DEC
},
{
"start_number_range"
,
"set range for looking at the first sequence number"
,
OFFSET
(
start_number_range
),
AV_OPT_TYPE_INT
,
{.
i64
=
5
},
1
,
INT_MAX
,
DEC
},
{
"video_size"
,
"set video size"
,
OFFSET
(
width
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
NULL
},
0
,
0
,
DEC
},
{
"frame_size"
,
"force frame size in bytes"
,
OFFSET
(
frame_size
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
INT_MAX
,
DEC
},
{
"ts_from_file"
,
"set frame timestamp from file's one"
,
OFFSET
(
ts_from_file
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
2
,
DEC
,
"ts_type"
},
{
"none"
,
"none"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
0
,
2
,
DEC
,
"ts_type"
},
{
"sec"
,
"second precision"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
0
,
2
,
DEC
,
"ts_type"
},
{
"ns"
,
"nano second precision"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
2
},
0
,
2
,
DEC
,
"ts_type"
},
{
NULL
},
COMMON_OPTIONS
};
#if CONFIG_IMAGE2_DEMUXER
static
const
AVClass
img2_class
=
{
.
class_name
=
"image2 demuxer"
,
.
item_name
=
av_default_item_name
,
...
...
@@ -606,11 +606,17 @@ AVInputFormat ff_image2_demuxer = {
.
priv_class
=
&
img2_class
,
};
#endif
const
AVOption
ff_img2pipe_options
[]
=
{
{
"frame_size"
,
"force frame size in bytes"
,
OFFSET
(
frame_size
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
INT_MAX
,
DEC
},
COMMON_OPTIONS
};
#if CONFIG_IMAGE2PIPE_DEMUXER
static
const
AVClass
img2pipe_class
=
{
.
class_name
=
"image2pipe demuxer"
,
.
item_name
=
av_default_item_name
,
.
option
=
ff_img_options
,
.
option
=
ff_img
2pipe
_options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
};
AVInputFormat
ff_image2pipe_demuxer
=
{
...
...
@@ -1023,7 +1029,7 @@ static int gif_probe(AVProbeData *p)
static const AVClass imgname ## _class = {\
.class_name = AV_STRINGIFY(imgname) " demuxer",\
.item_name = av_default_item_name,\
.option = ff_img_options,\
.option = ff_img
2pipe
_options,\
.version = LIBAVUTIL_VERSION_INT,\
};\
AVInputFormat ff_image_ ## imgname ## _pipe_demuxer = {\
...
...
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