Commit 764dd94a authored by Evgeny Stambulchik's avatar Evgeny Stambulchik Committed by Albert Astals Cid

Make poppler_movie_get_volume() return double 0.0-1.0

parent 8c2c5c46
......@@ -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);
......
......@@ -228,16 +228,16 @@ poppler_movie_is_synchronous (PopplerMovie *poppler_movie)
*
* Returns the playback audio volume
*
* Return value: volume setting for the movie (0 - 100)
* Return value: volume setting for the movie (0.0 - 1.0)
*
* Since: 0.80
*/
gint
gdouble
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;
}
/**
......
......@@ -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
gint poppler_movie_get_volume (PopplerMovie *poppler_movie);
gdouble poppler_movie_get_volume (PopplerMovie *poppler_movie);
POPPLER_PUBLIC
gdouble poppler_movie_get_rate (PopplerMovie *poppler_movie);
POPPLER_PUBLIC
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment