Commit a8a9ca26 authored by Felix Paul Kühne's avatar Felix Paul Kühne

playback: set deinterlace option through libvlc API instead of argc/argv

parent 028f1630
......@@ -106,13 +106,11 @@
<key>Titles</key>
<array>
<string>SETTINGS_DEINTERLACE_ON</string>
<string>SETTINGS_DEINTERLACE_AUTO</string>
<string>SETTINGS_DEINTERLACE_OFF</string>
</array>
<key>Values</key>
<array>
<integer>1</integer>
<integer>-1</integer>
<integer>0</integer>
</array>
</dict>
......
......@@ -96,13 +96,11 @@
<key>Titles</key>
<array>
<string>SETTINGS_DEINTERLACE_ON</string>
<string>SETTINGS_DEINTERLACE_AUTO</string>
<string>SETTINGS_DEINTERLACE_OFF</string>
</array>
<key>Values</key>
<array>
<integer>1</integer>
<integer>-1</integer>
<integer>0</integer>
</array>
</dict>
......
......@@ -405,11 +405,16 @@
return;
}
_listPlayer = [[VLCMediaListPlayer alloc]
initWithOptions:@[[NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFont, [self _resolveFontName]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFontColor, [defaults objectForKey:kVLCSettingSubtitlesFontColor]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFontSize, [defaults objectForKey:kVLCSettingSubtitlesFontSize]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingDeinterlace, [defaults objectForKey:kVLCSettingDeinterlace]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingNetworkCaching, [defaults objectForKey:kVLCSettingNetworkCaching]]]];
NSMutableDictionary *mediaDictionary = [[NSMutableDictionary alloc] init];
_listPlayer = [[VLCMediaListPlayer alloc] initWithOptions:@[[NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFont, [self _resolveFontName]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFontColor, [defaults objectForKey:kVLCSettingSubtitlesFontColor]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFontSize, [defaults objectForKey:kVLCSettingSubtitlesFontSize]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingNetworkCaching, [defaults objectForKey:kVLCSettingNetworkCaching]]]];
_mediaPlayer = _listPlayer.mediaPlayer;
[_mediaPlayer setDelegate:self];
[_mediaPlayer setDrawable:self.movieView];
if ([[defaults objectForKey:kVLCSettingDeinterlace] intValue] != 0)
[_mediaPlayer setDeinterlaceFilter:@"blend"];
else
[_mediaPlayer setDeinterlaceFilter:nil];
self.trackNameLabel.text = self.artistNameLabel.text = self.albumNameLabel.text = @"";
VLCMedia *media;
......@@ -424,7 +429,7 @@
[media parse];
}
NSMutableDictionary *mediaDictionary = [[NSMutableDictionary alloc] init];
[mediaDictionary setObject:[[defaults objectForKey:kVLCSettingStretchAudio] boolValue] ? kVLCSettingStretchAudioOnValue : kVLCSettingStretchAudioOffValue forKey:kVLCSettingStretchAudio];
[mediaDictionary setObject:[defaults objectForKey:kVLCSettingTextEncoding] forKey:kVLCSettingTextEncoding];
......
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