public void parse(Attribute attribute, StreamInfo.Builder builder, ParseState state)
 {
     if (!attribute.value.Equals(Constants.NO_CLOSED_CAPTIONS))
     {
         builder.withClosedCaptions(ParseUtil.parseQuotedString(attribute.value));
     }
 }
                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());
                    }
                }
Esempio 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));
                }
                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);
                    }
                }
                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());
                    }
                }
                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());
                    }
                }
                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);
                    }
                }
                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);
                    }
                }
Esempio 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);
                }
Esempio n. 10
0
 public void parse(Attribute attribute, MapInfo.Builder builder, ParseState state)
 {
     builder.withUri(ParseUtil.decodeUri(ParseUtil.parseQuotedString(attribute.value), state.encoding));
 }
Esempio n. 11
0
 public void parse(Attribute attribute, EncryptionData.Builder builder, ParseState state)
 {
     builder.withKeyFormat(ParseUtil.parseQuotedString(attribute.value));
 }
Esempio n. 12
0
 public override void parse(Attribute attribute, T builder, ParseState state)
 {
     builder.withVideo(ParseUtil.parseQuotedString(attribute.value, tag));
 }
Esempio n. 13
0
 public void parse(Attribute attribute, StreamInfo.Builder builder, ParseState state)
 {
     builder.withSubtitles(ParseUtil.parseQuotedString(attribute.value));
 }
Esempio n. 14
0
 public void parse(Attribute attribute, IFrameStreamInfo.Builder builder, ParseState state)
 {
     builder.withUri(ParseUtil.parseQuotedString(attribute.value));
 }
Esempio n. 15
0
 public void parse(Attribute attribute, MediaData.Builder builder, ParseState state)
 {
     builder.withAssociatedLanguage(ParseUtil.parseQuotedString(attribute.value));
 }