initial import

This commit is contained in:
hbeham
2013-03-31 14:09:38 +02:00
commit e194ff983b
110 changed files with 20082 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using System;
using System.Text;
using ChanSort.Api;
namespace ChanSort.Plugin.TllFile
{
internal static class ChannelDataMapping
{
public static unsafe void SetChannelName(ChannelMappingBase mapping, string channelName, Encoding defaultEncoding)
{
byte[] codePagePrefix = new byte[0]; // DvbStringDecoder.GetCodepageBytes(defaultEncoding);
byte[] name = defaultEncoding.GetBytes(channelName);
byte[] newName = new byte[codePagePrefix.Length + name.Length + 1];
Array.Copy(codePagePrefix, 0, newName, 0, codePagePrefix.Length);
Array.Copy(name, 0, newName, codePagePrefix.Length, name.Length);
fixed (byte* ptrNewName = newName)
{
mapping.NamePtr = ptrNewName;
}
mapping.NameLength = newName.Length;
}
}
}