detect anamorphic video

This commit is contained in:
Luke Pulverenti
2014-06-22 12:25:47 -04:00
parent 414b1251c7
commit 3b30a2aee0
23 changed files with 182 additions and 37 deletions

View File

@@ -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)

View File

@@ -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}",

View File

@@ -514,7 +514,8 @@ namespace MediaBrowser.Dlna.PlayTo
streamInfo.TargetVideoLevel,
streamInfo.TargetFramerate,
streamInfo.TargetPacketLength,
streamInfo.TranscodeSeekInfo);
streamInfo.TranscodeSeekInfo,
streamInfo.IsTargetAnamorphic);
}
return null;

View File

@@ -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

View File

@@ -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,

View File

@@ -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" />

View File

@@ -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;