mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-15 12:10:47 +01:00
detect anamorphic video
This commit is contained in:
@@ -6,13 +6,11 @@ using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
|
||||
namespace MediaBrowser.Dlna.ConnectionManager
|
||||
{
|
||||
public class ControlHandler : BaseControlHandler
|
||||
{
|
||||
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
||||
private readonly DeviceProfile _profile;
|
||||
|
||||
public ControlHandler(ILogger logger, DeviceProfile profile, IServerConfigurationManager config)
|
||||
|
||||
@@ -179,7 +179,8 @@ namespace MediaBrowser.Dlna.Didl
|
||||
streamInfo.TargetVideoLevel,
|
||||
streamInfo.TargetFramerate,
|
||||
streamInfo.TargetPacketLength,
|
||||
streamInfo.TargetTimestamp);
|
||||
streamInfo.TargetTimestamp,
|
||||
streamInfo.IsTargetAnamorphic);
|
||||
|
||||
var filename = url.Substring(0, url.IndexOf('?'));
|
||||
|
||||
@@ -203,7 +204,8 @@ namespace MediaBrowser.Dlna.Didl
|
||||
streamInfo.TargetVideoLevel,
|
||||
streamInfo.TargetFramerate,
|
||||
streamInfo.TargetPacketLength,
|
||||
streamInfo.TranscodeSeekInfo);
|
||||
streamInfo.TranscodeSeekInfo,
|
||||
streamInfo.IsTargetAnamorphic);
|
||||
|
||||
res.SetAttribute("protocolInfo", String.Format(
|
||||
"http-get:*:{0}:{1}",
|
||||
|
||||
@@ -514,7 +514,8 @@ namespace MediaBrowser.Dlna.PlayTo
|
||||
streamInfo.TargetVideoLevel,
|
||||
streamInfo.TargetFramerate,
|
||||
streamInfo.TargetPacketLength,
|
||||
streamInfo.TranscodeSeekInfo);
|
||||
streamInfo.TranscodeSeekInfo,
|
||||
streamInfo.IsTargetAnamorphic);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace MediaBrowser.Dlna.Profiles
|
||||
Container = "ts",
|
||||
Type = DlnaProfileType.Video,
|
||||
VideoCodec = "mpeg1video,mpeg2video,h264,vc1",
|
||||
AudioCodec = "ac3,dca,mp2,mp3"
|
||||
AudioCodec = "ac3,dca,mp2,mp3,aac"
|
||||
},
|
||||
|
||||
new DirectPlayProfile
|
||||
|
||||
@@ -93,6 +93,20 @@ namespace MediaBrowser.Dlna.Profiles
|
||||
|
||||
CodecProfiles = new[]
|
||||
{
|
||||
new CodecProfile
|
||||
{
|
||||
Type = CodecType.Video,
|
||||
Conditions = new []
|
||||
{
|
||||
new ProfileCondition
|
||||
{
|
||||
Condition = ProfileConditionType.NotEquals,
|
||||
Property = ProfileConditionValue.IsAnamorphic,
|
||||
Value = "true"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
new CodecProfile
|
||||
{
|
||||
Type = CodecType.Video,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<DirectPlayProfile container="avi" audioCodec="ac3,dca,mp2,mp3,pcm" videoCodec="mpeg1video,mpeg2video,mpeg4,h264,vc1" type="Video" />
|
||||
<DirectPlayProfile container="mpeg" audioCodec="ac3,dca,mp2,mp3,pcm" videoCodec="mpeg1video,mpeg2video" type="Video" />
|
||||
<DirectPlayProfile container="mkv" audioCodec="ac3,dca,aac,mp2,mp3,pcm" videoCodec="mpeg1video,mpeg2video,mpeg4,h264,vc1" type="Video" />
|
||||
<DirectPlayProfile container="ts" audioCodec="ac3,dca,mp2,mp3" videoCodec="mpeg1video,mpeg2video,h264,vc1" type="Video" />
|
||||
<DirectPlayProfile container="ts" audioCodec="ac3,dca,mp2,mp3,aac" videoCodec="mpeg1video,mpeg2video,h264,vc1" type="Video" />
|
||||
<DirectPlayProfile container="mp4,mov" audioCodec="ac3,aac,mp2,mp3" videoCodec="h264,mpeg4" type="Video" />
|
||||
<DirectPlayProfile container="asf" audioCodec="wmav2,wmapro" videoCodec="vc1" type="Video" />
|
||||
<DirectPlayProfile container="asf" audioCodec="mp2,ac3" videoCodec="mpeg2video" type="Video" />
|
||||
|
||||
@@ -92,7 +92,9 @@ namespace MediaBrowser.Dlna.Service
|
||||
Xml = xml,
|
||||
IsSuccessful = true
|
||||
};
|
||||
Logger.Debug(xml);
|
||||
|
||||
//Logger.Debug(xml);
|
||||
|
||||
controlResponse.Headers.Add("EXT", string.Empty);
|
||||
|
||||
return controlResponse;
|
||||
|
||||
Reference in New Issue
Block a user