Skip to content

Commit 0c46e8c

Browse files
committed
Created new basic stream architecture
1 parent 9d625dd commit 0c46e8c

33 files changed

+844
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.schabi.newpipe.extractor.streamdata.delivery;
2+
3+
public interface DASHDeliveryData extends DeliveryData {
4+
// Just a marker interface
5+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package org.schabi.newpipe.extractor.streamdata.delivery;
2+
3+
import javax.annotation.Nonnull;
4+
5+
public interface DASHManifestDeliveryData extends DASHDeliveryData {
6+
/**
7+
* Returns the base url for the DashManifest.
8+
*
9+
* @return
10+
*/
11+
// TODO: Check removal
12+
@Nonnull
13+
default String getBaseUrl() {
14+
return "";
15+
}
16+
17+
String getManifestAsString();
18+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.schabi.newpipe.extractor.streamdata.delivery;
2+
3+
public interface DASHUrlDeliveryData extends UrlBasedDeliveryData, DASHDeliveryData {
4+
// Nothing to implement additionally
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.schabi.newpipe.extractor.streamdata.delivery;
2+
3+
public interface DeliveryData {
4+
// Only a marker so far
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.schabi.newpipe.extractor.streamdata.delivery;
2+
3+
public interface HLSDeliveryData extends UrlBasedDeliveryData {
4+
// Nothing to implement additionally
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.schabi.newpipe.extractor.streamdata.delivery;
2+
3+
public interface ProgressiveHTTPDeliveryData extends DeliveryData {
4+
// Nothing to implement additionally
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.schabi.newpipe.extractor.streamdata.delivery;
2+
3+
public interface TorrentDeliveryData extends UrlBasedDeliveryData {
4+
// Nothing to implement additionally
5+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.schabi.newpipe.extractor.streamdata.delivery;
2+
3+
import javax.annotation.Nonnull;
4+
5+
public interface UrlBasedDeliveryData extends DeliveryData {
6+
@Nonnull
7+
String url();
8+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.schabi.newpipe.extractor.streamdata.delivery.simpleimpl;
2+
3+
import org.schabi.newpipe.extractor.streamdata.delivery.DeliveryData;
4+
5+
public abstract class AbstractDeliveryDataImpl implements DeliveryData {
6+
// Nothing to implement so far
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package org.schabi.newpipe.extractor.streamdata.delivery.simpleimpl;
2+
3+
import org.schabi.newpipe.extractor.streamdata.delivery.UrlBasedDeliveryData;
4+
5+
import java.util.Objects;
6+
7+
import javax.annotation.Nonnull;
8+
9+
public abstract class AbstractUrlBasedDeliveryDataImpl extends AbstractDeliveryDataImpl
10+
implements UrlBasedDeliveryData {
11+
12+
@Nonnull
13+
private final String url;
14+
15+
protected AbstractUrlBasedDeliveryDataImpl(@Nonnull final String url) {
16+
this.url = Objects.requireNonNull(url);
17+
}
18+
19+
@Nonnull
20+
@Override
21+
public String url() {
22+
return url;
23+
}
24+
25+
}

0 commit comments

Comments
 (0)