diff options
| author | Anton Khirnov <[email protected]> | 2013-03-28 09:10:09 +0100 | 
|---|---|---|
| committer | Anton Khirnov <[email protected]> | 2013-04-11 20:46:04 +0200 | 
| commit | e19e8aeeaaff3d4bc8f6065764c93f0298782ac6 (patch) | |
| tree | 4acf3225ce2695ff1465b933ff305a07613ef3f4 /cmdutils.c | |
| parent | dc574658d15ad8f171dbdecbdce7197acf9424a0 (diff) | |
avtools: move media_type_string() from avprobe to cmdutils.
It will be useful outside of avprobe.
Diffstat (limited to 'cmdutils.c')
| -rw-r--r-- | cmdutils.c | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/cmdutils.c b/cmdutils.c index 7084faed41..f43f70120a 100644 --- a/cmdutils.c +++ b/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"; +    } +} | 
