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
69e2c1a9
Commit
69e2c1a9
authored
Aug 18, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu: add av_get_media_type_string() convenience function
Avoid code duplication.
parent
31ac0ac2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
APIchanges
doc/APIchanges
+3
-0
avutil.h
libavutil/avutil.h
+7
-1
utils.c
libavutil/utils.c
+12
-0
No files found.
doc/APIchanges
View file @
69e2c1a9
...
...
@@ -13,6 +13,9 @@ libavutil: 2011-04-18
API changes, most recent first:
2011-08-20 - xxxxxx - lavu 51.13.0
Add av_get_media_type_string().
2011-08-14 - xxxxxx - lavu 52.12.0
Add av_fifo_peek2(), deprecate av_fifo_peek().
...
...
libavutil/avutil.h
View file @
69e2c1a9
...
...
@@ -40,7 +40,7 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 1
2
#define LIBAVUTIL_VERSION_MINOR 1
3
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...
...
@@ -95,6 +95,12 @@ enum AVMediaType {
AVMEDIA_TYPE_NB
};
/**
* Return a string describing the media_type enum, NULL if media_type
* is unknown.
*/
const
char
*
av_get_media_type_string
(
enum
AVMediaType
media_type
);
#define FF_LAMBDA_SHIFT 7
#define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)
#define FF_QP2LAMBDA 118 ///< factor to convert from H.263 QP to lambda
...
...
libavutil/utils.c
View file @
69e2c1a9
...
...
@@ -40,6 +40,18 @@ const char *avutil_license(void)
return
LICENSE_PREFIX
FFMPEG_LICENSE
+
sizeof
(
LICENSE_PREFIX
)
-
1
;
}
const
char
*
av_get_media_type_string
(
enum
AVMediaType
media_type
)
{
switch
(
media_type
)
{
case
AVMEDIA_TYPE_VIDEO
:
return
"video"
;
case
AVMEDIA_TYPE_AUDIO
:
return
"audio"
;
case
AVMEDIA_TYPE_DATA
:
return
"data"
;
case
AVMEDIA_TYPE_SUBTITLE
:
return
"subtitle"
;
case
AVMEDIA_TYPE_ATTACHMENT
:
return
"attachment"
;
default:
return
NULL
;
}
}
char
av_get_picture_type_char
(
enum
AVPictureType
pict_type
)
{
switch
(
pict_type
)
{
...
...
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