Commit b4db38df authored by Sylvain Berfini's avatar Sylvain Berfini

Move video enabled param from linphonerc to customs + stub for Opus and iSAC audio codec settings

parent 517c443e
......@@ -30,8 +30,5 @@ displaytype=MSWP8Dis
history_max_size=30
max_calls=1
[app]
HideVideoSettings=1
[default_values]
reg_expires=28800
\ No newline at end of file
......@@ -17,5 +17,6 @@ namespace Linphone.Model
internal static string PictureUploadScriptURL = "https://linphone.org:444/upload.php";
internal static string UserAgent = "LinphoneWP8";
internal static bool EnableG729 = false;
internal static bool EnableVideo = false;
}
}
......@@ -165,7 +165,6 @@ namespace Linphone.Model
private const string LogLevelKeyName = "LogLevel";
private const string LogDestinationKeyName = "LogDestination";
private const string LogOptionKeyName = "LogOption";
private const string HideVideoSettingsKeyName = "HideVideoSettings";
#endregion
/// <summary>
......@@ -192,7 +191,6 @@ namespace Linphone.Model
dict[LogLevelKeyName] = Config.GetInt(ApplicationSection, LogLevelKeyName, (int)OutputTraceLevel.None).ToString();
dict[LogDestinationKeyName] = Config.GetString(ApplicationSection, LogDestinationKeyName, OutputTraceDest.File.ToString());
dict[LogOptionKeyName] = Config.GetString(ApplicationSection, LogOptionKeyName, "Linphone.log");
dict[HideVideoSettingsKeyName] = Config.GetBool(ApplicationSection, HideVideoSettingsKeyName, false).ToString();
}
/// <summary>
......@@ -285,17 +283,6 @@ namespace Linphone.Model
}
}
/// <summary>
/// Hide video settings (bool).
/// </summary>
public Boolean HideVideoSettings
{
get
{
return Convert.ToBoolean(Get(HideVideoSettingsKeyName));
}
}
/// <summary>
/// Log option (filename if LogDestination is OutputTraceDest.File, host:port if LogDestination is OutputTraceDest.TCPRemote).
/// </summary>
......@@ -597,6 +584,8 @@ namespace Linphone.Model
private const string ILBCSettingKeyName = "CodecILBC";
private const string SILK16SettingKeyName = "CodecSILK16";
private const string GSMSettingKeyName = "CodecGSM";
private const string OpusSettingKeyName = "CodecOpus";
private const string IsacSettingKeyName = "CodecIsac";
private const string H264SettingKeyName = "CodecH264";
#endregion
......@@ -615,6 +604,8 @@ namespace Linphone.Model
{ new Tuple<String, int>("ilbc", 8000), ILBCSettingKeyName },
{ new Tuple<String, int>("silk", 16000), SILK16SettingKeyName },
{ new Tuple<String, int>("gsm", 8000), GSMSettingKeyName },
{ new Tuple<String, int>("opus", 48000), OpusSettingKeyName },
{ new Tuple<String, int>("isac", 16000), IsacSettingKeyName },
{ new Tuple<String, int>("h264", 90000), H264SettingKeyName },
};
......@@ -841,6 +832,36 @@ namespace Linphone.Model
}
}
/// <summary>
/// Is OPUS audio codec enabled or disabled ? (Boolean)
/// </summary>
public bool OPUS
{
get
{
return Convert.ToBoolean(Get(OpusSettingKeyName));
}
set
{
Set(OpusSettingKeyName, value.ToString());
}
}
/// <summary>
/// Is ISAC audio codec enabled or disabled ? (Boolean)
/// </summary>
public bool Isac
{
get
{
return Convert.ToBoolean(Get(IsacSettingKeyName));
}
set
{
Set(IsacSettingKeyName, value.ToString());
}
}
/// <summary>
/// Is H.264 video codec enabled or disabled ? (Boolean)
/// </summary>
......
......@@ -732,6 +732,15 @@ namespace Linphone.Resources {
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à iSAC.
/// </summary>
public static string ISACCodec {
get {
return ResourceManager.GetString("ISACCodec", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Use linphone.org account.
/// </summary>
......@@ -831,6 +840,15 @@ namespace Linphone.Resources {
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à OPUS.
/// </summary>
public static string OpusCodec {
get {
return ResourceManager.GetString("OpusCodec", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à PCMA.
/// </summary>
......
......@@ -555,4 +555,10 @@ Do you want to report it to the developpers ? It will help fix it faster.</value
<data name="StunServer" xml:space="preserve">
<value>Stun server</value>
</data>
<data name="OpusCodec" xml:space="preserve">
<value>OPUS</value>
</data>
<data name="ISACCodec" xml:space="preserve">
<value>iSAC</value>
</data>
</root>
\ No newline at end of file
......@@ -35,74 +35,89 @@
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<toolkit:ToggleSwitch
Grid.Row="0"
x:Name="AMRNB"
Header="{Binding Path=LocalizedResources.AMRNBCodec, Source={StaticResource LocalizedStrings}}">
Grid.Row="0"
x:Name="OPUS"
Header="{Binding Path=LocalizedResources.OpusCodec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="1"
x:Name="AMRNB"
Header="{Binding Path=LocalizedResources.AMRNBCodec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="1"
x:Name="AMRWB"
Header="{Binding Path=LocalizedResources.AMRWBCodec, Source={StaticResource LocalizedStrings}}">
Grid.Row="2"
x:Name="AMRWB"
Header="{Binding Path=LocalizedResources.AMRWBCodec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="2"
x:Name="Speex16"
Header="{Binding Path=LocalizedResources.Speex16Codec, Source={StaticResource LocalizedStrings}}">
Grid.Row="3"
x:Name="Speex16"
Header="{Binding Path=LocalizedResources.Speex16Codec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="3"
x:Name="Speex8"
Header="{Binding Path=LocalizedResources.Speex8Codec, Source={StaticResource LocalizedStrings}}">
Grid.Row="4"
x:Name="Speex8"
Header="{Binding Path=LocalizedResources.Speex8Codec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="4"
x:Name="PCMU"
Header="{Binding Path=LocalizedResources.PCMUCodec, Source={StaticResource LocalizedStrings}}">
Grid.Row="5"
x:Name="PCMU"
Header="{Binding Path=LocalizedResources.PCMUCodec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="5"
x:Name="PCMA"
Header="{Binding Path=LocalizedResources.PCMACodec, Source={StaticResource LocalizedStrings}}">
Grid.Row="6"
x:Name="PCMA"
Header="{Binding Path=LocalizedResources.PCMACodec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="6"
x:Name="G722"
Header="{Binding Path=LocalizedResources.G722Codec, Source={StaticResource LocalizedStrings}}">
Grid.Row="7"
x:Name="G722"
Header="{Binding Path=LocalizedResources.G722Codec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="7"
x:Name="G729"
Header="{Binding Path=LocalizedResources.G729Codec, Source={StaticResource LocalizedStrings}}">
Grid.Row="8"
x:Name="G729"
Header="{Binding Path=LocalizedResources.G729Codec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="8"
x:Name="ILBC"
Header="{Binding Path=LocalizedResources.ILBCCodec, Source={StaticResource LocalizedStrings}}">
Grid.Row="9"
x:Name="ILBC"
Header="{Binding Path=LocalizedResources.ILBCCodec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="9"
x:Name="SILK16"
Header="{Binding Path=LocalizedResources.SILK16Codec, Source={StaticResource LocalizedStrings}}">
Grid.Row="10"
x:Name="SILK16"
Header="{Binding Path=LocalizedResources.SILK16Codec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="10"
x:Name="GSM"
Header="{Binding Path=LocalizedResources.GSMCodec, Source={StaticResource LocalizedStrings}}">
Grid.Row="11"
x:Name="GSM"
Header="{Binding Path=LocalizedResources.GSMCodec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
<toolkit:ToggleSwitch
Grid.Row="12"
x:Name="ISAC"
Header="{Binding Path=LocalizedResources.ISACCodec, Source={StaticResource LocalizedStrings}}">
</toolkit:ToggleSwitch>
</Grid>
</ScrollViewer.Content>
</ScrollViewer>
......
......@@ -34,7 +34,9 @@ namespace Linphone.Views
G729.IsEnabled = Customs.EnableG729;
ILBC.IsChecked = _settings.ILBC;
SILK16.IsChecked = _settings.SILK16;
GSM.IsChecked = _settings.GSM;
GSM.IsChecked = _settings.GSM;
OPUS.IsChecked = _settings.OPUS;
ISAC.IsChecked = _settings.Isac;
}
/// <summary>
......@@ -72,7 +74,9 @@ namespace Linphone.Views
_settings.G729 = ToBool(G729.IsChecked) && Customs.EnableG729;
_settings.ILBC = ToBool(ILBC.IsChecked);
_settings.SILK16 = ToBool(SILK16.IsChecked);
_settings.GSM = ToBool(GSM.IsChecked);
_settings.GSM = ToBool(GSM.IsChecked);
_settings.OPUS = ToBool(OPUS.IsChecked);
_settings.Isac = ToBool(ISAC.IsChecked);
_settings.Save();
NavigationService.GoBack();
......
......@@ -23,7 +23,7 @@ namespace Linphone.Views
BuildLocalizedApplicationBar();
_settings.Load();
Debug.IsChecked = _settings.DebugEnabled;
Video.Visibility = _settings.HideVideoSettings ? Visibility.Collapsed : Visibility.Visible;
Video.Visibility = Customs.EnableVideo ? Visibility.Visible : Visibility.Collapsed;
}
/// <summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment