patch for vod plugin to support xineliboutput

Message ID 20080514073617.54360@gmx.net
State New
Headers

Commit Message

Patrick Fischer May 14, 2008, 7:36 a.m. UTC
  I have written a small patch to be able to view vodcastas via VOD Plugin on a budget only system with xineliboutput plugin.
Normally the VOD Plugin use mplayer to play the vodcastas.
Not the plugin search for xineliboutput plugin if mplayer was not found.

You need xineliboutput > 1.0
Im not sure which types of streams the xinelib supports but the first tests work fine.
  

Patch

--- vod_orig/menu.c  2006-12-15 23:26:13.000000000 +0100
+++ vod/menu.c      2008-05-14 09:26:16.000000000 +0200
@@ -100,7 +100,17 @@ 
         Skins.Message(mtError, "MPlayer plugin does not support service interface!");
       free (target);
     } else {
-      Skins.Message(mtError, "MPlayer plugin not found!");
+        dsyslog("DEBUG MPlayer plugin not found, try xineliboutput plugin.");
+        Plugin = cPluginManager::GetPlugin("xineliboutput");
+        if (Plugin) {
+                char *target;
+                target = strdup(i->GetTarget());
+                if (!Plugin->Service("MediaPlayer-1.0", target))
+                        Skins.Message(mtError, "Xineliboutput plugin does not support service interface! Please update the xineliboutput plugin.");
+                free (target);
+        } else {
+                Skins.Message(mtError, "Xineliboutput plugin not found!");
+        }
     }
   }
 }