Skip to content
GitLab
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 Khan
gstreamer-rs
Commits
3179806f
Commit
3179806f
authored
Nov 05, 2017
by
Sebastian Dröge
🍵
Browse files
Regenerate everything with latest GIR
And fix-up manual code
parent
99a60e92
Changes
68
Hide whitespace changes
Inline
Side-by-side
gstreamer-app/src/auto/app_sink.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
gstreamer-app/src/auto/app_src.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
AppStreamType
;
...
...
gstreamer-app/src/auto/enums.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
@@ -7,7 +7,6 @@ use glib::StaticType;
use
glib
::
value
::{
Value
,
SetValue
,
FromValue
,
FromValueOptional
};
use
gobject_ffi
;
use
glib
::
translate
::
*
;
use
std
;
#[derive(Clone,
Copy,
Debug,
Eq,
PartialEq,
Hash)]
pub
enum
AppStreamType
{
...
...
@@ -27,7 +26,7 @@ impl ToGlib for AppStreamType {
AppStreamType
::
Stream
=>
ffi
::
GST_APP_STREAM_TYPE_STREAM
,
AppStreamType
::
Seekable
=>
ffi
::
GST_APP_STREAM_TYPE_SEEKABLE
,
AppStreamType
::
RandomAccess
=>
ffi
::
GST_APP_STREAM_TYPE_RANDOM_ACCESS
,
AppStreamType
::
__Unknown
(
value
)
=>
unsafe
{
std
::
mem
::
transmute
(
value
)}
AppStreamType
::
__Unknown
(
value
)
=>
value
}
}
}
...
...
@@ -36,7 +35,7 @@ impl ToGlib for AppStreamType {
impl
FromGlib
<
ffi
::
GstAppStreamType
>
for
AppStreamType
{
fn
from_glib
(
value
:
ffi
::
GstAppStreamType
)
->
Self
{
skip_assert_initialized!
();
match
value
as
i32
{
match
value
{
0
=>
AppStreamType
::
Stream
,
1
=>
AppStreamType
::
Seekable
,
2
=>
AppStreamType
::
RandomAccess
,
...
...
@@ -59,13 +58,13 @@ impl<'a> FromValueOptional<'a> for AppStreamType {
impl
<
'a
>
FromValue
<
'a
>
for
AppStreamType
{
unsafe
fn
from_value
(
value
:
&
Value
)
->
Self
{
from_glib
(
std
::
mem
::
transmute
::
<
i32
,
ffi
::
GstAppStreamType
>
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
)
from_glib
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
}
}
impl
SetValue
for
AppStreamType
{
unsafe
fn
set_value
(
value
:
&
mut
Value
,
this
:
&
Self
)
{
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
()
as
i32
)
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
())
}
}
gstreamer-app/src/auto/flags.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
gstreamer-app/src/auto/mod.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
mod
app_sink
;
...
...
gstreamer-audio/src/audio_channel_position.rs
View file @
3179806f
...
...
@@ -36,7 +36,7 @@ impl AudioChannelPosition {
let
positions_raw
:
[
ffi
::
GstAudioChannelPosition
;
64
]
=
array_init
::
array_init_copy
(|
i
|
if
i
>=
len
as
usize
{
ffi
::
G
stAudioChannelPosition
::
Invalid
ffi
::
G
ST_AUDIO_CHANNEL_POSITION_INVALID
}
else
{
positions
[
i
]
.to_glib
()
});
...
...
@@ -69,7 +69,7 @@ impl AudioChannelPosition {
let
len
=
positions
.len
();
let
mut
positions_raw
:
[
ffi
::
GstAudioChannelPosition
;
64
]
=
[
ffi
::
G
stAudioChannelPosition
::
Invalid
;
64
];
[
ffi
::
G
ST_AUDIO_CHANNEL_POSITION_INVALID
;
64
];
let
valid
:
bool
=
unsafe
{
from_glib
(
ffi
::
gst_audio_channel_positions_from_mask
(
len
as
i32
,
...
...
@@ -102,7 +102,7 @@ impl AudioChannelPosition {
let
len
=
positions
.len
();
let
mut
positions_raw
:
[
ffi
::
GstAudioChannelPosition
;
64
]
=
array_init
::
array_init_copy
(|
i
|
if
i
>=
len
as
usize
{
ffi
::
G
stAudioChannelPosition
::
Invalid
ffi
::
G
ST_AUDIO_CHANNEL_POSITION_INVALID
}
else
{
positions
[
i
]
.to_glib
()
});
...
...
@@ -145,7 +145,7 @@ impl AudioChannelPosition {
let
len
=
positions
.len
();
let
positions_raw
:
[
ffi
::
GstAudioChannelPosition
;
64
]
=
array_init
::
array_init_copy
(|
i
|
if
i
>=
len
as
usize
{
ffi
::
G
stAudioChannelPosition
::
Invalid
ffi
::
G
ST_AUDIO_CHANNEL_POSITION_INVALID
}
else
{
positions
[
i
]
.to_glib
()
});
...
...
@@ -178,14 +178,14 @@ pub fn buffer_reorder_channels(
let
from_raw
:
[
ffi
::
GstAudioChannelPosition
;
64
]
=
array_init
::
array_init_copy
(|
i
|
if
i
>=
from_len
as
usize
{
ffi
::
G
stAudioChannelPosition
::
Invalid
ffi
::
G
ST_AUDIO_CHANNEL_POSITION_INVALID
}
else
{
from
[
i
]
.to_glib
()
});
let
to_raw
:
[
ffi
::
GstAudioChannelPosition
;
64
]
=
array_init
::
array_init_copy
(|
i
|
if
i
>=
to_len
as
usize
{
ffi
::
G
stAudioChannelPosition
::
Invalid
ffi
::
G
ST_AUDIO_CHANNEL_POSITION_INVALID
}
else
{
to
[
i
]
.to_glib
()
});
...
...
@@ -225,14 +225,14 @@ pub fn reorder_channels(
let
from_raw
:
[
ffi
::
GstAudioChannelPosition
;
64
]
=
array_init
::
array_init_copy
(|
i
|
if
i
>=
from_len
as
usize
{
ffi
::
G
stAudioChannelPosition
::
Invalid
ffi
::
G
ST_AUDIO_CHANNEL_POSITION_INVALID
}
else
{
from
[
i
]
.to_glib
()
});
let
to_raw
:
[
ffi
::
GstAudioChannelPosition
;
64
]
=
array_init
::
array_init_copy
(|
i
|
if
i
>=
to_len
as
usize
{
ffi
::
G
stAudioChannelPosition
::
Invalid
ffi
::
G
ST_AUDIO_CHANNEL_POSITION_INVALID
}
else
{
to
[
i
]
.to_glib
()
});
...
...
@@ -271,14 +271,14 @@ pub fn get_channel_reorder_map(
let
from_raw
:
[
ffi
::
GstAudioChannelPosition
;
64
]
=
array_init
::
array_init_copy
(|
i
|
if
i
>=
from_len
as
usize
{
ffi
::
G
stAudioChannelPosition
::
Invalid
ffi
::
G
ST_AUDIO_CHANNEL_POSITION_INVALID
}
else
{
from
[
i
]
.to_glib
()
});
let
to_raw
:
[
ffi
::
GstAudioChannelPosition
;
64
]
=
array_init
::
array_init_copy
(|
i
|
if
i
>=
to_len
as
usize
{
ffi
::
G
stAudioChannelPosition
::
Invalid
ffi
::
G
ST_AUDIO_CHANNEL_POSITION_INVALID
}
else
{
to
[
i
]
.to_glib
()
});
...
...
gstreamer-audio/src/audio_info.rs
View file @
3179806f
...
...
@@ -44,7 +44,7 @@ impl<'a> AudioInfoBuilder<'a> {
let
positions
:
[
ffi
::
GstAudioChannelPosition
;
64
]
=
array_init
::
array_init_copy
(|
i
|
if
i
>=
self
.channels
as
usize
{
ffi
::
G
stAudioChannelPosition
::
Invalid
ffi
::
G
ST_AUDIO_CHANNEL_POSITION_INVALID
}
else
{
p
[
i
]
.to_glib
()
});
...
...
gstreamer-audio/src/auto/enums.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
@@ -7,7 +7,6 @@ use glib::StaticType;
use
glib
::
value
::{
Value
,
SetValue
,
FromValue
,
FromValueOptional
};
use
gobject_ffi
;
use
glib
::
translate
::
*
;
use
std
;
#[derive(Clone,
Copy,
Debug,
Eq,
PartialEq,
Hash)]
pub
enum
AudioChannelPosition
{
...
...
@@ -83,7 +82,7 @@ impl ToGlib for AudioChannelPosition {
AudioChannelPosition
::
WideRight
=>
ffi
::
GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT
,
AudioChannelPosition
::
SurroundLeft
=>
ffi
::
GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT
,
AudioChannelPosition
::
SurroundRight
=>
ffi
::
GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT
,
AudioChannelPosition
::
__Unknown
(
value
)
=>
unsafe
{
std
::
mem
::
transmute
(
value
)}
AudioChannelPosition
::
__Unknown
(
value
)
=>
value
}
}
}
...
...
@@ -92,7 +91,7 @@ impl ToGlib for AudioChannelPosition {
impl
FromGlib
<
ffi
::
GstAudioChannelPosition
>
for
AudioChannelPosition
{
fn
from_glib
(
value
:
ffi
::
GstAudioChannelPosition
)
->
Self
{
skip_assert_initialized!
();
match
value
as
i32
{
match
value
{
-
3
=>
AudioChannelPosition
::
None
,
-
2
=>
AudioChannelPosition
::
Mono
,
-
1
=>
AudioChannelPosition
::
Invalid
,
...
...
@@ -143,13 +142,13 @@ impl<'a> FromValueOptional<'a> for AudioChannelPosition {
impl
<
'a
>
FromValue
<
'a
>
for
AudioChannelPosition
{
unsafe
fn
from_value
(
value
:
&
Value
)
->
Self
{
from_glib
(
std
::
mem
::
transmute
::
<
i32
,
ffi
::
GstAudioChannelPosition
>
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
)
from_glib
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
}
}
impl
SetValue
for
AudioChannelPosition
{
unsafe
fn
set_value
(
value
:
&
mut
Value
,
this
:
&
Self
)
{
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
()
as
i32
)
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
())
}
}
...
...
@@ -229,7 +228,7 @@ impl ToGlib for AudioFormat {
AudioFormat
::
F32be
=>
ffi
::
GST_AUDIO_FORMAT_F32BE
,
AudioFormat
::
F64le
=>
ffi
::
GST_AUDIO_FORMAT_F64LE
,
AudioFormat
::
F64be
=>
ffi
::
GST_AUDIO_FORMAT_F64BE
,
AudioFormat
::
__Unknown
(
value
)
=>
unsafe
{
std
::
mem
::
transmute
(
value
)}
AudioFormat
::
__Unknown
(
value
)
=>
value
}
}
}
...
...
@@ -238,7 +237,7 @@ impl ToGlib for AudioFormat {
impl
FromGlib
<
ffi
::
GstAudioFormat
>
for
AudioFormat
{
fn
from_glib
(
value
:
ffi
::
GstAudioFormat
)
->
Self
{
skip_assert_initialized!
();
match
value
as
i32
{
match
value
{
0
=>
AudioFormat
::
Unknown
,
1
=>
AudioFormat
::
Encoded
,
2
=>
AudioFormat
::
S8
,
...
...
@@ -290,13 +289,13 @@ impl<'a> FromValueOptional<'a> for AudioFormat {
impl
<
'a
>
FromValue
<
'a
>
for
AudioFormat
{
unsafe
fn
from_value
(
value
:
&
Value
)
->
Self
{
from_glib
(
std
::
mem
::
transmute
::
<
i32
,
ffi
::
GstAudioFormat
>
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
)
from_glib
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
}
}
impl
SetValue
for
AudioFormat
{
unsafe
fn
set_value
(
value
:
&
mut
Value
,
this
:
&
Self
)
{
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
()
as
i32
)
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
())
}
}
...
...
@@ -316,7 +315,7 @@ impl ToGlib for AudioLayout {
match
*
self
{
AudioLayout
::
Interleaved
=>
ffi
::
GST_AUDIO_LAYOUT_INTERLEAVED
,
AudioLayout
::
NonInterleaved
=>
ffi
::
GST_AUDIO_LAYOUT_NON_INTERLEAVED
,
AudioLayout
::
__Unknown
(
value
)
=>
unsafe
{
std
::
mem
::
transmute
(
value
)}
AudioLayout
::
__Unknown
(
value
)
=>
value
}
}
}
...
...
@@ -325,7 +324,7 @@ impl ToGlib for AudioLayout {
impl
FromGlib
<
ffi
::
GstAudioLayout
>
for
AudioLayout
{
fn
from_glib
(
value
:
ffi
::
GstAudioLayout
)
->
Self
{
skip_assert_initialized!
();
match
value
as
i32
{
match
value
{
0
=>
AudioLayout
::
Interleaved
,
1
=>
AudioLayout
::
NonInterleaved
,
value
=>
AudioLayout
::
__Unknown
(
value
),
...
...
@@ -347,13 +346,13 @@ impl<'a> FromValueOptional<'a> for AudioLayout {
impl
<
'a
>
FromValue
<
'a
>
for
AudioLayout
{
unsafe
fn
from_value
(
value
:
&
Value
)
->
Self
{
from_glib
(
std
::
mem
::
transmute
::
<
i32
,
ffi
::
GstAudioLayout
>
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
)
from_glib
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
}
}
impl
SetValue
for
AudioLayout
{
unsafe
fn
set_value
(
value
:
&
mut
Value
,
this
:
&
Self
)
{
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
()
as
i32
)
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
())
}
}
...
...
@@ -375,7 +374,7 @@ impl ToGlib for StreamVolumeFormat {
StreamVolumeFormat
::
Linear
=>
ffi
::
GST_STREAM_VOLUME_FORMAT_LINEAR
,
StreamVolumeFormat
::
Cubic
=>
ffi
::
GST_STREAM_VOLUME_FORMAT_CUBIC
,
StreamVolumeFormat
::
Db
=>
ffi
::
GST_STREAM_VOLUME_FORMAT_DB
,
StreamVolumeFormat
::
__Unknown
(
value
)
=>
unsafe
{
std
::
mem
::
transmute
(
value
)}
StreamVolumeFormat
::
__Unknown
(
value
)
=>
value
}
}
}
...
...
@@ -384,7 +383,7 @@ impl ToGlib for StreamVolumeFormat {
impl
FromGlib
<
ffi
::
GstStreamVolumeFormat
>
for
StreamVolumeFormat
{
fn
from_glib
(
value
:
ffi
::
GstStreamVolumeFormat
)
->
Self
{
skip_assert_initialized!
();
match
value
as
i32
{
match
value
{
0
=>
StreamVolumeFormat
::
Linear
,
1
=>
StreamVolumeFormat
::
Cubic
,
2
=>
StreamVolumeFormat
::
Db
,
...
...
gstreamer-audio/src/auto/flags.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
gstreamer-audio/src/auto/mod.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
mod
stream_volume
;
...
...
gstreamer-audio/src/auto/stream_volume.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
StreamVolumeFormat
;
...
...
gstreamer-base/src/auto/adapter.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
gstreamer-base/src/auto/base_sink.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
gstreamer-base/src/auto/base_src.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
gstreamer-base/src/auto/base_transform.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
gstreamer-base/src/auto/enums.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
use
glib
::
translate
::
*
;
use
std
;
gstreamer-base/src/auto/flags.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
gstreamer-base/src/auto/mod.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
mod
adapter
;
...
...
gstreamer-base/src/auto/push_src.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
BaseSrc
;
...
...
gstreamer-player/src/auto/enums.rs
View file @
3179806f
// This file was generated by gir (
0fe730
d) from gir-files (???)
// This file was generated by gir (
94e079
d) from gir-files (???)
// DO NOT EDIT
use
ffi
;
...
...
@@ -9,7 +9,6 @@ use glib::StaticType;
use
glib
::
value
::{
Value
,
SetValue
,
FromValue
,
FromValueOptional
};
use
gobject_ffi
;
use
glib
::
translate
::
*
;
use
std
;
#[derive(Clone,
Copy,
Debug,
Eq,
PartialEq,
Hash)]
pub
enum
PlayerColorBalanceType
{
...
...
@@ -31,7 +30,7 @@ impl ToGlib for PlayerColorBalanceType {
PlayerColorBalanceType
::
Brightness
=>
ffi
::
GST_PLAYER_COLOR_BALANCE_BRIGHTNESS
,
PlayerColorBalanceType
::
Saturation
=>
ffi
::
GST_PLAYER_COLOR_BALANCE_SATURATION
,
PlayerColorBalanceType
::
Contrast
=>
ffi
::
GST_PLAYER_COLOR_BALANCE_CONTRAST
,
PlayerColorBalanceType
::
__Unknown
(
value
)
=>
unsafe
{
std
::
mem
::
transmute
(
value
)}
PlayerColorBalanceType
::
__Unknown
(
value
)
=>
value
}
}
}
...
...
@@ -40,7 +39,7 @@ impl ToGlib for PlayerColorBalanceType {
impl
FromGlib
<
ffi
::
GstPlayerColorBalanceType
>
for
PlayerColorBalanceType
{
fn
from_glib
(
value
:
ffi
::
GstPlayerColorBalanceType
)
->
Self
{
skip_assert_initialized!
();
match
value
as
i32
{
match
value
{
3
=>
PlayerColorBalanceType
::
Hue
,
0
=>
PlayerColorBalanceType
::
Brightness
,
2
=>
PlayerColorBalanceType
::
Saturation
,
...
...
@@ -64,13 +63,13 @@ impl<'a> FromValueOptional<'a> for PlayerColorBalanceType {
impl
<
'a
>
FromValue
<
'a
>
for
PlayerColorBalanceType
{
unsafe
fn
from_value
(
value
:
&
Value
)
->
Self
{
from_glib
(
std
::
mem
::
transmute
::
<
i32
,
ffi
::
GstPlayerColorBalanceType
>
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
)
from_glib
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
}
}
impl
SetValue
for
PlayerColorBalanceType
{
unsafe
fn
set_value
(
value
:
&
mut
Value
,
this
:
&
Self
)
{
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
()
as
i32
)
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
())
}
}
...
...
@@ -88,7 +87,7 @@ impl ToGlib for PlayerError {
fn
to_glib
(
&
self
)
->
ffi
::
GstPlayerError
{
match
*
self
{
PlayerError
::
Failed
=>
ffi
::
GST_PLAYER_ERROR_FAILED
,
PlayerError
::
__Unknown
(
value
)
=>
unsafe
{
std
::
mem
::
transmute
(
value
)}
PlayerError
::
__Unknown
(
value
)
=>
value
}
}
}
...
...
@@ -97,7 +96,7 @@ impl ToGlib for PlayerError {
impl
FromGlib
<
ffi
::
GstPlayerError
>
for
PlayerError
{
fn
from_glib
(
value
:
ffi
::
GstPlayerError
)
->
Self
{
skip_assert_initialized!
();
match
value
as
i32
{
match
value
{
0
=>
PlayerError
::
Failed
,
value
=>
PlayerError
::
__Unknown
(
value
),
}
...
...
@@ -111,7 +110,7 @@ impl ErrorDomain for PlayerError {
}
fn
code
(
self
)
->
i32
{
self
.to_glib
()
as
i32
self
.to_glib
()
}
fn
from
(
code
:
i32
)
->
Option
<
Self
>
{
...
...
@@ -137,13 +136,13 @@ impl<'a> FromValueOptional<'a> for PlayerError {
impl
<
'a
>
FromValue
<
'a
>
for
PlayerError
{
unsafe
fn
from_value
(
value
:
&
Value
)
->
Self
{
from_glib
(
std
::
mem
::
transmute
::
<
i32
,
ffi
::
GstPlayerError
>
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
)
from_glib
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
}
}
impl
SetValue
for
PlayerError
{
unsafe
fn
set_value
(
value
:
&
mut
Value
,
this
:
&
Self
)
{
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
()
as
i32
)
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
())
}
}
...
...
@@ -169,7 +168,7 @@ impl ToGlib for PlayerSnapshotFormat {
PlayerSnapshotFormat
::
RawBgrx
=>
ffi
::
GST_PLAYER_THUMBNAIL_RAW_BGRx
,
PlayerSnapshotFormat
::
Jpg
=>
ffi
::
GST_PLAYER_THUMBNAIL_JPG
,
PlayerSnapshotFormat
::
Png
=>
ffi
::
GST_PLAYER_THUMBNAIL_PNG
,
PlayerSnapshotFormat
::
__Unknown
(
value
)
=>
unsafe
{
std
::
mem
::
transmute
(
value
)}
PlayerSnapshotFormat
::
__Unknown
(
value
)
=>
value
}
}
}
...
...
@@ -178,7 +177,7 @@ impl ToGlib for PlayerSnapshotFormat {
impl
FromGlib
<
ffi
::
GstPlayerSnapshotFormat
>
for
PlayerSnapshotFormat
{
fn
from_glib
(
value
:
ffi
::
GstPlayerSnapshotFormat
)
->
Self
{
skip_assert_initialized!
();
match
value
as
i32
{
match
value
{
0
=>
PlayerSnapshotFormat
::
RawNative
,
1
=>
PlayerSnapshotFormat
::
RawXrgb
,
2
=>
PlayerSnapshotFormat
::
RawBgrx
,
...
...
@@ -209,7 +208,7 @@ impl ToGlib for PlayerState {
PlayerState
::
Buffering
=>
ffi
::
GST_PLAYER_STATE_BUFFERING
,
PlayerState
::
Paused
=>
ffi
::
GST_PLAYER_STATE_PAUSED
,
PlayerState
::
Playing
=>
ffi
::
GST_PLAYER_STATE_PLAYING
,
PlayerState
::
__Unknown
(
value
)
=>
unsafe
{
std
::
mem
::
transmute
(
value
)}
PlayerState
::
__Unknown
(
value
)
=>
value
}
}
}
...
...
@@ -218,7 +217,7 @@ impl ToGlib for PlayerState {
impl
FromGlib
<
ffi
::
GstPlayerState
>
for
PlayerState
{
fn
from_glib
(
value
:
ffi
::
GstPlayerState
)
->
Self
{
skip_assert_initialized!
();
match
value
as
i32
{
match
value
{
0
=>
PlayerState
::
Stopped
,
1
=>
PlayerState
::
Buffering
,
2
=>
PlayerState
::
Paused
,
...
...
@@ -242,13 +241,13 @@ impl<'a> FromValueOptional<'a> for PlayerState {
impl
<
'a
>
FromValue
<
'a
>
for
PlayerState
{
unsafe
fn
from_value
(
value
:
&
Value
)
->
Self
{
from_glib
(
std
::
mem
::
transmute
::
<
i32
,
ffi
::
GstPlayerState
>
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
)
from_glib
(
gobject_ffi
::
g_value_get_enum
(
value
.to_glib_none
()
.0
))
}
}
impl
SetValue
for
PlayerState
{
unsafe
fn
set_value
(
value
:
&
mut
Value
,
this
:
&
Self
)
{
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
()
as
i32
)
gobject_ffi
::
g_value_set_enum
(
value
.to_glib_none_mut
()
.0
,
this
.to_glib
())
}
}
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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