Commit 8b48127a authored by Philipp Schafft's avatar Philipp Schafft 🦁
Browse files

Feature: Added support for Matroska.

That was easy.
parent af436a1d
......@@ -52,6 +52,7 @@ extern "C" {
#define SHOUT_FORMAT_MP3 ( 1) /* MP3 */
#define SHOUT_FORMAT_WEBM ( 2) /* WebM */
#define SHOUT_FORMAT_WEBMAUDIO ( 3) /* WebM, audio only, obsolete. Only used by shout_set_format() */
#define SHOUT_FORMAT_MATROSKA ( 4) /* Matroska */
/* backward-compatibility alias */
#define SHOUT_FORMAT_VORBIS SHOUT_FORMAT_OGG
......
......@@ -901,6 +901,15 @@ static const char *shout_get_mimetype(unsigned int format, unsigned int usage, c
return "video/webm";
}
break;
case SHOUT_FORMAT_MATROSKA:
if (is_audio(usage)) {
return "audio/x-matroska";
} else if (is_video(usage) && (usage & SHOUT_USAGE_3D)) {
return "video/x-matroska-3d";
} else if (is_video(usage)) {
return "video/x-matroska";
}
break;
}
return NULL;
......@@ -1331,6 +1340,7 @@ static int try_connect(shout_t *self)
break;
case SHOUT_FORMAT_WEBM:
case SHOUT_FORMAT_WEBMAUDIO:
case SHOUT_FORMAT_MATROSKA:
rc = self->error = shout_open_webm(self);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment