add screen sharing ability by choosing Screen in video input device.
This commit is contained in:
parent
aea75469a1
commit
c1584918f3
|
@ -364,9 +364,13 @@ class JingleVideo(JingleRTPContent):
|
|||
JingleRTPContent.setup_stream(self, self._on_src_pad_added)
|
||||
|
||||
# the local parts
|
||||
if gajim.config.get('video_input_device').startswith('ximagesrc'):
|
||||
colorspace = 'rgb'
|
||||
else:
|
||||
colorspace = 'yuv'
|
||||
if gajim.config.get('video_framerate'):
|
||||
framerate = 'videorate ! video/x-raw-yuv,framerate=%s ! ' % \
|
||||
gajim.config.get('video_framerate')
|
||||
framerate = 'videorate ! video/x-raw-%s,framerate=%s ! ' % \
|
||||
(colorspace, gajim.config.get('video_framerate'))
|
||||
else:
|
||||
framerate = ''
|
||||
try:
|
||||
|
@ -374,7 +378,8 @@ class JingleVideo(JingleRTPContent):
|
|||
except:
|
||||
w = h = None
|
||||
if w and h:
|
||||
video_size = 'video/x-raw-yuv,width=%s,height=%s ! ' % (w, h)
|
||||
video_size = 'video/x-raw-%s,width=%s,height=%s ! ' % (colorspace,
|
||||
w, h)
|
||||
else:
|
||||
video_size = ''
|
||||
self.src_bin = self.make_bin_from_config('video_input_device',
|
||||
|
|
|
@ -95,7 +95,7 @@ class VideoInputManager(DeviceManager):
|
|||
self.detect_element('v4l2src', _('V4L2: %s'))
|
||||
# Funny things, just to test...
|
||||
# self.devices['GOOM'] = 'audiotestsrc ! goom'
|
||||
# self.devices['screen'] = 'ximagesrc'
|
||||
self.detect_element('ximagesrc', _('Screen'))
|
||||
|
||||
|
||||
class VideoOutputManager(DeviceManager):
|
||||
|
|
Loading…
Reference in New Issue