Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Albert Gräf
Gem
Commits
af0b8bf4
Commit
af0b8bf4
authored
Feb 11, 2019
by
IOhannes m zmölnig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filmDS: disabled "auto" mode
parent
7f6170b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
plugins/filmDS/filmDS.cpp
plugins/filmDS/filmDS.cpp
+11
-2
No files found.
plugins/filmDS/filmDS.cpp
View file @
af0b8bf4
...
...
@@ -34,6 +34,7 @@
#define USE_CALLBACKS 1
#define USE_AUTO 0
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
...
...
@@ -1150,15 +1151,19 @@ bool filmDS::open(const std::string&path, const gem::Properties&props)
bool
res
=
player
->
loadMovie
(
path
,
GEM_RGBA
);
if
(
res
)
{
player
->
setPosition
(
0
);
#if USE_AUTO
double
d
=
0.
;
if
(
props
.
get
(
"auto"
,
d
))
{
}
if
(
d
>-
1e8
&&
d
<
1e8
)
if
(
d
>-
1e
-
8
&&
d
<
1e
-
8
)
player
->
setPaused
(
true
);
else
{
player
->
setSpeed
(
d
);
player
->
play
();
}
#else
player
->
setPaused
(
true
);
#endif
}
else
{
close
();
}
...
...
@@ -1209,15 +1214,18 @@ bool filmDS::enumProperties(gem::Properties&readable,
readable
.
set
(
"width"
,
value
);
readable
.
set
(
"height"
,
value
);
#if USE_AUTO
writeable
.
set
(
"auto"
,
value
);
#endif
return
true
;
}
void
filmDS
::
setProperties
(
gem
::
Properties
&
props
)
{
#if USE_AUTO
double
d
;
if
(
props
.
get
(
"auto"
,
d
))
{
if
(
player
)
{
if
(
d
>-
1e8
&&
d
<
1e8
)
if
(
d
>-
1e
-
8
&&
d
<
1e
-
8
)
player
->
setPaused
(
true
);
else
{
player
->
setSpeed
(
d
);
...
...
@@ -1225,6 +1233,7 @@ void filmDS::setProperties(gem::Properties&props)
}
}
}
#endif
}
void
filmDS
::
getProperties
(
gem
::
Properties
&
props
)
{
...
...
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