Commit d42f25d6 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

add network caching option (close #10388)

parent bd812c23
......@@ -30,6 +30,32 @@
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>SETTINGS_NETWORK_CACHING_TITLE</string>
<key>Key</key>
<string>network-caching</string>
<key>DefaultValue</key>
<string>999</string>
<key>Titles</key>
<array>
<string>SETTINGS_NETWORK_CACHING_LEVEL_LOWEST</string>
<string>SETTINGS_NETWORK_CACHING_LEVEL_LOW</string>
<string>SETTINGS_NETWORK_CACHING_LEVEL_NORMAL</string>
<string>SETTINGS_NETWORK_CACHING_LEVEL_HIGH</string>
<string>SETTINGS_NETWORK_CACHING_LEVEL_HIGHEST</string>
</array>
<key>Values</key>
<array>
<integer>333</integer>
<integer>666</integer>
<integer>999</integer>
<integer>1667</integer>
<integer>3333</integer>
</array>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
......
......@@ -20,6 +20,32 @@
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>SETTINGS_NETWORK_CACHING_TITLE</string>
<key>Key</key>
<string>network-caching</string>
<key>DefaultValue</key>
<string>999</string>
<key>Titles</key>
<array>
<string>SETTINGS_NETWORK_CACHING_LEVEL_LOWEST</string>
<string>SETTINGS_NETWORK_CACHING_LEVEL_LOW</string>
<string>SETTINGS_NETWORK_CACHING_LEVEL_NORMAL</string>
<string>SETTINGS_NETWORK_CACHING_LEVEL_HIGH</string>
<string>SETTINGS_NETWORK_CACHING_LEVEL_HIGHEST</string>
</array>
<key>Values</key>
<array>
<integer>333</integer>
<integer>666</integer>
<integer>999</integer>
<integer>1667</integer>
<integer>3333</integer>
</array>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
......
......@@ -53,7 +53,7 @@
else
skipLoopFilterDefaultValue = kVLCSettingSkipLoopFilterNonRef;
NSDictionary *appDefaults = @{kVLCSettingPasscodeKey : @"", kVLCSettingPasscodeOnKey : @(NO), kVLCSettingContinueAudioInBackgroundKey : @(YES), kVLCSettingStretchAudio : @(NO), kVLCSettingTextEncoding : kVLCSettingTextEncodingDefaultValue, kVLCSettingSkipLoopFilter : skipLoopFilterDefaultValue, kVLCSettingSubtitlesFont : kVLCSettingSubtitlesFontDefaultValue, kVLCSettingSubtitlesFontColor : kVLCSettingSubtitlesFontColorDefaultValue, kVLCSettingSubtitlesFontSize : kVLCSettingSubtitlesFontSizeDefaultValue, kVLCSettingDeinterlace : kVLCSettingDeinterlaceDefaultValue};
NSDictionary *appDefaults = @{kVLCSettingPasscodeKey : @"", kVLCSettingPasscodeOnKey : @(NO), kVLCSettingContinueAudioInBackgroundKey : @(YES), kVLCSettingStretchAudio : @(NO), kVLCSettingTextEncoding : kVLCSettingTextEncodingDefaultValue, kVLCSettingSkipLoopFilter : skipLoopFilterDefaultValue, kVLCSettingSubtitlesFont : kVLCSettingSubtitlesFontDefaultValue, kVLCSettingSubtitlesFontColor : kVLCSettingSubtitlesFontColorDefaultValue, kVLCSettingSubtitlesFontSize : kVLCSettingSubtitlesFontSizeDefaultValue, kVLCSettingDeinterlace : kVLCSettingDeinterlaceDefaultValue, kVLCSettingNetworkCaching : kVLCSettingNetworkCachingDefaultValue};
[defaults registerDefaults:appDefaults];
}
......
......@@ -34,6 +34,8 @@
#define kVLCSettingSubtitlesFontColorDefaultValue @"16777215"
#define kVLCSettingDeinterlace @"deinterlace"
#define kVLCSettingDeinterlaceDefaultValue @(0)
#define kVLCSettingNetworkCaching @"network-caching"
#define kVLCSettingNetworkCachingDefaultValue @(999)
#define kVLCSettingsDecrapifyTitles = @"MLDecrapifyTitles";
#define kVLCShowRemainingTime @"show-remaining-time"
......
......@@ -388,7 +388,7 @@
return;
}
_listPlayer = [[VLCMediaListPlayer alloc] initWithOptions:@[[NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFont, [defaults objectForKey:kVLCSettingSubtitlesFont]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFontColor, [defaults objectForKey:kVLCSettingSubtitlesFontColor]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFontSize, [defaults objectForKey:kVLCSettingSubtitlesFontSize]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingDeinterlace, [defaults objectForKey:kVLCSettingDeinterlace]]]];
_listPlayer = [[VLCMediaListPlayer alloc] initWithOptions:@[[NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFont, [defaults objectForKey:kVLCSettingSubtitlesFont]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFontColor, [defaults objectForKey:kVLCSettingSubtitlesFontColor]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFontSize, [defaults objectForKey:kVLCSettingSubtitlesFontSize]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingDeinterlace, [defaults objectForKey:kVLCSettingDeinterlace]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingNetworkCaching, [defaults objectForKey:kVLCSettingNetworkCaching]]]];
_mediaPlayer = _listPlayer.mediaPlayer;
[_mediaPlayer setDelegate:self];
[_mediaPlayer setDrawable:self.movieView];
......
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