Use guint64 for time-related values of movie objects (in ns)
diff --git a/glib/demo/utils.c b/glib/demo/utils.c
index a8b0c68..aad6c88 100644
--- a/glib/demo/utils.c
+++ b/glib/demo/utils.c
@@ -564,7 +564,6 @@
 	GtkWidget  *button;
         GEnumValue *enum_value;
 	gint        row = 0;
-	PopplerMovieTime start, duration;
 
 	table = gtk_bin_get_child (GTK_BIN (movie_view));
 	if (table) {
@@ -595,10 +594,8 @@
 	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("%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);
-        poppler_movie_get_duration (movie, &duration);
-        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>Start:</b>", g_strdup_printf("%g s", poppler_movie_get_start (movie)/1e9), &row);
+        pgd_table_add_property (GTK_GRID (table), "<b>Duration:</b>", g_strdup_printf("%g s", poppler_movie_get_duration (movie)/1e9), &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");
diff --git a/glib/poppler-movie.cc b/glib/poppler-movie.cc
index ce5e7ba..aa40aa1 100644
--- a/glib/poppler-movie.cc
+++ b/glib/poppler-movie.cc
@@ -41,8 +41,8 @@
   gboolean synchronous_play;
   gint     volume;
   gdouble  rate;
-  PopplerMovieTime start;
-  PopplerMovieTime duration;
+  guint64  start;
+  guint64  duration;
   gushort  rotation_angle;
 };
 
@@ -117,11 +117,21 @@
 
   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;
+  if (poppler_movie->getActivationParameters()->start.units_per_second > 0) {
+    movie->start = 1000000000L*
+      poppler_movie->getActivationParameters()->start.units/
+      poppler_movie->getActivationParameters()->start.units_per_second;
+  } else {
+    movie->start = 0L;
+  }
 
-  movie->duration.units = poppler_movie->getActivationParameters()->duration.units;
-  movie->duration.units_per_second = poppler_movie->getActivationParameters()->duration.units_per_second;
+  if (poppler_movie->getActivationParameters()->duration.units_per_second > 0) {
+    movie->duration = 1000000000L*
+      poppler_movie->getActivationParameters()->duration.units/
+      poppler_movie->getActivationParameters()->duration.units_per_second;
+  } else {
+    movie->duration = 0L;
+  }
 
   movie->rotation_angle = poppler_movie->getRotationAngle();
 
@@ -280,35 +290,35 @@
 /**
  * poppler_movie_get_start:
  * @poppler_movie: a #PopplerMovie
- * @start: (out): a return location for a #PopplerMovieTime
  *
- * Obtains the start position of the movie playback
+ * Returns the start position of the movie playback
+ *
+ * Return value: the start position of the movie playback (in ns)
  *
  * Since: 0.80
  */
-void
-poppler_movie_get_start (PopplerMovie *poppler_movie,
-                         PopplerMovieTime *start)
+guint64
+poppler_movie_get_start (PopplerMovie *poppler_movie)
 {
-  g_return_if_fail (POPPLER_IS_MOVIE (poppler_movie));
+  g_return_val_if_fail (POPPLER_IS_MOVIE (poppler_movie), 0L);
 
-  *start = poppler_movie->start;
+  return poppler_movie->start;
 }
 
 /**
  * poppler_movie_get_duration:
  * @poppler_movie: a #PopplerMovie
- * @duration: (out): a return location for a #PopplerMovieTime
  *
- * Obtains the duration of the movie playback
+ * Returns the duration of the movie playback
+ *
+ * Return value: the duration of the movie playback (in ns)
  *
  * Since: 0.80
  */
-void
-poppler_movie_get_duration (PopplerMovie *poppler_movie,
-                            PopplerMovieTime *duration)
+guint64
+poppler_movie_get_duration (PopplerMovie *poppler_movie)
 {
-  g_return_if_fail (POPPLER_IS_MOVIE (poppler_movie));
+  g_return_val_if_fail (POPPLER_IS_MOVIE (poppler_movie), 0L);
 
-  *duration = poppler_movie->duration;
+  return poppler_movie->duration;
 }
diff --git a/glib/poppler-movie.h b/glib/poppler-movie.h
index 52b3d7b..9350a07 100644
--- a/glib/poppler-movie.h
+++ b/glib/poppler-movie.h
@@ -51,20 +51,6 @@
   POPPLER_MOVIE_PLAY_MODE_PALINDROME
 } PopplerMoviePlayMode;
 
-/**
- * PopplerMovieTime:
- *
- * Time-related entities (start position, duration); to get the equivalent
- * value in seconds, calculate (double) units/units_per_second. Note that
- * units_per_second may be zero if the respective entity is undefined.
- *
- * Since: 0.80
- */
-typedef struct {
-  gulong units;
-  gint units_per_second;
-} PopplerMovieTime;
-
 POPPLER_PUBLIC
 GType                poppler_movie_get_type      (void) G_GNUC_CONST;
 POPPLER_PUBLIC
@@ -84,11 +70,9 @@
 POPPLER_PUBLIC
 gushort              poppler_movie_get_rotation_angle (PopplerMovie *poppler_movie);
 POPPLER_PUBLIC
-void                 poppler_movie_get_start (PopplerMovie *poppler_movie,
-                                              PopplerMovieTime *start);
+guint64              poppler_movie_get_start (PopplerMovie *poppler_movie);
 POPPLER_PUBLIC
-void                 poppler_movie_get_duration (PopplerMovie *poppler_movie,
-                                                 PopplerMovieTime *duration);
+guint64              poppler_movie_get_duration (PopplerMovie *poppler_movie);
 
 G_END_DECLS