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
a0a41db3
Commit
a0a41db3
authored
May 23, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/testsrc: make nb_decimals available only in testsrc.
parent
288f9166
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
filters.texi
doc/filters.texi
+1
-1
version.h
libavfilter/version.h
+1
-1
vsrc_testsrc.c
libavfilter/vsrc_testsrc.c
+11
-13
No files found.
doc/filters.texi
View file @
a0a41db3
...
@@ -7453,7 +7453,7 @@ If not specified, or the expressed duration is negative, the video is
...
@@ -7453,7 +7453,7 @@ If not specified, or the expressed duration is negative, the video is
supposed to be generated forever.
supposed to be generated forever.
@item decimals, n
@item decimals, n
Set the number of decimals to show in the timestamp, only
used
in the
Set the number of decimals to show in the timestamp, only
available
in the
@code{testsrc} source.
@code{testsrc} source.
The displayed timestamp value will correspond to the original
The displayed timestamp value will correspond to the original
...
...
libavfilter/version.h
View file @
a0a41db3
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 69
#define LIBAVFILTER_VERSION_MINOR 69
#define LIBAVFILTER_VERSION_MICRO 10
0
#define LIBAVFILTER_VERSION_MICRO 10
1
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/vsrc_testsrc.c
View file @
a0a41db3
...
@@ -55,13 +55,15 @@ typedef struct {
...
@@ -55,13 +55,15 @@ typedef struct {
int64_t
pts
;
int64_t
pts
;
int64_t
duration
;
///< duration expressed in microseconds
int64_t
duration
;
///< duration expressed in microseconds
AVRational
sar
;
///< sample aspect ratio
AVRational
sar
;
///< sample aspect ratio
int
nb_decimals
;
int
draw_once
;
///< draw only the first frame, always put out the same picture
int
draw_once
;
///< draw only the first frame, always put out the same picture
int
draw_once_reset
;
///< draw only the first frame or in case of reset
int
draw_once_reset
;
///< draw only the first frame or in case of reset
AVFrame
*
picref
;
///< cached reference containing the painted picture
AVFrame
*
picref
;
///< cached reference containing the painted picture
void
(
*
fill_picture_fn
)(
AVFilterContext
*
ctx
,
AVFrame
*
frame
);
void
(
*
fill_picture_fn
)(
AVFilterContext
*
ctx
,
AVFrame
*
frame
);
/* only used by testsrc */
int
nb_decimals
;
/* only used by color */
/* only used by color */
FFDrawContext
draw
;
FFDrawContext
draw
;
FFDrawColor
color
;
FFDrawColor
color
;
...
@@ -86,23 +88,13 @@ typedef struct {
...
@@ -86,23 +88,13 @@ typedef struct {
static
const
AVOption
options
[]
=
{
static
const
AVOption
options
[]
=
{
COMMON_OPTIONS
COMMON_OPTIONS
/* only used by testsrc */
{
NULL
}
{
"decimals"
,
"set number of decimals to show"
,
OFFSET
(
nb_decimals
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
17
,
FLAGS
},
{
"n"
,
"set number of decimals to show"
,
OFFSET
(
nb_decimals
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
17
,
FLAGS
},
{
NULL
},
};
};
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
{
{
TestSourceContext
*
test
=
ctx
->
priv
;
TestSourceContext
*
test
=
ctx
->
priv
;
if
(
test
->
nb_decimals
&&
strcmp
(
ctx
->
filter
->
name
,
"testsrc"
))
{
av_log
(
ctx
,
AV_LOG_WARNING
,
"Option 'decimals' is ignored with source '%s'
\n
"
,
ctx
->
filter
->
name
);
}
test
->
time_base
=
av_inv_q
(
test
->
frame_rate
);
test
->
time_base
=
av_inv_q
(
test
->
frame_rate
);
test
->
nb_frame
=
0
;
test
->
nb_frame
=
0
;
test
->
pts
=
0
;
test
->
pts
=
0
;
...
@@ -317,7 +309,13 @@ AVFilter avfilter_vsrc_nullsrc = {
...
@@ -317,7 +309,13 @@ AVFilter avfilter_vsrc_nullsrc = {
#if CONFIG_TESTSRC_FILTER
#if CONFIG_TESTSRC_FILTER
#define testsrc_options options
static
const
AVOption
testsrc_options
[]
=
{
COMMON_OPTIONS
{
"decimals"
,
"set number of decimals to show"
,
OFFSET
(
nb_decimals
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
17
,
FLAGS
},
{
"n"
,
"set number of decimals to show"
,
OFFSET
(
nb_decimals
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
17
,
FLAGS
},
{
NULL
}
};
AVFILTER_DEFINE_CLASS
(
testsrc
);
AVFILTER_DEFINE_CLASS
(
testsrc
);
/**
/**
...
...
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