commit
5b32d2cd64
|
@ -10,6 +10,9 @@ namespace Emby.Dlna.Profiles
|
||||||
{
|
{
|
||||||
Name = "Sharp Smart TV";
|
Name = "Sharp Smart TV";
|
||||||
|
|
||||||
|
RequiresPlainFolders = true;
|
||||||
|
RequiresPlainVideoItems = true;
|
||||||
|
|
||||||
Identification = new DeviceIdentification
|
Identification = new DeviceIdentification
|
||||||
{
|
{
|
||||||
Manufacturer = "Sharp",
|
Manufacturer = "Sharp",
|
||||||
|
@ -36,10 +39,11 @@ namespace Emby.Dlna.Profiles
|
||||||
|
|
||||||
new TranscodingProfile
|
new TranscodingProfile
|
||||||
{
|
{
|
||||||
Container = "mkv",
|
Container = "ts",
|
||||||
Type = DlnaProfileType.Video,
|
Type = DlnaProfileType.Video,
|
||||||
AudioCodec = "ac3,aac,mp3,dts,dca",
|
AudioCodec = "ac3,aac,mp3,dts,dca",
|
||||||
VideoCodec = "h264"
|
VideoCodec = "h264",
|
||||||
|
EnableMpegtsM2TsMode = true
|
||||||
},
|
},
|
||||||
|
|
||||||
new TranscodingProfile
|
new TranscodingProfile
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,7 @@ namespace Emby.Server.Implementations.Sync
|
||||||
private readonly IServerSyncProvider _provider;
|
private readonly IServerSyncProvider _provider;
|
||||||
|
|
||||||
private readonly SemaphoreSlim _dataLock = new SemaphoreSlim(1, 1);
|
private readonly SemaphoreSlim _dataLock = new SemaphoreSlim(1, 1);
|
||||||
|
private readonly SemaphoreSlim _remoteDataLock = new SemaphoreSlim(1, 1);
|
||||||
private List<LocalItem> _items;
|
private List<LocalItem> _items;
|
||||||
|
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
|
@ -63,15 +64,24 @@ namespace Emby.Server.Implementations.Sync
|
||||||
{
|
{
|
||||||
_logger.Debug("Getting {0} from {1}", string.Join(MediaSync.PathSeparatorString, GetRemotePath().ToArray()), _provider.Name);
|
_logger.Debug("Getting {0} from {1}", string.Join(MediaSync.PathSeparatorString, GetRemotePath().ToArray()), _provider.Name);
|
||||||
|
|
||||||
var fileResult = await _provider.GetFiles(GetRemotePath().ToArray(), _target, cancellationToken).ConfigureAwait(false);
|
await _remoteDataLock.WaitAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
if (fileResult.Items.Length > 0)
|
try
|
||||||
{
|
{
|
||||||
using (var stream = await _provider.GetFile(fileResult.Items[0].FullName, _target, new Progress<double>(), cancellationToken))
|
var fileResult = await _provider.GetFiles(GetRemotePath().ToArray(), _target, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
if (fileResult.Items.Length > 0)
|
||||||
{
|
{
|
||||||
return _json.DeserializeFromStream<List<LocalItem>>(stream);
|
using (var stream = await _provider.GetFile(fileResult.Items[0].FullName, _target, new Progress<double>(), cancellationToken))
|
||||||
|
{
|
||||||
|
return _json.DeserializeFromStream<List<LocalItem>>(stream);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
_remoteDataLock.Release();
|
||||||
|
}
|
||||||
|
|
||||||
return new List<LocalItem>();
|
return new List<LocalItem>();
|
||||||
}
|
}
|
||||||
|
@ -93,9 +103,19 @@ namespace Emby.Server.Implementations.Sync
|
||||||
// Save to sync provider
|
// Save to sync provider
|
||||||
stream.Position = 0;
|
stream.Position = 0;
|
||||||
var remotePath = GetRemotePath();
|
var remotePath = GetRemotePath();
|
||||||
_logger.Debug("Saving data.json to {0}. Remote path: {1}", _provider.Name, string.Join("/", remotePath));
|
|
||||||
|
|
||||||
await _provider.SendFile(stream, remotePath, _target, new Progress<double>(), cancellationToken).ConfigureAwait(false);
|
await _remoteDataLock.WaitAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_logger.Debug("Saving data.json to {0}. Remote path: {1}", _provider.Name, string.Join("/", remotePath));
|
||||||
|
|
||||||
|
await _provider.SendFile(stream, remotePath, _target, new Progress<double>(), cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
_remoteDataLock.Release();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user