|
|
|
@ -21,14 +21,14 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
AddPixelFormatColumnCommand();
|
|
|
|
|
AddBitDepthCommand();
|
|
|
|
|
AddIsAnamorphicColumn();
|
|
|
|
|
AddIsCabacColumn();
|
|
|
|
|
AddKeyFramesColumn();
|
|
|
|
|
AddRefFramesCommand();
|
|
|
|
|
AddCodecTagColumn();
|
|
|
|
|
AddCommentColumn();
|
|
|
|
|
AddNalColumn();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AddCommentColumn()
|
|
|
|
|
private void AddNalColumn()
|
|
|
|
|
{
|
|
|
|
|
using (var cmd = _connection.CreateCommand())
|
|
|
|
|
{
|
|
|
|
@ -42,7 +42,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
{
|
|
|
|
|
var name = reader.GetString(1);
|
|
|
|
|
|
|
|
|
|
if (string.Equals(name, "Comment", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (string.Equals(name, "NalLengthSize", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -54,12 +54,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
var builder = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
builder.AppendLine("alter table mediastreams");
|
|
|
|
|
builder.AppendLine("add column Comment TEXT");
|
|
|
|
|
builder.AppendLine("add column NalLengthSize TEXT");
|
|
|
|
|
|
|
|
|
|
_connection.RunQueries(new[] { builder.ToString() }, _logger);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AddCodecTagColumn()
|
|
|
|
|
private void AddCommentColumn()
|
|
|
|
|
{
|
|
|
|
|
using (var cmd = _connection.CreateCommand())
|
|
|
|
|
{
|
|
|
|
@ -73,7 +73,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
{
|
|
|
|
|
var name = reader.GetString(1);
|
|
|
|
|
|
|
|
|
|
if (string.Equals(name, "CodecTag", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (string.Equals(name, "Comment", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -85,12 +85,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
var builder = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
builder.AppendLine("alter table mediastreams");
|
|
|
|
|
builder.AppendLine("add column CodecTag TEXT");
|
|
|
|
|
builder.AppendLine("add column Comment TEXT");
|
|
|
|
|
|
|
|
|
|
_connection.RunQueries(new[] { builder.ToString() }, _logger);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AddPixelFormatColumnCommand()
|
|
|
|
|
private void AddCodecTagColumn()
|
|
|
|
|
{
|
|
|
|
|
using (var cmd = _connection.CreateCommand())
|
|
|
|
|
{
|
|
|
|
@ -104,7 +104,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
{
|
|
|
|
|
var name = reader.GetString(1);
|
|
|
|
|
|
|
|
|
|
if (string.Equals(name, "PixelFormat", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (string.Equals(name, "CodecTag", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -116,12 +116,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
var builder = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
builder.AppendLine("alter table mediastreams");
|
|
|
|
|
builder.AppendLine("add column PixelFormat TEXT");
|
|
|
|
|
builder.AppendLine("add column CodecTag TEXT");
|
|
|
|
|
|
|
|
|
|
_connection.RunQueries(new[] { builder.ToString() }, _logger);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AddBitDepthCommand()
|
|
|
|
|
private void AddPixelFormatColumnCommand()
|
|
|
|
|
{
|
|
|
|
|
using (var cmd = _connection.CreateCommand())
|
|
|
|
|
{
|
|
|
|
@ -135,7 +135,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
{
|
|
|
|
|
var name = reader.GetString(1);
|
|
|
|
|
|
|
|
|
|
if (string.Equals(name, "BitDepth", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (string.Equals(name, "PixelFormat", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -147,12 +147,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
var builder = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
builder.AppendLine("alter table mediastreams");
|
|
|
|
|
builder.AppendLine("add column BitDepth INT NULL");
|
|
|
|
|
builder.AppendLine("add column PixelFormat TEXT");
|
|
|
|
|
|
|
|
|
|
_connection.RunQueries(new[] { builder.ToString() }, _logger);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AddRefFramesCommand()
|
|
|
|
|
private void AddBitDepthCommand()
|
|
|
|
|
{
|
|
|
|
|
using (var cmd = _connection.CreateCommand())
|
|
|
|
|
{
|
|
|
|
@ -166,7 +166,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
{
|
|
|
|
|
var name = reader.GetString(1);
|
|
|
|
|
|
|
|
|
|
if (string.Equals(name, "RefFrames", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (string.Equals(name, "BitDepth", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -178,12 +178,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
var builder = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
builder.AppendLine("alter table mediastreams");
|
|
|
|
|
builder.AppendLine("add column RefFrames INT NULL");
|
|
|
|
|
builder.AppendLine("add column BitDepth INT NULL");
|
|
|
|
|
|
|
|
|
|
_connection.RunQueries(new[] { builder.ToString() }, _logger);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AddIsCabacColumn()
|
|
|
|
|
private void AddRefFramesCommand()
|
|
|
|
|
{
|
|
|
|
|
using (var cmd = _connection.CreateCommand())
|
|
|
|
|
{
|
|
|
|
@ -197,7 +197,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
{
|
|
|
|
|
var name = reader.GetString(1);
|
|
|
|
|
|
|
|
|
|
if (string.Equals(name, "IsCabac", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (string.Equals(name, "RefFrames", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -209,7 +209,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
var builder = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
builder.AppendLine("alter table mediastreams");
|
|
|
|
|
builder.AppendLine("add column IsCabac BIT NULL");
|
|
|
|
|
builder.AppendLine("add column RefFrames INT NULL");
|
|
|
|
|
|
|
|
|
|
_connection.RunQueries(new[] { builder.ToString() }, _logger);
|
|
|
|
|
}
|
|
|
|
|