filesrc issue
symeon.mattes
symeon.mattes at gmail.com
Tue Oct 13 03:17:24 PDT 2015
I've managed to make it work in objective c by using the following:
NSString *soundFilePath = [NSString
stringWithFormat:@"\"%@/mysound.wav\"",[[NSBundle mainBundle]
resourcePath]];
gchar *ppl_send = g_strdup_printf("filesrc location=%s ! decodebin !
audioconvert ! audioresample ! alawenc ! rtppcmapay ! udpsink port=%s
host=%s bind-port=5004", soundFilePath.UTF8String, remotePort.UTF8String,
remoteAddress.UTF8String);
pipeline_sending = gst_parse_launch(ppl_send, &error);
However when I tried to make it properly it didn't work at all:
GstElement *input, *decodebin, *audioconvert, *audioresample, *alawenc,
*rtppcmapay, *udpsink;
NSString *soundFilePath = [NSString
stringWithFormat:@"\"%@/mysound.wav\"",[[NSBundle mainBundle]
resourcePath]];
pipeline_sending=gst_pipeline_new("sending-data");
input = gst_element_factory_make("filesrc",NULL);
g_object_set(G_OBJECT(input),"location",soundFilePath.UTF8String,NULL);
decodebin=gst_element_factory_make("decodebin",NULL);
audioconvert = gst_element_factory_make("audioconvert",NULL);
audioresample = gst_element_factory_make("audioresample",NULL);
alawenc = gst_element_factory_make("alawenc","snd-encoder");
rtppcmapay = gst_element_factory_make("rtppcmapay",NULL);
udpsink = gst_element_factory_make("udpsink",NULL);
g_object_set(G_OBJECT(udpsink),"port",remotePort.intValue,"host",remoteAddress.UTF8String,"bind-port",5004,NULL);
gst_bin_add_many(GST_BIN(pipeline_sending),input,decodebin,audioconvert,audioresample,alawenc,rtppcmapay,udpsink,NULL);
gst_element_link_many(input,decodebin,audioconvert,audioresample,alawenc,rtppcmapay,udpsink,NULL);
Any ideas?
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/filesrc-issue-tp4674037p4674051.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list