[Bug 779452] New: gstplayer: set rate continuously and the position will be wrong.

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Mar 2 06:34:59 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=779452

            Bug ID: 779452
           Summary: gstplayer: set rate continuously and the position will
                    be wrong.
    Classification: Platform
           Product: GStreamer
           Version: 1.10.x
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: lyon.wang at nxp.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

When I tried to set rate immediately after first my first set rate action.

The play position will jump to 0 to play.


Checked  gst_player_set_rate_internal(), It will first call
gst_player_get_position()

however, I found that the 2nd time get position return might be zero if the
first set_rate (or seek) is not yet finished.

    case PROP_POSITION:{
      gint64 position = 0;

      gst_element_query_position (self->playbin, GST_FORMAT_TIME, &position);
      g_value_set_uint64 (value, position);
      GST_TRACE_OBJECT (self, "Returning position=%" GST_TIME_FORMAT,
          GST_TIME_ARGS (g_value_get_uint64 (value)));
      break;
    }

Actually, the second time when getting the position,
gst_element_query_position() return is FALSE means the query is failed. and the
position is remain 0 to be got.

That's why after 2nd set rate operation, the play position will jump to 0.

Will it be a possible solution here to using a while loop to check the
gst_element_query_position() return TRUE, and set the correct position.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list