Bug 570904 - Update libnestegg. r=doublec
authorMatthew Gregan <kinetik@flim.org>
Tue, 07 Sep 2010 16:54:17 +1200
changeset 53764 ffd7d74232e6fd8845b7a645b627b8e35e239ad6
parent 53760 4405a670d69985e27735cd2a25cfa5633c9ab192
child 53765 fd21140bec7bcb89961b14a767caeaaa5b509244
push id15692
push usermgregan@mozilla.com
push dateTue, 14 Sep 2010 05:24:25 +0000
treeherdermozilla-central@c14c5fe155da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdoublec
bugs570904
milestone2.0b6pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 570904 - Update libnestegg. r=doublec
media/libnestegg/README_MOZILLA
media/libnestegg/include/nestegg.h
media/libnestegg/src/nestegg.c
media/libnestegg/update.sh
--- a/media/libnestegg/README_MOZILLA
+++ b/media/libnestegg/README_MOZILLA
@@ -1,8 +1,8 @@
 The source from this directory was copied from the nestegg
 git repository using the update.sh script.  The only changes
 made were those applied by update.sh and the addition of
 Makefile.in build files for the Mozilla build system.
 
 The nestegg git repository is: git://github.com/kinetiknz/nestegg.git
 
-The git commit ID used was 844b8bc7695e2d60ad7bde3fb5105c0b24304640.
+The git commit ID used was 938fbd47a291fa12ea35deffb5bdfd614654d65f.
--- a/media/libnestegg/include/nestegg.h
+++ b/media/libnestegg/include/nestegg.h
@@ -149,16 +149,25 @@ void nestegg_destroy(nestegg * context);
 
 /** Query the duration of the media stream in nanoseconds.
     @param context  Stream context initialized by #nestegg_init.
     @param duration Storage for the queried duration.
     @retval  0 Success.
     @retval -1 Error. */
 int nestegg_duration(nestegg * context, uint64_t * duration);
 
+/** Query the tstamp scale of the media stream in nanoseconds.
+    Timecodes presented by nestegg have been scaled by this value
+    before presentation to the caller.
+    @param context Stream context initialized by #nestegg_init.
+    @param scale   Storage for the queried scale factor.
+    @retval  0 Success.
+    @retval -1 Error. */
+int nestegg_tstamp_scale(nestegg * context, uint64_t * scale);
+
 /** Query the number of tracks in the media stream.
     @param context Stream context initialized by #nestegg_init.
     @param tracks  Storage for the queried track count.
     @retval  0 Success.
     @retval -1 Error. */
 int nestegg_track_count(nestegg * context, unsigned int * tracks);
 
 /** Seek @a track to @a tstamp.  Stream seek will terminate at the earliest
--- a/media/libnestegg/src/nestegg.c
+++ b/media/libnestegg/src/nestegg.c
@@ -1509,16 +1509,23 @@ nestegg_duration(nestegg * ctx, uint64_t
 
   tc_scale = get_timecode_scale(ctx);
 
   *duration = (uint64_t) (unscaled_duration * tc_scale);
   return 0;
 }
 
 int
+nestegg_tstamp_scale(nestegg * ctx, uint64_t * scale)
+{
+  *scale = get_timecode_scale(ctx);
+  return 0;
+}
+
+int
 nestegg_track_count(nestegg * ctx, unsigned int * tracks)
 {
   *tracks = ctx->track_count;
   return 0;
 }
 
 int
 nestegg_track_seek(nestegg * ctx, unsigned int track, uint64_t tstamp)
--- a/media/libnestegg/update.sh
+++ b/media/libnestegg/update.sh
@@ -4,9 +4,24 @@ cp $1/src/nestegg.c src
 cp $1/halloc/halloc.h src
 cp $1/halloc/src/align.h src
 cp $1/halloc/src/halloc.c src
 cp $1/halloc/src/hlist.h src
 cp $1/halloc/src/macros.h src
 cp $1/LICENSE .
 cp $1/README .
 cp $1/AUTHORS .
-echo 'Remember to update README_MOZILLA with the version details.'
+if [ -d $1/.git ]; then
+  rev=$(cd $1 && git rev-parse --verify HEAD)
+  dirty=$(cd $1 && git diff-index --name-only HEAD)
+fi
+
+if [ -n "$rev" ]; then
+  version=$rev
+  if [ -n "$dirty" ]; then
+    version=$version-dirty
+    echo "WARNING: updating from a dirty git repository."
+  fi
+  sed -i "/The git commit ID used was/ s/[0-9a-f]\+\(-dirty\)\?\./$version./" README_MOZILLA
+else
+  echo "Remember to update README_MOZILLA with the version details."
+fi
+