for i in find . -name *.[ch]; do perl -n -i -p -e 's/disksrc/filesrc/g;' $i; done

Original commit message from CVS:
for i in `find . -name *.[ch]`; do perl -n -i -p -e 's/disksrc/filesrc/g;' $i; done
This commit is contained in:
Andy Wingo 2002-01-05 23:05:56 +00:00
parent 55641b32a8
commit 082a40ded1
24 changed files with 174 additions and 174 deletions

View file

@ -17,14 +17,14 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline)
GstAutoplug *autoplug; GstAutoplug *autoplug;
GtkWidget *socket; GtkWidget *socket;
GstElement *autobin; GstElement *autobin;
GstElement *disksrc; GstElement *filesrc;
GstElement *cache; GstElement *cache;
GST_DEBUG (0,"GstPipeline: play have type\n"); GST_DEBUG (0,"GstPipeline: play have type\n");
gst_element_set_state (pipeline, GST_STATE_PAUSED); gst_element_set_state (pipeline, GST_STATE_PAUSED);
disksrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source"); filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source");
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache");
@ -109,7 +109,7 @@ static void
gst_play_cache_empty (GstElement *element, GstElement *pipeline) gst_play_cache_empty (GstElement *element, GstElement *pipeline)
{ {
GstElement *autobin; GstElement *autobin;
GstElement *disksrc; GstElement *filesrc;
GstElement *cache; GstElement *cache;
GstElement *new_element; GstElement *new_element;
@ -117,15 +117,15 @@ gst_play_cache_empty (GstElement *element, GstElement *pipeline)
gst_element_set_state (pipeline, GST_STATE_PAUSED); gst_element_set_state (pipeline, GST_STATE_PAUSED);
disksrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source"); filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source");
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache");
new_element = gst_bin_get_by_name (GST_BIN (autobin), "new_element"); new_element = gst_bin_get_by_name (GST_BIN (autobin), "new_element");
gst_element_disconnect (disksrc, "src", cache, "sink"); gst_element_disconnect (filesrc, "src", cache, "sink");
gst_element_disconnect (cache, "src", new_element, "sink"); gst_element_disconnect (cache, "src", new_element, "sink");
gst_bin_remove (GST_BIN (autobin), cache); gst_bin_remove (GST_BIN (autobin), cache);
gst_element_connect (disksrc, "src", new_element, "sink"); gst_element_connect (filesrc, "src", new_element, "sink");
gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_element_set_state (pipeline, GST_STATE_PLAYING);
@ -134,7 +134,7 @@ gst_play_cache_empty (GstElement *element, GstElement *pipeline)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc; GstElement *filesrc;
GstElement *pipeline; GstElement *pipeline;
GstElement *autobin; GstElement *autobin;
GstElement *typefind; GstElement *typefind;
@ -154,10 +154,10 @@ int main(int argc,char *argv[])
g_assert(pipeline != NULL); g_assert(pipeline != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL); gtk_object_set(GTK_OBJECT(filesrc),"location", argv[1],NULL);
gst_bin_add (GST_BIN (pipeline), disksrc); gst_bin_add (GST_BIN (pipeline), filesrc);
autobin = gst_bin_new ("autobin"); autobin = gst_bin_new ("autobin");
cache = gst_elementfactory_make ("autoplugcache", "cache"); cache = gst_elementfactory_make ("autoplugcache", "cache");
@ -172,7 +172,7 @@ int main(int argc,char *argv[])
gst_element_add_ghost_pad (autobin, gst_element_get_pad (cache, "sink"), "sink"); gst_element_add_ghost_pad (autobin, gst_element_get_pad (cache, "sink"), "sink");
gst_bin_add (GST_BIN( pipeline), autobin); gst_bin_add (GST_BIN( pipeline), autobin);
gst_element_connect (disksrc, "src", autobin, "sink"); gst_element_connect (filesrc, "src", autobin, "sink");
/* start playing */ /* start playing */
gst_element_set_state( GST_ELEMENT (pipeline), GST_STATE_PLAYING); gst_element_set_state( GST_ELEMENT (pipeline), GST_STATE_PLAYING);

View file

@ -13,7 +13,7 @@ void eos(GstElement *element)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *bin, *disksrc, *parse, *decoder, *downmix, *mulaw, *mulawdec, *osssink; GstElement *bin, *filesrc, *parse, *decoder, *downmix, *mulaw, *mulawdec, *osssink;
gst_init(&argc,&argv); gst_init(&argc,&argv);
@ -26,9 +26,9 @@ int main(int argc,char *argv[])
bin = gst_pipeline_new("pipeline"); bin = gst_pipeline_new("pipeline");
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
g_signal_connect(G_OBJECT(disksrc),"eos", g_signal_connect(G_OBJECT(filesrc),"eos",
G_CALLBACK(eos),NULL); G_CALLBACK(eos),NULL);
/* now it's time to get the parser */ /* now it's time to get the parser */
@ -41,7 +41,7 @@ int main(int argc,char *argv[])
osssink = gst_elementfactory_make("osssink", "play_audio"); osssink = gst_elementfactory_make("osssink", "play_audio");
/* add objects to the main pipeline */ /* add objects to the main pipeline */
gst_bin_add(GST_BIN(bin), disksrc); gst_bin_add(GST_BIN(bin), filesrc);
gst_bin_add(GST_BIN(bin), parse); gst_bin_add(GST_BIN(bin), parse);
gst_bin_add(GST_BIN(bin), decoder); gst_bin_add(GST_BIN(bin), decoder);
gst_bin_add(GST_BIN(bin), downmix); gst_bin_add(GST_BIN(bin), downmix);
@ -50,7 +50,7 @@ int main(int argc,char *argv[])
gst_bin_add(GST_BIN(bin), osssink); gst_bin_add(GST_BIN(bin), osssink);
/* connect src to sink */ /* connect src to sink */
gst_pad_connect(gst_element_get_pad(disksrc,"src"), gst_pad_connect(gst_element_get_pad(filesrc,"src"),
gst_element_get_pad(parse,"sink")); gst_element_get_pad(parse,"sink"));
gst_pad_connect(gst_element_get_pad(parse,"src"), gst_pad_connect(gst_element_get_pad(parse,"src"),
gst_element_get_pad(decoder,"sink")); gst_element_get_pad(decoder,"sink"));
@ -81,7 +81,7 @@ int main(int argc,char *argv[])
gst_object_destroy(GST_OBJECT(downmix)); gst_object_destroy(GST_OBJECT(downmix));
gst_object_destroy(GST_OBJECT(mulaw)); gst_object_destroy(GST_OBJECT(mulaw));
gst_object_destroy(GST_OBJECT(mulawdec)); gst_object_destroy(GST_OBJECT(mulawdec));
gst_object_destroy(GST_OBJECT(disksrc)); gst_object_destroy(GST_OBJECT(filesrc));
gst_object_destroy(GST_OBJECT(bin)); gst_object_destroy(GST_OBJECT(bin));
exit(0); exit(0);

View file

@ -7,14 +7,14 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline)
GstElement *new_element; GstElement *new_element;
GstAutoplug *autoplug; GstAutoplug *autoplug;
GstElement *autobin; GstElement *autobin;
GstElement *disksrc; GstElement *filesrc;
GstElement *cache; GstElement *cache;
GST_DEBUG (0,"GstPipeline: play have type\n"); GST_DEBUG (0,"GstPipeline: play have type\n");
gst_element_set_state (pipeline, GST_STATE_PAUSED); gst_element_set_state (pipeline, GST_STATE_PAUSED);
disksrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source"); filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source");
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache");
@ -54,7 +54,7 @@ static void
gst_play_cache_empty (GstElement *element, GstElement *pipeline) gst_play_cache_empty (GstElement *element, GstElement *pipeline)
{ {
GstElement *autobin; GstElement *autobin;
GstElement *disksrc; GstElement *filesrc;
GstElement *cache; GstElement *cache;
GstElement *new_element; GstElement *new_element;
@ -62,15 +62,15 @@ gst_play_cache_empty (GstElement *element, GstElement *pipeline)
gst_element_set_state (pipeline, GST_STATE_PAUSED); gst_element_set_state (pipeline, GST_STATE_PAUSED);
disksrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source"); filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source");
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache");
new_element = gst_bin_get_by_name (GST_BIN (autobin), "new_element"); new_element = gst_bin_get_by_name (GST_BIN (autobin), "new_element");
gst_element_disconnect (disksrc, "src", cache, "sink"); gst_element_disconnect (filesrc, "src", cache, "sink");
gst_element_disconnect (cache, "src", new_element, "sink"); gst_element_disconnect (cache, "src", new_element, "sink");
gst_bin_remove (GST_BIN (autobin), cache); gst_bin_remove (GST_BIN (autobin), cache);
gst_element_connect (disksrc, "src", new_element, "sink"); gst_element_connect (filesrc, "src", new_element, "sink");
gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_element_set_state (pipeline, GST_STATE_PLAYING);
@ -80,7 +80,7 @@ gst_play_cache_empty (GstElement *element, GstElement *pipeline)
int int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
GstElement *disksrc; GstElement *filesrc;
GstElement *pipeline; GstElement *pipeline;
GstElement *autobin; GstElement *autobin;
GstElement *typefind; GstElement *typefind;
@ -98,10 +98,10 @@ main (int argc, char *argv[])
g_assert (pipeline != NULL); g_assert (pipeline != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source"); filesrc = gst_elementfactory_make ("filesrc", "disk_source");
g_assert (disksrc != NULL); g_assert (filesrc != NULL);
g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
gst_bin_add (GST_BIN (pipeline), disksrc); gst_bin_add (GST_BIN (pipeline), filesrc);
autobin = gst_bin_new ("autobin"); autobin = gst_bin_new ("autobin");
cache = gst_elementfactory_make ("autoplugcache", "cache"); cache = gst_elementfactory_make ("autoplugcache", "cache");
@ -118,7 +118,7 @@ main (int argc, char *argv[])
gst_element_add_ghost_pad (autobin, gst_element_get_pad (cache, "sink"), "sink"); gst_element_add_ghost_pad (autobin, gst_element_get_pad (cache, "sink"), "sink");
gst_bin_add (GST_BIN( pipeline), autobin); gst_bin_add (GST_BIN( pipeline), autobin);
gst_element_connect (disksrc, "src", autobin, "sink"); gst_element_connect (filesrc, "src", autobin, "sink");
/* start playing */ /* start playing */
gst_element_set_state( GST_ELEMENT (pipeline), GST_STATE_PLAYING); gst_element_set_state( GST_ELEMENT (pipeline), GST_STATE_PLAYING);

View file

@ -4,7 +4,7 @@ int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
GstElement *pipeline; GstElement *pipeline;
GstElement *disksrc; GstElement *filesrc;
gst_init (&argc, &argv); gst_init (&argc, &argv);
@ -14,10 +14,10 @@ main (int argc, char *argv[])
} }
pipeline = gst_pipeline_new ("my_pipeline"); pipeline = gst_pipeline_new ("my_pipeline");
gst_parse_launch ("disksrc[my_disksrc] ! mp3parse ! mpg123 ! osssink", GST_BIN (pipeline)); gst_parse_launch ("filesrc[my_filesrc] ! mp3parse ! mpg123 ! osssink", GST_BIN (pipeline));
disksrc = gst_bin_get_by_name (GST_BIN (pipeline), "my_disksrc"); filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "my_filesrc");
g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_element_set_state (pipeline, GST_STATE_PLAYING);

