macosx: Add helper to set rd item demux filter
authorMarvin Scholz <epirat07@gmail.com>
Wed, 12 Jul 2017 21:03:37 +0000 (23:03 +0200)
committerMarvin Scholz <epirat07@gmail.com>
Wed, 12 Jul 2017 21:06:34 +0000 (23:06 +0200)
modules/gui/macosx/VLCRendererItem.h
modules/gui/macosx/VLCRendererItem.m

index 47f8072..c034d9a 100644 (file)
  */
 - (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
+ */
+- (void)setDemuxFilterForPlaylist:(playlist_t*)playlist;
+
 @end
index 614f866..813cec2 100644 (file)
     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)
+        return;
+
+    var_SetString(playlist, "demux-filter", item_demux_filter);
+}
+
 - (BOOL)isEqual:(id)object
 {
     if (![object isKindOfClass:[VLCRendererItem class]]) {