Exemple #1
0
 def getAudioCaps(self):
     """ Returns the GstCaps corresponding to the audio settings """
     astr = "rate=%d,channels=%d" % (self.audiorate, self.audiochannels)
     astrcaps = gst.caps_from_string("audio/x-raw-int,%s;audio/x-raw-float,%s" % (astr, astr))
     if self.aencoder:
         return get_compatible_sink_caps(self.aencoder, astrcaps)
     return astrcaps
Exemple #2
0
 def getAudioCaps(self):
     """ Returns the GstCaps corresponding to the audio settings """
     astr = "rate=%d,channels=%d" % (self.audiorate, self.audiochannels)
     astrcaps = gst.caps_from_string("audio/x-raw-int,%s;audio/x-raw-float,%s" % (astr, astr))
     if self.aencoder:
         return get_compatible_sink_caps(self.aencoder, astrcaps)
     return astrcaps
Exemple #3
0
 def getAudioCaps(self):
     """ Returns the GstCaps corresponding to the audio settings """
     # TODO: Figure out why including 'depth' causes pipeline failures:
     astr = "rate=%d,channels=%d" % (self.audiorate, self.audiochannels)
     caps_str = "audio/x-raw-int,%s;audio/x-raw-float,%s" % (astr, astr)
     audio_caps = gst.caps_from_string(caps_str)
     if self.aencoder:
         return get_compatible_sink_caps(self.aencoder, audio_caps)
     return audio_caps
Exemple #4
0
 def getAudioCaps(self):
     """ Returns the GstCaps corresponding to the audio settings """
     # TODO: Figure out why including 'depth' causes pipeline failures:
     astr = "rate=%d,channels=%d" % (self.audiorate, self.audiochannels)
     caps_str = "audio/x-raw-int,%s;audio/x-raw-float,%s" % (astr, astr)
     audio_caps = gst.caps_from_string(caps_str)
     if self.aencoder:
         return get_compatible_sink_caps(self.aencoder, audio_caps)
     return audio_caps
Exemple #5
0
 def getVideoCaps(self):
     """ Returns the GstCaps corresponding to the video settings """
     astr = "width=%d,height=%d,pixel-aspect-ratio=%d/%d,framerate=%d/%d" % (
         self.videowidth, self.videoheight, self.videopar.num,
         self.videopar.denom, self.videorate.num, self.videorate.denom)
     vcaps = gst.caps_from_string("video/x-raw-yuv,%s;video/x-raw-rgb,%s" %
                                  (astr, astr))
     if self.vencoder:
         return get_compatible_sink_caps(self.vencoder, vcaps)
     return vcaps
Exemple #6
0
 def getVideoCaps(self, render=False):
     """ Returns the GstCaps corresponding to the video settings """
     videowidth, videoheight = self.getVideoWidthAndHeight(render=render)
     vstr = "width=%d,height=%d,pixel-aspect-ratio=%d/%d,framerate=%d/%d" % (
         videowidth, videoheight, self.videopar.num, self.videopar.denom,
         self.videorate.num, self.videorate.denom)
     caps_str = "video/x-raw-yuv,%s;video/x-raw-rgb,%s" % (vstr, vstr)
     video_caps = gst.caps_from_string(caps_str)
     if self.vencoder:
         return get_compatible_sink_caps(self.vencoder, video_caps)
     return video_caps
Exemple #7
0
 def getVideoCaps(self, render=False):
     """ Returns the GstCaps corresponding to the video settings """
     videowidth, videoheight = self.getVideoWidthAndHeight(render=render)
     vstr = "width=%d,height=%d,pixel-aspect-ratio=%d/%d,framerate=%d/%d" % (
             videowidth, videoheight,
             self.videopar.num, self.videopar.denom,
             self.videorate.num, self.videorate.denom)
     caps_str = "video/x-raw-yuv,%s;video/x-raw-rgb,%s" % (vstr, vstr)
     video_caps = gst.caps_from_string(caps_str)
     if self.vencoder:
         return get_compatible_sink_caps(self.vencoder, video_caps)
     return video_caps
Exemple #8
0
 def getVideoCaps(self):
     """ Returns the GstCaps corresponding to the video settings """
     astr = "width=%d,height=%d,pixel-aspect-ratio=%d/%d,framerate=%d/%d" % (self.videowidth,
                                                                             self.videoheight,
                                                                             self.videopar.num,
                                                                             self.videopar.denom,
                                                                             self.videorate.num,
                                                                             self.videorate.denom)
     vcaps = gst.caps_from_string("video/x-raw-yuv,%s;video/x-raw-rgb,%s" % (astr, astr))
     if self.vencoder:
         return get_compatible_sink_caps(self.vencoder, vcaps)
     return vcaps