Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
gst-plugins-bad
gst-plugins-bad
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,011
    • Issues 1,011
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 199
    • Merge Requests 199
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gst-plugins-badgst-plugins-bad
  • Issues
  • #526

Closed
Open
Opened Mar 02, 2017 by Bugzilla Migration User@bugzilla-migration

gstplayer: set rate continuously and the position will be wrong.

Submitted by Lyon

Link to original bug (#779452)

Description

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.

Version: 1.10.x

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: gstreamer/gst-plugins-bad#526