+2008-02-04 Wim Taymans <wim.taymans@collabora.co.uk>
+
+ * tests/examples/seek/seek.c: (do_seek),
+ (rate_spinbutton_changed_cb), (update_streams), (main):
+ Remove obsolete stream_time reset after flushing seek, core does that
+ automatically now.
+ Improve accuracy of speed spinbutton.
+ Only do playbin2 stuff when we actually use it.
+
2008-02-02 Tim-Philipp Müller <tim at centricular dot net>
* tests/check/Makefile.am:
* Boston, MA 02111-1307, USA.
*/
/* FIXME: remove #if 0 code
- * FIXME: is the flush_seek part after sending the seek still needed?
*
*/
#include <stdlib.h>
if (res) {
if (flush_seek) {
- gst_pipeline_set_new_stream_time (GST_PIPELINE (pipeline), 0);
gst_element_get_state (GST_ELEMENT (pipeline), NULL, NULL, SEEK_TIMEOUT);
} else {
set_update_scale (TRUE);
if (res) {
if (flush_seek) {
- gst_pipeline_set_new_stream_time (GST_PIPELINE (pipeline), 0);
gst_element_get_state (GST_ELEMENT (pipeline), NULL, NULL, SEEK_TIMEOUT);
}
} else
{
gint n_video, n_audio, n_text;
- /* here we get and update the different streams detected by playbin2 */
- g_object_get (pipeline, "n-video", &n_video, NULL);
- g_object_get (pipeline, "n-audio", &n_audio, NULL);
- g_object_get (pipeline, "n-text", &n_text, NULL);
+ if (pipeline_type == 16) {
+ /* here we get and update the different streams detected by playbin2 */
+ g_object_get (pipeline, "n-video", &n_video, NULL);
+ g_object_get (pipeline, "n-audio", &n_audio, NULL);
+ g_object_get (pipeline, "n-text", &n_text, NULL);
- g_print ("video %d, audio %d, text %d\n", n_video, n_audio, n_text);
+ g_print ("video %d, audio %d, text %d\n", n_video, n_audio, n_text);
+ }
}
scrub_checkbox = gtk_check_button_new_with_label ("Scrub");
play_scrub_checkbox = gtk_check_button_new_with_label ("Play Scrub");
rate_spinbutton = gtk_spin_button_new_with_range (-100, 100, 0.1);
+ gtk_spin_button_set_digits (GTK_SPIN_BUTTON (rate_spinbutton), 3);
rate_label = gtk_label_new ("Rate");
gtk_tooltips_set_tip (tips, accurate_checkbox,
g_signal_connect (G_OBJECT (rate_spinbutton), "value_changed",
G_CALLBACK (rate_spinbutton_changed_cb), pipeline);
- g_signal_connect (G_OBJECT (window), "destroy", gtk_main_quit, NULL);
+ g_signal_connect (G_OBJECT (window), "delete-event", gtk_main_quit, NULL);
/* show the gui. */
gtk_widget_show_all (window);