Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
4a192254
Commit
4a192254
authored
Feb 16, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/framework: Only fetch meta when needed.
parent
c6f9a67d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
projects/macosx/framework/Headers/Public/VLCMedia.h
projects/macosx/framework/Headers/Public/VLCMedia.h
+1
-1
projects/macosx/framework/Sources/VLCMedia.m
projects/macosx/framework/Sources/VLCMedia.m
+13
-3
No files found.
projects/macosx/framework/Headers/Public/VLCMedia.h
View file @
4a192254
...
@@ -113,7 +113,7 @@ typedef enum VLCMediaState
...
@@ -113,7 +113,7 @@ typedef enum VLCMediaState
VLCTime
*
length
;
//< Duration of the media
VLCTime
*
length
;
//< Duration of the media
NSMutableDictionary
*
metaDictionary
;
//< Meta data storage
NSMutableDictionary
*
metaDictionary
;
//< Meta data storage
id
delegate
;
//< Delegate object
id
delegate
;
//< Delegate object
BOOL
preparsed
;
//< Value used to determine of the file
has been preparsed
BOOL
artFetched
;
//< Value used to determine of the artwork
has been preparsed
VLCMediaState
state
;
VLCMediaState
state
;
}
}
...
...
projects/macosx/framework/Sources/VLCMedia.m
View file @
4a192254
...
@@ -430,6 +430,8 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
...
@@ -430,6 +430,8 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
libvlc_exception_t
ex
;
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_exception_init
(
&
ex
);
artFetched
=
NO
;
char
*
p_url
=
libvlc_media_descriptor_get_mrl
(
p_md
,
&
ex
);
char
*
p_url
=
libvlc_media_descriptor_get_mrl
(
p_md
,
&
ex
);
catch_exception
(
&
ex
);
catch_exception
(
&
ex
);
...
@@ -463,9 +465,6 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
...
@@ -463,9 +465,6 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
/* Force VLCMetaInformationTitle, that will trigger preparsing
/* Force VLCMetaInformationTitle, that will trigger preparsing
* And all the other meta will be added through the libvlc event system */
* And all the other meta will be added through the libvlc event system */
[
self
fetchMetaInformationFromLibVLCWithType
:
VLCMetaInformationTitle
];
[
self
fetchMetaInformationFromLibVLCWithType
:
VLCMetaInformationTitle
];
/* Force VLCMetaInformationArtworkURL, that will trigger artwork fetching */
[
self
fetchMetaInformationFromLibVLCWithType
:
VLCMetaInformationArtworkURL
];
}
}
-
(
void
)
fetchMetaInformationFromLibVLCWithType
:(
NSString
*
)
metaType
-
(
void
)
fetchMetaInformationFromLibVLCWithType
:(
NSString
*
)
metaType
...
@@ -545,6 +544,17 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
...
@@ -545,6 +544,17 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
{
{
[
self
setState
:
[
newStateAsNumber
intValue
]];
[
self
setState
:
[
newStateAsNumber
intValue
]];
}
}
-
(
id
)
valueForKeyPath
:(
NSString
*
)
keyPath
{
if
(
!
[
metaDictionary
objectForKey
:
@"artwork"
]
&&
[
keyPath
isEqualToString
:
@"metaDictionary.artwork"
])
{
artFetched
=
YES
;
/* Force the retrieval of the artwork now that someone asked for it */
[
self
fetchMetaInformationFromLibVLCWithType
:
VLCMetaInformationArtworkURL
];
}
return
[
super
valueForKeyPath
:
keyPath
];
}
@end
@end
/******************************************************************************
/******************************************************************************
...
...
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