From a5f5f9a77bb9dea55b58f516b0a5bbd87c7d2f95 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 11 May 2004 15:31:36 +0000 Subject: [PATCH] ext/libvisual/visual.c: use the right caps depending on endianness (I hope) Original commit message from CVS: * ext/libvisual/visual.c: (gst_visual_getcaps): use the right caps depending on endianness (I hope) * ext/ogg/gstoggmux.c: (gst_ogg_mux_plugin_init): use GST_RANK_NONE for all non-decoding elements or spider gets mighty confused --- ChangeLog | 8 ++++++++ ext/libvisual/visual.c | 11 ++++++++++- ext/ogg/gstoggmux.c | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8ad58d34dd..02190340f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-05-11 Benjamin Otte + + * ext/libvisual/visual.c: (gst_visual_getcaps): + use the right caps depending on endianness (I hope) + * ext/ogg/gstoggmux.c: (gst_ogg_mux_plugin_init): + use GST_RANK_NONE for all non-decoding elements or spider gets + mighty confused + 2004-05-11 Ronald Bultje * gst/asfdemux/gstasfdemux.c: (gst_asf_demux_process_comment): diff --git a/ext/libvisual/visual.c b/ext/libvisual/visual.c index c8e555234f..0c1421aa10 100644 --- a/ext/libvisual/visual.c +++ b/ext/libvisual/visual.c @@ -75,7 +75,12 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB_HOST_ENDIAN "; " - GST_VIDEO_CAPS_BGR "; " GST_VIDEO_CAPS_RGB_16) +#if G_BYTE_ORDER == G_BIG_ENDIAN + GST_VIDEO_CAPS_RGB "; " +#else + GST_VIDEO_CAPS_BGR "; " +#endif + GST_VIDEO_CAPS_RGB_16) ); static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -214,7 +219,11 @@ gst_visual_getcaps (GstPad * pad) } if (visual_actor_depth_is_supported (visual->actor, VISUAL_VIDEO_CONTEXT_24BIT) == 1) { +#if G_BYTE_ORDER == G_BIG_ENDIAN + gst_caps_append (ret, gst_caps_from_string (GST_VIDEO_CAPS_RGB)); +#else gst_caps_append (ret, gst_caps_from_string (GST_VIDEO_CAPS_BGR)); +#endif } if (visual_actor_depth_is_supported (visual->actor, VISUAL_VIDEO_CONTEXT_16BIT) == 1) { diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 967c9fbfc0..88d5e231b7 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -673,6 +673,6 @@ gst_ogg_mux_plugin_init (GstPlugin * plugin) { GST_DEBUG_CATEGORY_INIT (gst_ogg_mux_debug, "oggmux", 0, "ogg muxer"); - return gst_element_register (plugin, "oggmux", GST_RANK_PRIMARY, + return gst_element_register (plugin, "oggmux", GST_RANK_NONE, GST_TYPE_OGG_MUX); }