update video config from 0.16 to 1.0

This commit is contained in:
Yann Leboulanger 2016-03-30 21:19:13 +02:00
parent 398b0a6385
commit 8d57da9d39
3 changed files with 12 additions and 2 deletions

View File

@ -303,7 +303,7 @@ class Config:
'show_self_contact': [opt_str, 'when_other_resource', _('When is self contact row displayed. Can be "always", "when_other_resource" or "never"'), True],
'audio_input_device': [opt_str, 'autoaudiosrc ! volume name=gajim_vol'],
'audio_output_device': [opt_str, 'autoaudiosink'],
'video_input_device': [opt_str, 'autovideosrc ! videoscale ! videoconvert'],
'video_input_device': [opt_str, 'autovideosrc'],
'video_output_device': [opt_str, 'autovideosink'],
'video_framerate': [opt_str, '', _('Optionally fix jingle output video framerate. Example: 10/1 or 25/2')],
'video_size': [opt_str, '', _('Optionally resize jingle output video. Example: 320x240')],

View File

@ -27,7 +27,7 @@ docdir = '../'
basedir = '../'
localedir = '../po'
version = '0.16.10'
version = '0.16.10.1'
import subprocess
try:
node = subprocess.Popen('hg tip --template "{node|short}"', shell=True,

View File

@ -231,6 +231,8 @@ class OptionsParser:
self.update_config_to_01601()
if old < [0, 16, 4, 1] and new >= [0, 16, 4, 1]:
self.update_config_to_01641()
if old < [0, 16, 10, 1] and new >= [0, 16, 10, 1]:
self.update_config_to_016101()
gajim.logger.init_vars()
gajim.logger.attach_cache_database()
@ -936,3 +938,11 @@ class OptionsParser:
gajim.config.set_per('accounts', account, 'connection_types',
' '.join(connection_types))
gajim.config.set('version', '0.16.4.1')
def update_config_to_016101(self):
if 'video_input_device' in self.old_values:
if self.old_values['video_input_device'] == 'autovideosrc ! videoscale ! ffmpegcolorspace':
gajim.config.set('video_input_device', 'autovideosrc')
if self.old_values['video_input_device'] == 'videotestsrc is-live=true ! video/x-raw-yuv,framerate=10/1':
gajim.config.set('video_input_device', 'videotestsrc is-live=true ! video/x-raw,framerate=10/1')
gajim.config.set('version', '0.16.10.1')