Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gstreamer-rs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
39
Issues
39
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GStreamer
gstreamer-rs
Commits
b44c8156
Commit
b44c8156
authored
Jul 12, 2017
by
Sebastian Dröge
🍵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable Caps tests
parent
64f8b8c0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
19 deletions
+17
-19
gstreamer/src/caps.rs
gstreamer/src/caps.rs
+17
-17
gstreamer/src/tags.rs
gstreamer/src/tags.rs
+0
-2
No files found.
gstreamer/src/caps.rs
View file @
b44c8156
...
...
@@ -12,6 +12,7 @@ use structure::*;
use
glib
;
use
ffi
;
use
glib
::
ToValue
;
use
glib
::
translate
::{
from_glib
,
from_glib_none
,
from_glib_full
,
ToGlibPtr
};
#[repr(C)]
...
...
@@ -221,45 +222,44 @@ impl ToOwned for CapsRef {
unsafe
impl
Sync
for
CapsRef
{}
unsafe
impl
Send
for
CapsRef
{}
/*
#[cfg(test)]
mod
tests
{
use
super
::
*
;
#[test]
fn
test_simple
()
{
gst::init
();
::
init
()
.unwrap
();
let
caps
=
Caps
::
new_simple
(
"foo/bar"
,
&
[
("int",
12.into
()),
("bool",
true.into
()),
("string",
"bla".into
()),
("fraction", (1, 2).into()),
("array", vec![1.into(), 2.into()].into()),
(
"int"
,
&
12
.to_value
()),
(
"bool"
,
&
true
.to_value
()),
(
"string"
,
&
"bla"
.to_value
()),
//
("fraction", (1, 2).into()),
//
("array", vec![1.into(), 2.into()].into()),
],
);
assert_eq!
(
caps
.to_string
(),
"foo/bar, int=(int)12, bool=(boolean)true, string=(string)bla, \
fraction=(fraction)1/2, array=(int)< 1, 2 >"
);
"foo/bar, int=(int)12, bool=(boolean)true, string=(string)bla"
);
//, \
// fraction=(fraction)1/2, array=(int)< 1, 2 >"
//);
let
s
=
caps
.get_structure
(
0
)
.unwrap
();
assert_eq!
(
s
,
Owned
Structure::new(
Structure
::
new
(
"foo/bar"
,
&
[
("int",
12.into
()),
("bool",
true.into
()),
("string",
"bla".into
()),
("fraction", (1, 2).into()),
("array", vec![1.into(), 2.into()].into()),
(
"int"
,
&
12
.to_value
()),
(
"bool"
,
&
true
.to_value
()),
(
"string"
,
&
"bla"
.to_value
()),
//
("fraction", (1, 2).into()),
//
("array", vec![1.into(), 2.into()].into()),
],
)
.as_ref
()
);
}
}
*/
gstreamer/src/tags.rs
View file @
b44c8156
...
...
@@ -8,10 +8,8 @@
use
std
::
fmt
;
use
std
::
mem
;
use
std
::
ffi
::{
CStr
,
CString
};
use
std
::
marker
::
PhantomData
;
use
glib
;
use
ffi
;
use
glib
::
StaticType
;
use
glib
::
value
::{
Value
,
TypedValue
,
FromValueOptional
,
SetValue
,
ToValue
};
...
...
Write
Preview
Markdown
is supported
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