diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-12-21 11:00:47 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-12-21 11:17:11 +0200 |
commit | 9b5de053995488d5ddc78c1bf4df651101271d70 (patch) | |
tree | 07755463428bf4460852180dc4d3155cc28bf488 /tests | |
parent | 0fdd4e2539cc8c2c794419b13594ed7761d5fccd (diff) | |
download | gstreamer-plugins-bad-9b5de053995488d5ddc78c1bf4df651101271d70.tar.gz |
Remove various unported plugins
If they were not ported after 4+ years it seems unlikely that anybody is
ever going to need them again. They're still in the GIT history if
needed.
https://bugzilla.gnome.org/show_bug.cgi?id=774530
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/Makefile.am | 18 | ||||
-rw-r--r-- | tests/check/elements/timidity.c | 74 | ||||
-rw-r--r-- | tests/icles/dccp/README | 52 | ||||
-rw-r--r-- | tests/icles/dccp/call/DCCPClient.c | 152 | ||||
-rw-r--r-- | tests/icles/dccp/call/DCCPServer.c | 145 | ||||
-rw-r--r-- | tests/icles/dccp/call/README | 1 | ||||
-rw-r--r-- | tests/icles/dccp/file/DCCPClientSaveFile.c | 113 | ||||
-rw-r--r-- | tests/icles/dccp/file/DCCPServerSendFile.c | 112 | ||||
-rw-r--r-- | tests/icles/dccp/mic/DCCPClientPlayMic.c | 116 | ||||
-rw-r--r-- | tests/icles/dccp/mic/DCCPServerMic.c | 111 | ||||
-rw-r--r-- | tests/icles/dccp/mp3/DCCPClientPlayMP3.c | 117 | ||||
-rw-r--r-- | tests/icles/dccp/mp3/DCCPServerSendMP3.c | 113 | ||||
-rw-r--r-- | tests/icles/dccp/mp3Speex/DCCPClientPlaySpeexMP3.c | 120 | ||||
-rw-r--r-- | tests/icles/dccp/mp3Speex/DCCPServerSendSpeexMP3.c | 128 | ||||
-rw-r--r-- | tests/icles/dccp/mp3Stream/DCCPClientPlayMP3Stream.c | 113 | ||||
-rw-r--r-- | tests/icles/dccp/mp3Stream/DCCPServerSendMP3Stream.c | 113 |
16 files changed, 4 insertions, 1594 deletions
diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 21c411069..508b3b56f 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -14,11 +14,11 @@ AM_TESTS_ENVIRONMENT += \ GST_PLUGIN_SYSTEM_PATH_1_0= \ GST_PLUGIN_PATH_1_0=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(GST_PLUGINS_LIBAV_DIR):$(GST_PLUGINS_UGLY_DIR):$(GST_PLUGINS_GOOD_DIR):$(GST_PLUGINS_BASE_DIR):$(GST_PLUGINS_DIR) \ GST_PLUGIN_LOADING_WHITELIST="gstreamer@$(GST_PLUGINS_DIR):gst-plugins-base@$(GSTPB_PLUGINS_DIR):gst-plugins-good:gst-plugins-ugly:gst-libav:gst-plugins-bad@$(top_builddir)" \ - GST_STATE_IGNORE_ELEMENTS="apexsink avdtpsrc camerabin dc1394src \ - dccpclientsrc dccpclientsink dccpserversrc dccpserversink decklinksrc \ + GST_STATE_IGNORE_ELEMENTS="avdtpsrc camerabin dc1394src \ + decklinksrc \ decklinksink dtlssrtpdec dtlssrtpenc dvbsrc dvbbasebin dfbvideosink festival fluidsynth \ - linsyssdisrc linsyssdisink nassink kmssink \ - rsndvdbin sdlaudiosink sdlvideosink vcdsrc rfbsrc vdpauyuvvideo vdpauvideoyuv \ + kmssink \ + rsndvdbin vcdsrc rfbsrc vdpauyuvvideo vdpauvideoyuv \ vdpaumpegdec vdpaumpeg4dec vdpauh264dec vdpauvideopostprocess vdpausink neonhttpsrc" plugindir = $(libdir)/gstreamer-@GST_API_VERSION@ @@ -120,12 +120,6 @@ else check_x265enc= endif -if USE_TIMIDITY -check_timidity=elements/timidity -else -check_timidity= -endif - if USE_KATE check_kate=elements/kate else @@ -247,7 +241,6 @@ check_PROGRAMS = \ $(check_mplex) \ $(check_mssdemux) \ $(check_ofa) \ - $(check_timidity) \ $(check_kate) \ $(check_opencv) \ $(check_curl) \ @@ -446,9 +439,6 @@ elements_jifmux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(EXIF_CFLAGS) $(AM_CFLAGS) elements_jifmux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) $(GST_CHECK_LIBS) $(EXIF_LIBS) $(LDADD) elements_jifmux_SOURCES = elements/jifmux.c -elements_timidity_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS) -elements_timidity_LDADD = $(GST_BASE_LIBS) $(LDADD) - elements_kate_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS) elements_kate_LDADD = $(GST_BASE_LIBS) $(LDADD) diff --git a/tests/check/elements/timidity.c b/tests/check/elements/timidity.c deleted file mode 100644 index 5c85b6567..000000000 --- a/tests/check/elements/timidity.c +++ /dev/null @@ -1,74 +0,0 @@ -/* GStreamer - * - * unit test for timidity/wildmidi - * - * Copyright (C) <2007> Stefan Kost <ensonic@users.sf.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <unistd.h> - -#include <gst/check/gstcheck.h> -#include <gst/base/gsttypefindhelper.h> - - -GST_START_TEST (test_midi_typefind) -{ - const guint8 midi_header[] = { - 0x4d, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x4d, 0x54, - 0x72, 0x6b, 0x00, 0x00 - }; - GstTypeFindProbability prob; - const gchar *type; - GstBuffer *buf; - GstCaps *caps = NULL; - - buf = gst_buffer_new (); - GST_BUFFER_DATA (buf) = (guint8 *) midi_header; - GST_BUFFER_SIZE (buf) = sizeof (midi_header); - GST_BUFFER_OFFSET (buf) = 0; - - caps = gst_type_find_helper_for_buffer (NULL, buf, &prob); - fail_unless (caps != NULL); - GST_LOG ("Found type: %" GST_PTR_FORMAT, caps); - - type = gst_structure_get_name (gst_caps_get_structure (caps, 0)); - fail_unless_equals_string (type, "audio/midi"); - fail_unless (prob > GST_TYPE_FIND_MINIMUM && prob <= GST_TYPE_FIND_MAXIMUM); - - gst_buffer_unref (buf); - gst_caps_unref (caps); - -} - -GST_END_TEST; - - -static Suite * -timidity_suite (void) -{ - Suite *s = suite_create ("timidity"); - TCase *tc_chain = tcase_create ("general"); - - suite_add_tcase (s, tc_chain); - tcase_add_test (tc_chain, test_midi_typefind); - - return s; -} - -GST_CHECK_MAIN (timidity); diff --git a/tests/icles/dccp/README b/tests/icles/dccp/README deleted file mode 100644 index e76ead5e5..000000000 --- a/tests/icles/dccp/README +++ /dev/null @@ -1,52 +0,0 @@ -Applications - -If you want to compile the applications you will need to run this command-line: -gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10) <applicationName>.c -o <applicationName> - -To run: -./<applicationName> - - -Command-line - -###### Pipe to transmit a file # - -* Server: -gst-launch -v filesrc location=file ! dccpserversink port=9011 ccid=2 - -* Client: -gst-launch -v dccpclientsrc host=localhost port=9011 ccid=2 ! filesink location=fileDist - -###### Pipe to transmit from the microphone # - -* Server: -gst-launch -v alsasrc ! dccpserversink port=9011 ccid=2 - -* Client: -gst-launch -v dccpclientsrc host=localhost port=9011 ccid=2 caps="audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2" ! alsasink - -###### Pipe to transmit a MP3 # - -* Server: -gst-launch -v filesrc location=music.mp3 ! mad ! dccpserversink port=9011 ccid=2 - -* Client: -gst-launch -v dccpclientsrc host=localhost port=9011 ccid=2 caps="audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2" ! alsasink - -###### Pipe to stream a MP3 # - -* Server: -gst-launch -v filesrc location=music.mp3 ! mp3parse ! dccpserversink port=9011 ccid=2 - -* Client: -gst-launch -v dccpclientsrc host=localhost port=9011 ccid=2 ! decodebin ! alsasink --- We also tested with mpg123, to use it: mpg123 dccp://localhost:9011 - -###### Pipe to transmit a MP3 with dccp, speex and rtp # - -* Server: -gst-launch -v filesrc location=music.mp3 ! mad ! audioconvert ! capsfilter caps="audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1" ! speexenc ! rtpspeexpay ! dccpserversink port=9011 ccid=2 - -* Client: -gst-launch -v dccpclientsrc host=localhost port=9011 ccid=2 caps="application/x-rtp, media=(string)audio, payload=(int)110, clock-rate=(int)44100, encoding-name=(string)SPEEX, ssrc=(guint)152981653, clock-base=(guint)1553719649, seqnum-base=(guint)3680, encoding-params=(string)1" ! rtpspeexdepay ! speexdec ! alsasink - diff --git a/tests/icles/dccp/call/DCCPClient.c b/tests/icles/dccp/call/DCCPClient.c deleted file mode 100644 index 5f7eb019c..000000000 --- a/tests/icles/dccp/call/DCCPClient.c +++ /dev/null @@ -1,152 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - -void -start_dccpserversink_pipe (GstElement * object, gint socket, gpointer data) -{ - GstElement *dccpserversink = (GstElement *) data; - g_object_set (G_OBJECT (dccpserversink), "sockfd", socket, NULL); - - g_print ("Setting pipelinesink to PLAYING\n"); - GstElement *pipelinesink = - (GstElement *) gst_element_get_parent (dccpserversink); - gst_element_set_state (pipelinesink, GST_STATE_PLAYING); - gst_object_unref (pipelinesink); -} - - -int -main (int argc, char *argv[]) -{ - - GstElement *pipelinesink, *alsasrc, *dccpserversink; - GstElement *pipelinesrc, *alsasink, *dccpclientsrc; - GMainLoop *loop; - GstBus *bus; - GstCaps *caps; - - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* check input arguments */ - if (argc != 2) { - g_print ("%s\n", "see usage: serverHost"); - return -1; - } - - /* create elements */ - pipelinesink = gst_pipeline_new ("audio-sender"); - alsasrc = gst_element_factory_make ("alsasrc", "alsa-source"); - dccpserversink = gst_element_factory_make ("dccpserversink", "server-sink"); - pipelinesrc = gst_pipeline_new ("audio-receiver"); - alsasink = gst_element_factory_make ("alsasink", "alsa-sink"); - dccpclientsrc = gst_element_factory_make ("dccpclientsrc", "client-source"); - - - if (!pipelinesink || !alsasrc || !dccpserversink || !pipelinesrc || !alsasink - || !dccpclientsrc) { - g_print ("One element could not be created\n"); - return -1; - } - - caps = - gst_caps_from_string - ("audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2"); - g_object_set (G_OBJECT (dccpclientsrc), "caps", caps, NULL); - - g_object_set (G_OBJECT (dccpclientsrc), "host", argv[1], NULL); - /*g_object_set (G_OBJECT (dccpclientsrc), "ccid", 3, NULL); - g_object_set (G_OBJECT (dccpserversink), "ccid", 3, NULL); */ - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipelinesink)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipelinesrc)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipelinesink), alsasrc, dccpserversink, NULL); - gst_element_link_many (alsasrc, dccpserversink, NULL); - - gst_bin_add_many (GST_BIN (pipelinesrc), dccpclientsrc, alsasink, NULL); - gst_element_link (dccpclientsrc, alsasink); - - g_signal_connect (dccpclientsrc, "connected", - (GCallback) start_dccpserversink_pipe, dccpserversink); - - /* Now set to playing and iterate. */ - g_print ("Setting pipelinesrc to PLAYING\n"); - gst_element_set_state (pipelinesrc, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipelinesink, GST_STATE_NULL); - g_print ("Deleting pipelinesink\n"); - gst_object_unref (GST_OBJECT (pipelinesink)); - - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipelinesrc, GST_STATE_NULL); - g_print ("Deleting pipelinesrc\n"); - gst_object_unref (GST_OBJECT (pipelinesrc)); - - - return 0; -} diff --git a/tests/icles/dccp/call/DCCPServer.c b/tests/icles/dccp/call/DCCPServer.c deleted file mode 100644 index fe0e34fa2..000000000 --- a/tests/icles/dccp/call/DCCPServer.c +++ /dev/null @@ -1,145 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - -void -start_dccpclientsrc_pipe (GstElement * object, gint socket, gpointer data) -{ - GstElement *dccpclientsrc = (GstElement *) data; - g_object_set (G_OBJECT (dccpclientsrc), "sockfd", socket, NULL); - - g_print ("Setting pipelinesrc to PLAYING\n"); - GstElement *pipelinesrc = - (GstElement *) gst_element_get_parent (dccpclientsrc); - gst_element_set_state (pipelinesrc, GST_STATE_PLAYING); - gst_object_unref (pipelinesrc); -} - - -int -main (int argc, char *argv[]) -{ - - GstElement *pipelinesink, *alsasrc, *dccpserversink; - GstElement *pipelinesrc, *alsasink, *dccpclientsrc; - GMainLoop *loop; - GstBus *bus; - GstCaps *caps; - - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* create elements */ - pipelinesink = gst_pipeline_new ("audio-sender"); - alsasrc = gst_element_factory_make ("alsasrc", "alsa-source"); - dccpserversink = gst_element_factory_make ("dccpserversink", "server-sink"); - pipelinesrc = gst_pipeline_new ("audio-receiver"); - alsasink = gst_element_factory_make ("alsasink", "alsa-sink"); - dccpclientsrc = gst_element_factory_make ("dccpclientsrc", "client-source"); - - - if (!pipelinesink || !alsasrc || !dccpserversink || !pipelinesrc || !alsasink - || !dccpclientsrc) { - g_print ("One element could not be created\n"); - return -1; - } - - caps = - gst_caps_from_string - ("audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2"); - g_object_set (G_OBJECT (dccpclientsrc), "caps", caps, NULL); - - /*g_object_set (G_OBJECT (dccpclientsrc), "ccid", 3, NULL); - g_object_set (G_OBJECT (dccpserversink), "ccid", 3, NULL); */ - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipelinesink)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipelinesrc)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipelinesink), alsasrc, dccpserversink, NULL); - gst_element_link_many (alsasrc, dccpserversink, NULL); - - gst_bin_add_many (GST_BIN (pipelinesrc), dccpclientsrc, alsasink, NULL); - gst_element_link (dccpclientsrc, alsasink); - - g_signal_connect (dccpserversink, "connected", - (GCallback) start_dccpclientsrc_pipe, dccpclientsrc); - - /* Now set to playing and iterate. */ - g_print ("Setting pipelinesink to PLAYING\n"); - gst_element_set_state (pipelinesink, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipelinesink, GST_STATE_NULL); - g_print ("Deleting pipelinesink\n"); - gst_object_unref (GST_OBJECT (pipelinesink)); - - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipelinesrc, GST_STATE_NULL); - g_print ("Deleting pipelinesrc\n"); - gst_object_unref (GST_OBJECT (pipelinesrc)); - - - return 0; -} diff --git a/tests/icles/dccp/call/README b/tests/icles/dccp/call/README deleted file mode 100644 index ed53abd65..000000000 --- a/tests/icles/dccp/call/README +++ /dev/null @@ -1 +0,0 @@ -This application tests the socket sharing. diff --git a/tests/icles/dccp/file/DCCPClientSaveFile.c b/tests/icles/dccp/file/DCCPClientSaveFile.c deleted file mode 100644 index cdd7fe29e..000000000 --- a/tests/icles/dccp/file/DCCPClientSaveFile.c +++ /dev/null @@ -1,113 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - - -int -main (int argc, char *argv[]) -{ - - GMainLoop *loop; - GstBus *bus; - GstElement *pipeline, *filesink, *dccpclientsrc; - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* check input arguments */ - if (argc != 4) { - g_print ("%s\n", "see usage: serverHost serverPort location"); - return -1; - } - - /* create elements */ - pipeline = gst_pipeline_new ("audio-sender"); - filesink = gst_element_factory_make ("filesink", "file-sink"); - dccpclientsrc = gst_element_factory_make ("dccpclientsrc", "client-source"); - - - if (!pipeline || !filesink || !dccpclientsrc) { - g_print ("One element could not be created\n"); - return -1; - } - - g_object_set (G_OBJECT (dccpclientsrc), "host", argv[1], NULL); - g_object_set (G_OBJECT (dccpclientsrc), "port", atoi (argv[2]), NULL); - /*g_object_set (G_OBJECT (dccpclientsrc), "ccid", 3, NULL); */ - g_object_set (G_OBJECT (filesink), "location", argv[3], NULL); - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipeline), dccpclientsrc, filesink, NULL); - - gst_element_link (dccpclientsrc, filesink); - - - /* Now set to playing and iterate. */ - g_print ("Setting to PLAYING\n"); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipeline, GST_STATE_NULL); - g_print ("Deleting pipeline\n"); - gst_object_unref (GST_OBJECT (pipeline)); - - return 0; -} diff --git a/tests/icles/dccp/file/DCCPServerSendFile.c b/tests/icles/dccp/file/DCCPServerSendFile.c deleted file mode 100644 index 768381fe0..000000000 --- a/tests/icles/dccp/file/DCCPServerSendFile.c +++ /dev/null @@ -1,112 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - - -int -main (int argc, char *argv[]) -{ - - GMainLoop *loop; - GstBus *bus; - GstElement *pipeline, *filesrc, *dccpserversink; - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* check input arguments */ - if (argc != 3) { - g_print ("%s\n", "see usage: port mp3Location"); - return -1; - } - - /* create elements */ - pipeline = gst_pipeline_new ("audio-sender"); - filesrc = gst_element_factory_make ("filesrc", "file-source"); - dccpserversink = gst_element_factory_make ("dccpserversink", "server-sink"); - - - if (!pipeline || !filesrc || !dccpserversink) { - g_print ("One element could not be created\n"); - return -1; - } - - g_object_set (G_OBJECT (dccpserversink), "port", atoi (argv[1]), NULL); - /*g_object_set (G_OBJECT (dccpserversink), "ccid", 3, NULL); */ - g_object_set (G_OBJECT (filesrc), "location", argv[2], NULL); - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipeline), filesrc, dccpserversink, NULL); - - gst_element_link_many (filesrc, dccpserversink, NULL); - - - /* Now set to playing and iterate. */ - g_print ("Setting to PLAYING\n"); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipeline, GST_STATE_NULL); - g_print ("Deleting pipeline\n"); - gst_object_unref (GST_OBJECT (pipeline)); - - return 0; -} diff --git a/tests/icles/dccp/mic/DCCPClientPlayMic.c b/tests/icles/dccp/mic/DCCPClientPlayMic.c deleted file mode 100644 index 4cd0c3b52..000000000 --- a/tests/icles/dccp/mic/DCCPClientPlayMic.c +++ /dev/null @@ -1,116 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - - -int -main (int argc, char *argv[]) -{ - - GMainLoop *loop; - GstBus *bus; - GstElement *pipeline, *alsasink, *dccpclientsrc; - GstCaps *caps; - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* check input arguments */ - if (argc != 3) { - g_print ("%s\n", "see usage: serverHost serverPort"); - return -1; - } - - /* create elements */ - pipeline = gst_pipeline_new ("audio-receiver"); - alsasink = gst_element_factory_make ("alsasink", "alsa-sink"); - dccpclientsrc = gst_element_factory_make ("dccpclientsrc", "client-source"); - - if (!pipeline || !alsasink || !dccpclientsrc) { - g_print ("One element could not be created\n"); - return -1; - } - - caps = - gst_caps_from_string - ("audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2"); - - g_object_set (G_OBJECT (dccpclientsrc), "caps", caps, NULL); - g_object_set (G_OBJECT (dccpclientsrc), "host", argv[1], NULL); - g_object_set (G_OBJECT (dccpclientsrc), "port", atoi (argv[2]), NULL); - /*g_object_set (G_OBJECT (dccpclientsrc), "ccid", 3, NULL); */ - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipeline), dccpclientsrc, alsasink, NULL); - - gst_element_link (dccpclientsrc, alsasink); - - /* Now set to playing and iterate. */ - g_print ("Setting to PLAYING\n"); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipeline, GST_STATE_NULL); - g_print ("Deleting pipeline\n"); - gst_object_unref (GST_OBJECT (pipeline)); - - return 0; -} diff --git a/tests/icles/dccp/mic/DCCPServerMic.c b/tests/icles/dccp/mic/DCCPServerMic.c deleted file mode 100644 index d40119802..000000000 --- a/tests/icles/dccp/mic/DCCPServerMic.c +++ /dev/null @@ -1,111 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - - -int -main (int argc, char *argv[]) -{ - - GMainLoop *loop; - GstBus *bus; - GstElement *pipeline, *alsasrc, *dccpserversink; - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* check input arguments */ - if (argc != 2) { - g_print ("%s\n", "see usage: port"); - return -1; - } - - /* create elements */ - pipeline = gst_pipeline_new ("audio-sender"); - alsasrc = gst_element_factory_make ("alsasrc", "alsa-source"); - dccpserversink = gst_element_factory_make ("dccpserversink", "server-sink"); - - - if (!pipeline || !alsasrc || !dccpserversink) { - g_print ("One element could not be created\n"); - return -1; - } - - g_object_set (G_OBJECT (dccpserversink), "port", atoi (argv[1]), NULL); - /*g_object_set (G_OBJECT (dccpserversink), "ccid", 3, NULL); */ - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipeline), alsasrc, dccpserversink, NULL); - - gst_element_link_many (alsasrc, dccpserversink, NULL); - - - /* Now set to playing and iterate. */ - g_print ("Setting to PLAYING\n"); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipeline, GST_STATE_NULL); - g_print ("Deleting pipeline\n"); - gst_object_unref (GST_OBJECT (pipeline)); - - return 0; -} diff --git a/tests/icles/dccp/mp3/DCCPClientPlayMP3.c b/tests/icles/dccp/mp3/DCCPClientPlayMP3.c deleted file mode 100644 index ac55d25d0..000000000 --- a/tests/icles/dccp/mp3/DCCPClientPlayMP3.c +++ /dev/null @@ -1,117 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - - -int -main (int argc, char *argv[]) -{ - - GMainLoop *loop; - GstBus *bus; - GstElement *pipeline, *alsasink, *dccpclientsrc; - GstCaps *caps; - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* check input arguments */ - if (argc != 3) { - g_print ("%s\n", "see usage: serverHost serverPort"); - return -1; - } - - /* create elements */ - pipeline = gst_pipeline_new ("audio-sender"); - alsasink = gst_element_factory_make ("alsasink", "alsa-sink"); - dccpclientsrc = gst_element_factory_make ("dccpclientsrc", "client-source"); - - if (!pipeline || !alsasink || !dccpclientsrc) { - g_print ("One element could not be created\n"); - return -1; - } - - caps = - gst_caps_from_string - ("audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2"); - g_object_set (G_OBJECT (dccpclientsrc), "caps", caps, NULL); - gst_object_unref (caps); - - g_object_set (G_OBJECT (dccpclientsrc), "host", argv[1], NULL); - g_object_set (G_OBJECT (dccpclientsrc), "port", atoi (argv[2]), NULL); - /*g_object_set (G_OBJECT (dccpclientsrc), "ccid", 2, NULL); */ - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipeline), dccpclientsrc, alsasink, NULL); - - gst_element_link_many (dccpclientsrc, alsasink, NULL); - - /* Now set to playing and iterate. */ - g_print ("Setting to PLAYING\n"); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipeline, GST_STATE_NULL); - g_print ("Deleting pipeline\n"); - gst_object_unref (GST_OBJECT (pipeline)); - - return 0; -} diff --git a/tests/icles/dccp/mp3/DCCPServerSendMP3.c b/tests/icles/dccp/mp3/DCCPServerSendMP3.c deleted file mode 100644 index a7d9d5da6..000000000 --- a/tests/icles/dccp/mp3/DCCPServerSendMP3.c +++ /dev/null @@ -1,113 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - - -int -main (int argc, char *argv[]) -{ - - GMainLoop *loop; - GstBus *bus; - GstElement *pipeline, *filesrc, *dccpserversink, *mad; - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* check input arguments */ - if (argc != 3) { - g_print ("%s\n", "see usage: port mp3Location"); - return -1; - } - - /* create elements */ - pipeline = gst_pipeline_new ("audio-sender"); - filesrc = gst_element_factory_make ("filesrc", "file-source"); - mad = gst_element_factory_make ("mad", "mad"); - dccpserversink = gst_element_factory_make ("dccpserversink", "server-sink"); - - - if (!pipeline || !filesrc || !dccpserversink || !mad) { - g_print ("One element could not be created\n"); - return -1; - } - - g_object_set (G_OBJECT (dccpserversink), "port", atoi (argv[1]), NULL); - /*g_object_set (G_OBJECT (dccpserversink), "ccid", 2, NULL); */ - g_object_set (G_OBJECT (filesrc), "location", argv[2], NULL); - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipeline), filesrc, mad, dccpserversink, NULL); - - gst_element_link_many (filesrc, mad, dccpserversink, NULL); - - - /* Now set to playing and iterate. */ - g_print ("Setting to PLAYING\n"); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipeline, GST_STATE_NULL); - g_print ("Deleting pipeline\n"); - gst_object_unref (GST_OBJECT (pipeline)); - - return 0; -} diff --git a/tests/icles/dccp/mp3Speex/DCCPClientPlaySpeexMP3.c b/tests/icles/dccp/mp3Speex/DCCPClientPlaySpeexMP3.c deleted file mode 100644 index 4d260f2a6..000000000 --- a/tests/icles/dccp/mp3Speex/DCCPClientPlaySpeexMP3.c +++ /dev/null @@ -1,120 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - - -int -main (int argc, char *argv[]) -{ - - GMainLoop *loop; - GstBus *bus; - GstElement *pipeline, *alsasink, *rtpspeexdepay, *speexdec, *dccpclientsrc; - GstCaps *caps; - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* check input arguments */ - if (argc != 3) { - g_print ("%s\n", "see usage: serverHost serverPort"); - return -1; - } - - /* create elements */ - pipeline = gst_pipeline_new ("audio-sender"); - alsasink = gst_element_factory_make ("alsasink", "alsa-sink"); - rtpspeexdepay = gst_element_factory_make ("rtpspeexdepay", "rtpspeexdepay"); - speexdec = gst_element_factory_make ("speexdec", "speexdec"); - dccpclientsrc = gst_element_factory_make ("dccpclientsrc", "client-source"); - - if (!pipeline || !alsasink || !rtpspeexdepay || !speexdec || !dccpclientsrc) { - g_print ("One element could not be created\n"); - return -1; - } - - caps = - gst_caps_from_string - ("application/x-rtp, media=(string)audio, payload=(int)110, clock-rate=(int)44100, encoding-name=(string)SPEEX, ssrc=(guint)152981653, clock-base=(guint)1553719649, seqnum-base=(guint)3680, encoding-params=(string)1"); - g_object_set (G_OBJECT (dccpclientsrc), "caps", caps, NULL); - gst_object_unref (caps); - - g_object_set (G_OBJECT (dccpclientsrc), "host", argv[1], NULL); - g_object_set (G_OBJECT (dccpclientsrc), "port", atoi (argv[2]), NULL); - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipeline), dccpclientsrc, rtpspeexdepay, speexdec, - alsasink, NULL); - - gst_element_link_many (dccpclientsrc, rtpspeexdepay, speexdec, alsasink, - NULL); - - /* Now set to playing and iterate. */ - g_print ("Setting to PLAYING\n"); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipeline, GST_STATE_NULL); - g_print ("Deleting pipeline\n"); - gst_object_unref (GST_OBJECT (pipeline)); - - return 0; -} diff --git a/tests/icles/dccp/mp3Speex/DCCPServerSendSpeexMP3.c b/tests/icles/dccp/mp3Speex/DCCPServerSendSpeexMP3.c deleted file mode 100644 index a5d9e0d7d..000000000 --- a/tests/icles/dccp/mp3Speex/DCCPServerSendSpeexMP3.c +++ /dev/null @@ -1,128 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - - -int -main (int argc, char *argv[]) -{ - - GMainLoop *loop; - GstBus *bus; - GstElement *pipeline, *filesrc, *mad, *audioconvert, *capsfilter, *speexenc, - *rtpspeexpay, *dccpserversink; - GstCaps *caps; - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* check input arguments */ - if (argc != 3) { - g_print ("%s\n", "see usage: port mp3Location"); - return -1; - } - - /* create elements */ - pipeline = gst_pipeline_new ("audio-sender"); - filesrc = gst_element_factory_make ("filesrc", "file-source"); - mad = gst_element_factory_make ("mad", "mad"); - audioconvert = gst_element_factory_make ("audioconvert", "audioconvert"); - capsfilter = gst_element_factory_make ("capsfilter", "capsfilter"); - speexenc = gst_element_factory_make ("speexenc", "speexenc"); - rtpspeexpay = gst_element_factory_make ("rtpspeexpay", "rtpspeexpay"); - dccpserversink = gst_element_factory_make ("dccpserversink", "server-sink"); - - - if (!pipeline || !filesrc || !dccpserversink || !mad || !audioconvert - || !capsfilter || !speexenc || !rtpspeexpay) { - g_print ("One element could not be created\n"); - return -1; - } - - g_object_set (G_OBJECT (dccpserversink), "port", atoi (argv[1]), NULL); - g_object_set (G_OBJECT (filesrc), "location", argv[2], NULL); - - caps = - gst_caps_from_string - ("audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1"); - g_object_set (G_OBJECT (capsfilter), "caps", caps, NULL); - gst_object_unref (caps); - - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipeline), filesrc, mad, audioconvert, capsfilter, - speexenc, rtpspeexpay, dccpserversink, NULL); - - gst_element_link_many (filesrc, mad, audioconvert, capsfilter, speexenc, - rtpspeexpay, dccpserversink, NULL); - - - /* Now set to playing and iterate. */ - g_print ("Setting to PLAYING\n"); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipeline, GST_STATE_NULL); - g_print ("Deleting pipeline\n"); - gst_object_unref (GST_OBJECT (pipeline)); - - return 0; -} diff --git a/tests/icles/dccp/mp3Stream/DCCPClientPlayMP3Stream.c b/tests/icles/dccp/mp3Stream/DCCPClientPlayMP3Stream.c deleted file mode 100644 index fb09e4ba3..000000000 --- a/tests/icles/dccp/mp3Stream/DCCPClientPlayMP3Stream.c +++ /dev/null @@ -1,113 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - - -int -main (int argc, char *argv[]) -{ - - GMainLoop *loop; - GstBus *bus; - GstElement *pipeline, *alsasink, *mad, *audioconvert, *dccpclientsrc; - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* check input arguments */ - if (argc != 3) { - g_print ("%s\n", "see usage: serverHost serverPort"); - return -1; - } - - /* create elements */ - pipeline = gst_pipeline_new ("audio-sender"); - dccpclientsrc = gst_element_factory_make ("dccpclientsrc", "client-source"); - mad = gst_element_factory_make ("mad", "mad"); - audioconvert = gst_element_factory_make ("audioconvert", "audioconvert"); - alsasink = gst_element_factory_make ("alsasink", "alsa-sink"); - - if (!pipeline || !alsasink || !mad || !audioconvert || !dccpclientsrc) { - g_print ("One element could not be created\n"); - return -1; - } - - g_object_set (G_OBJECT (dccpclientsrc), "host", argv[1], NULL); - g_object_set (G_OBJECT (dccpclientsrc), "port", atoi (argv[2]), NULL); - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipeline), dccpclientsrc, mad, audioconvert, - alsasink, NULL); - - gst_element_link_many (dccpclientsrc, mad, audioconvert, alsasink, NULL); - - - /* Now set to playing and iterate. */ - g_print ("Setting to PLAYING\n"); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipeline, GST_STATE_NULL); - g_print ("Deleting pipeline\n"); - gst_object_unref (GST_OBJECT (pipeline)); - - return 0; -} diff --git a/tests/icles/dccp/mp3Stream/DCCPServerSendMP3Stream.c b/tests/icles/dccp/mp3Stream/DCCPServerSendMP3Stream.c deleted file mode 100644 index 2b090a200..000000000 --- a/tests/icles/dccp/mp3Stream/DCCPServerSendMP3Stream.c +++ /dev/null @@ -1,113 +0,0 @@ -/* GStreamer - * Copyright (C) <2007> Leandro Melo de Sales <leandroal@gmail.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <gst/gst.h> - -static gboolean -bus_call (GstBus * bus, GstMessage * msg, gpointer data) -{ - - GMainLoop *loop = (GMainLoop *) data; - - switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - g_print ("End-of-stream\n"); - g_main_loop_quit (loop); - break; - case GST_MESSAGE_ERROR:{ - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_print ("Error: %s\n", err->message); - g_error_free (err); - - g_main_loop_quit (loop); - break; - } - default: - break; - } - - return TRUE; -} - - -int -main (int argc, char *argv[]) -{ - - GMainLoop *loop; - GstBus *bus; - GstElement *pipeline, *filesrc, *mp3parse, *dccpserversink; - - /* initialize GStreamer */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - - /* check input arguments */ - if (argc != 3) { - g_print ("%s\n", "see usage: port mp3Location"); - return -1; - } - - /* create elements */ - pipeline = gst_pipeline_new ("audio-sender"); /* create pipeline with the name audio-sender */ - filesrc = gst_element_factory_make ("filesrc", "file-source"); /* create filesrc element with the name file-source */ - mp3parse = gst_element_factory_make ("mp3parse", "mp3parse"); - dccpserversink = gst_element_factory_make ("dccpserversink", "server-sink"); - - - if (!pipeline || !filesrc || !mp3parse || !dccpserversink) { - g_print ("One element could not be created\n"); - return -1; - } - - g_object_set (G_OBJECT (dccpserversink), "port", atoi (argv[1]), NULL); - g_object_set (G_OBJECT (filesrc), "location", argv[2], NULL); - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); - gst_bus_add_watch (bus, bus_call, loop); - gst_object_unref (bus); - - /* put all elements in a bin */ - gst_bin_add_many (GST_BIN (pipeline), filesrc, mp3parse, dccpserversink, - NULL); - /* Link the elements at the pipeline */ - gst_element_link_many (filesrc, mp3parse, dccpserversink, NULL); - - - /* Now set to playing and iterate. */ - g_print ("Setting to PLAYING\n"); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - g_print ("Running\n"); - g_main_loop_run (loop); - - /* clean up nicely */ - g_print ("Returned, stopping playback\n"); - gst_element_set_state (pipeline, GST_STATE_NULL); - g_print ("Deleting pipeline\n"); - gst_object_unref (GST_OBJECT (pipeline)); - - return 0; -} |