[Bug 758258] matroska: Missing support for prores video
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Wed Nov 18 03:19:44 PST 2015
https://bugzilla.gnome.org/show_bug.cgi?id=758258
--- Comment #9 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 315812
--> https://bugzilla.gnome.org/attachment.cgi?id=315812
matroska-mux: Implement prores support
>+ } else if (strcmp (mimetype, "video/x-prores") == 0) {
>+ guint32 fourcc;
>+ const gchar *variant;
>+
>+ variant = gst_structure_get_string (structure, "format");
>+ if (!variant || !g_strcmp0 (variant, "standard"))
>+ fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 'n');
>+ else if (!g_strcmp0 (variant, "lt"))
>+ fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 's');
>+ else if (!g_strcmp0 (variant, "hq"))
>+ fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 'h');
>+ else if (!g_strcmp0 (variant, "proxy"))
>+ fourcc = GST_MAKE_FOURCC ('a', 'p', '4', 'h');
>+
>+ gst_matroska_mux_free_codec_priv (context);
>+ context->codec_priv = g_malloc (sizeof (guint32));
>+ *((guint32 *) context->codec_priv) = fourcc;
>+ context->codec_priv_size = sizeof (guint32);
This could be simplified, with the added advantage that one doesn't have to
wonder whether it's endian-safe or not, e.g. why not just do:
if (if (!g_strcmp0 (variant, "foo"))
context->codec_priv = g_strdup ("abcd");
...
context->codec_priv_size = 4;
?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list