Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
gst-editing-services
gst-editing-services
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 77
    • Issues 77
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 10
    • Merge Requests 10
  • 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-editing-servicesgst-editing-services
  • Issues
  • #89

Closed
Open
Opened Feb 24, 2020 by Henry Wilkes@hwilkesContributor

group: incorrect response to a change in a layer's priority

Group's are not properly responing to a change in a layer's priority

>>> timeline = GES.Timeline.new_audio_video()
>>> layer0 = timeline.append_layer()
>>> layer1 = timeline.append_layer()
>>> layer2 = timeline.append_layer()
>>> asset = GES.Asset.request(GES.TestClip,None)
>>> clip0 = layer0.add_asset(asset, 0, 0, 10, GES.TrackType.AUDIO)
>>> clip1 = layer1.add_asset(asset, 0, 0, 10, GES.TrackType.AUDIO)
>>> clip0.get_layer_priority()
0
>>> clip1.get_layer_priority()
1
>>> group = GES.Group.new()
>>> group.add(clip0)
True
>>> group.get_layer_priority()  # fine
0
>>> group.height  # fine
1
>>> group.add(clip1)
True
>>> group.get_layer_priority()  # fine, since lowest layer priority is still 0
0
>>> group.height  # fine, since layer priorities span two layers
2
>>> timeline.move_layer(layer0, 2)
True
>>> clip0.get_layer_priority()  # correct
2
>>> clip1.get_layer_priority()  # wrong, should still be 1! clip1 now overlaps clip0, breaking the timeline rules!
2
>>> clip0.get_layer() is clip1.get_layer()
True
>>> group.get_layer_priority()  # should have been 1, for clip1
2
>>> group.height  # wrong, should at least be 1 since clip1 and clip0 are in the same layer
2
>>> timeline.move_layer(layer0, 0)  # trying to set it back will cause GES to hang!

I think the problem starts with _child_priority_changed_cb, which is called when a layer's priority is set. It ends up setting the priority of the group, which will move its children. The priority might need to change, but we shouldn't move any children in such cases.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: gstreamer/gst-editing-services#89