mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-26 12:05:04 +01:00
fixes #797 - Determine mpeg2ts timestamp info
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public enum ManualLoginCategory
|
||||
{
|
||||
Mobile,
|
||||
MediaBrowserTheater
|
||||
}
|
||||
}
|
||||
@@ -168,8 +168,6 @@ namespace MediaBrowser.Model.Configuration
|
||||
/// <value>The dashboard source path.</value>
|
||||
public string DashboardSourcePath { get; set; }
|
||||
|
||||
public ManualLoginCategory[] ManualLoginClients { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [enable tv db updates].
|
||||
/// </summary>
|
||||
@@ -178,6 +176,9 @@ namespace MediaBrowser.Model.Configuration
|
||||
public bool EnableTmdbUpdates { get; set; }
|
||||
public bool EnableFanArtUpdates { get; set; }
|
||||
|
||||
public bool RequireManualLoginForMobileApps { get; set; }
|
||||
public bool RequireManualLoginForOtherApps { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the image saving convention.
|
||||
/// </summary>
|
||||
@@ -256,7 +257,6 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
EnableInternetProviders = true; //initial installs will need these
|
||||
|
||||
ManualLoginClients = new ManualLoginCategory[] { };
|
||||
PathSubstitutions = new PathSubstitution[] { };
|
||||
|
||||
MetadataRefreshDays = 30;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
|
||||
namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
|
||||
namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
|
||||
namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
|
||||
@@ -110,11 +110,4 @@ namespace MediaBrowser.Model.Dlna
|
||||
MPEG4_H263_3GPP_P0_L10_AMR,
|
||||
MPEG4_H263_MP4_P0_L10_AAC
|
||||
}
|
||||
|
||||
public enum TransportStreamTimestamp
|
||||
{
|
||||
NONE,
|
||||
ZERO,
|
||||
VALID
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -4,6 +4,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
|
||||
namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
@@ -285,7 +286,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
var audioBitrate = audioStream == null ? null : audioStream.BitRate;
|
||||
var audioChannels = audioStream == null ? null : audioStream.Channels;
|
||||
|
||||
var timestamp = videoStream == null ? TransportStreamTimestamp.NONE : videoStream.Timestamp;
|
||||
var timestamp = videoStream == null ? TransportStreamTimestamp.NONE : mediaSource.Timestamp;
|
||||
var packetLength = videoStream == null ? null : videoStream.PacketLength;
|
||||
|
||||
// Check container conditions
|
||||
|
||||
@@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
|
||||
namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
@@ -339,11 +340,13 @@ namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
get
|
||||
{
|
||||
var stream = TargetVideoStream;
|
||||
|
||||
return !IsDirectStream
|
||||
var defaultValue = string.Equals(Container, "m2ts", StringComparison.OrdinalIgnoreCase)
|
||||
? TransportStreamTimestamp.VALID
|
||||
: stream == null ? TransportStreamTimestamp.VALID : stream.Timestamp;
|
||||
: TransportStreamTimestamp.NONE;
|
||||
|
||||
return !IsDirectStream
|
||||
? defaultValue
|
||||
: MediaSource == null ? defaultValue : MediaSource.Timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
|
||||
namespace MediaBrowser.Model.Dto
|
||||
{
|
||||
@@ -30,6 +31,8 @@ namespace MediaBrowser.Model.Dto
|
||||
|
||||
public int? Bitrate { get; set; }
|
||||
|
||||
public TransportStreamTimestamp Timestamp { get; set; }
|
||||
|
||||
public MediaSourceInfo()
|
||||
{
|
||||
Formats = new List<string>();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
@@ -52,12 +51,6 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <value>The length of the packet.</value>
|
||||
public int? PacketLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp.
|
||||
/// </summary>
|
||||
/// <value>The timestamp.</value>
|
||||
public TransportStreamTimestamp Timestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the channels.
|
||||
/// </summary>
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
<Compile Include="Configuration\AutoOrganize.cs" />
|
||||
<Compile Include="Configuration\BaseApplicationConfiguration.cs" />
|
||||
<Compile Include="Configuration\DlnaOptions.cs" />
|
||||
<Compile Include="Configuration\ManualLoginCategory.cs" />
|
||||
<Compile Include="Configuration\MetadataPlugin.cs" />
|
||||
<Compile Include="Configuration\MetadataOptions.cs" />
|
||||
<Compile Include="Configuration\ServerConfiguration.cs" />
|
||||
|
||||
@@ -34,4 +34,11 @@ namespace MediaBrowser.Model.MediaInfo
|
||||
/// <value>The chapters.</value>
|
||||
public List<double> Chapters { get; set; }
|
||||
}
|
||||
|
||||
public enum TransportStreamTimestamp
|
||||
{
|
||||
NONE,
|
||||
ZERO,
|
||||
VALID
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user