1 // Copyright (C) 2016-2018 Sebastian Dröge <sebastian@centricular.com>
2 //
3 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6 // option. This file may not be copied, modified, or distributed
7 // except according to those terms.
8
9 use gst::glib;
10 use gst::prelude::*;
11
12 mod imp;
13
14 glib::wrapper! {
15 pub struct ReqwestHttpSrc(ObjectSubclass<imp::ReqwestHttpSrc>) @extends gst_base::PushSrc, gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler;
16 }
17
18 unsafe impl Send for ReqwestHttpSrc {}
19 unsafe impl Sync for ReqwestHttpSrc {}
20
register(plugin: &gst::Plugin) -> Result<(), glib::BoolError>21 pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
22 gst::Element::register(
23 Some(plugin),
24 "reqwesthttpsrc",
25 gst::Rank::Marginal,
26 ReqwestHttpSrc::static_type(),
27 )
28 }
29