Commit 8859a288 authored by Marvin Scholz's avatar Marvin Scholz
Browse files

macosx: Switch to new playlist_SetRenderer API

parent f25ce3d3
......@@ -64,29 +64,11 @@
- (int)capabilityFlags;
Checks if the Item’s sout string is equivalent to the given
sout string. If output is YES, it's checked if it's an
output sout as well.
Sets the renderer represented by this \c VLCRendererItem as active
for the given playlist.
\param sout The sout c string to compare with
\param output Indicates wether to check if sout is an output
\return YES if souts match the given sout and output, NO otherwise
- (bool)isSoutEqualTo:(const char*)sout asOutput:(bool)output;
Sets the passed playlist’s sout to the sout of the \c VLCRendererItem.
\param playlist The playlist for which to set the sout
- (void)setSoutForPlaylist:(playlist_t*)playlist;
Sets the passed playlist’s demux filter to the demux filter of the \c VLCRendererItem.
\param playlist The playlist for which to set the demux filter
\param playlist The playlist for which to set the renderer
- (void)setDemuxFilterForPlaylist:(playlist_t*)playlist;
- (void)setRendererForPlaylist:(playlist_t*)playlist;
......@@ -68,39 +68,9 @@
return vlc_renderer_item_flags(_rendererItem);
- (bool)isSoutEqualTo:(const char*)sout asOutput:(bool)output
- (void)setRendererForPlaylist:(playlist_t*)playlist
NSString *temp_sout;
NSString *prefix;
NSString *self_sout;
prefix = (output) ? @"#" : @"";
self_sout = [prefix stringByAppendingString:toNSStr(vlc_renderer_item_sout(_rendererItem))];
temp_sout = toNSStr(sout);
return [temp_sout isEqualToString:self_sout];
- (void)setSoutForPlaylist:(playlist_t*)playlist
NSString *sout;
const char *item_sout = vlc_renderer_item_sout(_rendererItem);
if (!playlist || !item_sout)
sout = [[NSString alloc] initWithFormat:@"#%s", item_sout];
var_SetString(playlist , "sout", sout.UTF8String);
- (void)setDemuxFilterForPlaylist:(playlist_t*)playlist
const char *item_demux_filter = vlc_renderer_item_demux_filter(_rendererItem);
if (!playlist || !item_demux_filter)
var_SetString(playlist, "demux-filter", item_demux_filter);
playlist_SetRenderer(playlist, _rendererItem);
- (BOOL)isEqual:(id)object
......@@ -169,22 +169,15 @@
if (item) {
[item setSoutForPlaylist:playlist];
[item setDemuxFilterForPlaylist:playlist];
[item setRendererForPlaylist:playlist];
} else {
[self unsetSoutForPlaylist:playlist];
[self unsetDemuxFilterForPlaylist:playlist];
[self unsetRendererForPlaylist:playlist];
- (void)unsetSoutForPlaylist:(playlist_t*)playlist
- (void)unsetRendererForPlaylist:(playlist_t*)playlist
var_SetString(playlist, "sout", "");
- (void)unsetDemuxFilterForPlaylist:(playlist_t*)playlist
var_SetString(playlist, "demux-filter", "");
playlist_SetRenderer(playlist, NULL);
#pragma mark VLCRendererDiscovery delegate methods
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment