Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / gst-libs / gst / audio / testchannels.c
1 /* GStreamer Multichannel Test
2  * (c) 2004 Ronald Bultje <rbultje@ronald.bitfreak.net>
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 #include "multichannel.c"
21 #include "audio-enumtypes.c"
22
23 gint
24 main (gint argc, gchar * argv[])
25 {
26   gchar *str;
27   GstCaps *caps;
28   GstAudioChannelPosition pos[2] = { GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
29     GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT
30   };
31
32   /* register multichannel type */
33   gst_init (&argc, &argv);
34   gst_audio_channel_position_get_type ();
35
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);
41   g_free (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);
45   g_free (str);
46   gst_caps_unref (caps);
47
48   return 0;
49 }