updated test programs to new ghostpad API

Original commit message from CVS:
updated test programs to new ghostpad API
This commit is contained in:
Erik Walthinsen 2001-01-20 03:33:55 +00:00
parent 0a9cc5f2fe
commit 92b4650081
11 changed files with 24 additions and 24 deletions

View file

@ -47,13 +47,13 @@ int main(int argc,char *argv[]) {
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"));
gst_element_add_ghost_pad(GST_ELEMENT(decodethread), gst_element_add_ghost_pad(GST_ELEMENT(decodethread),
gst_element_get_pad(decode,"src")); gst_element_get_pad(decode,"src"),"src");
// construct the play thread // construct the play thread
g_print("constructing the play thread\n"); g_print("constructing the play thread\n");
gst_bin_add(GST_BIN(playthread),GST_ELEMENT(play)); gst_bin_add(GST_BIN(playthread),GST_ELEMENT(play));
gst_element_add_ghost_pad(GST_ELEMENT(playthread), gst_element_add_ghost_pad(GST_ELEMENT(playthread),
gst_element_get_pad(play,"sink")); gst_element_get_pad(play,"sink"),"sink");
// construct the outer pipeline // construct the outer pipeline
g_print("constructing the main pipeline\n"); g_print("constructing the main pipeline\n");

View file

@ -44,7 +44,7 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
gst_element_get_pad(audio_encode,"sink")); gst_element_get_pad(audio_encode,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(audio_encode,"src"), gst_pad_connect(gst_element_get_pad(audio_encode,"src"),
gst_element_get_pad(mux,"audio_00")); gst_element_get_pad(mux,"audio_00"));
@ -101,7 +101,7 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(video_thread), gst_element_add_ghost_pad(GST_ELEMENT(video_thread),
gst_element_get_pad(median,"sink")); gst_element_get_pad(median,"sink"),"sink");
// construct queue and connect everything in the main pipeline // construct queue and connect everything in the main pipeline
video_queue = gst_elementfactory_make("queue","video_queue"); video_queue = gst_elementfactory_make("queue","video_queue");

View file

@ -33,7 +33,7 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
gst_element_get_pad(play,"sink")); gst_element_get_pad(play,"sink"),"sink");
// construct queue and connect everything in the main pipelie // construct queue and connect everything in the main pipelie
audio_queue = gst_elementfactory_make("queue","audio_queue"); audio_queue = gst_elementfactory_make("queue","audio_queue");
@ -101,7 +101,7 @@ int main(int argc,char *argv[]) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(video_thread), gst_element_add_ghost_pad(GST_ELEMENT(video_thread),
gst_element_get_pad(show,"sink")); gst_element_get_pad(show,"sink"),"sink");
// construct queue and connect everything in the main pipeline // construct queue and connect everything in the main pipeline
video_queue = gst_elementfactory_make("queue","video_queue"); video_queue = gst_elementfactory_make("queue","video_queue");

View file

