support rtp protocol

This commit is contained in:
Luke Pulverenti 2017-01-18 01:05:33 -05:00
parent 16bd1df08a
commit 80a9bbf5ef
3 changed files with 7 additions and 20 deletions

View File

@ -127,6 +127,10 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
{ {
protocol = MediaProtocol.Udp; protocol = MediaProtocol.Udp;
} }
else if (path.StartsWith("rtp", StringComparison.OrdinalIgnoreCase))
{
protocol = MediaProtocol.Rtmp;
}
var mediaSource = new MediaSourceInfo var mediaSource = new MediaSourceInfo
{ {

View File

@ -8,25 +8,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
{ {
public static string GetInputArgument(List<string> inputFiles, MediaProtocol protocol) public static string GetInputArgument(List<string> inputFiles, MediaProtocol protocol)
{ {
if (protocol == MediaProtocol.Http) if (protocol != MediaProtocol.File)
{
var url = inputFiles.First();
return string.Format("\"{0}\"", url);
}
if (protocol == MediaProtocol.Rtmp)
{
var url = inputFiles.First();
return string.Format("\"{0}\"", url);
}
if (protocol == MediaProtocol.Rtsp)
{
var url = inputFiles.First();
return string.Format("\"{0}\"", url);
}
if (protocol == MediaProtocol.Udp)
{ {
var url = inputFiles.First(); var url = inputFiles.First();

View File

@ -6,6 +6,7 @@ namespace MediaBrowser.Model.MediaInfo
Http = 1, Http = 1,
Rtmp = 2, Rtmp = 2,
Rtsp = 3, Rtsp = 3,
Udp = 4 Udp = 4,
Rtp = 5
} }
} }