gint main (gint argc, gchar * argv[]) { gchar *str; GstCaps *caps; GstAudioChannelPosition pos[2] = { GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT }; /* register multichannel type */ gst_init (&argc, &argv); gst_audio_channel_position_get_type (); /* test some caps-string conversions */ caps = gst_caps_new_simple ("audio/x-raw-int", "channels", G_TYPE_INT, 2, NULL); str = gst_caps_to_string (caps); g_print ("Test caps #1: %s\n", str); g_free (str); gst_audio_set_channel_positions (gst_caps_get_structure (caps, 0), pos); str = gst_caps_to_string (caps); g_print ("Test caps #2: %s\n", str); g_free (str); gst_caps_unref (caps); return 0; }
static gboolean plugin_init (GstPlugin * plugin) { /* ensure GstAudioChannelPosition type is registered */ if (!gst_audio_channel_position_get_type ()) return FALSE; if (!gst_element_register (plugin, "a52dec", GST_RANK_SECONDARY, GST_TYPE_A52DEC)) return FALSE; return TRUE; }