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

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

timeline-tree: not using snapped values when testing if a trim is legal

Timline-tree only uses the given values, rather than the snapped values, for testing if a trim is legal. This can bypass some of the checks.

>>> tl = GES.Timeline.new_audio_video()
>>> layer = tl.append_layer()
>>> clip0 = GES.TestClip.new()
>>> clip1 = GES.TestClip.new()
>>> clip0.set_start(22)
True
>>> clip0.set_inpoint(10)
True
>>> clip0.set_duration(10)
True
>>> clip1 = GES.TestClip.new()
>>> clip1.set_duration(10)
True
>>> layer.add_clip(clip0)
True
>>> layer.add_clip(clip1)
True
>>> layer
<GES.Layer object at 0x7fae68c1c050 (GESLayer at 0x55752e696410)>
>>> layer.get_clips()
[testclip4 [0:00:00.000000000 (0:00:00.000000000) 0:00:00.000000010], testclip2 [0:00:00.000000022 (0:00:00.000000010) 0:00:00.000000010]]
>>> tl.set_snapping_distance(2)
>>> clip0.trim(12)
True
>>> layer.get_clips()  # in-point has underflowed
[testclip4 [0:00:00.000000000 (0:00:00.000000000) 0:00:00.000000010], testclip2 [0:00:00.000000010 (5124095:34:33.709551614) 0:00:00.000000022]]
Assignee
Assign to
Time tracking