Пример #1
0
        private byte SortOrder(SubtitleTypes subtitleType)
        {
            byte order = 0;

            switch (subtitleType)
            {
            case SubtitleTypes.SMI:
                order = 1;
                break;

            case SubtitleTypes.SRT:
                order = 2;
                break;

            case SubtitleTypes.ASS:
            case SubtitleTypes.SSA:
                order = 3;
                break;

            case SubtitleTypes.NA:
                order = 4;
                break;
            }
            return(order);
        }
Пример #2
0
 /// <summary>
 /// Erzeugt eine neue Informationsinstanz.
 /// <param name="language">Die Sprache der Untertitel.</param>
 /// <param name="type">Die Art der Untertitel.</param>
 /// <param name="compositionPage">Die primäre Seite.</param>
 /// <param name="ancillaryPage">Die zusätzliche Seite.</param>
 /// </summary>
 public SubtitleInfo(string language, SubtitleTypes type, ushort compositionPage, ushort ancillaryPage)
 {
     // Remember
     CompositionPage = compositionPage;
     AncillaryPage   = ancillaryPage;
     ISOLanguage     = language;
     Type            = type;
 }
Пример #3
0
        /// <summary>
        /// Erzeugt eine neue Informationsinstanz.
        /// </summary>
        /// <param name="section">Die SI Tabelle, in der die Informationen abgelegt sind.</param>
        /// <param name="offset">Das erste Byte, das Informationen zu Untertiteln enthält.</param>
        private SubtitleInfo(Section section, int offset)
        {
            // Load the language
            ISOLanguage = section.ReadString(offset, 3);

            // Load the type
            Type = (SubtitleTypes)section[offset + 3];

            // Load pages
            CompositionPage = Tools.MergeBytesToWord(section[offset + 5], section[offset + 4]);
            AncillaryPage   = Tools.MergeBytesToWord(section[offset + 7], section[offset + 6]);
        }
Пример #4
0
 /// <summary>
 /// Erzeugt eine neue Informationsinstanz.
 /// <param name="language">Die Sprache der Untertitel.</param>
 /// <param name="type">Die Art der Untertitel.</param>
 /// <param name="compositionPage">Die primäre Seite.</param>
 /// <param name="ancillaryPage">Die zusätzliche Seite.</param>
 /// </summary>
 public SubtitleInfo( string language, SubtitleTypes type, ushort compositionPage, ushort ancillaryPage )
 {
     // Remember
     CompositionPage = compositionPage;
     AncillaryPage = ancillaryPage;
     ISOLanguage = language;
     Type = type;
 }
Пример #5
0
        /// <summary>
        /// Erzeugt eine neue Informationsinstanz.
        /// </summary>
        /// <param name="section">Die SI Tabelle, in der die Informationen abgelegt sind.</param>
        /// <param name="offset">Das erste Byte, das Informationen zu Untertiteln enthält.</param>
        private SubtitleInfo( Section section, int offset )
        {
            // Load the language
            ISOLanguage = section.ReadString( offset, 3 );

            // Load the type
            Type = (SubtitleTypes) section[offset + 3];

            // Load pages
            CompositionPage = Tools.MergeBytesToWord( section[offset + 5], section[offset + 4] );
            AncillaryPage = Tools.MergeBytesToWord( section[offset + 7], section[offset + 6] );
        }