Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-editing-services gst-editing-services
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 74
    • Issues 74
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gst-editing-servicesgst-editing-services
  • Issues
  • #93

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

group: incorrect layer priority after removing a child

When removing a child, the layer priority of the group is not updated.

>>> timeline = GES.Timeline.new_audio_video()
>>> layer0 = timeline.append_layer()
>>> layer1 = 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, 20, 0, 10, GES.TrackType.AUDIO)
>>> group = GES.Group.new()
>>> group.add(clip0)
True
>>> group.add(clip1)
True
>>> group.get_layer_priority()  # fine
0
>>> clip0.get_layer_priority()
0
>>> clip1.get_layer_priority()
1
>>> group.remove(clip0)
True
>>> group.get_layer_priority()  # wrong, should be 1, matching clip1
0
>>> clip1.edit(timeline.get_layers(), 2, GES.EditMode.EDIT_NORMAL, GES.Edge.EDGE_NONE, clip1.start)
True
>>> group.get_layer_priority()  # still wrong, should be 2, matching clip1
1
>>> clip1.get_layer_priority()
2
>>> clip1.edit(timeline.get_layers(), 0, GES.EditMode.EDIT_NORMAL, GES.Edge.EDGE_NONE, clip1.start)
False

The last operation fails because, even though clip1 is the only member of group, we can't move it to layer 0 because it would move make the layer priority of group -1!

Assignee
Assign to
Time tracking