mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-05 23:34:35 +08:00
avtools: move media_type_string() from avprobe to cmdutils.
It will be useful outside of avprobe.
This commit is contained in:
12
cmdutils.c
12
cmdutils.c
@ -1553,3 +1553,15 @@ void *grow_array(void *array, int elem_size, int *size, int new_size)
|
||||
}
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user