Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
e19e8aee
Commit
e19e8aee
authored
Mar 28, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avtools: move media_type_string() from avprobe to cmdutils.
It will be useful outside of avprobe.
parent
dc574658
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
+17
-14
avprobe.c
avprobe.c
+0
-14
cmdutils.c
cmdutils.c
+12
-0
cmdutils.h
cmdutils.h
+5
-0
No files found.
avprobe.c
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
];
...
...
cmdutils.c
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"
;
}
}
cmdutils.h
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)
...
...
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