- * It doesn't make sense to use this enum constant outside of the extractor as it will never be - * returned by an {@link org.schabi.newpipe.extractor.Extractor extractor} and is only used - * internally. - *
+ * Placeholder to check if the stream type was checked or not. It doesn't make sense to use this + * enum constant outside of the extractor as it will never be returned by an {@link + * org.schabi.newpipe.extractor.Extractor} and is only used internally. */ NONE, /** - * Enum constant to indicate that the stream type of stream content is a live video. - * - *- * Note that contents may contain audio streams even if they also contain - * video streams (video-only or video with audio, depending of the stream/the content/the - * service). - *
+ * A normal video stream, usually with audio. Note that the {@link StreamInfo} can also + * provide audio-only {@link AudioStream}s in addition to video or video-only {@link + * VideoStream}s. */ VIDEO_STREAM, /** - * Enum constant to indicate that the stream type of stream content is an audio. - * - *- * Note that contents returned as audio streams should not return video streams. - *
- * - *- * So, in order to prevent unexpected behaviors, stream extractors which are returning this - * stream type for a content should ensure that no video stream is returned for this content. - *
+ * An audio-only stream. There should be no {@link VideoStream}s available! In order to prevent + * unexpected behaviors, when {@link StreamExtractor}s return this stream type, they should + * ensure that no video stream is returned in {@link StreamExtractor#getVideoStreams()} and + * {@link StreamExtractor#getVideoOnlyStreams()}. */ AUDIO_STREAM, /** - * Enum constant to indicate that the stream type of stream content is a video. - * - *- * Note that contents can contain audio live streams even if they also contain - * live video streams (so video-only or video with audio, depending on the stream/the content/ - * the service). - *
+ * A video live stream, usually with audio. Note that the {@link StreamInfo} can also + * provide audio-only {@link AudioStream}s in addition to video or video-only {@link + * VideoStream}s. */ LIVE_STREAM, /** - * Enum constant to indicate that the stream type of stream content is a live audio. - * - *- * Note that contents returned as live audio streams should not return live video streams. - *
- * - *- * To prevent unexpected behavior, stream extractors which are returning this stream type for a - * content should ensure that no live video stream is returned along with it. - *
+ * An audio-only live stream. There should be no {@link VideoStream}s available! In order to + * prevent unexpected behaviors, when {@link StreamExtractor}s return this stream type, they + * should ensure that no video stream is returned in {@link StreamExtractor#getVideoStreams()} + * and {@link StreamExtractor#getVideoOnlyStreams()}. */ AUDIO_LIVE_STREAM, /** - * Enum constant to indicate that the stream type of stream content is a video content of an - * ended live video stream. + * A video live stream that has just ended but has not yet been encoded into a normal video + * stream. Note that the {@link StreamInfo} can also provide audio-only {@link + * AudioStream}s in addition to video or video-only {@link VideoStream}s. * ** Note that most of the content of an ended live video (or audio) may be extracted as {@link @@ -76,39 +54,21 @@ public enum StreamType { * later, because the service may encode them again later as normal video/audio streams. That's * the case on YouTube, for example. *
- * - *- * Note that contents can contain post-live audio streams even if they also - * contain post-live video streams (video-only or video with audio, depending of the stream/the - * content/the service). - *
*/ POST_LIVE_STREAM, /** - * Enum constant to indicate that the stream type of stream content is an audio content of an - * ended live audio stream. + * An audio live stream that has just ended but has not yet been encoded into a normal audio + * stream. There should be no {@link VideoStream}s available! In order to prevent unexpected + * behaviors, when {@link StreamExtractor}s return this stream type, they should ensure that no + * video stream is returned in {@link StreamExtractor#getVideoStreams()} and + * {@link StreamExtractor#getVideoOnlyStreams()}. * ** Note that most of ended live audio streams extracted with this value are processed as * {@link #AUDIO_STREAM regular audio streams} later, because the service may encode them * again later. *
- * - *- * Contents returned as post-live audio streams should not return post-live video streams. - *
- * - *- * So, in order to prevent unexpected behaviors, stream extractors which are returning this - * stream type for a content should ensure that no post-live video stream is returned for this - * content. - *
*/ - POST_LIVE_AUDIO_STREAM, - - /** - * Enum constant to indicate that the stream type of stream content is a file. - */ - FILE + POST_LIVE_AUDIO_STREAM } diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/utils/ManifestCreatorCache.java b/extractor/src/main/java/org/schabi/newpipe/extractor/utils/ManifestCreatorCache.java index e2084f1d4..ac12f83f9 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/utils/ManifestCreatorCache.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/utils/ManifestCreatorCache.java @@ -141,17 +141,13 @@ public final class ManifestCreatorCache