avtools: move media_type_string() from avprobe to cmdutils.
It will be useful outside of avprobe.
This commit is contained in:
14
avprobe.c
14
avprobe.c
@@ -526,20 +526,6 @@ static char *tag_string(char *buf, int buf_size, int tag)
|
||||
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)
|
||||
{
|
||||
char val_str[128];
|
||||
|
Reference in New Issue
Block a user