mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 03:21: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]
|
||||
url = "1.1"
|
||||
gst-plugin = { path="../gst-plugin" }
|
||||
reqwest = "0.6"
|
||||
reqwest = "0.7"
|
||||
slog = "2.0"
|
||||
|
||||
[lib]
|
||||
|
|
|
@ -64,13 +64,15 @@ impl HttpSrc {
|
|||
start: u64,
|
||||
stop: Option<u64>)
|
||||
-> Result<StreamingState, ErrorMessage> {
|
||||
let mut req = self.client.get(uri.clone());
|
||||
let mut req = self.client.get(uri.clone()).unwrap();
|
||||
|
||||
match (start != 0, stop) {
|
||||
(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)) => {
|
||||
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