Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Zeeshan Ali
gstreamer-rs
Commits
210119d9
Commit
210119d9
authored
Dec 20, 2017
by
Sebastian Dröge
🍵
Browse files
Element::set_clock() allows None for the clock parameter
parent
6d7acd20
Changes
2
Hide whitespace changes
Inline
Side-by-side
gir-files/Gst-1.0.gir
View file @
210119d9
...
...
@@ -14177,7 +14177,10 @@ MT safe.</doc>
<doc xml:space="preserve">a #GstElement to set the clock for.</doc>
<type name="Element" c:type="GstElement*"/>
</instance-parameter>
<parameter name="clock" transfer-ownership="none">
<parameter name="clock"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the #GstClock to set for the element.</doc>
<type name="Clock" c:type="GstClock*"/>
</parameter>
gstreamer/src/auto/element.rs
View file @
210119d9
...
...
@@ -146,7 +146,7 @@ pub trait ElementExt {
fn
set_bus
<
'a
,
P
:
Into
<
Option
<&
'a
Bus
>>>
(
&
self
,
bus
:
P
);
fn
set_clock
<
P
:
IsA
<
Clock
>>
(
&
self
,
clock
:
&
P
)
->
Result
<
(),
glib
::
error
::
BoolError
>
;
fn
set_clock
<
'a
,
P
:
IsA
<
Clock
>
+
'a
,
Q
:
Into
<
Option
<&
'a
P
>>
>
(
&
self
,
clock
:
Q
)
->
Result
<
(),
glib
::
error
::
BoolError
>
;
fn
set_context
(
&
self
,
context
:
&
Context
);
...
...
@@ -421,9 +421,11 @@ impl<O: IsA<Element> + IsA<glib::object::Object>> ElementExt for O {
}
}
fn
set_clock
<
P
:
IsA
<
Clock
>>
(
&
self
,
clock
:
&
P
)
->
Result
<
(),
glib
::
error
::
BoolError
>
{
fn
set_clock
<
'a
,
P
:
IsA
<
Clock
>
+
'a
,
Q
:
Into
<
Option
<&
'a
P
>>>
(
&
self
,
clock
:
Q
)
->
Result
<
(),
glib
::
error
::
BoolError
>
{
let
clock
=
clock
.into
();
let
clock
=
clock
.to_glib_none
();
unsafe
{
glib
::
error
::
BoolError
::
from_glib
(
ffi
::
gst_element_set_clock
(
self
.to_glib_none
()
.0
,
clock
.
to_glib_none
()
.
0
),
"Failed to set clock"
)
glib
::
error
::
BoolError
::
from_glib
(
ffi
::
gst_element_set_clock
(
self
.to_glib_none
()
.0
,
clock
.0
),
"Failed to set clock"
)
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment