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)
|
JingleRTPContent.setup_stream(self, self._on_src_pad_added)
|
||||||
|
|
||||||
# the local parts
|
# the local parts
|
||||||
|
if gajim.config.get('video_input_device').startswith('ximagesrc'):
|
||||||
|
colorspace = 'rgb'
|
||||||
|
else:
|
||||||
|
colorspace = 'yuv'
|
||||||
if gajim.config.get('video_framerate'):
|
if gajim.config.get('video_framerate'):
|
||||||
framerate = 'videorate ! video/x-raw-yuv,framerate=%s ! ' % \
|
framerate = 'videorate ! video/x-raw-%s,framerate=%s ! ' % \
|
||||||
gajim.config.get('video_framerate')
|
(colorspace, gajim.config.get('video_framerate'))
|
||||||
else:
|
else:
|
||||||
framerate = ''
|
framerate = ''
|
||||||
try:
|
try:
|
||||||
|
@ -374,7 +378,8 @@ class JingleVideo(JingleRTPContent):
|
||||||
except:
|
except:
|
||||||
w = h = None
|
w = h = None
|
||||||
if w and h:
|
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:
|
else:
|
||||||
video_size = ''
|
video_size = ''
|
||||||
self.src_bin = self.make_bin_from_config('video_input_device',
|
self.src_bin = self.make_bin_from_config('video_input_device',
|
||||||
|
|
|
@ -95,7 +95,7 @@ class VideoInputManager(DeviceManager):
|
||||||
self.detect_element('v4l2src', _('V4L2: %s'))
|
self.detect_element('v4l2src', _('V4L2: %s'))
|
||||||
# Funny things, just to test...
|
# Funny things, just to test...
|
||||||
# self.devices['GOOM'] = 'audiotestsrc ! goom'
|
# self.devices['GOOM'] = 'audiotestsrc ! goom'
|
||||||
# self.devices['screen'] = 'ximagesrc'
|
self.detect_element('ximagesrc', _('Screen'))
|
||||||
|
|
||||||
|
|
||||||
class VideoOutputManager(DeviceManager):
|
class VideoOutputManager(DeviceManager):
|
||||||
|
|
Loading…
Reference in New Issue