1
0
Эх сурвалжийг харах

change in regards to redirecting Audio as Stream

LH 9 жил өмнө
parent
commit
f5d3457375

+ 11 - 2
iZpl/src/main/java/de/nplusc/izc/iZpl/Utils/VlcInterface.java

@@ -463,11 +463,20 @@ public class VlcInterface implements PlaybackPlugin , MediaPlayerEventListener
     {
         private final VlcInterface parent;
         private final MediaPlayer mpaccess;
-        private final MediaPlayerFactory f;
+        private MediaPlayerFactory f;
         public VlcJIterface(String vlcpath,VlcInterface parent)
         {
             this.parent=parent;
-            f= new MediaPlayerFactory("--no-video-title-show");
+            if(new File(IZPLApi.APPDIR+File.separator+"stream").exists())
+            {
+                
+                f= new MediaPlayerFactory("--no-video-title-show",
+                        ":sout=#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{mux=mp3,dst=:9264/}",":sout-keep");
+            }
+            else
+            {
+                f= new MediaPlayerFactory("--no-video-title-show");
+            }
             mpaccess = f.newHeadlessMediaPlayer();
             mpaccess.addMediaPlayerEventListener(parent);
         }