Design Docs Editing Widget

From PiTiViWiKi

Contents

Editing Widget Design Considerations

Editing Widget needs to

when initializng

  1. create all gui components (done)
    1. connect slider to playground
    2. register signal callbacks
      1. Done button callback (done)
      2. Cancel button callback (done)
      3. Start Trim buttons (done)
      4. End Trim buttons (done)
      5. Start/Stop seek buttons (done)
      6. playground callbacks

when source is set

  1. check if source is editable (how?)
  2. remember the new source (done)
  3. create an editing FileSrcBin for current source(done)
  4. register thumbnail callback with FileSrcBin(done)
  5. set the timeline slider min/max values appropriately (done)
  6. update media_start and media_duration text displays(done)
  7. move slider to current source start(done)

when trim buttons are clicked

  1. remember new start/duration times(done)
  2. remember new start/duration times(done)
  3. adjust controls (done)
  4. update labels (done)
  5. update thumnail pixmaps (done)

when updating start/stop text displays

  1. use an appropriately large font(done)
  2. set start text to media_start(done)
  3. set end text to duration + media_start(done)

when done button clicked, cancel button clicked, or close menu item selected

  1. perform cleanup operations
    1. unregister signal handlers
  2. if cancel button clicked
    1. return
  3. set source start/stop duration from temporary values

SimpleSourceWidget needs to

when source start/duration changes

  1. update thumbnails

Thumbnail viewer needs to

when thumbnail needs to be updated

  1. remember the new pixbuf(done)
  2. set update flag

when drawing the widget

  1. if thumbnail needs to be updated
    1. redraw thumbnail
    2. force repaint

Q/A

  1. How to check if current source should be edited?
    1. i.e. if source is a camera or blank, can't call setMediaStartDurationTime()
  2. How to extract pixmaps from source?
    1. create a thumbnailer (a pipeline with the source and a PixbufThumbnailSink)
    2. set thumbnailer's source
    3. connect to thumbnailer's thumbnail signal
    4. call thumbnailer.makeThumbnail
    5. signal handler callback gets a gtk.gdk.pixbuf