Updates for the gst_pad_push changes

Original commit message from CVS:
Updates for the gst_pad_push changes
This commit is contained in:
Wim Taymans 2000-12-27 22:39:45 +00:00
parent 47c1e14677
commit 40f192075c
23 changed files with 41 additions and 38 deletions

View file

@ -4,7 +4,7 @@ noinst_PROGRAMS = qtest spectrum record wave mp3 teardown buffer mp3parse \
aviparse vidcapture avi2mpg mp2tomp1 mp1tomp1 pipetest \
vidcapture2 mp2toavi mp3tovorbis
SUBDIRS = xml cothreads bindings
SUBDIRS = xml bindings
CFLAGS = -Wall $(shell gnome-config --cflags gnomeui)
LDFLAGS = $(shell gnome-config --libs gnomeui)

View file

@ -48,8 +48,9 @@ int main(int argc,char *argv[]) {
g_print("setting to READY state\n");
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
g_print("about to enter loop\n");
while (1)
gst_src_push(GST_SRC(src));
gst_bin_iterate(GST_BIN(pipeline));
}

View file

@ -173,11 +173,11 @@ int main(int argc,char *argv[]) {
gst_element_get_pad(fdsink,"sink"));
g_print("setting to READY state\n");
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
g_print("about to enter loop\n");
g_idle_add(idle_func,src);
g_idle_add(idle_func,pipeline);
gdk_threads_enter();
gtk_main();
@ -187,6 +187,6 @@ int main(int argc,char *argv[]) {
}
gboolean idle_func(gpointer data) {
gst_src_push(GST_SRC(data));
gst_bin_iterate(GST_BIN(data));
return TRUE;
}

View file

@ -134,7 +134,7 @@ int main(int argc,char *argv[]) {
g_print("about to enter loop\n");
// this does not work due to multithreading
g_idle_add(idle_func,src);
g_idle_add(idle_func,pipeline);
gdk_threads_enter();
gtk_main();
@ -144,6 +144,6 @@ int main(int argc,char *argv[]) {
}
gboolean idle_func(gpointer data) {
gst_src_push(GST_SRC(data));
gst_bin_iterate(GST_BIN(data));
return TRUE;
}

View file

@ -41,5 +41,5 @@ int main(int argc,char *argv[]) {
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
while (1)
gst_src_push(GST_SRC(src));
gst_bin_iterate(GST_BIN(pipeline));
}

View file

@ -170,7 +170,7 @@ int main(int argc,char *argv[]) {
g_print("about to enter loop\n");
g_idle_add(idle_func,src);
g_idle_add(idle_func,pipeline);
gdk_threads_enter();
gtk_main();
@ -180,6 +180,6 @@ int main(int argc,char *argv[]) {
}
gboolean idle_func(gpointer data) {
gst_src_push(GST_SRC(data));
gst_bin_iterate(GST_BIN(data));
return TRUE;
}

View file

@ -210,9 +210,9 @@ int main(int argc,char *argv[]) {
gst_element_get_pad(parse,"sink"));
g_print("setting to READY state\n");
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
while (1) {
gst_src_push(GST_SRC(src));
gst_bin_iterate(GST_BIN(pipeline));
}
}

View file

@ -283,9 +283,9 @@ int main(int argc,char *argv[]) {
gst_element_get_pad(fdsink,"sink"));
g_print("setting to READY state\n");
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
while (1) {
gst_src_push(GST_SRC(src));
gst_bin_iterate(GST_BIN(pipeline));
}
}

View file

@ -270,10 +270,10 @@ int main(int argc,char *argv[]) {
gst_element_get_pad(fdsink,"sink"));
g_print("setting to READY state\n");
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
while (1) {
gst_src_push(GST_SRC(src));
gst_bin_iterate(GST_BIN(pipeline));
}
return 0;

View file

@ -57,7 +57,7 @@ int main(int argc,char *argv[]) {
gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING);
while (playing)
gst_src_push(GST_SRC(src));
gst_bin_iterate(GST_BIN(bin));
return 0;
}

View file

@ -59,5 +59,5 @@ int main(int argc,char *argv[]) {
g_print("about to enter loop\n");
while (1)
gst_src_push(GST_SRC(src));
gst_bin_iterate(GST_BIN(pipeline));
}

View file

@ -58,9 +58,10 @@ int main(int argc,char *argv[]) {
g_print("setting to READY state\n");
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
g_print("about to enter loop\n");
while (1) {
gst_src_push(GST_SRC(src));
gst_bin_iterate(GST_BIN(pipeline));
}
}

