Commit 6dc92c54 authored by Felix Paul Kühne's avatar Felix Paul Kühne

movie player: implement text renderer settings

WARNING: Note that since we use a custom libvlc instance to do so, there MIGHT BE a PERFORMANCE REGRESSION on older devices. Please check thoroughly, especially on the iPad 1 and the iPhone 3GS
parent 3e8c8370
......@@ -13,6 +13,9 @@
<Group
location = "container:"
name = "VLC Internals">
<FileRef
location = "group:ImportedSources/vlc/modules/text_renderer/quartztext.c">
</FileRef>
<FileRef
location = "group:ImportedSources/vlc/modules/video_output/ios2.m">
</FileRef>
......
......@@ -229,7 +229,9 @@
if (_playerIsSetup)
return;
_mediaPlayer = [[VLCMediaPlayer alloc] init];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
_mediaPlayer = [[VLCMediaPlayer alloc] initWithOptions:@[[NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFont, [defaults objectForKey:kVLCSettingSubtitlesFont]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFontColor, [defaults objectForKey:kVLCSettingSubtitlesFontColor]], [NSString stringWithFormat:@"--%@=%@", kVLCSettingSubtitlesFontSize, [defaults objectForKey:kVLCSettingSubtitlesFontSize]]]];
[_mediaPlayer setDelegate:self];
[_mediaPlayer setDrawable:self.movieView];
......@@ -248,10 +250,10 @@
self.title = @"Network Stream";
}
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[media addOptions:
@{kVLCSettingStretchAudio :
[[defaults objectForKey:kVLCSettingStretchAudio] boolValue] ? kVLCSettingStretchAudioOnValue : kVLCSettingStretchAudioOffValue, kVLCSettingTextEncoding : [defaults objectForKey:kVLCSettingTextEncoding], kVLCSettingSkipLoopFilter : [defaults objectForKey:kVLCSettingSkipLoopFilter], kVLCSettingSubtitlesFont : [defaults objectForKey:kVLCSettingSubtitlesFont], kVLCSettingSubtitlesFontColor : [defaults objectForKey:kVLCSettingSubtitlesFontColor], kVLCSettingSubtitlesFontSize : [defaults objectForKey:kVLCSettingSubtitlesFontSize]}];
[[defaults objectForKey:kVLCSettingStretchAudio] boolValue] ? kVLCSettingStretchAudioOnValue : kVLCSettingStretchAudioOffValue, kVLCSettingTextEncoding : [defaults objectForKey:kVLCSettingTextEncoding], kVLCSettingSkipLoopFilter : [defaults objectForKey:kVLCSettingSkipLoopFilter]}];
[NSTimeZone resetSystemTimeZone];
NSString *tzName = [[NSTimeZone systemTimeZone] name];
......
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