mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 00:26:31 +00:00
gstreamer-app: Assert that GStreamer is initialized before creating instances
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1184>
This commit is contained in:
parent
8d30bcbf4b
commit
7b279b9d6c
2 changed files with 2 additions and 0 deletions
|
@ -271,6 +271,7 @@ impl AppSink {
|
|||
///
|
||||
/// This method returns an instance of [`AppSinkBuilder`](crate::builders::AppSinkBuilder) which can be used to create [`AppSink`] objects.
|
||||
pub fn builder() -> AppSinkBuilder {
|
||||
assert_initialized_main_thread!();
|
||||
AppSinkBuilder::default()
|
||||
}
|
||||
|
||||
|
|
|
@ -216,6 +216,7 @@ impl AppSrc {
|
|||
///
|
||||
/// This method returns an instance of [`AppSrcBuilder`](crate::builders::AppSrcBuilder) which can be used to create [`AppSrc`] objects.
|
||||
pub fn builder() -> AppSrcBuilder {
|
||||
assert_initialized_main_thread!();
|
||||
AppSrcBuilder::default()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue