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
Marek Kasik
poppler
Commits
764dd94a
Commit
764dd94a
authored
Aug 21, 2019
by
Evgeny Stambulchik
Committed by
Albert Astals Cid
Aug 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make poppler_movie_get_volume() return double 0.0-1.0
parent
8c2c5c46
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
glib/demo/utils.c
glib/demo/utils.c
+1
-1
glib/poppler-movie.cc
glib/poppler-movie.cc
+3
-3
glib/poppler-movie.h
glib/poppler-movie.h
+1
-1
No files found.
glib/demo/utils.c
View file @
764dd94a
...
...
@@ -593,7 +593,7 @@ pgd_movie_view_set_movie (GtkWidget *movie_view,
enum_value
=
g_enum_get_value
((
GEnumClass
*
)
g_type_class_ref
(
POPPLER_TYPE_MOVIE_PLAY_MODE
),
poppler_movie_get_play_mode
(
movie
));
pgd_table_add_property
(
GTK_GRID
(
table
),
"<b>Play Mode:</b>"
,
enum_value
->
value_name
,
&
row
);
pgd_table_add_property
(
GTK_GRID
(
table
),
"<b>Synchronous Play:</b>"
,
poppler_movie_is_synchronous
(
movie
)
?
"Yes"
:
"No"
,
&
row
);
pgd_table_add_property
(
GTK_GRID
(
table
),
"<b>Volume:</b>"
,
g_strdup_printf
(
"%
i
"
,
poppler_movie_get_volume
(
movie
)),
&
row
);
pgd_table_add_property
(
GTK_GRID
(
table
),
"<b>Volume:</b>"
,
g_strdup_printf
(
"%
g
"
,
poppler_movie_get_volume
(
movie
)),
&
row
);
pgd_table_add_property
(
GTK_GRID
(
table
),
"<b>Rate:</b>"
,
g_strdup_printf
(
"%g"
,
poppler_movie_get_rate
(
movie
)),
&
row
);
poppler_movie_get_start
(
movie
,
&
start
);
pgd_table_add_property
(
GTK_GRID
(
table
),
"<b>Start:</b>"
,
g_strdup_printf
(
"%lu/%i s"
,
start
.
units
,
start
.
units_per_second
),
&
row
);
...
...
glib/poppler-movie.cc
View file @
764dd94a
...
...
@@ -228,16 +228,16 @@ poppler_movie_is_synchronous (PopplerMovie *poppler_movie)
*
* Returns the playback audio volume
*
* Return value: volume setting for the movie (0 - 1
0
0)
* Return value: volume setting for the movie (0
.0
- 1
.
0)
*
* Since: 0.80
*/
g
int
g
double
poppler_movie_get_volume
(
PopplerMovie
*
poppler_movie
)
{
g_return_val_if_fail
(
POPPLER_IS_MOVIE
(
poppler_movie
),
0
);
return
poppler_movie
->
volume
;
return
poppler_movie
->
volume
/
100.0
;
}
/**
...
...
glib/poppler-movie.h
View file @
764dd94a
...
...
@@ -78,7 +78,7 @@ PopplerMoviePlayMode poppler_movie_get_play_mode (PopplerMovie *poppler_movie);
POPPLER_PUBLIC
gboolean
poppler_movie_is_synchronous
(
PopplerMovie
*
poppler_movie
);
POPPLER_PUBLIC
g
int
poppler_movie_get_volume
(
PopplerMovie
*
poppler_movie
);
g
double
poppler_movie_get_volume
(
PopplerMovie
*
poppler_movie
);
POPPLER_PUBLIC
gdouble
poppler_movie_get_rate
(
PopplerMovie
*
poppler_movie
);
POPPLER_PUBLIC
...
...
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