Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
83fe7d46
Commit
83fe7d46
authored
Jun 16, 2015
by
Felix Paul Kühne
Browse files
media player: deploy VLCKit 3.0 API for titles and chapters, show chapter and title duration, etc.
parent
9a159f58
Changes
2
Show whitespace changes
Inline
Side-by-side
Sources/VLCMovieViewController.m
View file @
83fe7d46
...
...
@@ -1154,10 +1154,10 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
if
(
mediaPlayer
.
videoSubTitlesIndexes
.
count
>
1
)
ret
++
;
}
else
{
if
([
mediaPlayer
count
OfTitles
]
>
1
)
if
([
mediaPlayer
number
OfTitles
]
>
1
)
ret
++
;
if
([
mediaPlayer
c
haptersForTitle
Index
:
mediaPlayer
.
currentTitleIndex
]
.
count
>
1
)
if
([
mediaPlayer
numberOfC
haptersForTitle
:
mediaPlayer
.
currentTitleIndex
]
>
1
)
ret
++
;
}
...
...
@@ -1185,10 +1185,10 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
if
(
mediaPlayer
.
videoSubTitlesIndexes
.
count
>
1
)
return
NSLocalizedString
(
@"CHOOSE_SUBTITLE_TRACK"
,
nil
);
}
else
{
if
([
mediaPlayer
count
OfTitles
]
>
1
&&
section
==
0
)
if
([
mediaPlayer
number
OfTitles
]
>
1
&&
section
==
0
)
return
NSLocalizedString
(
@"CHOOSE_TITLE"
,
nil
);
if
([
mediaPlayer
c
haptersForTitle
Index
:
mediaPlayer
.
currentTitleIndex
]
.
count
>
1
)
if
([
mediaPlayer
numberOfC
haptersForTitle
:
mediaPlayer
.
currentTitleIndex
]
>
1
)
return
NSLocalizedString
(
@"CHOOSE_CHAPTER"
,
nil
);
}
...
...
@@ -1225,13 +1225,15 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
cell
.
textLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
mediaPlayer
.
videoSubTitlesNames
[
row
]];
}
}
else
{
if
([
mediaPlayer
countOfTitles
]
>
1
&&
section
==
0
)
{
cell
.
textLabel
.
text
=
mediaPlayer
.
titles
[
row
];
if
([
mediaPlayer
numberOfTitles
]
>
1
&&
section
==
0
)
{
NSDictionary
*
description
=
mediaPlayer
.
titleDescriptions
[
row
];
cell
.
textLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ (%@)"
,
description
[
VLCTitleDescriptionName
],
[[
VLCTime
timeWithNumber
:
description
[
VLCTitleDescriptionDuration
]]
stringValue
]];
if
(
row
==
mediaPlayer
.
currentTitleIndex
)
cellShowsCurrentTrack
=
YES
;
}
else
{
cell
.
textLabel
.
text
=
[
mediaPlayer
chaptersForTitleIndex
:
mediaPlayer
.
currentTitleIndex
][
row
];
NSDictionary
*
description
=
[
mediaPlayer
chapterDescriptionsOfTitle
:
mediaPlayer
.
currentTitleIndex
][
row
];
cell
.
textLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ (%@)"
,
description
[
VLCChapterDescriptionName
],
[[
VLCTime
timeWithNumber
:
description
[
VLCChapterDescriptionDuration
]]
stringValue
]];
if
(
row
==
mediaPlayer
.
currentChapterIndex
)
cellShowsCurrentTrack
=
YES
;
...
...
@@ -1254,10 +1256,10 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
return
mediaPlayer
.
videoSubTitlesIndexes
.
count
;
}
else
{
if
([
mediaPlayer
count
OfTitles
]
>
1
&&
section
==
0
)
return
[
mediaPlayer
count
OfTitles
];
if
([
mediaPlayer
number
OfTitles
]
>
1
&&
section
==
0
)
return
[
mediaPlayer
number
OfTitles
];
else
return
[
mediaPlayer
c
haptersForTitle
Index
:
mediaPlayer
.
currentTitleIndex
]
.
count
;
return
[
mediaPlayer
numberOfC
haptersForTitle
:
mediaPlayer
.
currentTitleIndex
];
}
}
...
...
@@ -1280,7 +1282,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
mediaPlayer
.
currentVideoSubTitleIndex
=
[
indexArray
[
index
]
intValue
];
}
}
else
{
if
([
mediaPlayer
count
OfTitles
]
>
1
&&
indexPath
.
section
==
0
)
if
([
mediaPlayer
number
OfTitles
]
>
1
&&
indexPath
.
section
==
0
)
mediaPlayer
.
currentTitleIndex
=
(
int
)
index
;
else
mediaPlayer
.
currentChapterIndex
=
(
int
)
index
;
...
...
compileVLCforiOS.sh
View file @
83fe7d46
...
...
@@ -12,7 +12,7 @@ CONFIGURATION="Release"
NONETWORK
=
no
SKIPLIBVLCCOMPILATION
=
no
TESTEDVLCKITHASH
=
ae8c1142
TESTEDVLCKITHASH
=
dd21c7cf
TESTEDMEDIALIBRARYKITHASH
=
ee79bd9d
usage
()
...
...
Write
Preview
Supports
Markdown
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