Esempio n. 1
0
 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')
Esempio n. 2
0
 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')
Esempio n. 3
0
    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)
Esempio n. 4
0
    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)
Esempio n. 5
0
    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)
Esempio n. 6
0
    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)
Esempio n. 7
0
    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)
Esempio n. 8
0
 def testCapsStreamheader(self):
     caps = gst.caps_from_string('application/ogg,streamheader=abcd')
     self.assertEquals(gstreamer.caps_repr(caps),
         'streamheader=<...>')
Esempio n. 9
0
 def testCapsStreamheader(self):
     caps = gst.caps_from_string('application/ogg,streamheader=abcd')
     self.assertEquals(gstreamer.caps_repr(caps), 'streamheader=<...>')