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
a5c298da
Commit
a5c298da
authored
Apr 18, 2014
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify libvlc vs. external sub interaction
parent
4cbb7f8a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
12 deletions
+14
-12
NEWS
NEWS
+3
-0
Sources/VLCAppDelegate.m
Sources/VLCAppDelegate.m
+2
-2
Sources/VLCConstants.h
Sources/VLCConstants.h
+0
-1
Sources/VLCMovieViewController.h
Sources/VLCMovieViewController.h
+1
-1
Sources/VLCMovieViewController.m
Sources/VLCMovieViewController.m
+8
-8
No files found.
NEWS
View file @
a5c298da
2.4 (not yet released):
-----------------------
* Detection of external subtitles when streaming media via http or ftp (#10668)
* Option to download media from http/ftp/https instead of direct playback when
requested through third-party app (#11147)
2.3:
----
...
...
Sources/VLCAppDelegate.m
View file @
a5c298da
...
...
@@ -392,7 +392,7 @@
_movieViewController
.
mediaList
=
list
;
_movieViewController
.
itemInMediaListToBePlayedFirst
=
index
;
_movieViewController
.
url
ExternalS
rt
=
nil
;
_movieViewController
.
pathTo
ExternalS
ubtitlesFile
=
nil
;
UINavigationController
*
navCon
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
_movieViewController
];
navCon
.
modalPresentationStyle
=
UIModalPresentationFullScreen
;
...
...
@@ -405,7 +405,7 @@
_movieViewController
=
[[
VLCMovieViewController
alloc
]
initWithNibName
:
nil
bundle
:
nil
];
_movieViewController
.
url
=
url
;
_movieViewController
.
url
ExternalS
rt
=
SubtitlePath
;
_movieViewController
.
pathTo
ExternalS
ubtitlesFile
=
SubtitlePath
;
UINavigationController
*
navCon
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
_movieViewController
];
navCon
.
modalPresentationStyle
=
UIModalPresentationFullScreen
;
...
...
Sources/VLCConstants.h
View file @
a5c298da
...
...
@@ -34,7 +34,6 @@
#define kVLCSettingSubtitlesBoldFontDefaulValue @NO
#define kVLCSettingSubtitlesFontColor @"quartztext-color"
#define kVLCSettingSubtitlesFontColorDefaultValue @"16777215"
#define kVLCSettingSubtitlesFilePath @"sub-file"
#define kVLCSettingDeinterlace @"deinterlace"
#define kVLCSettingDeinterlaceDefaultValue @(0)
#define kVLCSettingNetworkCaching @"network-caching"
...
...
Sources/VLCMovieViewController.h
View file @
a5c298da
...
...
@@ -84,7 +84,7 @@
@property
(
nonatomic
,
strong
)
MLFile
*
fileFromMediaLibrary
;
@property
(
nonatomic
,
strong
)
NSURL
*
url
;
@property
(
nonatomic
,
strong
)
NSString
*
url
ExternalS
rt
;
@property
(
nonatomic
,
strong
)
NSString
*
pathTo
ExternalS
ubtitlesFile
;
@property
(
nonatomic
,
retain
)
VLCMediaList
*
mediaList
;
@property
(
nonatomic
,
readwrite
)
int
itemInMediaListToBePlayedFirst
;
...
...
Sources/VLCMovieViewController.m
View file @
a5c298da
...
...
@@ -407,10 +407,7 @@
return
;
}
if
(
self
.
urlExternalSrt
)
_listPlayer
=
[[
VLCMediaListPlayer
alloc
]
initWithOptions
:@[[
NSString
stringWithFormat
:
@"--%@=%@"
,
kVLCSettingSubtitlesFilePath
,
[
self
urlExternalSrt
]]]];
else
_listPlayer
=
[[
VLCMediaListPlayer
alloc
]
init
];
_listPlayer
=
[[
VLCMediaListPlayer
alloc
]
init
];
_mediaPlayer
=
_listPlayer
.
mediaPlayer
;
[
_mediaPlayer
setDelegate
:
self
];
...
...
@@ -419,6 +416,9 @@
[
_mediaPlayer
setDeinterlaceFilter
:
@"blend"
];
else
[
_mediaPlayer
setDeinterlaceFilter
:
nil
];
if
(
self
.
pathToExternalSubtitlesFile
)
[
_mediaPlayer
openVideoSubTitlesFromFile
:
self
.
pathToExternalSubtitlesFile
];
self
.
trackNameLabel
.
text
=
self
.
artistNameLabel
.
text
=
self
.
albumNameLabel
.
text
=
@""
;
VLCMedia
*
media
;
...
...
@@ -640,11 +640,11 @@
_mediaList
=
nil
;
if
(
_url
)
_url
=
nil
;
if
(
_
url
ExternalS
rt
)
{
if
(
_
pathTo
ExternalS
ubtitlesFile
)
{
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
if
([
fileManager
fileExistsAtPath
:
_
url
ExternalS
rt
])
[
fileManager
removeItemAtPath
:
_
url
ExternalS
rt
error
:
nil
];
_
url
ExternalS
rt
=
nil
;
if
([
fileManager
fileExistsAtPath
:
_
pathTo
ExternalS
ubtitlesFile
])
[
fileManager
removeItemAtPath
:
_
pathTo
ExternalS
ubtitlesFile
error
:
nil
];
_
pathTo
ExternalS
ubtitlesFile
=
nil
;
}
_playerIsSetup
=
NO
;
}
...
...
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