Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
6dda19c8
Commit
6dda19c8
authored
Oct 20, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/Framework: Very minor identation changes.
parent
702edfe8
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
154 additions
and
154 deletions
+154
-154
extras/MacOSX/Framework/Headers/Public/VLCMediaLibrary.h
extras/MacOSX/Framework/Headers/Public/VLCMediaLibrary.h
+2
-2
extras/MacOSX/Framework/Headers/Public/VLCMediaList.h
extras/MacOSX/Framework/Headers/Public/VLCMediaList.h
+3
-3
extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h
extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h
+2
-2
extras/MacOSX/Framework/Headers/Public/VLCVideoView.h
extras/MacOSX/Framework/Headers/Public/VLCVideoView.h
+3
-3
extras/MacOSX/Framework/Sources/VLCLibrary.m
extras/MacOSX/Framework/Sources/VLCLibrary.m
+8
-8
extras/MacOSX/Framework/Sources/VLCMedia.m
extras/MacOSX/Framework/Sources/VLCMedia.m
+22
-22
extras/MacOSX/Framework/Sources/VLCMediaLibrary.m
extras/MacOSX/Framework/Sources/VLCMediaLibrary.m
+1
-1
extras/MacOSX/Framework/Sources/VLCMediaList.m
extras/MacOSX/Framework/Sources/VLCMediaList.m
+27
-27
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
+86
-86
No files found.
extras/MacOSX/Framework/Headers/Public/VLCMediaLibrary.h
View file @
6dda19c8
...
...
@@ -29,8 +29,8 @@
@interface
VLCMediaLibrary
:
NSObject
{
void
*
mlib
;
VLCMediaList
*
allMedia
;
void
*
mlib
;
VLCMediaList
*
allMedia
;
}
+
(
id
)
sharedMediaLibrary
;
...
...
extras/MacOSX/Framework/Headers/Public/VLCMediaList.h
View file @
6dda19c8
...
...
@@ -25,8 +25,8 @@
#import "VLCMedia.h"
/* Notification Messages */
extern
NSString
*
VLCMediaListItemAdded
;
extern
NSString
*
VLCMediaListItemDeleted
;
extern
NSString
*
VLCMediaListItemAdded
;
extern
NSString
*
VLCMediaListItemDeleted
;
@class
VLCMedia
;
@class
VLCMediaList
;
...
...
@@ -59,7 +59,7 @@ extern NSString *VLCMediaListItemDeleted;
-
(
int
)
indexOfMedia
:(
VLCMedia
*
)
media
;
-
(
int
)
count
;
#if 0 /* Disabled until this get fixed in libvlc
#if 0 /* Disabled until this get fixed in libvlc
*/
- (NSArray *)sublists; //< A way to see the same media list. Only sub media list.
- (NSArray *)flatMediaView; //< A way to see the same media list. Only media.
- (VLCMedia *)providerMedia; //< If a media was at the origin of this media list, here it is.
...
...
extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h
View file @
6dda19c8
...
...
@@ -26,8 +26,8 @@
#import "VLCMedia.h"
/* Notification Messages */
extern
NSString
*
VLCMediaPlayerTimeChanged
;
extern
NSString
*
VLCMediaPlayerStateChanged
;
extern
NSString
*
VLCMediaPlayerTimeChanged
;
extern
NSString
*
VLCMediaPlayerStateChanged
;
// TODO: Documentation
typedef
enum
VLCMediaPlayerState
...
...
extras/MacOSX/Framework/Headers/Public/VLCVideoView.h
View file @
6dda19c8
...
...
@@ -25,8 +25,8 @@
#import <Cocoa/Cocoa.h>
/* Notifications */
extern
NSString
*
VLCVideoViewEnteredFullScreen
;
extern
NSString
*
VLCVideoViewLeftFullScreen
;
extern
NSString
*
VLCVideoViewEnteredFullScreen
;
extern
NSString
*
VLCVideoViewLeftFullScreen
;
@protocol
VLCVideoViewDelegate
// Notifications defined in VLCVideoView.h
...
...
@@ -49,7 +49,7 @@ extern NSString *VLCVideoViewLeftFullScreen;
@interface
VLCVideoView
:
NSView
<
VLCOpenGLVoutEmbedding
>
{
id
delegate
;
NSColor
*
backColor
;
NSColor
*
backColor
;
BOOL
stretchesVideo
;
// TODO: Allow for view to report transparency to do some cool effects
...
...
extras/MacOSX/Framework/Sources/VLCLibrary.m
View file @
6dda19c8
...
...
@@ -37,7 +37,7 @@ void __quit_on_exception( void * e, const char * function, const char * file, in
{
/* XXX: localization */
NSRunCriticalAlertPanel
(
@"Error"
,
[
NSString
stringWithFormat
:
@"libvlc has thrown us an error: %s (%s:%d %s)"
,
libvlc_exception_get_message
(
ex
),
file
,
line_number
,
function
],
@"Quit"
,
nil
,
nil
);
libvlc_exception_get_message
(
ex
),
file
,
line_number
,
function
],
@"Quit"
,
nil
,
nil
);
exit
(
ex
->
i_code
);
}
}
...
...
@@ -61,7 +61,7 @@ static void *DestroySharedLibraryAtExit()
[[
self
alloc
]
init
];
// Register a function to gracefully destroy the shared library on exit.
atexit
(
(
void
*
)
DestroySharedLibraryAtExit
);
atexit
(
(
void
*
)
DestroySharedLibraryAtExit
);
}
return
sharedLibrary
;
}
...
...
@@ -79,8 +79,8 @@ static void *DestroySharedLibraryAtExit()
libvlc_exception_init
(
&
ex
);
// Figure out the frameworks path
char
*
applicationPath
=
strdup
([[
NSString
stringWithFormat
:
@"%@/Versions/Current/VLC"
,
[[
NSBundle
bundleForClass
:[
VLCLibrary
class
]]
bundlePath
]]
UTF8String
]);
char
*
applicationPath
=
strdup
(
[[
NSString
stringWithFormat
:
@"%@/Versions/Current/VLC"
,
[[
NSBundle
bundleForClass
:[
VLCLibrary
class
]]
bundlePath
]]
UTF8String
]
);
// TODO: Raise error if there is no memory available
char
*
lib_vlc_params
[]
=
{
...
...
@@ -89,7 +89,7 @@ static void *DestroySharedLibraryAtExit()
"--no-video-title-show"
,
NULL
};
instance
=
(
void
*
)
libvlc_new
(
7
,
lib_vlc_params
,
&
ex
);
instance
=
(
void
*
)
libvlc_new
(
7
,
lib_vlc_params
,
&
ex
);
quit_on_exception
(
&
ex
);
if
(
!
sharedLibrary
)
...
...
@@ -99,7 +99,7 @@ static void *DestroySharedLibraryAtExit()
/*audio = */
[[
VLCAudio
alloc
]
initWithLibrary
:
self
];
// free allocated resources
free
(
applicationPath
);
free
(
applicationPath
);
}
return
self
;
}
...
...
@@ -114,9 +114,9 @@ static void *DestroySharedLibraryAtExit()
if
(
instance
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_exception_init
(
&
ex
);
libvlc_destroy
(
instance
,
&
ex
);
libvlc_destroy
(
instance
,
&
ex
);
}
}
@finally
...
...
extras/MacOSX/Framework/Sources/VLCMedia.m
View file @
6dda19c8
...
...
@@ -219,7 +219,7 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
[
subitems
release
];
[
metaDictionary
release
];
libvlc_media_descriptor_release
(
p_md
);
libvlc_media_descriptor_release
(
p_md
);
[
super
dealloc
];
}
...
...
@@ -257,7 +257,7 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
if
(
!
length
)
{
// Try figuring out what the length is
long
long
duration
=
libvlc_media_descriptor_get_duration
(
p_md
,
NULL
);
long
long
duration
=
libvlc_media_descriptor_get_duration
(
p_md
,
NULL
);
if
(
duration
>
-
1
)
{
[
self
setLength
:[
VLCTime
timeWithNumber
:[
NSNumber
numberWithLongLong
:
duration
]]];
...
...
@@ -278,7 +278,7 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
{
while
(
!
length
&&
!
[
self
isPreparsed
]
&&
[
aDate
timeIntervalSinceNow
]
>
0
)
{
usleep
(
THREAD_SLEEP
);
usleep
(
THREAD_SLEEP
);
}
// So we're done waiting, but sometimes we trap the fact that the parsing
...
...
@@ -294,7 +294,7 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
-
(
BOOL
)
isPreparsed
{
return
libvlc_media_descriptor_is_preparsed
(
p_md
,
NULL
);
return
libvlc_media_descriptor_is_preparsed
(
p_md
,
NULL
);
}
-
(
NSDictionary
*
)
metaDictionary
...
...
@@ -320,10 +320,10 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
VLCMedia
*
media
=
(
VLCMedia
*
)
libvlc_media_descriptor_get_user_data
(
md
,
&
ex
);
if
(
!
media
||
libvlc_exception_raised
(
&
ex
))
VLCMedia
*
media
=
(
VLCMedia
*
)
libvlc_media_descriptor_get_user_data
(
md
,
&
ex
);
if
(
!
media
||
libvlc_exception_raised
(
&
ex
))
{
libvlc_exception_clear
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
return
[[[
VLCMedia
alloc
]
initWithLibVLCMediaDescriptor
:
md
]
autorelease
];
}
else
...
...
@@ -344,18 +344,18 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
{
return
[
self
retain
];
}
libvlc_exception_clear
(
&
ex
);
// Just in case an exception was raised, lets release it
libvlc_exception_clear
(
&
ex
);
// Just in case an exception was raised, lets release it
if
(
self
=
[
super
init
])
{
char
*
p_url
;
p_url
=
libvlc_media_descriptor_get_mrl
(
md
,
&
ex
);
p_url
=
libvlc_media_descriptor_get_mrl
(
md
,
&
ex
);
quit_on_exception
(
&
ex
);
url
=
[
NSString
stringWithCString
:
p_url
];
libvlc_media_descriptor_retain
(
md
);
libvlc_media_descriptor_retain
(
md
);
p_md
=
md
;
[
self
initInternalMediaDescriptor
];
...
...
@@ -419,27 +419,27 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
-
(
void
)
initInternalMediaDescriptor
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_media_descriptor_set_user_data
(
p_md
,
(
void
*
)
self
,
&
ex
);
quit_on_exception
(
&
ex
);
libvlc_exception_init
(
&
ex
);
libvlc_media_descriptor_set_user_data
(
p_md
,
(
void
*
)
self
,
&
ex
);
quit_on_exception
(
&
ex
);
// TODO: Should these events be caught by VLCMediaList's notification hooks?
libvlc_event_manager_t
*
p_em
=
libvlc_media_descriptor_event_manager
(
p_md
,
&
ex
);
libvlc_event_manager_t
*
p_em
=
libvlc_media_descriptor_event_manager
(
p_md
,
&
ex
);
// libvlc_event_attach(p_em, libvlc_MediaDescriptorSubItemAdded, HandleMediaSubItemAdded, self, &ex);
// libvlc_event_attach(p_em, libvlc_MediaDescriptorSubItemRemoved, HandleMediaSubItemRemoved, self, &ex);
// libvlc_event_attach(p_em, libvlc_MediaDescriptorMetaChanged, HandleMediaMetaChanged, self, &ex);
// libvlc_event_attach(p_em, libvlc_MediaDescriptorDurationChanged, HandleMediaDurationChanged, self, &ex);
quit_on_exception
(
&
ex
);
quit_on_exception
(
&
ex
);
libvlc_media_list_t
*
p_mlist
=
libvlc_media_descriptor_subitems
(
p_md
,
NULL
);
libvlc_media_list_t
*
p_mlist
=
libvlc_media_descriptor_subitems
(
p_md
,
NULL
);
if
(
!
p_mlist
)
subitems
=
nil
;
else
{
[
subitems
release
];
subitems
=
[[
VLCMediaList
medialistWithLibVLCMediaList
:
p_mlist
]
retain
];
libvlc_media_list_release
(
p_mlist
);
libvlc_media_list_release
(
p_mlist
);
}
[
self
fetchMetaInformation
];
}
...
...
@@ -471,7 +471,7 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
}
result
=
YES
;
}
free
(
value
);
free
(
value
);
return
result
;
}
...
...
@@ -480,9 +480,9 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
// TODO: Only fetch meta data that has been requested. Just don't fetch
// it, just because.
[
self
setMetaValue
:
libvlc_media_descriptor_get_meta
(
p_md
,
libvlc_meta_Title
,
NULL
)
forKey
:[
VLCMedia
metaTypeToString
:
libvlc_meta_Title
]];
[
self
setMetaValue
:
libvlc_media_descriptor_get_meta
(
p_md
,
libvlc_meta_Artist
,
NULL
)
forKey
:[
VLCMedia
metaTypeToString
:
libvlc_meta_Artist
]];
[
self
setMetaValue
:
libvlc_media_descriptor_get_meta
(
p_md
,
libvlc_meta_ArtworkURL
,
NULL
)
forKey
:[
VLCMedia
metaTypeToString
:
libvlc_meta_ArtworkURL
]];
[
self
setMetaValue
:
libvlc_media_descriptor_get_meta
(
p_md
,
libvlc_meta_Title
,
NULL
)
forKey
:[
VLCMedia
metaTypeToString
:
libvlc_meta_Title
]];
[
self
setMetaValue
:
libvlc_media_descriptor_get_meta
(
p_md
,
libvlc_meta_Artist
,
NULL
)
forKey
:[
VLCMedia
metaTypeToString
:
libvlc_meta_Artist
]];
[
self
setMetaValue
:
libvlc_media_descriptor_get_meta
(
p_md
,
libvlc_meta_ArtworkURL
,
NULL
)
forKey
:[
VLCMedia
metaTypeToString
:
libvlc_meta_ArtworkURL
]];
}
-
(
void
)
fetchMetaInformationForArtWorkWithURL
:(
NSString
*
)
anURL
...
...
extras/MacOSX/Framework/Sources/VLCMediaLibrary.m
View file @
6dda19c8
...
...
@@ -84,7 +84,7 @@ static VLCMediaLibrary * sharedMediaLibrary = nil;
{
libvlc_media_list_t
*
p_mlist
=
libvlc_media_library_media_list
(
mlib
,
NULL
);
VLCMediaList
*
medialist
=
[
VLCMediaList
medialistWithLibVLCMediaList
:
p_mlist
];
libvlc_media_list_release
(
p_mlist
);
libvlc_media_list_release
(
p_mlist
);
NSArray
*
ret
=
[
medialist
sublists
];
return
ret
;
...
...
extras/MacOSX/Framework/Sources/VLCMediaList.m
View file @
6dda19c8
...
...
@@ -124,12 +124,12 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
-
(
void
)
lock
{
libvlc_media_list_lock
(
p_mlist
);
libvlc_media_list_lock
(
p_mlist
);
}
-
(
void
)
unlock
{
libvlc_media_list_unlock
(
p_mlist
);
libvlc_media_list_unlock
(
p_mlist
);
}
-
(
int
)
addMedia
:(
VLCMedia
*
)
media
...
...
@@ -146,8 +146,8 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
// Add it to the libvlc's medialist
libvlc_exception_t
p_e
;
libvlc_exception_init
(
&
p_e
);
libvlc_media_list_insert_media_descriptor
(
p_mlist
,
[
media
libVLCMediaDescriptor
],
index
,
&
p_e
);
quit_on_exception
(
&
p_e
);
libvlc_media_list_insert_media_descriptor
(
p_mlist
,
[
media
libVLCMediaDescriptor
],
index
,
&
p_e
);
quit_on_exception
(
&
p_e
);
}
-
(
void
)
removeMediaAtIndex
:(
int
)
index
...
...
@@ -156,17 +156,17 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
// Remove it from the libvlc's medialist
libvlc_exception_t
p_e
;
libvlc_exception_init
(
&
p_e
);
libvlc_media_list_remove_index
(
p_mlist
,
index
,
&
p_e
);
quit_on_exception
(
&
p_e
);
libvlc_exception_init
(
&
p_e
);
libvlc_media_list_remove_index
(
p_mlist
,
index
,
&
p_e
);
quit_on_exception
(
&
p_e
);
}
-
(
VLCMedia
*
)
mediaAtIndex
:(
int
)
index
{
libvlc_exception_t
p_e
;
libvlc_exception_init
(
&
p_e
);
libvlc_media_descriptor_t
*
p_md
=
libvlc_media_list_item_at_index
(
p_mlist
,
index
,
&
p_e
);
quit_on_exception
(
&
p_e
);
libvlc_exception_init
(
&
p_e
);
libvlc_media_descriptor_t
*
p_md
=
libvlc_media_list_item_at_index
(
p_mlist
,
index
,
&
p_e
);
quit_on_exception
(
&
p_e
);
// Returns local object for media descriptor, searchs for user data first. If not found it creates a
// new cocoa object representation of the media descriptor.
...
...
@@ -176,9 +176,9 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
-
(
int
)
count
{
libvlc_exception_t
p_e
;
libvlc_exception_init
(
&
p_e
);
int
result
=
libvlc_media_list_count
(
p_mlist
,
&
p_e
);
quit_on_exception
(
&
p_e
);
libvlc_exception_init
(
&
p_e
);
int
result
=
libvlc_media_list_count
(
p_mlist
,
&
p_e
);
quit_on_exception
(
&
p_e
);
return
result
;
}
...
...
@@ -186,9 +186,9 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
-
(
int
)
indexOfMedia
:(
VLCMedia
*
)
media
{
libvlc_exception_t
p_e
;
libvlc_exception_init
(
&
p_e
);
int
result
=
libvlc_media_list_index_of_item
(
p_mlist
,
[
media
libVLCMediaDescriptor
],
&
p_e
);
quit_on_exception
(
&
p_e
);
libvlc_exception_init
(
&
p_e
);
int
result
=
libvlc_media_list_index_of_item
(
p_mlist
,
[
media
libVLCMediaDescriptor
],
&
p_e
);
quit_on_exception
(
&
p_e
);
return
result
;
}
...
...
@@ -199,22 +199,22 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
int
i
,
count
;
libvlc_exception_t
p_e
;
libvlc_exception_init
(
&
p_e
);
count
=
libvlc_media_list_count
(
p_mlist
,
&
p_e
);
quit_on_exception
(
&
p_e
);
libvlc_exception_init
(
&
p_e
);
count
=
libvlc_media_list_count
(
p_mlist
,
&
p_e
);
quit_on_exception
(
&
p_e
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
libvlc_media_descriptor_t
*
p_md
;
libvlc_media_list_t
*
p_submlist
;
p_md
=
libvlc_media_list_item_at_index
(
p_mlist
,
i
,
NULL
);
p_submlist
=
libvlc_media_descriptor_subitems
(
p_md
,
NULL
);
if
(
p_submlist
)
p_md
=
libvlc_media_list_item_at_index
(
p_mlist
,
i
,
NULL
);
p_submlist
=
libvlc_media_descriptor_subitems
(
p_md
,
NULL
);
if
(
p_submlist
)
{
[
ret
addObject
:[
VLCMediaList
medialistWithLibVLCMediaList
:
p_submlist
]];
libvlc_media_list_release
(
p_submlist
);
libvlc_media_list_release
(
p_submlist
);
}
libvlc_media_descriptor_release
(
p_md
);
libvlc_media_descriptor_release
(
p_md
);
}
return
[
ret
autorelease
];
}
...
...
@@ -275,9 +275,9 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
libvlc_exception_t
p_e
;
libvlc_exception_init
(
&
p_e
);
libvlc_event_manager_t
*
p_em
=
libvlc_media_list_event_manager
(
p_mlist
,
&
p_e
);
libvlc_event_attach
(
p_em
,
libvlc_MediaListItemAdded
,
HandleMediaListItemAdded
,
self
,
&
p_e
);
libvlc_event_attach
(
p_em
,
libvlc_MediaListItemDeleted
,
HandleMediaListItemDeleted
,
self
,
&
p_e
);
libvlc_event_manager_t
*
p_em
=
libvlc_media_list_event_manager
(
p_mlist
,
&
p_e
);
libvlc_event_attach
(
p_em
,
libvlc_MediaListItemAdded
,
HandleMediaListItemAdded
,
self
,
&
p_e
);
libvlc_event_attach
(
p_em
,
libvlc_MediaListItemDeleted
,
HandleMediaListItemDeleted
,
self
,
&
p_e
);
[
self
unlock
];
quit_on_exception
(
&
p_e
);
...
...
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
View file @
6dda19c8
This diff is collapsed.
Click to expand it.
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