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
fef411ef
Commit
fef411ef
authored
Dec 03, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: Add a AVClass for AVFrames.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
dff97be8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
avcodec.h
libavcodec/avcodec.h
+8
-0
options.c
libavcodec/options.c
+24
-0
No files found.
libavcodec/avcodec.h
View file @
fef411ef
...
...
@@ -4687,4 +4687,12 @@ enum AVMediaType avcodec_get_type(enum CodecID codec_id);
*/
const
AVClass
*
avcodec_get_class
(
void
);
/**
* Get the AVClass for AVFrame. It can be used in combination with
* AV_OPT_SEARCH_FAKE_OBJ for examining options.
*
* @see av_opt_find().
*/
const
AVClass
*
avcodec_get_frame_class
(
void
);
#endif
/* AVCODEC_AVCODEC_H */
libavcodec/options.c
View file @
fef411ef
...
...
@@ -700,3 +700,27 @@ const AVClass *avcodec_get_class(void)
{
return
&
av_codec_context_class
;
}
#define FOFFSET(x) offsetof(AVFrame,x)
static
const
AVOption
frame_options
[]
=
{
{
"best_effort_timestamp"
,
""
,
FOFFSET
(
best_effort_timestamp
),
AV_OPT_TYPE_INT64
,
{.
dbl
=
AV_NOPTS_VALUE
},
INT64_MIN
,
INT64_MAX
,
0
},
{
"pkt_pos"
,
""
,
FOFFSET
(
pkt_pos
),
AV_OPT_TYPE_INT64
,
{.
dbl
=
-
1
},
INT64_MIN
,
INT64_MAX
,
0
},
{
"sample_aspect_ratio"
,
""
,
FOFFSET
(
sample_aspect_ratio
),
AV_OPT_TYPE_RATIONAL
,
{.
dbl
=
0
},
0
,
INT_MAX
,
0
},
{
"width"
,
""
,
FOFFSET
(
width
),
AV_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
INT_MAX
,
0
},
{
"height"
,
""
,
FOFFSET
(
height
),
AV_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
INT_MAX
,
0
},
{
"format"
,
""
,
FOFFSET
(
format
),
AV_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
0
,
INT_MAX
,
0
},
{
NULL
},
};
static
const
AVClass
av_frame_class
=
{
.
class_name
=
"AVFrame"
,
.
item_name
=
NULL
,
.
option
=
frame_options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
};
const
AVClass
*
avcodec_get_frame_class
(
void
)
{
return
&
av_frame_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