@@ -134,6 +134,7 @@ public static ItagItem getItag(final int itagId) throws ParsingException {
134134 public static final int AUDIO_CHANNELS_NOT_APPLICABLE_OR_UNKNOWN = -1 ;
135135 public static final long CONTENT_LENGTH_UNKNOWN = -1 ;
136136 public static final long APPROX_DURATION_MS_UNKNOWN = -1 ;
137+ public static final long LAST_MODIFIED_UNKOWN = -1 ;
137138
138139 /*//////////////////////////////////////////////////////////////////////////
139140 // Constructors and misc
@@ -266,6 +267,9 @@ public MediaFormat getMediaFormat() {
266267 private AudioTrackType audioTrackType ;
267268 @ Nullable
268269 private Locale audioLocale ;
270+ private boolean isDrc ;
271+ private long lastModified ;
272+ private String xtags ;
269273
270274 public int getBitrate () {
271275 return bitrate ;
@@ -647,4 +651,77 @@ public Locale getAudioLocale() {
647651 public void setAudioLocale (@ Nullable final Locale audioLocale ) {
648652 this .audioLocale = audioLocale ;
649653 }
654+
655+ /**
656+ * Whether the audio is using dynamic range compression (DRC).
657+ *
658+ * <p>
659+ * https://en.wikipedia.org/wiki/Dynamic_range_compression
660+ * </p>
661+ *
662+ * @return whether the audio is using DRC
663+ */
664+ public Boolean isDrc () {
665+ return isDrc ;
666+ }
667+
668+ /**
669+ * Sets whether the audio is using dynamic range compression (DRC).
670+ *
671+ * <p>
672+ * https://en.wikipedia.org/wiki/Dynamic_range_compression
673+ * </p>
674+ *
675+ * @param isDrc whether the audio has DRC applied
676+ */
677+ public void setIsDrc (final Boolean isDrc ) {
678+ this .isDrc = isDrc ;
679+ }
680+
681+
682+ /**
683+ * When the stream was last modified.
684+ *
685+ * <p>
686+ * If the timestamp is unknown, {@link #LAST_MODIFIED_UNKOWN} is returned.
687+ * </p>
688+ *
689+ * @return unix timestamp of when the stream was last modified or
690+ * {@link #LAST_MODIFIED_UNKOWN} if the timestamp is unknown.
691+ */
692+ public long getLastModified () {
693+ return lastModified ;
694+ }
695+
696+ /**
697+ * Sets the timestamp when the stream was last modified.
698+ *
699+ * @param lastModified unix timestamp of when the stream was last modified
700+ */
701+ public void setLastModified (final long lastModified ) {
702+ this .lastModified = lastModified ;
703+ }
704+
705+ /**
706+ * Extra tags about the stream.
707+ *
708+ * <p>
709+ * Contains a Base64 encoded protobuf key-value list of additional tags for the stream,
710+ * such as whether the stream is using {@link #isDrc()}.
711+ * </p>
712+ *
713+ * @return Base64-encoded extra tags.
714+ */
715+ public String getXtags () {
716+ return xtags ;
717+ }
718+
719+ /**
720+ * Sets extra tags of the stream.
721+ *
722+ * @param xtags extra tags of the stream
723+ */
724+ public void setXtags (final String xtags ) {
725+ this .xtags = xtags ;
726+ }
650727}
0 commit comments