def testCaps(self): caps = gst.caps_from_string( 'video/x-raw-yuv,width=10,framerate=5.0;video/x-raw-rgb,' 'width=15,framerate=10.0') self.assertEquals( gstreamer.caps_repr(caps), 'video/x-raw-yuv, width=(int)10, ' 'framerate=(double)5; video/x-raw-rgb, ' 'width=(int)15, framerate=(double)10')
def testCaps(self): caps = gst.caps_from_string( 'video/x-raw-yuv,width=10,framerate=5.0;video/x-raw-rgb,' 'width=15,framerate=10.0') self.assertEquals(gstreamer.caps_repr(caps), 'video/x-raw-yuv, width=(int)10, ' 'framerate=(double)5; video/x-raw-rgb, ' 'width=(int)15, framerate=(double)10')
def _notify_caps_cb(self, element, pad, param): caps = pad.get_negotiated_caps() if caps == None: return caps_str = gstreamer.caps_repr(caps) self.debug('Got caps: %s' % caps_str) if not self.caps == None: self.warning('Already had caps: %s, replacing' % caps_str) self.debug('Storing caps: %s' % caps_str) self.caps = caps reactor.callFromThread(self.update_ui_state)
def _notify_caps_cb(self, element, pad, param): # We store caps in sink objects as # each sink might (and will) serve different content-type caps = pad.get_negotiated_caps() if caps == None: return caps_str = gstreamer.caps_repr(caps) self.debug("Got caps: %s" % caps_str) if not element.caps == None: self.warning("Already had caps: %s, replacing" % caps_str) self.debug("Storing caps: %s" % caps_str) element.caps = caps reactor.callFromThread(self.update_ui_state)
def _notify_caps_cb(self, element, pad, param): # We store caps in sink objects as # each sink might (and will) serve different content-type caps = pad.get_negotiated_caps() if caps == None: return caps_str = gstreamer.caps_repr(caps) self.debug('Got caps: %s' % caps_str) if not element.caps == None: self.warning('Already had caps: %s, replacing' % caps_str) self.debug('Storing caps: %s' % caps_str) element.caps = caps reactor.callFromThread(self.update_ui_state)
def _notify_caps_cb(self, pad, param): caps = pad.get_negotiated_caps() if caps == None: return caps_str = gstreamer.caps_repr(caps) self.debug('Got caps: %s' % caps_str) new = True if not self.caps == None: self.warning('Already had caps: %s, replacing' % caps_str) new = False self.debug('Storing caps: %s' % caps_str) self.caps = caps if new and self._recordAtStart: reactor.callLater(0, self.changeFilename, self._startFilenameTemplate, self._startTimeTuple)
def _notify_caps_cb(self, pad, param): caps = pad.get_negotiated_caps() if caps == None: return caps_str = gstreamer.caps_repr(caps) self.debug('Got caps: %s' % caps_str) new = True if not self.caps == None: self.warning('Already had caps: %s, replacing' % caps_str) new = False self.debug('Storing caps: %s' % caps_str) self.caps = caps if new and self._recordAtStart and not self.syncOnTdt: reactor.callLater(0, self.changeFilename, self._startFilenameTemplate, self._startTime)
def testCapsStreamheader(self): caps = gst.caps_from_string('application/ogg,streamheader=abcd') self.assertEquals(gstreamer.caps_repr(caps), 'streamheader=<...>')
def testCapsStreamheader(self): caps = gst.caps_from_string('application/ogg,streamheader=abcd') self.assertEquals(gstreamer.caps_repr(caps), 'streamheader=<...>')