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
  • #94

Closed
Open
Created Mar 04, 2020 by Henry Wilkes@hwilkesContributor

clip: splitting allowing for timeline in unsupported configuration

When a source clip that overlaps another source clip is split in the overlap it will result in one clip completely covering another clip. E.g.

>>> timeline = GES.Timeline.new_audio_video()
>>> layer = timeline.append_layer()
>>> layer.set_auto_transition(True)
>>> clip0 = GES.TestClip.new()
>>> clip0.set_start(0)
True
>>> clip0.set_duration(50)
True
>>> clip1 = GES.TestClip.new()
>>> clip1.set_start(20)
True
>>> clip1.set_duration(50)
True
>>> layer.add_clip(clip0)
True
>>> layer.add_clip(clip1)
True
>>> layer.get_clips()  # layer contents are fine
[testclip5 [0:00:00.000000000 (0:00:00.000000000) 0:00:00.000000050], transitionclip1 [0:00:00.000000020 (0:00:00.000000000) 0:00:00.000000030], transitionclip0 [0:00:00.000000020 (0:00:00.000000000) 0:00:00.000000030], testclip6 [0:00:00.000000020 (0:00:00.000000000) 0:00:00.000000050]]
>>> clip0.start, clip0.duration  # clip0 extends from 0 - 50
(0, 50)
>>> clip1.start, clip1.duration  # clip1 extends from 20 - 70
(20, 50)
>>> split_end = clip1.split(40)
>>> split_end
testclip7 [0:00:00.000000040 (0:00:00.000000020) 0:00:00.000000030]
>>> layer.get_clips()  # Note that the transition clips have not changed, they still correspond to the previous overlap
[testclip5 [0:00:00.000000000 (0:00:00.000000000) 0:00:00.000000050], transitionclip1 [0:00:00.000000020 (0:00:00.000000000) 0:00:00.000000030], transitionclip0 [0:00:00.000000020 (0:00:00.000000000) 0:00:00.000000030], testclip6 [0:00:00.000000020 (0:00:00.000000000) 0:00:00.000000020], testclip7 [0:00:00.000000040 (0:00:00.000000020) 0:00:00.000000030]]
>>> clip0.start, clip0.duration  # clip0 extends from 0 - 50
(0, 50)
>>> clip1.start, clip1.duration  # clip1 extends from 20 - 40, it is now completely overlapped by clip0!
(20, 20)
>>> split_end.start, split_end.duration  # new clip extends from 40 - 70
(40, 30)

We should simply not allow clips to be split at a point of overlap. This would also mean we would not have to worry about updating the auto-transitions.

Assignee
Assign to
Time tracking