Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
12a4698c
Commit
12a4698c
authored
Jan 06, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/Framework/VLCMedia: make the url property an NSURL.
parent
e3bc1e0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
extras/MacOSX/Framework/Headers/Public/VLCMedia.h
extras/MacOSX/Framework/Headers/Public/VLCMedia.h
+2
-2
extras/MacOSX/Framework/Sources/VLCMedia.m
extras/MacOSX/Framework/Sources/VLCMedia.m
+12
-13
No files found.
extras/MacOSX/Framework/Headers/Public/VLCMedia.h
View file @
12a4698c
...
...
@@ -108,7 +108,7 @@ typedef enum VLCMediaState
@interface
VLCMedia
:
NSObject
{
void
*
p_md
;
//< Internal media descriptor instance
NS
String
*
url
;
//< URL for this media resource
NS
URL
*
url
;
//< URL for this media resource
VLCMediaList
*
subitems
;
//< Sub list of items
VLCTime
*
length
;
//< Duration of the media
NSMutableDictionary
*
metaDictionary
;
//< Meta data storage
...
...
@@ -209,7 +209,7 @@ typedef enum VLCMediaState
/**
* The URL for the receiver's media resource.
*/
@property
(
readonly
)
NS
String
*
url
;
@property
(
readonly
)
NS
URL
*
url
;
/**
* The receiver's sub list.
...
...
extras/MacOSX/Framework/Sources/VLCMedia.m
View file @
12a4698c
...
...
@@ -175,7 +175,6 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
&
ex
);
catch_exception
(
&
ex
);
url
=
[
aPath
copy
];
delegate
=
nil
;
metaDictionary
=
[[
NSMutableDictionary
alloc
]
initWithCapacity
:
3
];
...
...
@@ -199,8 +198,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
[
aName
UTF8String
],
&
ex
);
catch_exception
(
&
ex
);
url
=
[
aName
copy
];
delegate
=
nil
;
metaDictionary
=
[[
NSMutableDictionary
alloc
]
initWithCapacity
:
3
];
...
...
@@ -251,7 +249,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
-
(
NSString
*
)
description
{
NSString
*
result
=
[
metaDictionary
objectForKey
:
VLCMetaInformationTitle
];
return
[
NSString
stringWithFormat
:
@"<%@ %p> %@"
,
[
self
className
],
self
,
(
result
?
result
:
url
)];
return
[
NSString
stringWithFormat
:
@"<%@ %p> %@"
,
[
self
className
],
self
,
(
result
?
result
:
[
url
absoluteString
]
)];
}
-
(
NSComparisonResult
)
compare
:(
VLCMedia
*
)
media
...
...
@@ -261,7 +259,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
else
if
(
!
media
)
return
NSOrderedDescending
;
else
return
[[
self
url
]
compare
:[
media
url
]];
return
[[
[
self
url
]
absoluteString
]
compare
:[[
media
url
]
absoluteString
]];
}
@synthesize
delegate
;
...
...
@@ -329,14 +327,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
char
*
p_url
;
p_url
=
libvlc_media_descriptor_get_mrl
(
md
,
&
ex
);
catch_exception
(
&
ex
);
url
=
[[
NSString
stringWithUTF8String
:
p_url
]
retain
];
free
(
p_url
);
libvlc_media_descriptor_retain
(
md
);
p_md
=
md
;
...
...
@@ -417,6 +408,14 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
char
*
p_url
=
libvlc_media_descriptor_get_mrl
(
p_md
,
&
ex
);
catch_exception
(
&
ex
);
url
=
[[
NSURL
URLWithString
:[
NSString
stringWithUTF8String
:
p_url
]]
retain
];
if
(
!
url
)
/* Attempt to interpret as a file path then */
url
=
[[
NSURL
fileURLWithPath
:[
NSString
stringWithUTF8String
:
p_url
]]
retain
];
free
(
p_url
);
libvlc_media_descriptor_set_user_data
(
p_md
,
(
void
*
)
self
,
&
ex
);
catch_exception
(
&
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