Implement missing Movie API's in the Glib bindings
diff --git a/glib/demo/utils.c b/glib/demo/utils.c
index 38bde14..40f541f 100644
--- a/glib/demo/utils.c
+++ b/glib/demo/utils.c
@@ -564,6 +564,7 @@
 	GtkWidget  *button;
         GEnumValue *enum_value;
 	gint        row = 0;
+	PopplerMovieTime start, duration;
 
 	table = gtk_bin_get_child (GTK_BIN (movie_view));
 	if (table) {
@@ -590,7 +591,15 @@
 	pgd_table_add_property (GTK_GRID (table), "<b>Need Poster:</b>", poppler_movie_need_poster (movie) ? "Yes" : "No", &row);
 	pgd_table_add_property (GTK_GRID (table), "<b>Show Controls:</b>", poppler_movie_show_controls (movie) ? "Yes" : "No", &row);
         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>Play Mode:</b>", enum_value->value_name, &row);
+	pgd_table_add_property (GTK_GRID (table), "<b>Synchronous Play:</b>", poppler_movie_synchronous_play (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>Rate:</b>", g_strdup_printf("%g", poppler_movie_get_rate (movie)), &row);
+        start = poppler_movie_get_start (movie);
+        pgd_table_add_property (GTK_GRID (table), "<b>Start:</b>", g_strdup_printf("%lu/%i s", start.units, start.units_per_second), &row);
+        duration = poppler_movie_get_duration (movie);
+        pgd_table_add_property (GTK_GRID (table), "<b>Duration:</b>", g_strdup_printf("%lu/%i s", duration.units, duration.units_per_second), &row);
+	pgd_table_add_property (GTK_GRID (table), "<b>Rotation Angle:</b>", g_strdup_printf("%u", poppler_movie_get_rotation_angle (movie)), &row);
 
 	button = gtk_button_new_with_mnemonic ("_Play");
 	g_signal_connect (button, "clicked",
diff --git a/glib/poppler-movie.cc b/glib/poppler-movie.cc
index 999d1c4..f505ce0 100644
--- a/glib/poppler-movie.cc
+++ b/glib/poppler-movie.cc
@@ -38,6 +38,12 @@
   gboolean need_poster;
   gboolean show_controls;
   PopplerMoviePlayMode mode;
+  gboolean synchronous_play;
+  gint     volume;
+  gdouble  rate;
+  PopplerMovieTime start;
+  PopplerMovieTime duration;
+  gushort  rotation_angle;
 };
 
 struct _PopplerMovieClass
@@ -105,6 +111,20 @@
     break;
   }
 
+  movie->synchronous_play = poppler_movie->getActivationParameters()->synchronousPlay;
+
+  movie->volume = poppler_movie->getActivationParameters()->volume;
+
+  movie->rate = poppler_movie->getActivationParameters()->rate;
+
+  movie->start.units = poppler_movie->getActivationParameters()->start.units;
+  movie->start.units_per_second = poppler_movie->getActivationParameters()->start.units_per_second;
+
+  movie->duration.units = poppler_movie->getActivationParameters()->duration.units;
+  movie->duration.units_per_second = poppler_movie->getActivationParameters()->duration.units_per_second;
+
+  movie->rotation_angle = poppler_movie->getRotationAngle();
+
   return movie;
 }
 
@@ -182,3 +202,87 @@
 
   return poppler_movie->mode;
 }
+
+/**
+ * poppler_movie_synchronous_play:
+ * @poppler_movie: a #PopplerMovie
+ *
+ * Returns whether the user must wait for the movie to be finished before
+ * the PDF viewer accepts any interactive action
+ *
+ * Return value: %TRUE if yes, %FALSE otherwise
+ */
+gboolean
+poppler_movie_synchronous_play (PopplerMovie *poppler_movie)
+{
+  g_return_val_if_fail (POPPLER_IS_MOVIE (poppler_movie), FALSE);
+
+  return poppler_movie->synchronous_play;
+}
+
+/**
+ * poppler_movie_get_volume:
+ * @poppler_movie: a #PopplerMovie
+ *
+ * Returns the playback audio volume
+ *
+ * Return value: volume setting for the movie (0 - 100)
+ */
+gint
+poppler_movie_get_volume (PopplerMovie *poppler_movie)
+{
+  g_return_val_if_fail (POPPLER_IS_MOVIE (poppler_movie), 0);
+
+  return poppler_movie->volume;
+}
+
+/**
+ * poppler_movie_get_rate:
+ * @poppler_movie: a #PopplerMovie
+ *
+ * Returns the relative speed of the movie
+ *
+ * Return value: the relative speed of the movie (1 means no change)
+ */
+gdouble
+poppler_movie_get_rate (PopplerMovie *poppler_movie)
+{
+  g_return_val_if_fail (POPPLER_IS_MOVIE (poppler_movie), 0);
+
+  return poppler_movie->rate;
+}
+
+/**
+ * poppler_movie_get_rotation_angle:
+ * @poppler_movie: a #PopplerMovie
+ *
+ * Returns the rotation angle
+ *
+ * Return value: the number of degrees the movie should be rotated (positive,
+ * multiples of 90: 0, 90, 180, 270)
+ */
+gushort
+poppler_movie_get_rotation_angle (PopplerMovie *poppler_movie)
+{
+  g_return_val_if_fail (POPPLER_IS_MOVIE (poppler_movie), 0);
+
+  return poppler_movie->rotation_angle;
+}
+
+const static PopplerMovieTime time0 = {0, 0};
+
+PopplerMovieTime
+poppler_movie_get_start (PopplerMovie *poppler_movie)
+{
+  g_return_val_if_fail (POPPLER_IS_MOVIE (poppler_movie), time0);
+
+  return poppler_movie->start;
+}
+
+PopplerMovieTime
+poppler_movie_get_duration (PopplerMovie *poppler_movie)
+{
+  g_return_val_if_fail (POPPLER_IS_MOVIE (poppler_movie), time0);
+
+  return poppler_movie->duration;
+}
diff --git a/glib/poppler-movie.h b/glib/poppler-movie.h
index 02c0765..0cb7bb2 100644
--- a/glib/poppler-movie.h
+++ b/glib/poppler-movie.h
@@ -51,6 +51,11 @@
   POPPLER_MOVIE_PLAY_MODE_PALINDROME
 } PopplerMoviePlayMode;
 
+typedef struct {
+  gulong units;
+  gint units_per_second;
+} PopplerMovieTime;
+
 POPPLER_PUBLIC
 GType                poppler_movie_get_type      (void) G_GNUC_CONST;
 POPPLER_PUBLIC
@@ -61,6 +66,18 @@
 gboolean             poppler_movie_show_controls (PopplerMovie *poppler_movie);
 POPPLER_PUBLIC
 PopplerMoviePlayMode poppler_movie_get_play_mode (PopplerMovie *poppler_movie);
+POPPLER_PUBLIC
+gboolean             poppler_movie_synchronous_play (PopplerMovie *poppler_movie);
+POPPLER_PUBLIC
+gint                 poppler_movie_get_volume (PopplerMovie *poppler_movie);
+POPPLER_PUBLIC
+gdouble              poppler_movie_get_rate (PopplerMovie *poppler_movie);
+POPPLER_PUBLIC
+gushort              poppler_movie_get_rotation_angle (PopplerMovie *poppler_movie);
+POPPLER_PUBLIC
+PopplerMovieTime     poppler_movie_get_start (PopplerMovie *poppler_movie);
+POPPLER_PUBLIC
+PopplerMovieTime     poppler_movie_get_duration (PopplerMovie *poppler_movie);
 
 G_END_DECLS