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
0f5f55c6
Commit
0f5f55c6
authored
Sep 10, 2017
by
Sebastian Dröge
🍵
Browse files
Fix various clippy warnings in examples
parent
150527f7
Changes
7
Hide whitespace changes
Inline
Side-by-side
examples/src/bin/appsink.rs
View file @
0f5f55c6
...
...
@@ -67,7 +67,7 @@ fn create_pipeline() -> Result<gst::Pipeline, utils::ExampleError> {
let
sum
:
f64
=
samples
.iter
()
.map
(|
sample
|
{
let
f
=
(
*
sample
as
f64
)
/
(
i16
::
MAX
as
f64
);
let
f
=
f64
::
from
(
*
sample
)
/
f64
::
from
(
i16
::
MAX
);
f
*
f
})
.sum
();
...
...
examples/src/bin/decodebin.rs
View file @
0f5f55c6
...
...
@@ -13,7 +13,7 @@ fn main() {
let
uri
:
&
str
=
if
args
.len
()
==
2
{
args
[
1
]
.as_ref
()
}
else
{
panic!
(
"Usage: decodebin file_path"
)
;
panic!
(
"Usage: decodebin file_path"
)
};
let
pipeline
=
gst
::
Pipeline
::
new
(
None
);
...
...
examples/src/bin/launch.rs
View file @
0f5f55c6
...
...
@@ -21,7 +21,7 @@ fn main() {
println!
(
"Failed to parse pipeline: {}"
,
err
);
}
process
::
exit
(
-
1
)
;
process
::
exit
(
-
1
)
}
};
let
bus
=
pipeline
.get_bus
()
.unwrap
();
...
...
examples/src/bin/pad_probes.rs
View file @
0f5f55c6
...
...
@@ -37,7 +37,7 @@ fn main() {
let
sum
:
f64
=
samples
.iter
()
.map
(|
sample
|
{
let
f
=
(
*
sample
as
f64
)
/
(
i16
::
MAX
as
f64
);
let
f
=
f64
::
from
(
*
sample
)
/
f64
::
from
(
i16
::
MAX
);
f
*
f
})
.sum
();
...
...
examples/src/bin/playbin.rs
View file @
0f5f55c6
...
...
@@ -13,7 +13,7 @@ fn main() {
let
uri
:
&
str
=
if
args
.len
()
==
2
{
args
[
1
]
.as_ref
()
}
else
{
panic!
(
"Usage: playbin uri"
)
;
panic!
(
"Usage: playbin uri"
)
};
let
playbin
=
gst
::
ElementFactory
::
make
(
"playbin"
,
None
)
.unwrap
();
...
...
examples/src/bin/player.rs
View file @
0f5f55c6
...
...
@@ -76,7 +76,7 @@ fn main() {
let
uri
:
&
str
=
if
args
.len
()
==
2
{
args
[
1
]
.as_ref
()
}
else
{
panic!
(
"Usage: player uri"
)
;
panic!
(
"Usage: player uri"
)
};
match
main_loop
(
uri
)
{
...
...
examples/src/bin/toc.rs
View file @
0f5f55c6
...
...
@@ -13,7 +13,7 @@ fn main() {
let
uri
:
&
str
=
if
args
.len
()
==
2
{
args
[
1
]
.as_ref
()
}
else
{
panic!
(
"Usage: toc file_path"
)
;
panic!
(
"Usage: toc file_path"
)
};
let
pipeline
=
gst
::
Pipeline
::
new
(
None
);
...
...
@@ -61,7 +61,7 @@ fn main() {
};
match
msg
.view
()
{
MessageView
::
Eos
(
..
)
=>
break
,
MessageView
::
Eos
(
_
)
|
MessageView
::
AsyncDone
(
_
)
=>
break
,
MessageView
::
Error
(
err
)
=>
{
println!
(
"Error from {}: {} ({:?})"
,
...
...
@@ -71,7 +71,6 @@ fn main() {
);
break
;
}
MessageView
::
AsyncDone
(
_
)
=>
break
,
MessageView
::
Toc
(
msg_toc
)
=>
{
let
(
toc
,
updated
)
=
msg_toc
.get_toc
();
println!
(
...
...
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