@ -43,7 +43,7 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
gst_element_get_pad(parse_audio,"sink")); gst_element_get_pad(parse_audio,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_audio,"src"), gst_pad_connect(gst_element_get_pad(parse_audio,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));
gst_pad_connect(gst_element_get_pad(decode,"src"), gst_pad_connect(gst_element_get_pad(decode,"src"),
@ -95,7 +95,7 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(video_thread), gst_element_add_ghost_pad(GST_ELEMENT(video_thread),
gst_element_get_pad(parse_video,"sink")); gst_element_get_pad(parse_video,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_video,"src"), gst_pad_connect(gst_element_get_pad(parse_video,"src"),
gst_element_get_pad(decode_video,"sink")); gst_element_get_pad(decode_video,"sink"));
gst_pad_connect(gst_element_get_pad(decode_video,"src"), gst_pad_connect(gst_element_get_pad(decode_video,"src"),

View file

@ -45,7 +45,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
gst_element_get_pad(parse_audio,"sink")); gst_element_get_pad(parse_audio,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_audio,"src"), gst_pad_connect(gst_element_get_pad(parse_audio,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));
gst_pad_connect(gst_element_get_pad(decode,"src"), gst_pad_connect(gst_element_get_pad(decode,"src"),
@ -87,7 +87,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
gst_element_get_pad(parse_audio,"sink")); gst_element_get_pad(parse_audio,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_audio,"src"), gst_pad_connect(gst_element_get_pad(parse_audio,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));
gst_pad_connect(gst_element_get_pad(decode,"src"), gst_pad_connect(gst_element_get_pad(decode,"src"),
@ -141,7 +141,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(video_thread), gst_element_add_ghost_pad(GST_ELEMENT(video_thread),
gst_element_get_pad(parse_video,"sink")); gst_element_get_pad(parse_video,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_video,"src"), gst_pad_connect(gst_element_get_pad(parse_video,"src"),
gst_element_get_pad(decode_video,"sink")); gst_element_get_pad(decode_video,"sink"));
gst_pad_connect(gst_element_get_pad(decode_video,"src"), gst_pad_connect(gst_element_get_pad(decode_video,"src"),

View file

@ -69,7 +69,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
gst_element_get_pad(parse_audio,"sink")); gst_element_get_pad(parse_audio,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_audio,"src"), gst_pad_connect(gst_element_get_pad(parse_audio,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));
gst_pad_connect(gst_element_get_pad(decode,"src"), gst_pad_connect(gst_element_get_pad(decode,"src"),
@ -117,7 +117,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
gst_element_get_pad(parse_audio,"sink")); gst_element_get_pad(parse_audio,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_audio,"src"), gst_pad_connect(gst_element_get_pad(parse_audio,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));
gst_pad_connect(gst_element_get_pad(decode,"src"), gst_pad_connect(gst_element_get_pad(decode,"src"),
@ -193,7 +193,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(video_thread), gst_element_add_ghost_pad(GST_ELEMENT(video_thread),
gst_element_get_pad(parse_video,"sink")); gst_element_get_pad(parse_video,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_video,"src"), gst_pad_connect(gst_element_get_pad(parse_video,"src"),
gst_element_get_pad(decode_video,"sink")); gst_element_get_pad(decode_video,"sink"));
gst_pad_connect(gst_element_get_pad(decode_video,"src"), gst_pad_connect(gst_element_get_pad(decode_video,"src"),

View file

@ -77,7 +77,7 @@ mp2tomp1 (GstElement *parser, GstPad *pad, GstElement *pipeline)
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
gst_element_get_pad(parse_audio,"sink")); gst_element_get_pad(parse_audio,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_audio,"src"), gst_pad_connect(gst_element_get_pad(parse_audio,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));
gst_pad_connect(gst_element_get_pad(decode,"src"), gst_pad_connect(gst_element_get_pad(decode,"src"),
@ -123,7 +123,7 @@ mp2tomp1 (GstElement *parser, GstPad *pad, GstElement *pipeline)
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
gst_element_get_pad(parse_audio,"sink")); gst_element_get_pad(parse_audio,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_audio,"src"), gst_pad_connect(gst_element_get_pad(parse_audio,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));
gst_pad_connect(gst_element_get_pad(decode,"src"), gst_pad_connect(gst_element_get_pad(decode,"src"),
@ -189,7 +189,7 @@ mp2tomp1 (GstElement *parser, GstPad *pad, GstElement *pipeline)
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(video_thread), gst_element_add_ghost_pad(GST_ELEMENT(video_thread),
gst_element_get_pad(parse_video,"sink")); gst_element_get_pad(parse_video,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_video,"src"), gst_pad_connect(gst_element_get_pad(parse_video,"src"),
gst_element_get_pad(decode_video,"sink")); gst_element_get_pad(decode_video,"sink"));
gst_pad_connect(gst_element_get_pad(decode_video,"src"), gst_pad_connect(gst_element_get_pad(decode_video,"src"),

View file

@ -46,7 +46,7 @@ void mpeg2parse_newpad(GstElement *parser,GstPad *pad, GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
gst_element_get_pad(parse_audio,"sink")); gst_element_get_pad(parse_audio,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_audio,"src"), gst_pad_connect(gst_element_get_pad(parse_audio,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));
gst_pad_connect(gst_element_get_pad(decode,"src"), gst_pad_connect(gst_element_get_pad(decode,"src"),
@ -90,7 +90,7 @@ void mpeg2parse_newpad(GstElement *parser,GstPad *pad, GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread), gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
gst_element_get_pad(parse_audio,"sink")); gst_element_get_pad(parse_audio,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_audio,"src"), gst_pad_connect(gst_element_get_pad(parse_audio,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));
gst_pad_connect(gst_element_get_pad(decode,"src"), gst_pad_connect(gst_element_get_pad(decode,"src"),
@ -145,7 +145,7 @@ void mpeg2parse_newpad(GstElement *parser,GstPad *pad, GstElement *pipeline) {
// set up pad connections // set up pad connections
gst_element_add_ghost_pad(GST_ELEMENT(video_thread), gst_element_add_ghost_pad(GST_ELEMENT(video_thread),
gst_element_get_pad(parse_video,"sink")); gst_element_get_pad(parse_video,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(parse_video,"src"), gst_pad_connect(gst_element_get_pad(parse_video,"src"),
gst_element_get_pad(decode_video,"sink")); gst_element_get_pad(decode_video,"sink"));
gst_pad_connect(gst_element_get_pad(decode_video,"src"), gst_pad_connect(gst_element_get_pad(decode_video,"src"),

View file

@ -49,7 +49,7 @@ int main(int argc,char *argv[]) {
decode = gst_elementfactory_create(decodefactory,"decode"); decode = gst_elementfactory_create(decodefactory,"decode");
gst_bin_add(GST_BIN(decodethread),GST_ELEMENT(decode)); gst_bin_add(GST_BIN(decodethread),GST_ELEMENT(decode));
gst_element_add_ghost_pad(GST_ELEMENT(decodethread), gst_element_add_ghost_pad(GST_ELEMENT(decodethread),
gst_element_get_pad(decode,"src")); gst_element_get_pad(decode,"src"),"src");
gst_pad_connect(gst_element_get_pad(src,"src"), gst_pad_connect(gst_element_get_pad(src,"src"),
gst_element_get_pad(decode,"sink")); gst_element_get_pad(decode,"sink"));
@ -61,7 +61,7 @@ int main(int argc,char *argv[]) {
sink = gst_elementfactory_create(sinkfactory,"sink"); sink = gst_elementfactory_create(sinkfactory,"sink");
gst_bin_add(GST_BIN(playthread),GST_ELEMENT(sink)); gst_bin_add(GST_BIN(playthread),GST_ELEMENT(sink));
gst_element_add_ghost_pad(GST_ELEMENT(playthread), gst_element_add_ghost_pad(GST_ELEMENT(playthread),
gst_element_get_pad(sink,"sink")); gst_element_get_pad(sink,"sink"),"sink");
/* create the queue */ /* create the queue */
queuefactory = gst_elementfactory_find("queue"); queuefactory = gst_elementfactory_find("queue");

View file

@ -54,7 +54,7 @@ int main(int argc,char *argv[]) {
gst_element_add_ghost_pad(GST_ELEMENT(video_thread), gst_element_add_ghost_pad(GST_ELEMENT(video_thread),
// gst_element_get_pad(compress,"sink")); // gst_element_get_pad(compress,"sink"));
//gst_pad_connect(gst_element_get_pad(compress,"src"), //gst_pad_connect(gst_element_get_pad(compress,"src"),
gst_element_get_pad(encoder,"video_00")); gst_element_get_pad(encoder,"video_00"),"video_00");
gst_pad_connect(gst_element_get_pad(encoder,"src"), gst_pad_connect(gst_element_get_pad(encoder,"src"),
gst_element_get_pad(fdsink,"sink")); gst_element_get_pad(fdsink,"sink"));

View file

@ -53,7 +53,7 @@ int main(int argc,char *argv[]) {
/* connect src to sink */ /* connect src to sink */
gst_element_add_ghost_pad(GST_ELEMENT(video_thread), gst_element_add_ghost_pad(GST_ELEMENT(video_thread),
gst_element_get_pad(compress,"sink")); gst_element_get_pad(compress,"sink"),"sink");
gst_pad_connect(gst_element_get_pad(compress,"src"), gst_pad_connect(gst_element_get_pad(compress,"src"),
gst_element_get_pad(encoder,"video_00")); gst_element_get_pad(encoder,"video_00"));
gst_pad_connect(gst_element_get_pad(encoder,"src"), gst_pad_connect(gst_element_get_pad(encoder,"src"),