Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
6f68321d
Commit
6f68321d
authored
May 21, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movie view: release media player instance when playback stops
parent
33fd465e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
AspenProject/VLCMovieViewController.m
AspenProject/VLCMovieViewController.m
+10
-9
No files found.
AspenProject/VLCMovieViewController.m
View file @
6f68321d
...
...
@@ -44,15 +44,6 @@
[
super
viewDidLoad
];
self
.
wantsFullScreenLayout
=
YES
;
NSUserDefaults
*
defaults
=
[
NSUserDefaults
standardUserDefaults
];
NSArray
*
options
=
@[[
defaults
objectForKey
:
kVLCSettingVerboseOutput
],
[
defaults
objectForKey
:
kVLCSettingStretchAudio
],
[
defaults
objectForKey
:
kVLCSettingTextEncoding
]];
_mediaPlayer
=
[[
VLCMediaPlayer
alloc
]
initWithOptions
:
options
];
[
_mediaPlayer
setDelegate
:
self
];
[
_mediaPlayer
setDrawable
:
self
.
movieView
];
self
.
videoFilterView
.
hidden
=
YES
;
_videoFiltersHidden
=
YES
;
_hueLabel
.
text
=
NSLocalizedString
(
@"VFILTER_HUE"
,
@""
);
...
...
@@ -91,6 +82,15 @@
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
NSUserDefaults
*
defaults
=
[
NSUserDefaults
standardUserDefaults
];
NSArray
*
options
=
@[[
defaults
objectForKey
:
kVLCSettingVerboseOutput
],
[
defaults
objectForKey
:
kVLCSettingStretchAudio
],
[
defaults
objectForKey
:
kVLCSettingTextEncoding
]];
_mediaPlayer
=
[[
VLCMediaPlayer
alloc
]
initWithOptions
:
options
];
[
_mediaPlayer
setDelegate
:
self
];
[
_mediaPlayer
setDrawable
:
self
.
movieView
];
[
self
.
navigationController
setNavigationBarHidden
:
YES
animated
:
YES
];
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPhone
)
[
UIApplication
sharedApplication
].
statusBarStyle
=
UIStatusBarStyleBlackTranslucent
;
...
...
@@ -185,6 +185,7 @@
if
(
self
.
mediaItem
)
self
.
mediaItem
.
lastPosition
=
@
([
_mediaPlayer
position
]);
[
_mediaPlayer
stop
];
_mediaPlayer
=
nil
;
// save memory and some CPU time
}
-
(
id
)
initWithNibName
:(
NSString
*
)
nibNameOrNil
bundle
:(
NSBundle
*
)
nibBundleOrNil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment