aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-04-24 22:00:19 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-04-24 22:00:19 -0400
commiteca1ba0b12da195dff3c31ffb799e4e3a7b5b5b9 (patch)
tree436352b39c2c78e1b6731a9d44c09dd8407bed2f /MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
parent725e1a1509231650ae448d9eb7db55cce6fcd6bb (diff)
fixes #797 - Determine mpeg2ts timestamp info
Diffstat (limited to 'MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs')
-rw-r--r--MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
index 9337a6c95..589dc3376 100644
--- a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
+++ b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
+using MediaBrowser.Model.Entities;
+using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.Model.Dlna
{
@@ -147,14 +149,14 @@ namespace MediaBrowser.Model.Dlna
}
else if (string.Equals(videoCodec, "mpeg4", StringComparison.OrdinalIgnoreCase) || string.Equals(videoCodec, "msmpeg4", StringComparison.OrdinalIgnoreCase))
{
- // if (audioCodec == AudioCodec.AAC)
- // return Collections.singletonList(MediaFormatProfile.valueOf(String.format("MPEG4_P2_TS_ASP_AAC%s", cast(Object[])[ suffix ])));
- // if (audioCodec == AudioCodec.MP3)
- // return Collections.singletonList(MediaFormatProfile.valueOf(String.format("MPEG4_P2_TS_ASP_MPEG1_L3%s", cast(Object[])[ suffix ])));
- // if (audioCodec == AudioCodec.MP2)
- // return Collections.singletonList(MediaFormatProfile.valueOf(String.format("MPEG4_P2_TS_ASP_MPEG2_L2%s", cast(Object[])[ suffix ])));
- // if ((audioCodec is null) || (audioCodec == AudioCodec.AC3)) {
- // return Collections.singletonList(MediaFormatProfile.valueOf(String.format("MPEG4_P2_TS_ASP_AC3%s", cast(Object[])[ suffix ])));
+ if (string.Equals(audioCodec, "aac", StringComparison.OrdinalIgnoreCase))
+ return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_AAC{0}", suffix)) };
+ if (string.Equals(audioCodec, "mp3", StringComparison.OrdinalIgnoreCase))
+ return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG1_L3{0}", suffix)) };
+ if (string.Equals(audioCodec, "mp2", StringComparison.OrdinalIgnoreCase))
+ return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG2_L2{0}", suffix)) };
+ if (string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase))
+ return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_AC3{0}", suffix)) };
}
return new List<MediaFormatProfile>();