Sebastian Dröge
fc1e909925
gstreamer/childproxy: Fix unused variable compiler warnings
2020-01-22 22:31:10 +02:00
Sebastian Dröge
5577e8a457
Don't derive Debug impls for generic types where the type parameters don't have to impl Debug themselves
...
This allows to use MappedBuffer and similar types to be properly
debug-printed.
Also change VideoFrame/VideoFrameRef/RTPBuffer from a tuple struct to a
struct with proper field names to make the code easier to understand.
2020-01-22 22:31:10 +02:00
Sebastian Dröge
456ad9fb4a
gstreamer/childproxy: Don't require implementing child_added/removed() signal vfuncs
...
Most implementers will not care about default handlers for these signals
so requiring to implement them is only unnecessarily verbose.
2020-01-22 22:31:10 +02:00
Sebastian Dröge
b127f93cb9
bus: Take the mutex before popping messages for the bus stream
...
Otherwise a message might arrive between popping, getting None and
locking the mutex for storing the waker. In that case we would never
be woken up.
2020-01-22 22:31:10 +02:00
Sebastian Dröge
db1c341cdf
gstreamer/element: Add call_async_future() that returns a future
...
The future would resolve into the return value of the closure that is
called asynchronously on the thread pool, and allows asynchronous
awaiting for it to finish.
let res = element.call_async(|element| {
element.set_state(gst::State::Playing)
}).await;
assert_eq!(res, Ok(gst::StateChangeSuccess::Success))
2020-01-22 22:31:10 +02:00
Guillaume Desmottes
c29a7638d3
gstreamer: caps: BuilderFull: prevent adding features if using any
...
Rework the API to statically prevent users adding extra features if the
builder has been created with builder_full_with_any_features(). It
doesn't make sense to add extra features if all are already included.
2020-01-22 19:44:43 +02:00
Guillaume Desmottes
7f07bac0c7
gstreamer: add Caps::builder_full()
...
API to create a caps containing multiple structures.
Fix #231
2020-01-22 19:44:15 +02:00
Sebastian Dröge
3425bcfe9d
gstreamer: Add getters/setters for BinFlags and fix flags API for PadFlags
...
The BinFlags API was accidentally used for PadFlags, allowing to set
BinFlags on pads which is not very useful.
2020-01-22 19:44:09 +02:00
Sebastian Dröge
28cc573875
Run clippy on --all-targets
...
Also ignore clippy::missing_safety_doc for now.
2019-12-23 13:40:58 +02:00
Sebastian Dröge
fedf4b664a
Fix various new clippy warnings from 1.40
2019-12-23 13:40:58 +02:00
Sebastian Dröge
d2e508eca1
video: Use static inner lifetime for VideoCodecState<Readable>
...
It does not borrow from anything else and can be safely stored away.
Only the VideoCodecState<InNegotiation> is actively borrowing from the
element to ensure that it is only modified during negotiation in a safe
way.
2019-12-23 13:15:34 +02:00
Sebastian Dröge
d62d788630
gstreamer-rtp: Add README.md
2019-12-19 00:37:51 +02:00
Sebastian Dröge
6fd13cc807
Update versions of all dependencies and point to releases instead of GIT
2019-12-18 19:15:21 +02:00
Sebastian Dröge
98dcb27abd
Update documentation
2019-12-18 19:15:21 +02:00
Sebastian Dröge
bb321f7fa8
Update CHANGELOG.md for 0.15.0
2019-12-18 19:15:21 +02:00
Sebastian Dröge
573055cb1e
gstreamer-video: Require &mut self for VideoCodecFrame functions that modify it
...
And add non-mutable getters for input/output buffer
2019-12-18 18:42:40 +02:00
Sebastian Dröge
12416a4031
gstreamer-base: Require &mut self for BaseParseFrame functions that modify it
...
And add non-mutable getters for input/output buffer
2019-12-18 18:38:29 +02:00
Sebastian Dröge
2ba5105b80
Implement Sync/Send for more types and don't implement Send for TypeFind
...
They can actually be shared with multiple threads at the same time
safely as all functions requiring an immutable reference are
thread-safe.
OTOH TypeFind can't be shared safely between different threads as not
all implementations of the TypeFind struct are thread-safe.
2019-12-18 18:37:44 +02:00
Sebastian Dröge
da8187b016
gstreamer-audio: Add subclassing bindings for AudioSrc
2019-12-18 16:07:32 +02:00
Sebastian Dröge
b182882c7e
gstreamer-audio: Generate bindings for AudioBaseSrc and AudioSrc
2019-12-18 16:07:28 +02:00
Sebastian Dröge
9657f4ce78
gstreamer-audio: Add Debug and Clone impls for AudioRingBufferSpec
2019-12-18 16:04:48 +02:00
Hans Ole Hatzel
df251de2a1
gstreamer-audio: Add subclassing bindings for AudioSink
2019-12-18 16:04:48 +02:00
Hans Ole Hatzel
d3577ab2ae
gstreamer-audio: Add bindings for AudioRingBufferSpec
...
Includes auto generated AudioRingBufferFormatType
2019-12-18 15:15:03 +02:00
Hans Ole Hatzel
da848d2946
gstreamer-audio: Generate bindings for AudioSink and AudioBaseSink
2019-12-18 15:14:50 +02:00
Hans Ole Hatzel
14a55dc73d
gstreamer-base/basesink: Provide default implementation for render
...
We need some classes derived from `BaseSink` to not enforce render being
implemented.
An example of this is AudioSink which only requires the user to
implement `write` but not `render`, so the default implementation
of render needs to be called.
2019-12-18 15:14:35 +02:00
Sebastian Dröge
be3c378f28
Use Results instead of Options where they signal an error instead of just a missing value
...
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-12-17 22:21:28 +02:00
Sebastian Dröge
68c48c1984
Update gir
2019-12-17 21:02:15 +02:00
Tony Jinwoo Ahn
700332dd3e
gstreamer-video: Change functions from returning Option to Result
...
Partial work for:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-12-17 08:41:51 +00:00
Tony Jinwoo Ahn
c3b7f0f353
gstreamer-gl, gstreamer-pbutils, gstreamer-sdp: Change functions from returning Option to Result
...
Partial work for:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-12-17 08:20:47 +00:00
Tony Jinwoo Ahn
62c0b689a6
gstreamer-base/{adapter,functions}, gstreamer-video/video_info: Change functions from returning Option to Result
...
Partial work for:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-12-16 11:29:51 +00:00
Sebastian Dröge
eaafbd14f7
Regenerate
2019-12-15 12:19:33 +02:00
Sebastian Dröge
653b7f1da4
Update gir-files to 1.16.2
2019-12-15 12:18:09 +02:00
Sebastian Dröge
78525333cc
Update gir
2019-12-15 12:17:32 +02:00
Tony Jinwoo Ahn
3e3c5205db
gstreamer-video/video_info: Change functions from returning Option to Result
...
Partial work for:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-12-15 08:36:56 +00:00
Tony Jinwoo Ahn
c563fb6f44
gstreamer-audio/audio_info: Change functions from returning Option to Result
...
Partial work for:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-12-14 14:10:06 +00:00
Sebastian Dröge
90854eb047
base/basesrc: Add bindings for BaseSrc::get_times()
...
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/228
2019-12-10 19:49:36 +02:00
Sebastian Dröge
f417d68820
Remove usage of glib_floating_reference_guard!()
...
It's not needed anymore.
2019-12-07 23:05:14 +02:00
Sebastian Dröge
2375c9da59
gstreamer/element: Don't steal floating references passed into release_pad()
...
They are apparently not part of this element so we can directly return
here instead of stealing the reference.
2019-12-07 22:58:26 +02:00
Sebastian Dröge
802fa4fcb4
gstreamer/bin: Take a strong reference of the element passed into remove_element()
...
It might be gone once we called into the parent class' implementation so
we need to keep a strong reference around here. Also we need to ensure
that we don't accidentally steal a floating reference from the caller
here: if the element is still floating it is apparently not part of this
bin and we can directly return FALSE.
2019-12-07 22:56:11 +02:00
Sebastian Dröge
bef1143df3
gstreamer/device: Preserve floating reference flag from create_element() parent class' implementation
2019-12-07 22:51:57 +02:00
Sebastian Dröge
84ac2ef073
bin: Use from_glib_none() in Bin::add() for subclasses
...
This way we take ownership of any floating references passed in here, as
required by the GstBin API, instead of just borrowing the reference and
having someone else sink it or not.
2019-12-04 18:49:12 +02:00
Ruben Gonzalez
ead607ab8e
gstreamer-audio: Add the missing constants for all the audio formats
...
Include not target_endian related to improve developer experience.
2019-12-03 15:14:20 +01:00
Tony Jinwoo Ahn
1f7bd78bb2
gstreamer-audio/audio_channel_position: Change function from returning Option to Result
...
Partial work for:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-11-25 16:48:27 +00:00
Tony Jinwoo Ahn
e4adef3ba7
gstreamer-gl/{egl,x11}: Change functions from returning Option to Result
...
Partial work for:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-11-24 20:55:54 +00:00
Tony Jinwoo Ahn
a7090b2a03
gstreamer-gl/wayland: Change a function from returning an Option to Results
...
Partial work for:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-11-23 12:51:38 +00:00
François Laignel
fd6bbf5929
Fully qualify glib_bool_error! in gst_loggable_error!
2019-11-21 19:18:01 +01:00
Sebastian Dröge
2c4c2c4784
sdp: Guard against NULL strings/arrays in the SDP data structures
...
While all these are invalid for a proper SDP, they appear as NULL when
creating a new, empty SDP.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/221
2019-11-21 09:39:02 +00:00
Sebastian Dröge
d7556131e3
ges: Get rid of now unneeded fragile dependency
2019-11-21 09:53:10 +02:00
Sebastian Dröge
175863668d
Regenerate everything with latest gir
2019-11-21 09:52:51 +02:00
Sebastian Dröge
cecf70af1b
Update gir
2019-11-21 09:51:19 +02:00