giostreamsrc and udpsink problem

Matthias Dübon mail at ing-duebon.de
Wed Apr 30 04:34:22 PDT 2014


Hello everyone,

I am trying to use the giostreamsrc plugin and I got some problems.
When I use giostreamsrc as source (define GIOSTREAMSRC and filesink as
sink (define FILESINK) then everything is fine. But when I use udpsink
as sink (undefine FILESINK) my client doesn't receive data. But when I
use audiotestsr as source (undefine GIOSTREAMSRC) everything works
fine, e.g. my client receives udp data.
That means udpsink and giostreamsrc are working separately but not
combined. Does that make any sense to you?
BTW I am using gstreamer version 0.10


mystream = G_MEMORY_INPUT_STREAM(g_memory_input_stream_new_from_data(wave,
                                 LEN,
                                 (GDestroyNotify) g_free));
#ifdef GIOSTREAMSRC
   source = gst_element_factory_make ("giostreamsrc", "source");
#else
   source = gst_element_factory_make ("audiotestsrc", "source");
#endif

g_object_set (G_OBJECT (source), "stream", G_INPUT_STREAM (mystream), NULL);
sourcepad = gst_element_get_static_pad(source, "src");
gst_pad_set_caps (sourcepad,
      gst_caps_new_simple ("audio/x-raw-int",
                   "rate", G_TYPE_INT, 22000,
                   "channels", G_TYPE_INT, 1,
                   "width", G_TYPE_INT, 16,
                   "depth", G_TYPE_INT, 16,
                   "signed", G_TYPE_BOOLEAN, TRUE,
                   NULL));
gst_object_unref (sourcepad);

#if FILESINK
   sink = gst_element_factory_make ("filesink", "sink");
   g_object_set (G_OBJECT (sink), "location", "test.pcm", NULL);
#else
   sink    = gst_element_factory_make ("udpsink", "sink");
   g_object_set (G_OBJECT (sink), "host", "127.0.0.1", NULL);
   g_object_set (G_OBJECT (sink), "port", 2222, NULL);
#endif

g_object_set (G_OBJECT (sink), "host", "127.0.0.1", NULL);
g_object_set (G_OBJECT (sink), "port", 2222, NULL);
pipeline = gst_pipeline_new ("my-pipeline");
gst_bin_add_many (GST_BIN (pipeline),
      source, sink, NULL);
gst_element_link_many (source, sink, NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);

best wishes
Matthias
ᐧ


More information about the gstreamer-devel mailing list