~timo-jyrinki/ubuntu/trusty/pitivi/backport_utopic_fixes

« back to all changes in this revision

Viewing changes to pitivi/factories/timeline.py

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-05-26 15:29:58 UTC
  • mfrom: (3.1.20 experimental)
  • Revision ID: james.westby@ubuntu.com-20110526152958-90je1myzzjly26vw
Tags: 0.13.9.90-1ubuntu1
* Resynchronize on Debian
* debian/control:
  - Depend on python-launchpad-integration
  - Drop hal from Recommends to Suggests. This version has the patch applied
    to not crash without hal.
* debian/patches/01_lpi.patch:
  - launchpad integration  
* debian/rules:
  - Use gnome.mk so a translation template is built

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    def __init__(self, track):
43
43
        gst.BaseTransform.__init__(self)
44
44
        self.track = track
 
45
        self.caps = None
 
46
 
 
47
    def do_transform_caps(self, direction, caps):
 
48
        if self.caps is None:
 
49
            return caps
 
50
 
 
51
        return caps.intersect(self.caps)
45
52
 
46
53
    def do_src_event(self, event):
47
54
        if event.type == gst.EVENT_SEEK:
130
137
        else:
131
138
            seek = FixSeekStart(track)
132
139
        self.bin.add(seek)
133
 
        seek.set_state(gst.STATE_PLAYING)
134
 
        pad.link(seek.get_pad('sink'))
 
140
        seek.sync_state_with_parent()
 
141
        pad.link_full(seek.get_pad('sink'), gst.PAD_LINK_CHECK_NOTHING)
135
142
        ghost = gst.GhostPad('src%d' % self.pad_num + str(id(pad)), seek.get_pad('src'))
136
143
 
137
 
        # if the target pad has negotiated caps, set them on the ghost as well
 
144
        # FixSeekStart has template caps ANY. Setting seek.caps here we make it
 
145
        # so that ghost.get_caps() returns pad.get_caps()
138
146
        caps = pad.props.caps
139
147
        if caps is None:
140
148
            caps = pad.get_caps()
141
 
        if caps.is_fixed():
142
 
            seek.get_pad("sink").set_caps(caps)
143
 
            ghost.set_caps(caps)
 
149
        seek.caps = caps
144
150
        ghost.set_active(True)
145
151
        self.ghosts[pad_id] = ghost
146
152
        self.seek_checkers[pad_id] = seek