Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
e19e8aee
Commit
e19e8aee
authored
11 years ago
by
Anton Khirnov
Browse files
Options
Downloads
Patches
Plain Diff
avtools: move media_type_string() from avprobe to cmdutils.
It will be useful outside of avprobe.
parent
dc574658
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
avprobe.c
+0
-14
0 additions, 14 deletions
avprobe.c
cmdutils.c
+12
-0
12 additions, 0 deletions
cmdutils.c
cmdutils.h
+5
-0
5 additions, 0 deletions
cmdutils.h
with
17 additions
and
14 deletions
avprobe.c
+
0
−
14
View file @
e19e8aee
...
@@ -526,20 +526,6 @@ static char *tag_string(char *buf, int buf_size, int tag)
...
@@ -526,20 +526,6 @@ static char *tag_string(char *buf, int buf_size, int tag)
return
buf
;
return
buf
;
}
}
static
const
char
*
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
"unknown"
;
}
}
static
void
show_packet
(
AVFormatContext
*
fmt_ctx
,
AVPacket
*
pkt
)
static
void
show_packet
(
AVFormatContext
*
fmt_ctx
,
AVPacket
*
pkt
)
{
{
char
val_str
[
128
];
char
val_str
[
128
];
...
...
This diff is collapsed.
Click to expand it.
cmdutils.c
+
12
−
0
View file @
e19e8aee
...
@@ -1553,3 +1553,15 @@ void *grow_array(void *array, int elem_size, int *size, int new_size)
...
@@ -1553,3 +1553,15 @@ void *grow_array(void *array, int elem_size, int *size, int new_size)
}
}
return
array
;
return
array
;
}
}
const
char
*
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
"unknown"
;
}
}
This diff is collapsed.
Click to expand it.
cmdutils.h
+
5
−
0
View file @
e19e8aee
...
@@ -514,6 +514,11 @@ FILE *get_preset_file(char *filename, size_t filename_size,
...
@@ -514,6 +514,11 @@ FILE *get_preset_file(char *filename, size_t filename_size,
*/
*/
void
*
grow_array
(
void
*
array
,
int
elem_size
,
int
*
size
,
int
new_size
);
void
*
grow_array
(
void
*
array
,
int
elem_size
,
int
*
size
,
int
new_size
);
/**
* Get a string describing a media type.
*/
const
char
*
media_type_string
(
enum
AVMediaType
media_type
);
#define GROW_ARRAY(array, nb_elems)\
#define GROW_ARRAY(array, nb_elems)\
array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1)
array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment