1 /* GStreamer Multichannel Test
2 * (c) 2004 Ronald Bultje <rbultje@ronald.bitfreak.net>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #include "multichannel.c"
21 #include "audio-enumtypes.c"
24 main (gint argc, gchar * argv[])
28 GstAudioChannelPosition pos[2] = { GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
29 GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT
32 /* register multichannel type */
33 gst_init (&argc, &argv);
34 gst_audio_channel_position_get_type ();
36 /* test some caps-string conversions */
37 caps = gst_caps_new_simple ("audio/x-raw-int",
38 "channels", G_TYPE_INT, 2, NULL);
39 str = gst_caps_to_string (caps);
40 g_print ("Test caps #1: %s\n", str);
42 gst_audio_set_channel_positions (gst_caps_get_structure (caps, 0), pos);
43 str = gst_caps_to_string (caps);
44 g_print ("Test caps #2: %s\n", str);
46 gst_caps_unref (caps);