View file

@ -264,20 +264,20 @@ create_input_channel (int id, char* location)
/* create elements */ /* create elements */
GST_DEBUG(0, "c_i_p : creating disksrc\n"); GST_DEBUG(0, "c_i_p : creating filesrc\n");
sprintf (buffer, "disksrc%d", id); sprintf (buffer, "filesrc%d", id);
channel->disksrc = gst_elementfactory_make ("disksrc", buffer); channel->filesrc = gst_elementfactory_make ("filesrc", buffer);
g_assert(channel->disksrc != NULL); g_assert(channel->filesrc != NULL);
GST_DEBUG(0, "c_i_p : setting location\n"); GST_DEBUG(0, "c_i_p : setting location\n");
g_object_set(G_OBJECT(channel->disksrc),"location", location, NULL); g_object_set(G_OBJECT(channel->filesrc),"location", location, NULL);
/* add disksrc to the bin before autoplug */ /* add filesrc to the bin before autoplug */
gst_bin_add(GST_BIN(channel->pipe), channel->disksrc); gst_bin_add(GST_BIN(channel->pipe), channel->filesrc);
/* connect signal to eos of disksrc */ /* connect signal to eos of filesrc */
g_signal_connect (G_OBJECT(channel->disksrc),"eos", g_signal_connect (G_OBJECT(channel->filesrc),"eos",
G_CALLBACK(eos),NULL); G_CALLBACK(eos),NULL);
@ -296,7 +296,7 @@ create_input_channel (int id, char* location)
#endif #endif
#ifdef WITH_BUG #ifdef WITH_BUG
srccaps = gst_play_typefind (GST_BIN (channel->pipe), channel->disksrc); srccaps = gst_play_typefind (GST_BIN (channel->pipe), channel->filesrc);
#endif #endif
#ifdef WITH_BUG2 #ifdef WITH_BUG2
{ {
@ -364,7 +364,7 @@ create_input_channel (int id, char* location)
gst_bin_add (GST_BIN(channel->pipe), channel->volenv); gst_bin_add (GST_BIN(channel->pipe), channel->volenv);
gst_bin_add (GST_BIN (channel->pipe), new_element); gst_bin_add (GST_BIN (channel->pipe), new_element);
gst_element_connect (channel->disksrc, "src", new_element, "sink"); gst_element_connect (channel->filesrc, "src", new_element, "sink");
gst_element_connect (new_element, "src_00", channel->volenv, "sink"); gst_element_connect (new_element, "src_00", channel->volenv, "sink");
/* add a ghost pad */ /* add a ghost pad */

View file

@ -5,7 +5,7 @@
typedef struct typedef struct
{ {
GstElement *pipe, *disksrc, *volenv; GstElement *pipe, *filesrc, *volenv;
char *location; char *location;
int channel_id; int channel_id;

View file

@ -3,7 +3,7 @@
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink, *parse, *decode, *queue; GstElement *filesrc, *osssink, *parse, *decode, *queue;
GstElement *bin; GstElement *bin;
GstElement *thread; GstElement *thread;
@ -23,9 +23,9 @@ int main(int argc,char *argv[])
g_assert(bin != NULL); g_assert(bin != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
parse = gst_elementfactory_make("mp3parse", "parse"); parse = gst_elementfactory_make("mp3parse", "parse");
decode = gst_elementfactory_make("mpg123", "decode"); decode = gst_elementfactory_make("mpg123", "decode");
@ -37,7 +37,7 @@ int main(int argc,char *argv[])
g_assert(osssink != NULL); g_assert(osssink != NULL);
/* add objects to the main pipeline */ /* add objects to the main pipeline */
gst_bin_add(GST_BIN(bin), disksrc); gst_bin_add(GST_BIN(bin), filesrc);
gst_bin_add(GST_BIN(bin), parse); gst_bin_add(GST_BIN(bin), parse);
gst_bin_add(GST_BIN(bin), decode); gst_bin_add(GST_BIN(bin), decode);
gst_bin_add(GST_BIN(bin), queue); gst_bin_add(GST_BIN(bin), queue);
@ -46,7 +46,7 @@ int main(int argc,char *argv[])
gst_bin_add(GST_BIN(bin), thread); gst_bin_add(GST_BIN(bin), thread);
gst_pad_connect(gst_element_get_pad(disksrc,"src"), gst_pad_connect(gst_element_get_pad(filesrc,"src"),
gst_element_get_pad(parse,"sink")); gst_element_get_pad(parse,"sink"));
gst_pad_connect(gst_element_get_pad(parse,"src"), gst_pad_connect(gst_element_get_pad(parse,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));

View file

@ -13,7 +13,7 @@ void eos(GstElement *element, gpointer data)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink, *queue; GstElement *filesrc, *osssink, *queue;
GstElement *pipeline; GstElement *pipeline;
GstElement *thread; GstElement *thread;
@ -33,10 +33,10 @@ int main(int argc,char *argv[])
g_assert(pipeline != NULL); g_assert(pipeline != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
g_signal_connect (G_OBJECT(disksrc),"eos", g_signal_connect (G_OBJECT(filesrc),"eos",
G_CALLBACK(eos), thread); G_CALLBACK(eos), thread);
queue = gst_elementfactory_make("queue", "queue"); queue = gst_elementfactory_make("queue", "queue");
@ -47,7 +47,7 @@ int main(int argc,char *argv[])
/* add objects to the main pipeline */ /* add objects to the main pipeline */
/* /*
gst_pipeline_add_src(GST_PIPELINE(pipeline), disksrc); gst_pipeline_add_src(GST_PIPELINE(pipeline), filesrc);
gst_pipeline_add_sink(GST_PIPELINE(pipeline), queue); gst_pipeline_add_sink(GST_PIPELINE(pipeline), queue);
gst_bin_add(GST_BIN(thread), osssink); gst_bin_add(GST_BIN(thread), osssink);

View file

@ -13,7 +13,7 @@ void eos(GstElement *element, gpointer data)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink, *queue, *parse, *decode; GstElement *filesrc, *osssink, *queue, *parse, *decode;
GstElement *bin; GstElement *bin;
GstElement *thread; GstElement *thread;
@ -33,10 +33,10 @@ int main(int argc,char *argv[])
g_assert(bin != NULL); g_assert(bin != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
g_signal_connect(G_OBJECT(disksrc),"eos", g_signal_connect(G_OBJECT(filesrc),"eos",
G_CALLBACK(eos), thread); G_CALLBACK(eos), thread);
queue = gst_elementfactory_make("queue", "queue"); queue = gst_elementfactory_make("queue", "queue");
@ -49,14 +49,14 @@ int main(int argc,char *argv[])
decode = gst_elementfactory_make("mpg123", "decode"); decode = gst_elementfactory_make("mpg123", "decode");
/* add objects to the main bin */ /* add objects to the main bin */
gst_bin_add(GST_BIN(bin), disksrc); gst_bin_add(GST_BIN(bin), filesrc);
gst_bin_add(GST_BIN(bin), queue); gst_bin_add(GST_BIN(bin), queue);
gst_bin_add(GST_BIN(thread), parse); gst_bin_add(GST_BIN(thread), parse);
gst_bin_add(GST_BIN(thread), decode); gst_bin_add(GST_BIN(thread), decode);
gst_bin_add(GST_BIN(thread), osssink); gst_bin_add(GST_BIN(thread), osssink);
gst_pad_connect(gst_element_get_pad(disksrc,"src"), gst_pad_connect(gst_element_get_pad(filesrc,"src"),
gst_element_get_pad(queue,"sink")); gst_element_get_pad(queue,"sink"));
gst_pad_connect(gst_element_get_pad(queue,"src"), gst_pad_connect(gst_element_get_pad(queue,"src"),

View file

@ -13,7 +13,7 @@ void eos(GstElement *element, gpointer data)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink, *queue, *queue2, *parse, *decode; GstElement *filesrc, *osssink, *queue, *queue2, *parse, *decode;
GstElement *bin; GstElement *bin;
GstElement *thread, *thread2; GstElement *thread, *thread2;
@ -35,10 +35,10 @@ int main(int argc,char *argv[])
g_assert(bin != NULL); g_assert(bin != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
g_signal_connect(G_OBJECT(disksrc),"eos", g_signal_connect(G_OBJECT(filesrc),"eos",
G_CALLBACK(eos), thread); G_CALLBACK(eos), thread);
queue = gst_elementfactory_make("queue", "queue"); queue = gst_elementfactory_make("queue", "queue");
@ -52,7 +52,7 @@ int main(int argc,char *argv[])
decode = gst_elementfactory_make("mpg123", "decode"); decode = gst_elementfactory_make("mpg123", "decode");
/* add objects to the main bin */ /* add objects to the main bin */
gst_bin_add(GST_BIN(bin), disksrc); gst_bin_add(GST_BIN(bin), filesrc);
gst_bin_add(GST_BIN(bin), queue); gst_bin_add(GST_BIN(bin), queue);
gst_bin_add(GST_BIN(thread), parse); gst_bin_add(GST_BIN(thread), parse);
@ -61,7 +61,7 @@ int main(int argc,char *argv[])
gst_bin_add(GST_BIN(thread2), osssink); gst_bin_add(GST_BIN(thread2), osssink);
gst_pad_connect(gst_element_get_pad(disksrc,"src"), gst_pad_connect(gst_element_get_pad(filesrc,"src"),
gst_element_get_pad(queue,"sink")); gst_element_get_pad(queue,"sink"));
gst_pad_connect(gst_element_get_pad(queue,"src"), gst_pad_connect(gst_element_get_pad(queue,"src"),

View file

@ -14,7 +14,7 @@ void eos(GstElement *element, gpointer data)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink; GstElement *filesrc, *osssink;
GstElement *pipeline; GstElement *pipeline;
GstElement *thread; GstElement *thread;
@ -34,10 +34,10 @@ int main(int argc,char *argv[])
g_assert(pipeline != NULL); g_assert(pipeline != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
g_signal_connect(G_OBJECT(disksrc),"eos", g_signal_connect(G_OBJECT(filesrc),"eos",
G_CALLBACK(eos), thread); G_CALLBACK(eos), thread);
/* and an audio sink */ /* and an audio sink */
@ -46,7 +46,7 @@ int main(int argc,char *argv[])
/* add objects to the main pipeline */ /* add objects to the main pipeline */
/* /*
gst_pipeline_add_src(GST_PIPELINE(pipeline), disksrc); gst_pipeline_add_src(GST_PIPELINE(pipeline), filesrc);
gst_pipeline_add_sink(GST_PIPELINE(pipeline), osssink); gst_pipeline_add_sink(GST_PIPELINE(pipeline), osssink);
if (!gst_pipeline_autoplug(GST_PIPELINE(pipeline))) { if (!gst_pipeline_autoplug(GST_PIPELINE(pipeline))) {
@ -55,9 +55,9 @@ int main(int argc,char *argv[])
} }
*/ */
//gst_bin_remove(GST_BIN(pipeline), disksrc); //gst_bin_remove(GST_BIN(pipeline), filesrc);
//gst_bin_add(GST_BIN(thread), disksrc); //gst_bin_add(GST_BIN(thread), filesrc);
gst_bin_add(GST_BIN(thread), GST_ELEMENT(pipeline)); gst_bin_add(GST_BIN(thread), GST_ELEMENT(pipeline));
/* make it ready */ /* make it ready */

View file

@ -15,7 +15,7 @@ object_saved (GstObject *object, xmlNodePtr parent, gpointer data)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink, *queue, *queue2, *parse, *decode; GstElement *filesrc, *osssink, *queue, *queue2, *parse, *decode;
GstElement *bin; GstElement *bin;
GstElement *thread, *thread2; GstElement *thread, *thread2;
@ -48,9 +48,9 @@ int main(int argc,char *argv[])
g_assert(bin != NULL); g_assert(bin != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
queue = gst_elementfactory_make("queue", "queue"); queue = gst_elementfactory_make("queue", "queue");
queue2 = gst_elementfactory_make("queue", "queue2"); queue2 = gst_elementfactory_make("queue", "queue2");
@ -63,7 +63,7 @@ int main(int argc,char *argv[])
decode = gst_elementfactory_make("mpg123", "decode"); decode = gst_elementfactory_make("mpg123", "decode");
/* add objects to the main bin */ /* add objects to the main bin */
gst_bin_add(GST_BIN(bin), disksrc); gst_bin_add(GST_BIN(bin), filesrc);
gst_bin_add(GST_BIN(bin), queue); gst_bin_add(GST_BIN(bin), queue);
gst_bin_add(GST_BIN(thread), parse); gst_bin_add(GST_BIN(thread), parse);
@ -72,7 +72,7 @@ int main(int argc,char *argv[])
gst_bin_add(GST_BIN(thread2), osssink); gst_bin_add(GST_BIN(thread2), osssink);
gst_pad_connect(gst_element_get_pad(disksrc,"src"), gst_pad_connect(gst_element_get_pad(filesrc,"src"),
gst_element_get_pad(queue,"sink")); gst_element_get_pad(queue,"sink"));
gst_pad_connect(gst_element_get_pad(queue,"src"), gst_pad_connect(gst_element_get_pad(queue,"src"),

View file

@ -17,14 +17,14 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline)
GstAutoplug *autoplug; GstAutoplug *autoplug;
GtkWidget *socket; GtkWidget *socket;
GstElement *autobin; GstElement *autobin;
GstElement *disksrc; GstElement *filesrc;
GstElement *cache; GstElement *cache;
GST_DEBUG (0,"GstPipeline: play have type\n"); GST_DEBUG (0,"GstPipeline: play have type\n");
gst_element_set_state (pipeline, GST_STATE_PAUSED); gst_element_set_state (pipeline, GST_STATE_PAUSED);
disksrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source"); filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source");
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache");
@ -109,7 +109,7 @@ static void
gst_play_cache_empty (GstElement *element, GstElement *pipeline) gst_play_cache_empty (GstElement *element, GstElement *pipeline)
{ {
GstElement *autobin; GstElement *autobin;
GstElement *disksrc; GstElement *filesrc;
GstElement *cache; GstElement *cache;
GstElement *new_element; GstElement *new_element;
@ -117,15 +117,15 @@ gst_play_cache_empty (GstElement *element, GstElement *pipeline)
gst_element_set_state (pipeline, GST_STATE_PAUSED); gst_element_set_state (pipeline, GST_STATE_PAUSED);
disksrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source"); filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source");
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache");
new_element = gst_bin_get_by_name (GST_BIN (autobin), "new_element"); new_element = gst_bin_get_by_name (GST_BIN (autobin), "new_element");
gst_element_disconnect (disksrc, "src", cache, "sink"); gst_element_disconnect (filesrc, "src", cache, "sink");
gst_element_disconnect (cache, "src", new_element, "sink"); gst_element_disconnect (cache, "src", new_element, "sink");
gst_bin_remove (GST_BIN (autobin), cache); gst_bin_remove (GST_BIN (autobin), cache);
gst_element_connect (disksrc, "src", new_element, "sink"); gst_element_connect (filesrc, "src", new_element, "sink");
gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_element_set_state (pipeline, GST_STATE_PLAYING);
@ -134,7 +134,7 @@ gst_play_cache_empty (GstElement *element, GstElement *pipeline)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc; GstElement *filesrc;
GstElement *pipeline; GstElement *pipeline;
GstElement *autobin; GstElement *autobin;
GstElement *typefind; GstElement *typefind;
@ -154,10 +154,10 @@ int main(int argc,char *argv[])
g_assert(pipeline != NULL); g_assert(pipeline != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL); gtk_object_set(GTK_OBJECT(filesrc),"location", argv[1],NULL);
gst_bin_add (GST_BIN (pipeline), disksrc); gst_bin_add (GST_BIN (pipeline), filesrc);
autobin = gst_bin_new ("autobin"); autobin = gst_bin_new ("autobin");
cache = gst_elementfactory_make ("autoplugcache", "cache"); cache = gst_elementfactory_make ("autoplugcache", "cache");
@ -172,7 +172,7 @@ int main(int argc,char *argv[])
gst_element_add_ghost_pad (autobin, gst_element_get_pad (cache, "sink"), "sink"); gst_element_add_ghost_pad (autobin, gst_element_get_pad (cache, "sink"), "sink");
gst_bin_add (GST_BIN( pipeline), autobin); gst_bin_add (GST_BIN( pipeline), autobin);
gst_element_connect (disksrc, "src", autobin, "sink"); gst_element_connect (filesrc, "src", autobin, "sink");
/* start playing */ /* start playing */
gst_element_set_state( GST_ELEMENT (pipeline), GST_STATE_PLAYING); gst_element_set_state( GST_ELEMENT (pipeline), GST_STATE_PLAYING);

View file

@ -13,7 +13,7 @@ void eos(GstElement *element)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *bin, *disksrc, *parse, *decoder, *downmix, *mulaw, *mulawdec, *osssink; GstElement *bin, *filesrc, *parse, *decoder, *downmix, *mulaw, *mulawdec, *osssink;
gst_init(&argc,&argv); gst_init(&argc,&argv);
@ -26,9 +26,9 @@ int main(int argc,char *argv[])
bin = gst_pipeline_new("pipeline"); bin = gst_pipeline_new("pipeline");
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
g_signal_connect(G_OBJECT(disksrc),"eos", g_signal_connect(G_OBJECT(filesrc),"eos",
G_CALLBACK(eos),NULL); G_CALLBACK(eos),NULL);
/* now it's time to get the parser */ /* now it's time to get the parser */
@ -41,7 +41,7 @@ int main(int argc,char *argv[])
osssink = gst_elementfactory_make("osssink", "play_audio"); osssink = gst_elementfactory_make("osssink", "play_audio");
/* add objects to the main pipeline */ /* add objects to the main pipeline */
gst_bin_add(GST_BIN(bin), disksrc); gst_bin_add(GST_BIN(bin), filesrc);
gst_bin_add(GST_BIN(bin), parse); gst_bin_add(GST_BIN(bin), parse);
gst_bin_add(GST_BIN(bin), decoder); gst_bin_add(GST_BIN(bin), decoder);
gst_bin_add(GST_BIN(bin), downmix); gst_bin_add(GST_BIN(bin), downmix);
@ -50,7 +50,7 @@ int main(int argc,char *argv[])
gst_bin_add(GST_BIN(bin), osssink); gst_bin_add(GST_BIN(bin), osssink);
/* connect src to sink */ /* connect src to sink */
gst_pad_connect(gst_element_get_pad(disksrc,"src"), gst_pad_connect(gst_element_get_pad(filesrc,"src"),
gst_element_get_pad(parse,"sink")); gst_element_get_pad(parse,"sink"));
gst_pad_connect(gst_element_get_pad(parse,"src"), gst_pad_connect(gst_element_get_pad(parse,"src"),
gst_element_get_pad(decoder,"sink")); gst_element_get_pad(decoder,"sink"));
@ -81,7 +81,7 @@ int main(int argc,char *argv[])
gst_object_destroy(GST_OBJECT(downmix)); gst_object_destroy(GST_OBJECT(downmix));
gst_object_destroy(GST_OBJECT(mulaw)); gst_object_destroy(GST_OBJECT(mulaw));
gst_object_destroy(GST_OBJECT(mulawdec)); gst_object_destroy(GST_OBJECT(mulawdec));
gst_object_destroy(GST_OBJECT(disksrc)); gst_object_destroy(GST_OBJECT(filesrc));
gst_object_destroy(GST_OBJECT(bin)); gst_object_destroy(GST_OBJECT(bin));
exit(0); exit(0);

View file

@ -7,14 +7,14 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline)
GstElement *new_element; GstElement *new_element;
GstAutoplug *autoplug; GstAutoplug *autoplug;
GstElement *autobin; GstElement *autobin;
GstElement *disksrc; GstElement *filesrc;
GstElement *cache; GstElement *cache;
GST_DEBUG (0,"GstPipeline: play have type\n"); GST_DEBUG (0,"GstPipeline: play have type\n");
gst_element_set_state (pipeline, GST_STATE_PAUSED); gst_element_set_state (pipeline, GST_STATE_PAUSED);
disksrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source"); filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source");
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache");
@ -54,7 +54,7 @@ static void
gst_play_cache_empty (GstElement *element, GstElement *pipeline) gst_play_cache_empty (GstElement *element, GstElement *pipeline)
{ {
GstElement *autobin; GstElement *autobin;
GstElement *disksrc; GstElement *filesrc;
GstElement *cache; GstElement *cache;
GstElement *new_element; GstElement *new_element;
@ -62,15 +62,15 @@ gst_play_cache_empty (GstElement *element, GstElement *pipeline)
gst_element_set_state (pipeline, GST_STATE_PAUSED); gst_element_set_state (pipeline, GST_STATE_PAUSED);
disksrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source"); filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source");
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache");
new_element = gst_bin_get_by_name (GST_BIN (autobin), "new_element"); new_element = gst_bin_get_by_name (GST_BIN (autobin), "new_element");
gst_element_disconnect (disksrc, "src", cache, "sink"); gst_element_disconnect (filesrc, "src", cache, "sink");
gst_element_disconnect (cache, "src", new_element, "sink"); gst_element_disconnect (cache, "src", new_element, "sink");
gst_bin_remove (GST_BIN (autobin), cache); gst_bin_remove (GST_BIN (autobin), cache);
gst_element_connect (disksrc, "src", new_element, "sink"); gst_element_connect (filesrc, "src", new_element, "sink");
gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_element_set_state (pipeline, GST_STATE_PLAYING);
@ -80,7 +80,7 @@ gst_play_cache_empty (GstElement *element, GstElement *pipeline)
int int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
GstElement *disksrc; GstElement *filesrc;
GstElement *pipeline; GstElement *pipeline;
GstElement *autobin; GstElement *autobin;
GstElement *typefind; GstElement *typefind;
@ -98,10 +98,10 @@ main (int argc, char *argv[])
g_assert (pipeline != NULL); g_assert (pipeline != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source"); filesrc = gst_elementfactory_make ("filesrc", "disk_source");
g_assert (disksrc != NULL); g_assert (filesrc != NULL);
g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
gst_bin_add (GST_BIN (pipeline), disksrc); gst_bin_add (GST_BIN (pipeline), filesrc);
autobin = gst_bin_new ("autobin"); autobin = gst_bin_new ("autobin");
cache = gst_elementfactory_make ("autoplugcache", "cache"); cache = gst_elementfactory_make ("autoplugcache", "cache");
@ -118,7 +118,7 @@ main (int argc, char *argv[])
gst_element_add_ghost_pad (autobin, gst_element_get_pad (cache, "sink"), "sink"); gst_element_add_ghost_pad (autobin, gst_element_get_pad (cache, "sink"), "sink");
gst_bin_add (GST_BIN( pipeline), autobin); gst_bin_add (GST_BIN( pipeline), autobin);
gst_element_connect (disksrc, "src", autobin, "sink"); gst_element_connect (filesrc, "src", autobin, "sink");
/* start playing */ /* start playing */
gst_element_set_state( GST_ELEMENT (pipeline), GST_STATE_PLAYING); gst_element_set_state( GST_ELEMENT (pipeline), GST_STATE_PLAYING);

View file

@ -4,7 +4,7 @@ int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
GstElement *pipeline; GstElement *pipeline;
GstElement *disksrc; GstElement *filesrc;
gst_init (&argc, &argv); gst_init (&argc, &argv);
@ -14,10 +14,10 @@ main (int argc, char *argv[])
} }
pipeline = gst_pipeline_new ("my_pipeline"); pipeline = gst_pipeline_new ("my_pipeline");
gst_parse_launch ("disksrc[my_disksrc] ! mp3parse ! mpg123 ! osssink", GST_BIN (pipeline)); gst_parse_launch ("filesrc[my_filesrc] ! mp3parse ! mpg123 ! osssink", GST_BIN (pipeline));
disksrc = gst_bin_get_by_name (GST_BIN (pipeline), "my_disksrc"); filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "my_filesrc");
g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_element_set_state (pipeline, GST_STATE_PLAYING);

View file

@ -264,20 +264,20 @@ create_input_channel (int id, char* location)
/* create elements */ /* create elements */
GST_DEBUG(0, "c_i_p : creating disksrc\n"); GST_DEBUG(0, "c_i_p : creating filesrc\n");
sprintf (buffer, "disksrc%d", id); sprintf (buffer, "filesrc%d", id);
channel->disksrc = gst_elementfactory_make ("disksrc", buffer); channel->filesrc = gst_elementfactory_make ("filesrc", buffer);
g_assert(channel->disksrc != NULL); g_assert(channel->filesrc != NULL);
GST_DEBUG(0, "c_i_p : setting location\n"); GST_DEBUG(0, "c_i_p : setting location\n");
g_object_set(G_OBJECT(channel->disksrc),"location", location, NULL); g_object_set(G_OBJECT(channel->filesrc),"location", location, NULL);
/* add disksrc to the bin before autoplug */ /* add filesrc to the bin before autoplug */
gst_bin_add(GST_BIN(channel->pipe), channel->disksrc); gst_bin_add(GST_BIN(channel->pipe), channel->filesrc);
/* connect signal to eos of disksrc */ /* connect signal to eos of filesrc */
g_signal_connect (G_OBJECT(channel->disksrc),"eos", g_signal_connect (G_OBJECT(channel->filesrc),"eos",
G_CALLBACK(eos),NULL); G_CALLBACK(eos),NULL);
@ -296,7 +296,7 @@ create_input_channel (int id, char* location)
#endif #endif
#ifdef WITH_BUG #ifdef WITH_BUG
srccaps = gst_play_typefind (GST_BIN (channel->pipe), channel->disksrc); srccaps = gst_play_typefind (GST_BIN (channel->pipe), channel->filesrc);
#endif #endif
#ifdef WITH_BUG2 #ifdef WITH_BUG2
{ {
@ -364,7 +364,7 @@ create_input_channel (int id, char* location)
gst_bin_add (GST_BIN(channel->pipe), channel->volenv); gst_bin_add (GST_BIN(channel->pipe), channel->volenv);
gst_bin_add (GST_BIN (channel->pipe), new_element); gst_bin_add (GST_BIN (channel->pipe), new_element);
gst_element_connect (channel->disksrc, "src", new_element, "sink"); gst_element_connect (channel->filesrc, "src", new_element, "sink");
gst_element_connect (new_element, "src_00", channel->volenv, "sink"); gst_element_connect (new_element, "src_00", channel->volenv, "sink");
/* add a ghost pad */ /* add a ghost pad */

View file

@ -5,7 +5,7 @@
typedef struct typedef struct
{ {
GstElement *pipe, *disksrc, *volenv; GstElement *pipe, *filesrc, *volenv;
char *location; char *location;
int channel_id; int channel_id;

View file

@ -3,7 +3,7 @@
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink, *parse, *decode, *queue; GstElement *filesrc, *osssink, *parse, *decode, *queue;
GstElement *bin; GstElement *bin;
GstElement *thread; GstElement *thread;
@ -23,9 +23,9 @@ int main(int argc,char *argv[])
g_assert(bin != NULL); g_assert(bin != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
parse = gst_elementfactory_make("mp3parse", "parse"); parse = gst_elementfactory_make("mp3parse", "parse");
decode = gst_elementfactory_make("mpg123", "decode"); decode = gst_elementfactory_make("mpg123", "decode");
@ -37,7 +37,7 @@ int main(int argc,char *argv[])
g_assert(osssink != NULL); g_assert(osssink != NULL);
/* add objects to the main pipeline */ /* add objects to the main pipeline */
gst_bin_add(GST_BIN(bin), disksrc); gst_bin_add(GST_BIN(bin), filesrc);
gst_bin_add(GST_BIN(bin), parse); gst_bin_add(GST_BIN(bin), parse);
gst_bin_add(GST_BIN(bin), decode); gst_bin_add(GST_BIN(bin), decode);
gst_bin_add(GST_BIN(bin), queue); gst_bin_add(GST_BIN(bin), queue);
@ -46,7 +46,7 @@ int main(int argc,char *argv[])
gst_bin_add(GST_BIN(bin), thread); gst_bin_add(GST_BIN(bin), thread);
gst_pad_connect(gst_element_get_pad(disksrc,"src"), gst_pad_connect(gst_element_get_pad(filesrc,"src"),
gst_element_get_pad(parse,"sink")); gst_element_get_pad(parse,"sink"));
gst_pad_connect(gst_element_get_pad(parse,"src"), gst_pad_connect(gst_element_get_pad(parse,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));

View file

@ -13,7 +13,7 @@ void eos(GstElement *element, gpointer data)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink, *queue; GstElement *filesrc, *osssink, *queue;
GstElement *pipeline; GstElement *pipeline;
GstElement *thread; GstElement *thread;
@ -33,10 +33,10 @@ int main(int argc,char *argv[])
g_assert(pipeline != NULL); g_assert(pipeline != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
g_signal_connect (G_OBJECT(disksrc),"eos", g_signal_connect (G_OBJECT(filesrc),"eos",
G_CALLBACK(eos), thread); G_CALLBACK(eos), thread);
queue = gst_elementfactory_make("queue", "queue"); queue = gst_elementfactory_make("queue", "queue");
@ -47,7 +47,7 @@ int main(int argc,char *argv[])
/* add objects to the main pipeline */ /* add objects to the main pipeline */
/* /*
gst_pipeline_add_src(GST_PIPELINE(pipeline), disksrc); gst_pipeline_add_src(GST_PIPELINE(pipeline), filesrc);
gst_pipeline_add_sink(GST_PIPELINE(pipeline), queue); gst_pipeline_add_sink(GST_PIPELINE(pipeline), queue);
gst_bin_add(GST_BIN(thread), osssink); gst_bin_add(GST_BIN(thread), osssink);

View file

@ -13,7 +13,7 @@ void eos(GstElement *element, gpointer data)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink, *queue, *parse, *decode; GstElement *filesrc, *osssink, *queue, *parse, *decode;
GstElement *bin; GstElement *bin;
GstElement *thread; GstElement *thread;
@ -33,10 +33,10 @@ int main(int argc,char *argv[])
g_assert(bin != NULL); g_assert(bin != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
g_signal_connect(G_OBJECT(disksrc),"eos", g_signal_connect(G_OBJECT(filesrc),"eos",
G_CALLBACK(eos), thread); G_CALLBACK(eos), thread);
queue = gst_elementfactory_make("queue", "queue"); queue = gst_elementfactory_make("queue", "queue");
@ -49,14 +49,14 @@ int main(int argc,char *argv[])
decode = gst_elementfactory_make("mpg123", "decode"); decode = gst_elementfactory_make("mpg123", "decode");
/* add objects to the main bin */ /* add objects to the main bin */
gst_bin_add(GST_BIN(bin), disksrc); gst_bin_add(GST_BIN(bin), filesrc);
gst_bin_add(GST_BIN(bin), queue); gst_bin_add(GST_BIN(bin), queue);
gst_bin_add(GST_BIN(thread), parse); gst_bin_add(GST_BIN(thread), parse);
gst_bin_add(GST_BIN(thread), decode); gst_bin_add(GST_BIN(thread), decode);
gst_bin_add(GST_BIN(thread), osssink); gst_bin_add(GST_BIN(thread), osssink);
gst_pad_connect(gst_element_get_pad(disksrc,"src"), gst_pad_connect(gst_element_get_pad(filesrc,"src"),
gst_element_get_pad(queue,"sink")); gst_element_get_pad(queue,"sink"));
gst_pad_connect(gst_element_get_pad(queue,"src"), gst_pad_connect(gst_element_get_pad(queue,"src"),

View file

@ -13,7 +13,7 @@ void eos(GstElement *element, gpointer data)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink, *queue, *queue2, *parse, *decode; GstElement *filesrc, *osssink, *queue, *queue2, *parse, *decode;
GstElement *bin; GstElement *bin;
GstElement *thread, *thread2; GstElement *thread, *thread2;
@ -35,10 +35,10 @@ int main(int argc,char *argv[])
g_assert(bin != NULL); g_assert(bin != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
g_signal_connect(G_OBJECT(disksrc),"eos", g_signal_connect(G_OBJECT(filesrc),"eos",
G_CALLBACK(eos), thread); G_CALLBACK(eos), thread);
queue = gst_elementfactory_make("queue", "queue"); queue = gst_elementfactory_make("queue", "queue");
@ -52,7 +52,7 @@ int main(int argc,char *argv[])
decode = gst_elementfactory_make("mpg123", "decode"); decode = gst_elementfactory_make("mpg123", "decode");
/* add objects to the main bin */ /* add objects to the main bin */
gst_bin_add(GST_BIN(bin), disksrc); gst_bin_add(GST_BIN(bin), filesrc);
gst_bin_add(GST_BIN(bin), queue); gst_bin_add(GST_BIN(bin), queue);
gst_bin_add(GST_BIN(thread), parse); gst_bin_add(GST_BIN(thread), parse);
@ -61,7 +61,7 @@ int main(int argc,char *argv[])
gst_bin_add(GST_BIN(thread2), osssink); gst_bin_add(GST_BIN(thread2), osssink);
gst_pad_connect(gst_element_get_pad(disksrc,"src"), gst_pad_connect(gst_element_get_pad(filesrc,"src"),
gst_element_get_pad(queue,"sink")); gst_element_get_pad(queue,"sink"));
gst_pad_connect(gst_element_get_pad(queue,"src"), gst_pad_connect(gst_element_get_pad(queue,"src"),

View file

@ -14,7 +14,7 @@ void eos(GstElement *element, gpointer data)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink; GstElement *filesrc, *osssink;
GstElement *pipeline; GstElement *pipeline;
GstElement *thread; GstElement *thread;
@ -34,10 +34,10 @@ int main(int argc,char *argv[])
g_assert(pipeline != NULL); g_assert(pipeline != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
g_signal_connect(G_OBJECT(disksrc),"eos", g_signal_connect(G_OBJECT(filesrc),"eos",
G_CALLBACK(eos), thread); G_CALLBACK(eos), thread);
/* and an audio sink */ /* and an audio sink */
@ -46,7 +46,7 @@ int main(int argc,char *argv[])
/* add objects to the main pipeline */ /* add objects to the main pipeline */
/* /*
gst_pipeline_add_src(GST_PIPELINE(pipeline), disksrc); gst_pipeline_add_src(GST_PIPELINE(pipeline), filesrc);
gst_pipeline_add_sink(GST_PIPELINE(pipeline), osssink); gst_pipeline_add_sink(GST_PIPELINE(pipeline), osssink);
if (!gst_pipeline_autoplug(GST_PIPELINE(pipeline))) { if (!gst_pipeline_autoplug(GST_PIPELINE(pipeline))) {
@ -55,9 +55,9 @@ int main(int argc,char *argv[])
} }
*/ */
//gst_bin_remove(GST_BIN(pipeline), disksrc); //gst_bin_remove(GST_BIN(pipeline), filesrc);
//gst_bin_add(GST_BIN(thread), disksrc); //gst_bin_add(GST_BIN(thread), filesrc);
gst_bin_add(GST_BIN(thread), GST_ELEMENT(pipeline)); gst_bin_add(GST_BIN(thread), GST_ELEMENT(pipeline));
/* make it ready */ /* make it ready */

View file

@ -15,7 +15,7 @@ object_saved (GstObject *object, xmlNodePtr parent, gpointer data)
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
GstElement *disksrc, *osssink, *queue, *queue2, *parse, *decode; GstElement *filesrc, *osssink, *queue, *queue2, *parse, *decode;
GstElement *bin; GstElement *bin;
GstElement *thread, *thread2; GstElement *thread, *thread2;
@ -48,9 +48,9 @@ int main(int argc,char *argv[])
g_assert(bin != NULL); g_assert(bin != NULL);
/* create a disk reader */ /* create a disk reader */
disksrc = gst_elementfactory_make("disksrc", "disk_source"); filesrc = gst_elementfactory_make("filesrc", "disk_source");
g_assert(disksrc != NULL); g_assert(filesrc != NULL);
g_object_set(G_OBJECT(disksrc),"location", argv[1],NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL);
queue = gst_elementfactory_make("queue", "queue"); queue = gst_elementfactory_make("queue", "queue");
queue2 = gst_elementfactory_make("queue", "queue2"); queue2 = gst_elementfactory_make("queue", "queue2");
@ -63,7 +63,7 @@ int main(int argc,char *argv[])
decode = gst_elementfactory_make("mpg123", "decode"); decode = gst_elementfactory_make("mpg123", "decode");
/* add objects to the main bin */ /* add objects to the main bin */
gst_bin_add(GST_BIN(bin), disksrc); gst_bin_add(GST_BIN(bin), filesrc);
gst_bin_add(GST_BIN(bin), queue); gst_bin_add(GST_BIN(bin), queue);
gst_bin_add(GST_BIN(thread), parse); gst_bin_add(GST_BIN(thread), parse);
@ -72,7 +72,7 @@ int main(int argc,char *argv[])
gst_bin_add(GST_BIN(thread2), osssink); gst_bin_add(GST_BIN(thread2), osssink);
gst_pad_connect(gst_element_get_pad(disksrc,"src"), gst_pad_connect(gst_element_get_pad(filesrc,"src"),
gst_element_get_pad(queue,"sink")); gst_element_get_pad(queue,"sink"));
gst_pad_connect(gst_element_get_pad(queue,"src"), gst_pad_connect(gst_element_get_pad(queue,"src"),