delayed second song

Original commit message from CVS:
delayed second song
This commit is contained in:
Thomas Vander Stichele 2001-05-02 20:12:04 +00:00
parent 12f5bc7926
commit 6ec7766a4c
2 changed files with 36 additions and 24 deletions

View file

@ -188,7 +188,6 @@ int main(int argc,char *argv[])
env_register_cp (channel_in->volenv, num_channels * 10.0 - 5.0, 0.0000001); /* start fade in */ env_register_cp (channel_in->volenv, num_channels * 10.0 - 5.0, 0.0000001); /* start fade in */
} }
env_register_cp (channel_in->volenv, num_channels * 10.0 , 1.0 / num_channels); /* to end level */ env_register_cp (channel_in->volenv, num_channels * 10.0 , 1.0 / num_channels); /* to end level */
}
// write the pipeline to XML for visualization // write the pipeline to XML for visualization
xmlSaveFile("mixer.xml", gst_xml_write(GST_ELEMENT(main_bin))); xmlSaveFile("mixer.xml", gst_xml_write(GST_ELEMENT(main_bin)));
@ -198,16 +197,23 @@ int main(int argc,char *argv[])
// write out the schedule // write out the schedule
gst_schedule_show(GST_ELEMENT_SCHED(main_bin)); gst_schedule_show(GST_ELEMENT_SCHED(main_bin));
playing = TRUE; playing = TRUE;
j = 0; j = 0;
while (playing && j < 1000) printf ("main: iterating %d\n", j);
while (playing && j < 100)
{ {
gst_bin_iterate(GST_BIN(main_bin)); gst_bin_iterate(GST_BIN(main_bin));
fprintf(stderr,"after iterate()\n"); fprintf(stderr,"after iterate()\n");
++j; ++j;
} }
}
printf ("main: all the channels are open\n");
while (playing)
{
gst_bin_iterate(GST_BIN(main_bin));
fprintf(stderr,"after iterate()\n");
}
/* stop the bin */ /* stop the bin */
gst_element_set_state(main_bin, GST_STATE_NULL); gst_element_set_state(main_bin, GST_STATE_NULL);

View file

@ -188,7 +188,6 @@ int main(int argc,char *argv[])
env_register_cp (channel_in->volenv, num_channels * 10.0 - 5.0, 0.0000001); /* start fade in */ env_register_cp (channel_in->volenv, num_channels * 10.0 - 5.0, 0.0000001); /* start fade in */
} }
env_register_cp (channel_in->volenv, num_channels * 10.0 , 1.0 / num_channels); /* to end level */ env_register_cp (channel_in->volenv, num_channels * 10.0 , 1.0 / num_channels); /* to end level */
}
// write the pipeline to XML for visualization // write the pipeline to XML for visualization
xmlSaveFile("mixer.xml", gst_xml_write(GST_ELEMENT(main_bin))); xmlSaveFile("mixer.xml", gst_xml_write(GST_ELEMENT(main_bin)));
@ -198,16 +197,23 @@ int main(int argc,char *argv[])
// write out the schedule // write out the schedule
gst_schedule_show(GST_ELEMENT_SCHED(main_bin)); gst_schedule_show(GST_ELEMENT_SCHED(main_bin));
playing = TRUE; playing = TRUE;
j = 0; j = 0;
while (playing && j < 1000) printf ("main: iterating %d\n", j);
while (playing && j < 100)
{ {
gst_bin_iterate(GST_BIN(main_bin)); gst_bin_iterate(GST_BIN(main_bin));
fprintf(stderr,"after iterate()\n"); fprintf(stderr,"after iterate()\n");
++j; ++j;
} }
}
printf ("main: all the channels are open\n");
while (playing)
{
gst_bin_iterate(GST_BIN(main_bin));
fprintf(stderr,"after iterate()\n");
}
/* stop the bin */ /* stop the bin */
gst_element_set_state(main_bin, GST_STATE_NULL); gst_element_set_state(main_bin, GST_STATE_NULL);