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
bca06e77
Commit
bca06e77
authored
Aug 11, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: add avcodec_get_type() for mapping codec_id -> type.
parent
7f5bf4fb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
2 deletions
+27
-2
APIchanges
doc/APIchanges
+3
-0
avcodec.h
libavcodec/avcodec.h
+8
-0
utils.c
libavcodec/utils.c
+14
-0
version.h
libavcodec/version.h
+2
-2
No files found.
doc/APIchanges
View file @
bca06e77
...
...
@@ -13,6 +13,9 @@ libavutil: 2011-04-18
API changes, most recent first:
2011-08-xx - xxxxxxx - lavc 53.8.0
Add avcodec_get_type().
2011-08-06 - 2f63440 - lavf 53.4.0
Add error_recognition to AVFormatContext.
...
...
libavcodec/avcodec.h
View file @
bca06e77
...
...
@@ -210,6 +210,7 @@ enum CodecID {
CODEC_ID_DFA
,
/* various PCM "codecs" */
CODEC_ID_FIRST_AUDIO
=
0x10000
,
///< A dummy id pointing at the start of audio codecs
CODEC_ID_PCM_S16LE
=
0x10000
,
CODEC_ID_PCM_S16BE
,
CODEC_ID_PCM_U16LE
,
...
...
@@ -340,6 +341,7 @@ enum CodecID {
CODEC_ID_QDMC
,
/* subtitle codecs */
CODEC_ID_FIRST_SUBTITLE
=
0x17000
,
///< A dummy ID pointing at the start of subtitle codecs.
CODEC_ID_DVD_SUBTITLE
=
0x17000
,
CODEC_ID_DVB_SUBTITLE
,
CODEC_ID_TEXT
,
///< raw UTF-8 text
...
...
@@ -351,6 +353,7 @@ enum CodecID {
CODEC_ID_SRT
,
/* other specific kind of codecs (generally used for attachments) */
CODEC_ID_FIRST_UNKNOWN
=
0x18000
,
///< A dummy ID pointing at the start of various fake codecs.
CODEC_ID_TTF
=
0x18000
,
CODEC_ID_PROBE
=
0x19000
,
///< codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it
...
...
@@ -4273,4 +4276,9 @@ enum AVLockOp {
*/
int
av_lockmgr_register
(
int
(
*
cb
)(
void
**
mutex
,
enum
AVLockOp
op
));
/**
* Get the type of the given codec.
*/
enum
AVMediaType
avcodec_get_type
(
enum
CodecID
codec_id
);
#endif
/* AVCODEC_AVCODEC_H */
libavcodec/utils.c
View file @
bca06e77
...
...
@@ -1301,3 +1301,17 @@ int avcodec_thread_init(AVCodecContext *s, int thread_count)
return
ff_thread_init
(
s
);
}
#endif
enum
AVMediaType
avcodec_get_type
(
enum
CodecID
codec_id
)
{
if
(
codec_id
<=
CODEC_ID_NONE
)
return
AVMEDIA_TYPE_UNKNOWN
;
else
if
(
codec_id
<
CODEC_ID_FIRST_AUDIO
)
return
AVMEDIA_TYPE_VIDEO
;
else
if
(
codec_id
<
CODEC_ID_FIRST_SUBTITLE
)
return
AVMEDIA_TYPE_AUDIO
;
else
if
(
codec_id
<
CODEC_ID_FIRST_UNKNOWN
)
return
AVMEDIA_TYPE_SUBTITLE
;
return
AVMEDIA_TYPE_UNKNOWN
;
}
libavcodec/version.h
View file @
bca06e77
...
...
@@ -21,8 +21,8 @@
#define AVCODEC_VERSION_H
#define LIBAVCODEC_VERSION_MAJOR 53
#define LIBAVCODEC_VERSION_MINOR
7
#define LIBAVCODEC_VERSION_MICRO
1
#define LIBAVCODEC_VERSION_MINOR
8
#define LIBAVCODEC_VERSION_MICRO
0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
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