[xiph-commits] r17781 - in trunk/ffmpeg2theora: . src

j at svn.xiph.org j at svn.xiph.org
Tue Jan 18 04:18:00 PST 2011


Author: j
Date: 2011-01-18 04:18:00 -0800 (Tue, 18 Jan 2011)
New Revision: 17781

Added:
   trunk/ffmpeg2theora/get_ffmpeg.sh
Removed:
   trunk/ffmpeg2theora/get_ffmpeg_svn.sh
Modified:
   trunk/ffmpeg2theora/ChangeLog
   trunk/ffmpeg2theora/INSTALL
   trunk/ffmpeg2theora/SConstruct
   trunk/ffmpeg2theora/ffmpegrev
   trunk/ffmpeg2theora/src/avinfo.c
   trunk/ffmpeg2theora/src/theorautils.c
Log:
update to new ffmpeg git repository, only print aspect ratio once in --info

Modified: trunk/ffmpeg2theora/ChangeLog
===================================================================
--- trunk/ffmpeg2theora/ChangeLog	2011-01-15 02:01:47 UTC (rev 17780)
+++ trunk/ffmpeg2theora/ChangeLog	2011-01-18 12:18:00 UTC (rev 17781)
@@ -1,6 +1,7 @@
 svn
     - select resize method via commandline
     - fix 5.1 channel ordering
+    - use ffmpeg trunk
 
 0.27 2010-06-18
     - Use Skeleton 4.0 by default (including index),

