Commit graph

615 commits

Author SHA1 Message Date
Matthew Waters
fa054fe3b0 gst/tags: combine the static tag references into the impl_tag macro
There's no real reason to have them separate when there's already a
macro making types for different tags.
2018-07-12 07:22:39 +02:00
Sebastian Dröge
73a5b26638 Use ParamSpec for the deep-notify signal callback instead of just the name
And allow filtering by property-name via the signal details
2018-07-09 19:47:15 +02:00
Sebastian Dröge
dc32d338ef Let various Caps operations take &CapsRef instead of &Caps 2018-07-06 17:58:54 +02:00
Sebastian Dröge
480d373fbc Caps::subtract() does not take ownership of the arguments and can be implemented for CapsRef 2018-07-06 17:56:55 +02:00
Sebastian Dröge
8c268ecd06 Gracefully return None in Caps::get_structure() if the index is too high 2018-07-06 10:36:00 +02:00
Sebastian Dröge
75acd7ea95 Fix typefind test if typefind factories without caps are available 2018-07-06 10:35:57 +02:00
Sebastian Dröge
e88017f914 Ensure that miniobjects are writable before creating a mutable borrow 2018-07-06 10:29:09 +02:00
Sebastian Dröge
a3dffc2faa Switch from futures to futures-preview crates
Fixes https://github.com/sdroege/gstreamer-rs/issues/118
2018-06-29 07:43:29 +02:00
Sebastian Dröge
e0972ae1e5 Get rid of manual usage of callback_guard! 2018-06-24 14:52:50 +03:00
Sebastian Dröge
2085d170be Get rid of callback_guard! as unwinding through FFI is defined behaviour now and aborts 2018-06-24 14:42:11 +03:00
Sebastian Dröge
bd1fb746de Update to num-rational 0.2 2018-06-22 10:27:14 +03:00
JohanGoversTech
db3fe69415 Change return type of add_probe to support removing (#116)
* Change return type of add_probe to support 0 PadProbeId

* use from_glib for the conversion of the PadProbeId
2018-06-14 15:45:54 +03:00
François Laignel
f4d57a6652 Fix memory issue building a Sample with an info Structure
The following code in a `[test]`:
``` rust
let info = Structure::builder("sample.info")
    .field("f3", &123i32)
    .build();
let sample = Sample:🆕:<GenericFormattedValue>(
        None,
        None,
        None,
        Some(info.as_ref())
    );
```

generates one of the followings executing `cargo test`:
```
- segmentation fault
- signal: 6, SIGABRT: process abort signal
- signal: 11, SIGSEGV: invalid memory reference
```

This is due to `ffi::gst_sample_new` expecting to take ownership of the `info`
`Structure`.
2018-06-12 00:23:10 +03:00
Sebastian Dröge
d2272fefa7 Update CHANGELOG.md for 0.11.3 2018-06-08 10:27:24 +03:00
Sebastian Dröge
c2ee8d226c Print more fields in the VideoInfo fmt::Debug impl 2018-06-08 10:19:25 +03:00
Sebastian Dröge
f271c99498 Implement fmt::Debug for AudioInfo 2018-06-08 10:19:06 +03:00
Sebastian Dröge
85ca3b94a3 Add accessors for the type/sdp fields of the WebRTCSessionDescription
See https://github.com/sdroege/gstreamer-rs/issues/108#issuecomment-393505826
2018-06-06 00:31:05 +03:00
Sebastian Dröge
ba4b4a03f0 Update gir-files from gstreamer-sys 2018-06-06 00:26:36 +03:00
Philippe Normand
3451d5702d GstPlayer: Expose PlayerVisualization name and description
The name is the identifier of the visualization that has to be passed to
gstreamer_player::Player::set_visualization().

Fixes #111
2018-06-04 20:47:59 +03:00
Sebastian Dröge
b6a5686798 Add various other WebRTC related enums/flags types to the bindings
While they are not used by the types we have, they are used by the
webrtcbin element and are required for setting properties.

Fixes https://github.com/sdroege/gstreamer-rs/issues/110
2018-06-04 09:00:09 +03:00
Sebastian Dröge
8d0a0ee6b1 Directly use byte-slice-cast on the mapped buffer
No need to first get a byte slice from it anymore due to the buffer map
implementing AsRef/AsMut for byte slices
2018-06-01 11:55:13 +03:00
Sebastian Dröge
8ff9294f9d Update to byte-slice-cast 0.2.0 2018-06-01 11:52:56 +03:00
maxmcd
40c206d813 Add sdp message init in parse functions 2018-05-31 16:30:18 +03:00
Sebastian Dröge
1192a027b4 Regenerated with latest GIR and GIR files 2018-05-21 11:55:19 +03:00
Sebastian Dröge
82b56e782b Update GStreamer GIR files from latest 1.14 branch 2018-05-21 11:19:54 +03:00
Sebastian Dröge
4692806b00 Add Bus::remove_watch()
It was accidentially ignored before
2018-05-19 10:37:09 +03:00
Sebastian Dröge
da6b04abfd Bus::create_watch() can't return None, change it to return no Option 2018-05-19 10:36:15 +03:00
Sebastian Dröge
dc219af36e Add another comment to the appsrc example about the need-data callback not being mandatory 2018-05-18 11:42:24 +03:00
Sebastian Dröge
7734725da1 Change appsrc example to directly push data from the need-data callback
There's no need to start yet another thread just to push data in this
case, we can simply use the callback and store the frame counter in the
mutable environment of the closure.
2018-05-18 11:38:50 +03:00
Thibault Saunier
a10532c379 video_info: Implement fmt::Debug 2018-05-14 09:22:25 +03:00
Thibault Saunier
2962f186f7 Print pointer value when formatting debug strings 2018-05-14 09:22:25 +03:00
Sebastian Dröge
be646e78d9 Update to muldiv 0.2 2018-05-11 10:37:19 +03:00
Sebastian Dröge
7429138274 Update CHANGELOG.md for 0.11.2 2018-05-09 12:48:33 +03:00
Sebastian Dröge
c31921e093 Further work-arounds for floating reference handling changes between 1.12 and 1.14
This fixes various memory-safety issues caused by broken reference
counting. We have to handle pre-1.14 and post-1.14 differently in
constructors.

See https://bugzilla.gnome.org/show_bug.cgi?id=743062#c30
2018-05-09 12:20:59 +03:00
Sebastian Dröge
2cefd9aea6 Re-run everything through rustfmt 2018-04-25 11:13:14 +03:00
Sebastian Dröge
062403bdac appsrc need-data and all appsink callbacks can only be called from a single thread at a time
As such, make them FnMut and remove the Sync requirement from them. We
can only do this for the callbacks and not the signals, because the
signals can in theory be emitted from anybody (outside the object!)
at any time.
2018-04-25 11:13:14 +03:00
Sebastian Dröge
5ef13a11b0 Fix compiler warning about too many parenthesis 2018-04-23 20:46:29 +03:00
Sebastian Dröge
2d260b4f0c Rename manual files with too many underscores 2018-04-23 20:45:15 +03:00
Sebastian Dröge
46d27e3e75 Regenerate everything with latest GIR 2018-04-23 20:45:15 +03:00
Sebastian Dröge
a4c3c7cd76 Add futures example using the GLib futures executor 2018-04-23 20:31:27 +03:00
Sebastian Dröge
4b4f369200 Rename tokio example to futures
It has nothing to do with tokio anymore with the newer futures version,
tokio would only come in if actual tokio API (e.g. for sockets) is used.
2018-04-23 20:27:51 +03:00
Sebastian Dröge
a276c226fd Port BusStream to futures 0.2 2018-04-23 20:27:17 +03:00
Sebastian Dröge
5dd17d6248 Update CHANGELOG.md for 0.11.1 2018-04-07 20:32:28 +03:00
Sebastian Dröge
3784b0a97d Add CHANGELOG.md/README.md to pbutils 2018-04-07 20:32:22 +03:00
Sebastian Dröge
03055f4e84 Change Structure/StructureRef to_string() to the minimal required fix
And add a comment to why we need it. No other struct with a to_string()
function is affected.

https://github.com/sdroege/gstreamer-rs/issues/101
2018-04-07 13:37:44 +03:00
Sebastian Dröge
ce9b98f338 Add Display impl for StructureRef too 2018-04-06 13:22:08 +03:00
Sebastian Dröge
f346d57b4f Fix infinite recursion in Structure::to_string()
Instead of StructureRef's to_string(), we were calling
ToString::to_string() in the Display impl. Which then called into itself
again.

Fixes https://github.com/sdroege/gstreamer-rs/issues/101
2018-04-06 13:22:08 +03:00
Guillaume Desmottes
c5617f6a47 WIP: test Structure string conversions 2018-04-06 13:22:08 +03:00
Sebastian Dröge
2fe925927b Add missing imports to sdp library and fix build 2018-04-05 23:06:18 +03:00
Sebastian Dröge
ad038cb54d Update webrtc/sdp docs 2018-04-05 22:25:13 +03:00