[Gstreamer-bugs] [Bug 140275] New: - GstPlay troubles with gst_play_location_set ()

bugzilla-daemon at widget.gnome.org bugzilla-daemon at widget.gnome.org
Fri Apr 16 08:59:14 PDT 2004


http://bugzilla.gnome.org/show_bug.cgi?id=140275
GStreamer | gst-plugins | Ver: HEAD CVS

           Summary: GstPlay troubles with gst_play_location_set ()
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins
        AssignedTo: gstreamer-maint at bugzilla.gnome.org
        ReportedBy: tlg at denali.be
         QAContact: gstreamer-maint at bugzilla.gnome.org


Hi all, hi have a little problem when I do a gst_play_location (); the
next song doens't always (doesn't always +-= never) start well, it has a
little gap at the begining. 
Looking at the ticks, for the second song the ticks starts sometimes at
nearly 0.7-0.8 second, and stays at that value for may be 4-5 ticks  (a
tick is 200MS). This is when the song has a gap.

To expose my problem you can try with a modified version of
examples/gstplay/player.c with the patch attached

Here is the ouput:

tlg at portable gstplay
$ ./player /home/tlg/Documents/Media/Rb/The_Verve/Urban_Hymns/01\ -\
Bitter_Sweet_Symphony.ogg /home/tlg/Documents/Media/Rb/Various/Trainspotting/13\
-\ Born_Slippy.ogg
got video size 16, 16
         serial: 321190394
          title: Bitter Sweet Symphony
         artist: The Verve
   track number: 1
    track count: 13
          album: Urban Hymns
        comment: Ripped with Sound Juicer
        encoder: Xiph.Org libVorbis I 20030909
encoder version: 0
nominal bitrate: 192003
time tick 0.015692
got length 358440000000
time tick 0.215283
time tick 0.415283
time tick 0.616236
time tick 0.816236
time tick 1.016236
time tick 1.217188
time tick 1.417188
time tick 1.617143
time tick 1.817143
got length 0
time tick 0.000000
got video size 16, 16
         serial: 1296857087
time tick 0.658741
          title: Born Slippy
         artist: Underworld
   track number: 13
    track count: 14
          album: Trainspotting
        comment: Ripped with Sound Juicer
        encoder: Xiph.Org libVorbis I 20030909
encoder version: 0
nominal bitrate: 192003
time tick 0.658741
got length 584613333333
time tick 0.658741
time tick 0.658741
time tick 0.658741
time tick 0.808753
time tick 1.008753
time tick 1.209751
time tick 1.409751
time tick 1.609705
time tick 1.810703
time tick 2.010703
time tick 2.210658
time tick 2.411655
time tick 2.612608
time tick 2.814195
time tick 3.013878

Patch :

--- examples/gstplay/player.c.old       2004-04-16 17:36:04.538329272 +0200
+++ examples/gstplay/player.c           2004-04-16 17:30:34.152555544 +0200
@@ -22,6 +22,7 @@
 
 static GMainLoop *loop = NULL;
 static gint64 length = 0;
+static char *nextsong;
 
 static void
 print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
@@ -85,7 +86,10 @@
 static gboolean
 seek_timer (GstPlay * play)
 {
-  gst_play_seek_to_time (play, length / 2);
+  if (!gst_play_set_location (play, nextsong))
+    g_warning ("Could not set location");
+  gst_element_set_state (GST_ELEMENT (play), GST_STATE_PLAYING);
+
   return FALSE;
 }
 
@@ -106,8 +110,8 @@
   /* Initing GStreamer library */
   gst_init (&argc, &argv);
 
-  if (argc != 2) {
-    g_print ("usage: %s <video filename>\n", argv[0]);
+  if (argc != 3) {
+    g_print ("usage: %s <audio filename> <audio2 filename>\n", argv[0]);
     exit (-1);
   }
 
@@ -167,7 +171,8 @@
     g_error ("Could not set state to PLAYING");
 
   g_idle_add ((GSourceFunc) idle_iterate, play);
-  g_timeout_add (20000, (GSourceFunc) seek_timer, play);
+  nextsong = argv[2];
+  g_timeout_add (2000, (GSourceFunc) seek_timer, play);
 
   g_main_loop_run (loop);

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.




More information about the Gstreamer-bugs mailing list