Modified: trunk/ffmpeg2theora/INSTALL
===================================================================
--- trunk/ffmpeg2theora/INSTALL	2011-01-15 02:01:47 UTC (rev 17780)
+++ trunk/ffmpeg2theora/INSTALL	2011-01-18 12:18:00 UTC (rev 17781)
@@ -3,7 +3,7 @@
 you need
 - scons (http://www.scons.org/)
 - the latest version of libtheora <http://downloads.xiph.org/releases/theora/>
-- ffmpeg svn <http://ffmpeg.sf.net> by running ./get_ffmpeg_svn.sh
+- ffmpeg git <http://ffmpeg.org> by running ./get_ffmpeg.sh
   (this script downloads ffmpeg and runs configure and compiles ffmpeg)
 - for subtitles support, libkate <http://code.google.com/p/libkate/>,
   or by running ./get_libkate.sh (this script downloads libkate, and

Modified: trunk/ffmpeg2theora/SConstruct
===================================================================
--- trunk/ffmpeg2theora/SConstruct	2011-01-15 02:01:47 UTC (rev 17780)
+++ trunk/ffmpeg2theora/SConstruct	2011-01-18 12:18:00 UTC (rev 17781)
@@ -139,16 +139,25 @@
   Exit(1) 
 ParsePKGConfig(env, XIPH_LIBS)
 
-FFMPEG_LIBS=["libavcodec >= 52.30.0", "libavdevice", "libavformat", "libpostproc", "libswscale"]
+FFMPEG_LIBS=[
+    "libavdevice",
+    "libavformat",
+    "libavcodec >= 52.30.0",
+    "libpostproc",
+    "libswscale",
+]
 if os.path.exists("./ffmpeg"):
-  os.environ['PKG_CONFIG_PATH'] = "./ffmpeg/libavutil:./ffmpeg/libavformat:./ffmpeg/libavcodec:./ffmpeg/libavdevice:./ffmpeg/libswscale:./ffmpeg/libpostproc:" + os.environ.get('PKG_CONFIG_PATH', '')
+  pkg_path = list(set(map(os.path.dirname, glob('./ffmpeg/*/*.pc'))))
+  pkg_path.append(os.environ.get('PKG_CONFIG_PATH', ''))
+  os.environ['PKG_CONFIG_PATH'] = ':'.join(pkg_path)
+
 if not conf.CheckPKG(' '.join(FFMPEG_LIBS)): 
   print """
       Could not find %s.
       You can install it via
        sudo apt-get install %s
       or update PKG_CONFIG_PATH to point to ffmpeg's source folder
-      or run ./get_ffmpeg_svn.sh (for more information see INSTALL)
+      or run ./get_ffmpeg.sh (for more information see INSTALL)
   """ %(" ".join(FFMPEG_LIBS), " ".join(["%s-dev"%l.split()[0] for l in FFMPEG_LIBS]))
   Exit(1) 
 

Modified: trunk/ffmpeg2theora/ffmpegrev
===================================================================
--- trunk/ffmpeg2theora/ffmpegrev	2011-01-15 02:01:47 UTC (rev 17780)
+++ trunk/ffmpeg2theora/ffmpegrev	2011-01-18 12:18:00 UTC (rev 17781)
@@ -1,9 +1,3 @@
 FFMPEG_CO_DIR=ffmpeg
-FFMPEG_SVN=svn://svn.ffmpeg.org/ffmpeg/branches/0.6
-#not required fro 0.6 branch
-# Because ffmpeg checks out libswscale via an svn:externals, checking
-# out an old ffmpeg does not check out a corresponding libswscale.
-# Keep the swscale checkout manually synchronized, then. Update this
-# when you update FFMPEG_REVISION.
-#FFMPEG_REVISION=23309
-#FFMPEG_EXTERNALS_REVISION=31211
+FFMPEG_URL=git://git.videolan.org/ffmpeg
+#FFMPEG_REVISION=54bc6403620286f595becd01842947395020e2f4

Copied: trunk/ffmpeg2theora/get_ffmpeg.sh (from rev 17769, trunk/ffmpeg2theora/get_ffmpeg_svn.sh)
===================================================================
--- trunk/ffmpeg2theora/get_ffmpeg.sh	                        (rev 0)
+++ trunk/ffmpeg2theora/get_ffmpeg.sh	2011-01-18 12:18:00 UTC (rev 17781)
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+common="--enable-version3 --enable-gpl --enable-postproc --disable-muxers --disable-encoders --enable-libvorbis"
+common="$common --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --disable-doc"
+
+#optional, if you have those libs installed:
+#extra="--enable-libopencore-amrnb --enable-libopencore-amrwb"
+
+#apt-get install liba52-dev libgsm1-dev
+#extra="$extra  --enable-libgsm"
+
+#optional, if you have libvpx installed:
+#extra="--enable-libvpx"
+
+#linux
+options="$common --enable-pthreads $extra"
+
+#mingw32
+uname | grep MINGW && options="$common --enable-memalign-hack --enable-mingw32 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib $extra"
+
+# load FFMPEG specific properties
+. ./ffmpegrev
+
+test -e $FFMPEG_CO_DIR || git clone $FFPMEG_URL $FFMPEG_CO_DIR
+cd $FFMPEG_CO_DIR
+#git pull -r $FFMPEG_REVISION
+git pull
+cd ..
+
+apply_patches() {
+  cd $FFMPEG_CO_DIR
+  for patch in ../patches/*.patch; do
+    patch -p0 < $patch
+  done
+  touch .ffmpeg2theora_patched
+  cd ..
+}
+
+test -e $FFMPEG_CO_DIR/.ffmpeg2theora_patched || apply_patches
+#configure and build ffmpeg
+cd $FFMPEG_CO_DIR && ./configure $options && make
+

Deleted: trunk/ffmpeg2theora/get_ffmpeg_svn.sh
===================================================================
--- trunk/ffmpeg2theora/get_ffmpeg_svn.sh	2011-01-15 02:01:47 UTC (rev 17780)
+++ trunk/ffmpeg2theora/get_ffmpeg_svn.sh	2011-01-18 12:18:00 UTC (rev 17781)
@@ -1,43 +0,0 @@
-#!/bin/sh
-
-common="--enable-version3 --enable-gpl --enable-postproc --disable-muxers --disable-encoders --enable-libvorbis"
-common="$common --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --disable-doc"
-
-#optional, if you have those libs installed:
-#extra="--enable-libopencore-amrnb --enable-libopencore-amrwb"
-
-#apt-get install liba52-dev libgsm1-dev
-#extra="$extra  --enable-libgsm"
-
-#optional, if you have libvpx installed:
-#extra="--enable-libvpx"
-
-#linux
-options="$common --enable-pthreads $extra"
-
-#mingw32
-uname | grep MINGW && options="$common --enable-memalign-hack --enable-mingw32 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib $extra"
-
-# load FFMPEG specific properties
-. ./ffmpegrev
-
-#Get ffmpeg from svn
-#svn -r $FFMPEG_REVISION co $FFMPEG_SVN $FFMPEG_CO_DIR
-#svn update -r $FFMPEG_EXTERNALS_REVISION $FFMPEG_CO_DIR/libswscale
-
-#Get ffmpeg from svn 0.6 branch
-svn co $FFMPEG_SVN $FFMPEG_CO_DIR
-
-apply_patches() {
-  cd ffmpeg
-  for patch in ../patches/*.patch; do
-    patch -p0 < $patch
-  done
-  touch .ffmpeg2theora_patched
-  cd ..
-}
-
-test -e ffmpeg/.ffmpeg2theora_patched || apply_patches
-#configure and build ffmpeg
-cd ffmpeg && ./configure $options && make
-

Modified: trunk/ffmpeg2theora/src/avinfo.c
===================================================================
--- trunk/ffmpeg2theora/src/avinfo.c	2011-01-15 02:01:47 UTC (rev 17780)
+++ trunk/ffmpeg2theora/src/avinfo.c	2011-01-18 12:18:00 UTC (rev 17781)
@@ -316,20 +316,6 @@
         fprintf(output, "{\n");
 
         json_codec_info(output, st->codec, indent + 1);
-        if (st->sample_aspect_ratio.num && // default
-            av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)) {
-            AVRational display_aspect_ratio;
-            av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den,
-                      st->codec->width*st->sample_aspect_ratio.num,
-                      st->codec->height*st->sample_aspect_ratio.den,
-                      1024*1024);
-            snprintf(buf1, sizeof(buf1), "%d:%d",
-                     st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);
-            json_add_key_value(output, "pixel_aspect_ratio", buf1, JSON_STRING, 0, indent + 1);
-            snprintf(buf1, sizeof(buf1), "%d:%d",
-                     display_aspect_ratio.num, display_aspect_ratio.den);
-            json_add_key_value(output, "display_aspect_ratio", buf1, JSON_STRING, 0, indent + 1);
-        }
         if(st->codec->codec_type == CODEC_TYPE_VIDEO){
             if (st->time_base.den && st->time_base.num && av_q2d(st->time_base) > 0.001) {
                 snprintf(buf1, sizeof(buf1), "%d:%d",

Modified: trunk/ffmpeg2theora/src/theorautils.c
===================================================================
--- trunk/ffmpeg2theora/src/theorautils.c	2011-01-15 02:01:47 UTC (rev 17780)
+++ trunk/ffmpeg2theora/src/theorautils.c	2011-01-18 12:18:00 UTC (rev 17781)
@@ -1284,7 +1284,7 @@
                 if (op.packetno != 4) {
                     /* We only expect negative start granule in the first content
                        packet, not any of the others... */
-                    fprintf(stderr, "WARNING: vorbis packet %d has calculated start"
+                    fprintf(stderr, "WARNING: vorbis packet %lld has calculated start"
                             " granule of %lld, but it should be non-negative!",
                             op.packetno, start_granule);
                 }
@@ -1295,7 +1295,7 @@
                    allowed by the specification in the last packet only, and the
                    trailing samples should be discarded and not played/indexed. */
                 if (!op.e_o_s) {
-                    fprintf(stderr, "WARNING: vorbis packet %d (granulepos %lld) starts before"
+                    fprintf(stderr, "WARNING: vorbis packet %lld (granulepos %lld) starts before"
                             " the end of the preceeding packet!", op.packetno, op.granulepos);
                 }
                 start_granule = info->vorbis_granulepos;



More information about the commits mailing list