Class VideoStream
- java.lang.Object
-
- org.schabi.newpipe.extractor.stream.Stream
-
- org.schabi.newpipe.extractor.stream.VideoStream
-
- All Implemented Interfaces:
java.io.Serializable
public final class VideoStream extends Stream
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVideoStream.BuilderClass to buildVideoStreamobjects.
-
Field Summary
Fields Modifier and Type Field Description booleanisVideoOnlyDeprecated.UseisVideoOnly()instead.java.lang.StringresolutionDeprecated.UsegetResolution()instead.static java.lang.StringRESOLUTION_UNKNOWN-
Fields inherited from class org.schabi.newpipe.extractor.stream.Stream
FORMAT_ID_UNKNOWN, ID_UNKNOWN, ITAG_NOT_AVAILABLE_OR_NOT_APPLICABLE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequalStats(Stream cmp)Reveals whether two streams have the same statistics (media formatanddelivery method).intgetBitrate()Get the bitrate of the stream.java.lang.StringgetCodec()Get the codec of the stream.intgetFps()Get the frames per second of the video stream.intgetHeight()Get the height of the video stream.intgetIndexEnd()Get the index end of the stream.intgetIndexStart()Get the index start of the stream.intgetInitEnd()Get the initialization end of the stream.intgetInitStart()Get the initialization start of the stream.intgetItag()Get the itag identifier of the stream.ItagItemgetItagItem()Gets theItagItemof a stream.java.lang.StringgetQuality()Get the quality of the stream.java.lang.StringgetResolution()Get the video resolution.intgetWidth()Get the width of the video stream.booleanisVideoOnly()Return whether the stream is video-only.-
Methods inherited from class org.schabi.newpipe.extractor.stream.Stream
containSimilarStream, getContent, getDeliveryMethod, getFormat, getFormatId, getId, getManifestUrl, getUrl, isUrl
-
-
-
-
Field Detail
-
RESOLUTION_UNKNOWN
public static final java.lang.String RESOLUTION_UNKNOWN
- See Also:
- Constant Field Values
-
resolution
@Deprecated public final java.lang.String resolution
Deprecated.UsegetResolution()instead.
-
isVideoOnly
@Deprecated public final boolean isVideoOnly
Deprecated.UseisVideoOnly()instead.
-
-
Method Detail
-
equalStats
public boolean equalStats(Stream cmp)
Reveals whether two streams have the same statistics (media formatanddelivery method).If the
media formatof the stream is unknown, the streams are compared by using only thedelivery methodand their ID.Note: This method always returns false if the stream passed is null.
- Overrides:
equalStatsin classStream- Parameters:
cmp- the stream object to be compared to this stream object- Returns:
- whether the stream have the same stats or not, based on the criteria above
-
getResolution
@Nonnull public java.lang.String getResolution()
Get the video resolution.It can be unknown for some streams, like for HLS master playlists. In this case,
RESOLUTION_UNKNOWNis returned by this method.- Returns:
- the video resolution or
RESOLUTION_UNKNOWN
-
isVideoOnly
public boolean isVideoOnly()
Return whether the stream is video-only.Video-only streams have no audio.
- Returns:
trueif this stream is video-only,falseotherwise
-
getItag
public int getItag()
Get the itag identifier of the stream.Always equals to
Stream.ITAG_NOT_AVAILABLE_OR_NOT_APPLICABLEfor other streams than the ones of the YouTube service.- Returns:
- the number of the
ItagItempassed in the constructor of the video stream.
-
getBitrate
public int getBitrate()
Get the bitrate of the stream.- Returns:
- the bitrate set from the
ItagItempassed in the constructor of the stream.
-
getInitStart
public int getInitStart()
Get the initialization start of the stream.- Returns:
- the initialization start value set from the
ItagItempassed in the constructor of the stream.
-
getInitEnd
public int getInitEnd()
Get the initialization end of the stream.- Returns:
- the initialization end value set from the
ItagItempassed in the constructor of the stream.
-
getIndexStart
public int getIndexStart()
Get the index start of the stream.- Returns:
- the index start value set from the
ItagItempassed in the constructor of the stream.
-
getIndexEnd
public int getIndexEnd()
Get the index end of the stream.- Returns:
- the index end value set from the
ItagItempassed in the constructor of the stream.
-
getWidth
public int getWidth()
Get the width of the video stream.- Returns:
- the width set from the
ItagItempassed in the constructor of the stream.
-
getHeight
public int getHeight()
Get the height of the video stream.- Returns:
- the height set from the
ItagItempassed in the constructor of the stream.
-
getFps
public int getFps()
Get the frames per second of the video stream.- Returns:
- the frames per second set from the
ItagItempassed in the constructor of the stream.
-
getQuality
public java.lang.String getQuality()
Get the quality of the stream.- Returns:
- the quality label set from the
ItagItempassed in the constructor of the stream.
-
getCodec
public java.lang.String getCodec()
Get the codec of the stream.- Returns:
- the codec set from the
ItagItempassed in the constructor of the stream.
-
getItagItem
@Nullable public ItagItem getItagItem()
Gets theItagItemof a stream.If the stream is not from YouTube, this value will always be null.
- Specified by:
getItagItemin classStream- Returns:
- the
ItagItemof the stream ornull
-
-