Update gst-plugin-http to reqwest 0.7

This commit is contained in:
Sebastian Dröge 2017-07-31 14:29:11 +01:00
parent 94016c39b0
commit 3c27685e38
2 changed files with 6 additions and 4 deletions

View file

@ -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]

View file

@ -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)]));
} }
} }