mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 21:11:00 +00:00
Update gst-plugin-http to reqwest 0.7
This commit is contained in:
parent
94016c39b0
commit
3c27685e38
2 changed files with 6 additions and 4 deletions
|
@ -8,7 +8,7 @@ license = "MIT/Apache-2.0"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
url = "1.1"
|
url = "1.1"
|
||||||
gst-plugin = { path="../gst-plugin" }
|
gst-plugin = { path="../gst-plugin" }
|
||||||
reqwest = "0.6"
|
reqwest = "0.7"
|
||||||
slog = "2.0"
|
slog = "2.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -64,13 +64,15 @@ impl HttpSrc {
|
||||||
start: u64,
|
start: u64,
|
||||||
stop: Option<u64>)
|
stop: Option<u64>)
|
||||||
-> Result<StreamingState, ErrorMessage> {
|
-> Result<StreamingState, ErrorMessage> {
|
||||||
let mut req = self.client.get(uri.clone());
|
let mut req = self.client.get(uri.clone()).unwrap();
|
||||||
|
|
||||||
match (start != 0, stop) {
|
match (start != 0, stop) {
|
||||||
(false, None) => (),
|
(false, None) => (),
|
||||||
(true, None) => req = req.header(Range::Bytes(vec![ByteRangeSpec::AllFrom(start)])),
|
(true, None) => {
|
||||||
|
req.header(Range::Bytes(vec![ByteRangeSpec::AllFrom(start)]));
|
||||||
|
}
|
||||||
(_, Some(stop)) => {
|
(_, Some(stop)) => {
|
||||||
req = req.header(Range::Bytes(vec![ByteRangeSpec::FromTo(start, stop - 1)]))
|
req.header(Range::Bytes(vec![ByteRangeSpec::FromTo(start, stop - 1)]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue