Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
55f19bbc
Commit
55f19bbc
authored
Dec 21, 2009
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
osx/framework: added methods to access end-user-compliant names of subtitles, audio tracks, etc.
parent
3154a8b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
11 deletions
+68
-11
projects/macosx/framework/Headers/Public/VLCMediaPlayer.h
projects/macosx/framework/Headers/Public/VLCMediaPlayer.h
+5
-1
projects/macosx/framework/Sources/VLCMediaPlayer.m
projects/macosx/framework/Sources/VLCMediaPlayer.m
+63
-10
No files found.
projects/macosx/framework/Headers/Public/VLCMediaPlayer.h
View file @
55f19bbc
...
...
@@ -107,8 +107,9 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
-
(
char
*
)
videoAspectRatio
;
-
(
void
)
setVideoSubTitles
:(
int
)
value
;
-
(
int
)
countOfVideoSubTitles
;
-
(
int
)
currentVideoSubTitles
;
-
(
BOOL
)
openVideoSubTitlesFromFile
:(
NSString
*
)
path
;
-
(
int
)
currentVideoSubTitles
;
-
(
NSArray
*
)
videoSubTitles
;
-
(
void
)
setVideoCropGeometry
:(
char
*
)
value
;
-
(
char
*
)
videoCropGeometry
;
...
...
@@ -163,15 +164,18 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
-
(
void
)
setChapter
:(
int
)
value
;
-
(
int
)
currentChapter
;
-
(
int
)
countOfChapters
;
-
(
NSArray
*
)
chaptersForTitle
:(
int
)
title
;
-
(
void
)
setCurrentTitle
:(
int
)
value
;
-
(
int
)
currentTitle
;
-
(
int
)
countOfTitles
;
-
(
NSArray
*
)
titles
;
/* Audio Options */
-
(
void
)
setAudioTrack
:(
int
)
value
;
-
(
int
)
currentAudioTrack
;
-
(
int
)
countOfAudioTracks
;
-
(
NSArray
*
)
audioTracks
;
-
(
void
)
setAudioChannel
:(
int
)
value
;
-
(
int
)
audioChannel
;
...
...
projects/macosx/framework/Sources/VLCMediaPlayer.m
View file @
55f19bbc
...
...
@@ -297,16 +297,8 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
int
result
=
libvlc_video_get_spu
(
instance
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
))
{
libvlc_exception_clear
(
&
ex
);
return
-
1
;
}
else
{
libvlc_exception_clear
(
&
ex
);
return
result
;
}
catch_exception
(
&
ex
);
return
result
;
}
-
(
BOOL
)
openVideoSubTitlesFromFile
:(
NSString
*
)
path
...
...
@@ -318,6 +310,21 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
return
result
;
}
-
(
NSArray
*
)
videoSubTitles
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_track_description_t
*
tracks
=
libvlc_video_get_spu_description
(
instance
,
&
ex
);
NSMutableArray
*
tempArray
=
[
NSMutableArray
array
];
NSInteger
i
;
for
(
i
=
0
;
i
<
[
self
countOfVideoSubTitles
]
;
i
++
)
{
[
tempArray
addObject
:[
NSString
stringWithUTF8String
:
tracks
->
psz_name
]];
tracks
=
tracks
->
p_next
;
}
return
[
NSArray
arrayWithArray
:
tempArray
];
}
-
(
void
)
setVideoCropGeometry
:(
char
*
)
value
{
libvlc_exception_t
ex
;
...
...
@@ -493,6 +500,21 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
catch_exception
(
&
ex
);
}
-
(
NSArray
*
)
chaptersForTitle
:(
int
)
title
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_track_description_t
*
tracks
=
libvlc_video_get_chapter_description
(
instance
,
title
,
&
ex
);
NSMutableArray
*
tempArray
=
[
NSMutableArray
array
];
NSInteger
i
;
for
(
i
=
0
;
i
<
[
self
countOfChapters
]
;
i
++
)
{
[
tempArray
addObject
:[
NSString
stringWithUTF8String
:
tracks
->
psz_name
]];
tracks
=
tracks
->
p_next
;
}
return
[
NSArray
arrayWithArray
:
tempArray
];
}
-
(
void
)
setCurrentTitle
:(
int
)
value
{
libvlc_exception_t
ex
;
...
...
@@ -519,6 +541,21 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
return
result
;
}
-
(
NSArray
*
)
titles
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_track_description_t
*
tracks
=
libvlc_video_get_title_description
(
instance
,
&
ex
);
NSMutableArray
*
tempArray
=
[
NSMutableArray
array
];
NSInteger
i
;
for
(
i
=
0
;
i
<
[
self
countOfTitles
]
;
i
++
)
{
[
tempArray
addObject
:[
NSString
stringWithUTF8String
:
tracks
->
psz_name
]];
tracks
=
tracks
->
p_next
;
}
return
[
NSArray
arrayWithArray
:
tempArray
];
}
-
(
void
)
setAudioTrack
:(
int
)
value
{
libvlc_exception_t
ex
;
...
...
@@ -545,6 +582,22 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
return
result
;
}
-
(
NSArray
*
)
audioTracks
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_track_description_t
*
tracks
=
libvlc_audio_get_track_description
(
instance
,
&
ex
);
NSMutableArray
*
tempArray
=
[
NSMutableArray
array
];
NSInteger
i
;
for
(
i
=
0
;
i
<
[
self
countOfAudioTracks
]
;
i
++
)
{
[
tempArray
addObject
:[
NSString
stringWithUTF8String
:
tracks
->
psz_name
]];
tracks
=
tracks
->
p_next
;
}
return
[
NSArray
arrayWithArray
:
tempArray
];
}
-
(
void
)
setAudioChannel
:(
int
)
value
{
libvlc_exception_t
ex
;
...
...
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