View file

@ -68,10 +68,10 @@ int main(int argc,char *argv[]) {
gst_element_get_pad(sink,"sink"));
g_print("setting to READY state\n");
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
g_print("about to enter loop\n");
while (1) {
gst_src_push(GST_SRC(src));
gst_bin_iterate(GST_BIN(pipeline));
}
}

View file

@ -8,7 +8,7 @@ void eof(GstSrc *src) {
}
gboolean idle_func(gpointer data) {
gst_src_push(GST_SRC(data));
gst_bin_iterate(GST_BIN(data));
return TRUE;
}
@ -220,7 +220,7 @@ int main(int argc,char *argv[]) {
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
gtk_idle_add(idle_func,src);
gtk_idle_add(idle_func,pipeline);
gdk_threads_enter();
gtk_main();

View file

@ -55,10 +55,10 @@ int main(int argc,char *argv[]) {
gst_element_get_pad(sink,"sink"));
g_print("setting to READY state\n");
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY);
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
g_print("about to enter loop\n");
while (1) {
gst_src_push(GST_SRC(src));
gst_bin_iterate(GST_BIN(pipeline));
}
}

View file

@ -37,7 +37,8 @@ int main(int argc,char *argv[]) {
g_print("\nok, runnable, hitting 'play'...\n");
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
while(1)
gst_src_push(GST_SRC(audiosrc));
while(1) {
gst_bin_iterate(GST_BIN(pipeline));
}
}

View file

@ -77,6 +77,6 @@ void spectrum_chain(GstPad *pad,GstBuffer *buf) {
}
gboolean idle_func(gpointer data) {
gst_src_push(GST_SRC(data));
//gst_src_push(GST_SRC(data));
return TRUE;
}

View file

@ -76,6 +76,6 @@ int main(int argc,char *argv[]) {
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
while(1)
gst_src_push(GST_SRC(videosrc));
gst_bin_iterate(GST_BIN(pipeline));
}

View file

@ -77,6 +77,6 @@ int main(int argc,char *argv[]) {
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
while(1)
gst_src_push(GST_SRC(videosrc));
gst_bin_iterate(GST_BIN(pipeline));
}

View file

@ -72,7 +72,7 @@ int main(int argc,char *argv[]) {
gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING);
//gtk_object_set(GTK_OBJECT(src),"tune",133250,NULL);
g_idle_add(idle_func,src);
g_idle_add(idle_func,bin);
gtk_main();
}
@ -80,6 +80,6 @@ int main(int argc,char *argv[]) {
gboolean idle_func(gpointer data) {
static int i=0;
//g_print("pushing %d\n",i++);
gst_src_push(GST_SRC(data));
gst_bin_iterate(GST_BIN(data));
return TRUE;
}

View file

@ -48,12 +48,12 @@ int main(int argc,char *argv[]) {
gst_element_set_state(GST_ELEMENT(bin),GST_STATE_READY);
gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING);
g_idle_add(idle_func,src);
g_idle_add(idle_func,bin);
gtk_main();
}
gboolean idle_func(gpointer data) {
gst_src_push(GST_SRC(data));
gst_bin_iterate(GST_BIN(data));
return TRUE;
}

View file

@ -42,7 +42,7 @@ int main(int argc,char *argv[]) {
subtree = xmlNewChild(tree,NULL,"longname",
element->details->longname);
subtree = xmlNewChild(tree,NULL,"class",
element->details->class);
element->details->klass);
subtree = xmlNewChild(tree,NULL,"description",
element->details->description);
subtree = xmlNewChild(tree,NULL,"version",

View file

@ -88,7 +88,7 @@ int main(int argc,char *argv[]) {
else if (!strcmp(field->name,"longname"))
element->details.longname = getcontents(doc,field);
else if (!strcmp(field->name,"class"))
element->details.class = getcontents(doc,field);
element->details.klass = getcontents(doc,field);
else if (!strcmp(field->name,"description"))
element->details.description = getcontents(doc,field);
else if (!strcmp(field->name,"version"))
@ -117,7 +117,7 @@ int main(int argc,char *argv[]) {
g_print("Plugin filename: %s\n",element->plugin->filename);
g_print("Element name: %s\n",element->name);
g_print("Element long name: %s\n",element->details.longname);
g_print("Element class: %s\n",element->details.class);
g_print("Element class: %s\n",element->details.klass);
g_print("Element description: %s\n",element->details.description);
g_print("Element version: %s\n",element->details.version);
g_print("Element author: %s\n",element->details.author);