Commit 1e399270 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵 Committed by Sebastian Dröge

httpsrc: Port to new subclassing API

Fixes gstreamer/gst-plugins-rs#50
parent 8ad7643e
Pipeline #13563 passed with stages
in 5 minutes and 37 seconds
......@@ -8,11 +8,10 @@ license = "MIT/Apache-2.0"
[dependencies]
url = "1.1"
glib = { git = "https://github.com/gtk-rs/glib" }
gst-plugin = { path="../gst-plugin" }
gst-plugin-simple = { path="../gst-plugin-simple" }
reqwest = "0.9"
hyperx = "0.13"
gstreamer = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
gstreamer = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["subclassing"] }
gstreamer-base = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["subclassing"] }
[lib]
name = "gstrshttp"
......
This diff is collapsed.
......@@ -8,49 +8,29 @@
#![crate_type = "cdylib"]
extern crate glib;
#[macro_use]
extern crate gst_plugin;
extern crate gst_plugin_simple;
extern crate glib;
#[macro_use]
extern crate gstreamer as gst;
extern crate gstreamer_base as gst_base;
extern crate hyperx;
extern crate reqwest;
extern crate url;
use gst_plugin_simple::source::*;
mod httpsrc;
use httpsrc::HttpSrc;
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
source_register(
plugin,
SourceInfo {
name: "rshttpsrc".into(),
long_name: "HTTP/HTTPS Source".into(),
description: "Reads HTTP/HTTPS streams".into(),
classification: "Source/File".into(),
author: "Sebastian Dröge <sebastian@centricular.com>".into(),
rank: 256 + 100,
create_instance: HttpSrc::new_boxed,
protocols: vec!["http".into(), "https".into()],
push_only: true,
},
);
Ok(())
httpsrc::register(plugin)
}
plugin_define!(
b"rshttp\0",
b"Rust HTTP Plugin\0",
gst_plugin_define!(
"rshttp",
"Rust HTTP Plugin",
plugin_init,
b"1.0\0",
b"MIT/X11\0",
b"rshttp\0",
b"rshttp\0",
b"https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs\0",
b"2016-12-08\0"
"1.0",
"MIT/X11",
"rshttp",
"rshttp",
"https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs",
"2016-12-08"
);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment