Commit graph

38 commits

Author SHA1 Message Date
Sebastian Dröge 89b0220e26 Build each component into its own GStreamer plugin 2016-12-23 19:04:32 +02:00
Sebastian Dröge b23385e88f Add some more Buffer API and use explicit bitflags instead of magic numbers 2016-09-18 10:23:14 -04:00
Sebastian Dröge 61b5420102 Add wrapper around GstBuffer and use it in the source/sink 2016-09-12 15:00:28 +02:00
Sebastian Dröge 245d576159 Don't lock the URI mutex all the time while {Sink,Source}::{start,stop} is called but only when needed 2016-09-03 17:37:51 +03:00
Sebastian Dröge eee2653b76 Use None instead of u64::MAX for unknown/unspecified size/stop 2016-09-02 01:01:25 +03:00
Sebastian Dröge 4afdd2c985 Move thread-handling out of the actual Source/Sink implementation 2016-09-02 00:52:28 +03:00
Sebastian Dröge 742515aac1 Properly report error / error messages and make the trait APIs more Rust-like 2016-08-27 11:16:17 +03:00
Sebastian Dröge 9ae934e48a Make the UriError a bit nicer 2016-08-25 00:47:56 +03:00
Sebastian Dröge df50617c87 Add trait functions for getting back the controller 2016-08-25 00:08:06 +03:00
Sebastian Dröge 82c29d369d Properly report errors when setting the URI fails 2016-08-23 00:07:44 +03:00
Sebastian Dröge bb8072c4d8 Various cleanups 2016-08-22 22:35:16 +03:00
Sebastian Dröge 086ec5b68d Fix up mutability
Rust assumes that there can only be a single mutable reference at any time, as
such make use of interior mutability with a mutex for all state of the
elements.
2016-08-22 22:25:58 +03:00
Sebastian Dröge 4eb3d879de Move FFI usage out of actual Sink/Source implementations 2016-08-10 18:27:38 +02:00
Sebastian Dröge 4e053cd6bc Add new controller objects to Source/Sink
These store a pointer to the native GstElement and will allow calling back
into it later.
2016-07-20 14:50:35 +03:00
Sebastian Dröge 31fd26b982 Run everything through rustfmt 2016-07-20 11:28:58 +03:00
Sebastian Dröge 3db8882ce8 Pass Urls directly to the Source/Sink implementations instead of having them handle strings 2016-05-24 23:24:05 +03:00
Sebastian Dröge 8514d46092 Use a Mutex to protect the URI storage
get_uri()/set_uri() can be called at any time from any thread, only
all other methods of Source/Sink are guaranteed to be called by only
a single thread at a time.
2016-05-23 20:29:01 +03:00
Sebastian Dröge ca4fa82ffe Make it an requirement to implement Source::do_seek() 2016-05-22 16:23:43 +03:00
Sebastian Dröge acc7d2ea26 Use Option<&str> instead of &Option<&str> for set_uri()
This seems more ergonomic to use, and is more common in other libraries.
2016-05-18 11:39:37 +03:00
Sebastian Dröge b8a031c29b Use Option<&str> instead of Option<String> for set_uri()
There is no reason to require a heap-allocated String here.
2016-05-18 11:29:57 +03:00
Sebastian Dröge 546d67fa5a Add license and copyright notices 2016-05-15 18:54:09 +03:00
Sebastian Dröge 87bd914cad Some minor cleanup 2016-05-15 16:16:55 +03:00
Sebastian Dröge 79aed66914 Require Sync and Send traits to be implemented for Sources 2016-05-15 11:55:52 +03:00
Sebastian Dröge ec01d11393 Register types from Rust and abstract the source to be able to handle other implementations too 2016-05-14 15:47:06 +03:00
Sebastian Dröge 4d989404b0 Move stuff around into different modules 2016-05-14 14:44:49 +03:00
Sebastian Dröge 35a7cfa032 Use a Source trait instead of directly working with FileSrc 2016-05-14 13:34:50 +03:00
Sebastian Dröge 15865ab86b Implement parsing of URIs in Rust 2016-05-14 12:34:50 +03:00
Sebastian Dröge 5b6a05b548 Implement some error handling and seek support
This now works as a proper replacement of filesrc.
2016-05-14 11:31:13 +03:00
Sebastian Dröge 98c015281e Implement GstURIHandler interface and handle short reads 2016-05-14 11:09:48 +03:00
Sebastian Dröge 924b105147 Implement get_size() 2016-05-13 19:06:06 +03:00
Sebastian Dröge 99070d0a9f Initial file reading without error handling, etc 2016-05-13 19:04:10 +03:00
Sebastian Dröge 8f3d49be31 Move everything into the FileSrc implementation 2016-05-13 18:54:06 +03:00
Sebastian Dröge 76a5226f79 Fill buffer from Rust code 2016-05-13 18:38:28 +03:00
Sebastian Dröge d9657423a4 Add all other needed functions 2016-05-13 18:16:49 +03:00
Sebastian Dröge 0b67ffc9c7 Add location property handling 2016-05-13 18:02:19 +03:00
Sebastian Dröge 833148cef6 Use Box::from/into_raw() 2016-05-13 17:43:32 +03:00
Sebastian Dröge 6a3a42717f Add a Rust struct and store/use it in the C code 2016-05-13 17:35:09 +03:00
Sebastian Dröge 9bb2d32c75 Initial commit 2016-05-13 16:35:48 +03:00