Exemplo n.º 1
0
 public void parse(Attribute attribute, StreamInfo.Builder builder, ParseState state)
 {
     if (!attribute.value.Equals(Constants.NO_CLOSED_CAPTIONS))
     {
         builder.withClosedCaptions(ParseUtil.parseQuotedString(attribute.value));
     }
 }
Exemplo n.º 2
0
                public override void parse(Attribute attribute, T builder, ParseState state)
                {
                    String[] characteristicStrings = ParseUtil.parseQuotedString(attribute.value, tag).Split(Constants.COMMA_CHAR);

                    if (characteristicStrings.Length > 0)
                    {
                        builder.withCodecs(characteristicStrings.ToList());
                    }
                }
Exemplo n.º 3
0
                public void parse(Attribute attribute, MapInfo.Builder builder, ParseState state)
                {
                    Match match = Constants.EXT_X_BYTERANGE_VALUE_PATTERN.Match(ParseUtil.parseQuotedString(attribute.value));

                    if (!match.Success)
                    {
                        throw ParseException.create(ParseExceptionType.INVALID_BYTERANGE_FORMAT, tag: null, context: attribute.ToString());
                    }

                    builder.withByteRange(ParseUtil.matchByteRange(match));
                }
Exemplo n.º 4
0
                public void parse(Attribute attribute, MediaData.Builder builder, ParseState state)
                {
                    String groupId = ParseUtil.parseQuotedString(attribute.value);

                    if (groupId.isEmpty())
                    {
                        throw ParseException.create(ParseExceptionType.EMPTY_MEDIA_GROUP_ID, tag: null, context: attribute.ToString());
                    }
                    else
                    {
                        builder.withGroupId(groupId);
                    }
                }
Exemplo n.º 5
0
                public void parse(Attribute attribute, MediaData.Builder builder, ParseState state)
                {
                    String[] characteristicStrings = ParseUtil.parseQuotedString(attribute.value).Split(Constants.COMMA_CHAR);

                    if (characteristicStrings.Length == 0)
                    {
                        throw ParseException.create(ParseExceptionType.EMPTY_MEDIA_CHARACTERISTICS, tag: null, context: attribute.ToString());
                    }
                    else
                    {
                        builder.withCharacteristics(characteristicStrings.ToList());
                    }
                }
Exemplo n.º 6
0
                public void parse(Attribute attribute, MediaData.Builder builder, ParseState state)
                {
                    String inStreamId = ParseUtil.parseQuotedString(attribute.value);

                    if (Constants.EXT_X_MEDIA_IN_STREAM_ID_PATTERN.Match(inStreamId).Success)
                    {
                        builder.withInStreamId(inStreamId);
                    }
                    else
                    {
                        throw ParseException.create(ParseExceptionType.INVALID_MEDIA_IN_STREAM_ID, tag: null, context: attribute.ToString());
                    }
                }
Exemplo n.º 7
0
                public void parse(Attribute attribute, MediaData.Builder builder, ParseState state)
                {
                    String name = ParseUtil.parseQuotedString(attribute.value);

                    if (name.isEmpty())
                    {
                        throw ParseException.create(ParseExceptionType.EMPTY_MEDIA_NAME, tag: null, context: attribute.ToString());
                    }
                    else
                    {
                        builder.withName(name);
                    }
                }
Exemplo n.º 8
0
                public void parse(Attribute attribute, MediaData.Builder builder, ParseState state)
                {
                    String[] channelsStrings = ParseUtil.parseQuotedString(attribute.value).Split(Constants.LIST_SEPARATOR);

                    if (channelsStrings.Length == 0 || channelsStrings[0].isEmpty())
                    {
                        throw ParseException.create(ParseExceptionType.EMPTY_MEDIA_CHANNELS, tag: null, context: attribute.ToString());
                    }
                    else
                    {
                        int channelsCount = ParseUtil.parseInt(channelsStrings[0]);
                        builder.withChannels(channelsCount);
                    }
                }
Exemplo n.º 9
0
                public void parse(Attribute attribute, EncryptionData.Builder builder, ParseState state)
                {
                    String[]   versionStrings = ParseUtil.parseQuotedString(attribute.value).Split(Constants.LIST_SEPARATOR);
                    List <int> versions       = new List <int>();

                    foreach (String version in versionStrings)
                    {
                        try
                        {
                            versions.Add(Int32.Parse(version));
                        }
                        catch (FormatException)
                        {
                            throw ParseException.create(ParseExceptionType.INVALID_KEY_FORMAT_VERSIONS, tag: null, context: attribute.ToString());
                        }
                    }

                    builder.withKeyFormatVersions(versions);
                }
Exemplo n.º 10
0
 public void parse(Attribute attribute, MapInfo.Builder builder, ParseState state)
 {
     builder.withUri(ParseUtil.decodeUri(ParseUtil.parseQuotedString(attribute.value), state.encoding));
 }
Exemplo n.º 11
0
 public void parse(Attribute attribute, EncryptionData.Builder builder, ParseState state)
 {
     builder.withKeyFormat(ParseUtil.parseQuotedString(attribute.value));
 }
Exemplo n.º 12
0
 public override void parse(Attribute attribute, T builder, ParseState state)
 {
     builder.withVideo(ParseUtil.parseQuotedString(attribute.value, tag));
 }
Exemplo n.º 13
0
 public void parse(Attribute attribute, StreamInfo.Builder builder, ParseState state)
 {
     builder.withSubtitles(ParseUtil.parseQuotedString(attribute.value));
 }
Exemplo n.º 14
0
 public void parse(Attribute attribute, IFrameStreamInfo.Builder builder, ParseState state)
 {
     builder.withUri(ParseUtil.parseQuotedString(attribute.value));
 }
Exemplo n.º 15
0
 public void parse(Attribute attribute, MediaData.Builder builder, ParseState state)
 {
     builder.withAssociatedLanguage(ParseUtil.parseQuotedString(attribute.value));
 }