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
933b9ff9
Commit
933b9ff9
authored
Nov 23, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/Framework: Re-enable VLCMediaDiscoverer.
parent
d006608b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
40 deletions
+54
-40
extras/MacOSX/Framework/Headers/Public/VLC.h
extras/MacOSX/Framework/Headers/Public/VLC.h
+1
-0
extras/MacOSX/Framework/Headers/Public/VLCMediaDiscoverer.h
extras/MacOSX/Framework/Headers/Public/VLCMediaDiscoverer.h
+5
-4
extras/MacOSX/Framework/Sources/VLCMediaDiscoverer.m
extras/MacOSX/Framework/Sources/VLCMediaDiscoverer.m
+28
-30
extras/MacOSX/Framework/VLC.xcodeproj/project.pbxproj
extras/MacOSX/Framework/VLC.xcodeproj/project.pbxproj
+8
-0
extras/MacOSX/VLC_app/VLC.xcodeproj/project.pbxproj
extras/MacOSX/VLC_app/VLC.xcodeproj/project.pbxproj
+11
-5
extras/MacOSX/VLC_app/VLCController.m
extras/MacOSX/VLC_app/VLCController.m
+1
-1
No files found.
extras/MacOSX/Framework/Headers/Public/VLC.h
View file @
933b9ff9
...
...
@@ -29,6 +29,7 @@
#import <VLC/VLCMediaLibrary.h>
#import <VLC/VLCMediaList.h>
#import <VLC/VLCMediaListAspect.h>
#import <VLC/VLCMediaDiscoverer.h>
#import <VLC/VLCTime.h>
#import <VLC/VLCVideoView.h>
...
...
extras/MacOSX/Framework/Headers/Public/VLCMediaDiscoverer.h
View file @
933b9ff9
...
...
@@ -23,20 +23,21 @@
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <VLC/VLC
Playl
ist.h>
#import <VLC/VLC
MediaL
ist.h>
@class
VLC
Playl
ist
;
@class
VLC
MediaL
ist
;
@interface
VLCMediaDiscoverer
:
NSObject
{
NSString
*
localizedName
;
VLC
Playlist
*
playlist
;
VLC
MediaList
*
discoveredMedia
;
void
*
mdis
;
}
+
(
NSArray
*
)
availableMediaDiscoverer
;
-
(
id
)
initWithName
:(
NSString
*
)
aServiceName
;
-
(
VLC
Playlist
*
)
playlist
;
-
(
VLC
MediaList
*
)
discoveredMedia
;
-
(
NSString
*
)
localizedName
;
@end
extras/MacOSX/Framework/Sources/VLCMediaDiscoverer.m
View file @
933b9ff9
...
...
@@ -23,13 +23,27 @@
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import
<VLC/VLCMediaDiscoverer.h>
#import
"VLCMediaDiscoverer.h"
#import "VLCLibrary.h"
#import "VLCLibVLCBridging.h"
#include <vlc/libvlc.h>
static
NSArray
*
availableMediaDiscoverer
=
nil
;
@implementation
VLCMediaDiscoverer
+
(
NSArray
*
)
availableMediaDiscoverer
{
if
(
!
availableMediaDiscoverer
)
{
availableMediaDiscoverer
=
[[
NSArray
arrayWithObjects
:
[[[
VLCMediaDiscoverer
alloc
]
initWithName
:
@"sap"
]
autorelease
],
[[[
VLCMediaDiscoverer
alloc
]
initWithName
:
@"shoutcast"
]
autorelease
],
[[[
VLCMediaDiscoverer
alloc
]
initWithName
:
@"shoutcasttv"
]
autorelease
],
nil
]
retain
];
}
return
availableMediaDiscoverer
;
}
-
(
id
)
initWithName
:(
NSString
*
)
aServiceName
{
if
(
self
=
[
super
init
])
...
...
@@ -37,7 +51,7 @@
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
localizedName
=
nil
;
playlist
=
nil
;
discoveredMedia
=
nil
;
mdis
=
libvlc_media_discoverer_new_from_name
(
[
VLCLibrary
sharedInstance
],
[
aServiceName
cString
],
&
ex
);
...
...
@@ -50,40 +64,31 @@
{
if
(
localizedName
)
[
localizedName
release
];
if
(
playlist
)
[
playlist
release
];
if
(
discoveredMedia
)
[
discoveredMedia
release
];
libvlc_media_discoverer_release
(
mdis
);
[
super
dealloc
];
}
-
(
VLC
Playlist
*
)
playlist
-
(
VLC
MediaList
*
)
discoveredMedia
{
if
(
playlist
)
return
playlist
;
if
(
discoveredMedia
)
return
discoveredMedia
;
libvlc_media_list_t
*
p_mlist
=
libvlc_media_discoverer_media_list
(
mdis
);
VLC
Playlist
*
ret
=
[
VLCPlaylist
playl
istWithLibVLCMediaList
:
p_mlist
];
VLC
MediaList
*
ret
=
[
VLCMediaList
mediaL
istWithLibVLCMediaList
:
p_mlist
];
libvlc_media_list_release
(
p_mlist
);
/* Hack until this gets done properly upstream */
char
*
name
=
libvlc_media_discoverer_localized_name
(
mdis
);
if
(
!
name
)
{
VLCMedia
*
media
=
[
ret
mediaAtIndex
:
0
];
ret
=
media
?
(
VLCPlaylist
*
)[
media
subitems
]
:
nil
;
}
free
(
name
);
if
(
ret
)
{
playlist
=
[
ret
retain
];
discoveredMedia
=
[
ret
retain
];
}
return
ret
;
return
discoveredMedia
;
}
-
(
NSString
*
)
localizedName
{
NSString
*
ret
=
nil
;
NSString
*
aString
=
nil
;
char
*
name
=
libvlc_media_discoverer_localized_name
(
mdis
);
if
(
localizedName
)
...
...
@@ -91,19 +96,12 @@
if
(
name
)
{
ret
=
[
NSString
stringWithCString
:
name
encoding
:
NSUTF8StringEncoding
];
aString
=
[
NSString
stringWithCString
:
name
encoding
:
NSUTF8StringEncoding
];
free
(
name
);
}
/* XXX: Hack until this gets done properly upstream. This is really slow. */
if
(
!
ret
)
{
libvlc_media_list_t
*
p_mlist
=
libvlc_media_discoverer_media_list
(
mdis
);
ret
=
[[[[
VLCPlaylist
playlistWithLibVLCMediaList
:
p_mlist
]
mediaAtIndex
:
0
]
metaInformation
]
objectForKey
:
VLCMetaInformationTitle
];
libvlc_media_list_release
(
p_mlist
);
}
if
(
ret
)
if
(
aString
)
{
localizedName
=
[
ret
retain
];
localizedName
=
[
aString
retain
];
}
return
localizedName
;
}
...
...
extras/MacOSX/Framework/VLC.xcodeproj/project.pbxproj
View file @
933b9ff9
...
...
@@ -9,6 +9,8 @@
/* Begin PBXBuildFile section */
6303C43A0CF45CAE0000ECC8
/* VLCMediaListAspect.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
6303C4390CF45CAE0000ECC8
/* VLCMediaListAspect.m */
;
};
6303C43C0CF45CC30000ECC8
/* VLCMediaListAspect.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
6303C43B0CF45CC30000ECC8
/* VLCMediaListAspect.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
637D5ABD0CF6F2650073EA45
/* VLCMediaDiscoverer.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
637D5ABC0CF6F2650073EA45
/* VLCMediaDiscoverer.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
637D5ADC0CF6F2720073EA45
/* VLCMediaDiscoverer.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
637D5ADB0CF6F2720073EA45
/* VLCMediaDiscoverer.m */
;
};
8DC2EF570486A6940098B216
/* Cocoa.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1058C7B1FEA5585E11CA2CBB
/* Cocoa.framework */
;
};
EF7311900CB5797B009473B4
/* VLCAudio.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
EF73118E0CB5797B009473B4
/* VLCAudio.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
EF7311910CB5797B009473B4
/* VLCAudio.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
EF73118F0CB5797B009473B4
/* VLCAudio.m */
;
};
...
...
@@ -40,6 +42,8 @@
63030CC70CCA652C0088ECD1
/* Info.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
30
;
lastKnownFileType
=
text.xml
;
name
=
Info.plist
;
path
=
Resources/Info.plist
;
sourceTree
=
"<group>"
;
};
6303C4390CF45CAE0000ECC8
/* VLCMediaListAspect.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
VLCMediaListAspect.m
;
sourceTree
=
"<group>"
;
};
6303C43B0CF45CC30000ECC8
/* VLCMediaListAspect.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
VLCMediaListAspect.h
;
path
=
Public/VLCMediaListAspect.h
;
sourceTree
=
"<group>"
;
};
637D5ABC0CF6F2650073EA45
/* VLCMediaDiscoverer.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
30
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
VLCMediaDiscoverer.h
;
path
=
Public/VLCMediaDiscoverer.h
;
sourceTree
=
"<group>"
;
};
637D5ADB0CF6F2720073EA45
/* VLCMediaDiscoverer.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
30
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
VLCMediaDiscoverer.m
;
sourceTree
=
"<group>"
;
};
8DC2EF5B0486A6940098B216
/* VLC.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
includeInIndex
=
0
;
path
=
VLC.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
D2F7E79907B2D74100F64583
/* CoreData.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
CoreData.framework
;
path
=
/System/Library/Frameworks/CoreData.framework
;
sourceTree
=
"<absolute>"
;
};
EF73118E0CB5797B009473B4
/* VLCAudio.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
VLCAudio.h
;
path
=
Public/VLCAudio.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -125,6 +129,7 @@
EF78BD3C0CAEEFF600354E6E
/* VLCEventManager.m */
,
EF78BD3D0CAEEFF600354E6E
/* VLCLibrary.m */
,
EF78BD3E0CAEEFF600354E6E
/* VLCMedia.m */
,
637D5ADB0CF6F2720073EA45
/* VLCMediaDiscoverer.m */
,
EF78BD410CAEEFF600354E6E
/* VLCMediaList.m */
,
6303C4390CF45CAE0000ECC8
/* VLCMediaListAspect.m */
,
EF8BB8CF0CAFA8D80038A613
/* VLCMediaPlayer.m */
,
...
...
@@ -177,6 +182,7 @@
EF78BD0D0CAEEEC300354E6E
/* VLCEventManager.h */
,
EF78BD0E0CAEEEC300354E6E
/* VLCLibrary.h */
,
EF78BD130CAEEEE700354E6E
/* VLCMedia.h */
,
637D5ABC0CF6F2650073EA45
/* VLCMediaDiscoverer.h */
,
EF78BD160CAEEEE700354E6E
/* VLCMediaList.h */
,
6303C43B0CF45CC30000ECC8
/* VLCMediaListAspect.h */
,
EF8BB8CE0CAFA8D80038A613
/* VLCMediaPlayer.h */
,
...
...
@@ -207,6 +213,7 @@
EF7311900CB5797B009473B4
/* VLCAudio.h in Headers */
,
EFD551DD0CC6DD720074CEE1
/* VLCLibVLCBridging.h in Headers */
,
6303C43C0CF45CC30000ECC8
/* VLCMediaListAspect.h in Headers */
,
637D5ABD0CF6F2650073EA45
/* VLCMediaDiscoverer.h in Headers */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -293,6 +300,7 @@
EF8BB8D10CAFA8D80038A613
/* VLCMediaPlayer.m in Sources */
,
EF7311910CB5797B009473B4
/* VLCAudio.m in Sources */
,
6303C43A0CF45CAE0000ECC8
/* VLCMediaListAspect.m in Sources */
,
637D5ADC0CF6F2720073EA45
/* VLCMediaDiscoverer.m in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
extras/MacOSX/VLC_app/VLC.xcodeproj/project.pbxproj
View file @
933b9ff9
...
...
@@ -3,12 +3,12 @@
archiveVersion
=
1
;
classes
=
{
};
objectVersion
=
4
4
;
objectVersion
=
4
2
;
objects
=
{
/* Begin PBXBuildFile section */
630FBE2D0CF0B3940072CB10
/* VLC.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
630FBE2C0CF0B3930072CB10
/* VLC.framework */
;
};
630FBE3C0CF0B3D80072CB10
/* VLC.framework in CopyFiles */
=
{
isa
=
PBXBuildFile
;
fileRef
=
630FBE2C0CF0B3930072CB10
/* VLC.framework */
;
};
637D59B60CF5A5F90073EA45
/* VLC.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
630FBE2C0CF0B3930072CB10
/* VLC.framework */
;
};
63C5518D0C7F663500B202D3
/* VLCController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
63C5518B0C7F663500B202D3
/* VLCController.m */
;
};
8D11072A0486CEB800E47090
/* MainMenu.nib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B97318FDCFA39411CA2CEA
/* MainMenu.nib */
;
};
8D11072B0486CEB800E47090
/* InfoPlist.strings in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
089C165CFE840E0CC02AAC07
/* InfoPlist.strings */
;
};
...
...
@@ -50,8 +50,8 @@
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
637D59B60CF5A5F90073EA45
/* VLC.framework in Frameworks */
,
8D11072F0486CEB800E47090
/* Cocoa.framework in Frameworks */
,
630FBE2D0CF0B3940072CB10
/* VLC.framework in Frameworks */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -233,10 +233,13 @@
"$(inherited)"
,
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)"
,
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)"
,
"\"$(SRCROOT)/../Framework/build/Release\""
,
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)"
,
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)"
,
);
FRAMEWORK_SEARCH_PATHS_QUOTED_1
=
"\"$(SRCROOT)/../..\""
;
FRAMEWORK_SEARCH_PATHS_QUOTED_2
=
"\"$(SRCROOT)/../Framework\""
;
FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1
=
"\\\"$(SRCROOT)/../Framework/build/Release\\\""
;
FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2
=
"\"$(SRCROOT)/../Framework/build/Release\""
;
GCC_DYNAMIC_NO_PIC
=
NO
;
GCC_ENABLE_FIX_AND_CONTINUE
=
YES
;
GCC_MODEL_TUNING
=
G5
;
...
...
@@ -257,10 +260,13 @@
"$(inherited)"
,
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)"
,
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)"
,
"\"$(SRCROOT)/../Framework/build/Release\""
,
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)"
,
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)"
,
);
FRAMEWORK_SEARCH_PATHS_QUOTED_1
=
"\"$(SRCROOT)/../..\""
;
FRAMEWORK_SEARCH_PATHS_QUOTED_2
=
"\"$(SRCROOT)/../Framework\""
;
FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1
=
"\\\"$(SRCROOT)/../Framework/build/Release\\\""
;
FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2
=
"\"$(SRCROOT)/../Framework/build/Release\""
;
GCC_GENERATE_DEBUGGING_SYMBOLS
=
NO
;
GCC_MODEL_TUNING
=
G5
;
INFOPLIST_FILE
=
Info.plist
;
...
...
extras/MacOSX/VLC_app/VLCController.m
View file @
933b9ff9
...
...
@@ -32,7 +32,7 @@
VLCMediaList
*
mediaList
=
[[
VLCMediaList
alloc
]
init
];
[
mediaList
addMedia
:[
VLCMedia
mediaWithURL
:
@"/dev/null"
]];
NSArrayController
*
arrayController
=
[[
NSArrayController
alloc
]
init
];
[
arrayController
bind
:
@"contentArray"
toObject
:
mediaList
withKeyPath
:
@"media"
options
:
nil
];
[
arrayController
bind
:
@"contentArray"
toObject
:
[
mediaList
flatAspect
]
withKeyPath
:
@"media"
options
:
nil
];
NSMutableDictionary
*
bindingOptions
=
[
NSMutableDictionary
dictionary
];
[
bindingOptions
setObject
:
@"No Title"
forKey
:
NSDisplayNameBindingOption
];
...
...
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