|
1 | 1 | package org.schabi.newpipe.extractor.stream; |
2 | 2 |
|
3 | 3 | /** |
4 | | - * An enum representing the stream types of stream contents returned by the extractor. |
| 4 | + * An enum representing the stream type of a {@link StreamInfo} extracted by a {@link |
| 5 | + * StreamExtractor}. |
5 | 6 | */ |
6 | 7 | public enum StreamType { |
7 | 8 |
|
8 | 9 | /** |
9 | | - * Placeholder to check if the stream type of stream content was checked or not. |
10 | | - * |
11 | | - * <p> |
12 | | - * It doesn't make sense to use this enum constant outside of the extractor as it will never be |
13 | | - * returned by an {@link org.schabi.newpipe.extractor.Extractor extractor} and is only used |
14 | | - * internally. |
15 | | - * </p> |
| 10 | + * Placeholder to check if the stream type was checked or not. It doesn't make sense to use this |
| 11 | + * enum constant outside of the extractor as it will never be returned by an {@link |
| 12 | + * org.schabi.newpipe.extractor.Extractor} and is only used internally. |
16 | 13 | */ |
17 | 14 | NONE, |
18 | 15 |
|
19 | 16 | /** |
20 | | - * Enum constant to indicate that the stream type of stream content is a live video. |
21 | | - * |
22 | | - * <p> |
23 | | - * Note that contents <strong>may contain audio streams</strong> even if they also contain |
24 | | - * video streams (video-only or video with audio, depending of the stream/the content/the |
25 | | - * service). |
26 | | - * </p> |
| 17 | + * A normal video stream, usually with audio. Note that the {@link StreamInfo} <strong>can also |
| 18 | + * provide audio-only {@link AudioStream}s</strong> in addition to video or video-only {@link |
| 19 | + * VideoStream}s. |
27 | 20 | */ |
28 | 21 | VIDEO_STREAM, |
29 | 22 |
|
30 | 23 | /** |
31 | | - * Enum constant to indicate that the stream type of stream content is an audio. |
32 | | - * |
33 | | - * <p> |
34 | | - * Note that contents returned as audio streams should not return video streams. |
35 | | - * </p> |
36 | | - * |
37 | | - * <p> |
38 | | - * So, in order to prevent unexpected behaviors, stream extractors which are returning this |
39 | | - * stream type for a content should ensure that no video stream is returned for this content. |
40 | | - * </p> |
| 24 | + * An audio-only stream. There should be no {@link VideoStream}s available! In order to prevent |
| 25 | + * unexpected behaviors, when {@link StreamExtractor}s return this stream type, they should |
| 26 | + * ensure that no video stream is returned in {@link StreamExtractor#getVideoStreams()} and |
| 27 | + * {@link StreamExtractor#getVideoOnlyStreams()}. |
41 | 28 | */ |
42 | 29 | AUDIO_STREAM, |
43 | 30 |
|
44 | 31 | /** |
45 | | - * Enum constant to indicate that the stream type of stream content is a video. |
46 | | - * |
47 | | - * <p> |
48 | | - * Note that contents <strong>can contain audio live streams</strong> even if they also contain |
49 | | - * live video streams (so video-only or video with audio, depending on the stream/the content/ |
50 | | - * the service). |
51 | | - * </p> |
| 32 | + * A video live stream, usually with audio. Note that the {@link StreamInfo} <strong>can also |
| 33 | + * provide audio-only {@link AudioStream}s</strong> in addition to video or video-only {@link |
| 34 | + * VideoStream}s. |
52 | 35 | */ |
53 | 36 | LIVE_STREAM, |
54 | 37 |
|
55 | 38 | /** |
56 | | - * Enum constant to indicate that the stream type of stream content is a live audio. |
57 | | - * |
58 | | - * <p> |
59 | | - * Note that contents returned as live audio streams should not return live video streams. |
60 | | - * </p> |
61 | | - * |
62 | | - * <p> |
63 | | - * To prevent unexpected behavior, stream extractors which are returning this stream type for a |
64 | | - * content should ensure that no live video stream is returned along with it. |
65 | | - * </p> |
| 39 | + * An audio-only live stream. There should be no {@link VideoStream}s available! In order to |
| 40 | + * prevent unexpected behaviors, when {@link StreamExtractor}s return this stream type, they |
| 41 | + * should ensure that no video stream is returned in {@link StreamExtractor#getVideoStreams()} |
| 42 | + * and {@link StreamExtractor#getVideoOnlyStreams()}. |
66 | 43 | */ |
67 | 44 | AUDIO_LIVE_STREAM, |
68 | 45 |
|
69 | 46 | /** |
70 | | - * Enum constant to indicate that the stream type of stream content is a video content of an |
71 | | - * ended live video stream. |
| 47 | + * A video live stream that has just ended but has not yet been encoded into a normal video |
| 48 | + * stream. Note that the {@link StreamInfo} <strong>can also provide audio-only {@link |
| 49 | + * AudioStream}s</strong> in addition to video or video-only {@link VideoStream}s. |
72 | 50 | * |
73 | 51 | * <p> |
74 | 52 | * Note that most of the content of an ended live video (or audio) may be extracted as {@link |
75 | 53 | * #VIDEO_STREAM regular video contents} (or {@link #AUDIO_STREAM regular audio contents}) |
76 | 54 | * later, because the service may encode them again later as normal video/audio streams. That's |
77 | 55 | * the case on YouTube, for example. |
78 | 56 | * </p> |
79 | | - * |
80 | | - * <p> |
81 | | - * Note that contents <strong>can contain post-live audio streams</strong> even if they also |
82 | | - * contain post-live video streams (video-only or video with audio, depending of the stream/the |
83 | | - * content/the service). |
84 | | - * </p> |
85 | 57 | */ |
86 | 58 | POST_LIVE_STREAM, |
87 | 59 |
|
88 | 60 | /** |
89 | | - * Enum constant to indicate that the stream type of stream content is an audio content of an |
90 | | - * ended live audio stream. |
| 61 | + * An audio live stream that has just ended but has not yet been encoded into a normal audio |
| 62 | + * stream. There should be no {@link VideoStream}s available! In order to prevent unexpected |
| 63 | + * behaviors, when {@link StreamExtractor}s return this stream type, they should ensure that no |
| 64 | + * video stream is returned in {@link StreamExtractor#getVideoStreams()} and |
| 65 | + * {@link StreamExtractor#getVideoOnlyStreams()}. |
91 | 66 | * |
92 | 67 | * <p> |
93 | 68 | * Note that most of ended live audio streams extracted with this value are processed as |
94 | 69 | * {@link #AUDIO_STREAM regular audio streams} later, because the service may encode them |
95 | 70 | * again later. |
96 | 71 | * </p> |
97 | | - * |
98 | | - * <p> |
99 | | - * Contents returned as post-live audio streams should not return post-live video streams. |
100 | | - * </p> |
101 | | - * |
102 | | - * <p> |
103 | | - * So, in order to prevent unexpected behaviors, stream extractors which are returning this |
104 | | - * stream type for a content should ensure that no post-live video stream is returned for this |
105 | | - * content. |
106 | | - * </p> |
107 | | - */ |
108 | | - POST_LIVE_AUDIO_STREAM, |
109 | | - |
110 | | - /** |
111 | | - * Enum constant to indicate that the stream type of stream content is a file. |
112 | 72 | */ |
113 | | - FILE |
| 73 | + POST_LIVE_AUDIO_STREAM |
114 | 74 | } |
0 commit comments