Projects
Multimedia
ffmpeg2theora
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 11
View file
ffmpeg2theora.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Sat Feb 11 13:55:11 UTC 2017 - olaf@aepfle.de + +- Update to 0.30 + +------------------------------------------------------------------- Tue Aug 20 07:27:10 UTC 2013 - i@margueirte.su - fix ffmpeg 2.0 build
View file
ffmpeg2theora.spec
Changed
@@ -17,17 +17,14 @@ Name: ffmpeg2theora -Version: 0.29 +Version: 0.30 Release: 0 License: GPL-2.0+ Summary: A simple converter to create Ogg Theora files Url: http://v2v.cc/~j/ffmpeg2theora/index.html Group: Productivity/Multimedia/Other -Source: http://v2v.cc/~j/ffmpeg2theora/%{name}-%{version}.tar.bz2 -# PATCH-FIX-UPSTREAM marugerite@opensuse.org - port ffmpeg to 2.0 -Patch: ffmpeg2theora-ffmpeg-2.0.patch -# PATCH-FIX-UPSTREAM marguerite@opensuse.org - fix implicit declarations -Patch1: ffmpeg2theora-implicit-declaration.patch +Source0: http://v2v.cc/~j/ffmpeg2theora/%{name}-%{version}.tar.bz2 +Patch0: ffmpeg2theora.sort.patch BuildRequires: pkg-config BuildRequires: pkgconfig(libavcodec) = 56.60.100 BuildRequires: pkgconfig(libavdevice) = 56.4.100 @@ -38,10 +35,10 @@ BuildRequires: pkgconfig(libswresample) = 1.2.101 BuildRequires: pkgconfig(libswscale) = 3.1.101 BuildRequires: pkgconfig(vorbis) -BuildRequires: libkate-devel -BuildRequires: libmp3lame-devel -BuildRequires: libtheora-devel -BuildRequires: scons +BuildRequires: libkate-devel +BuildRequires: libmp3lame-devel +BuildRequires: libtheora-devel +BuildRequires: scons BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -49,14 +46,18 @@ %prep %setup -q -%patch -p1 -%patch1 -p1 +%patch0 -p1 %build -scons prefix=%{_prefix} APPEND_CCFLAGS="%{optflags}" APPEND_LINKFLAGS="-lm" %install -scons prefix=%{_prefix} mandir=%{_mandir} destdir=%{buildroot} APPEND_CCFLAGS="%{optflags}" APPEND_LINKFLAGS="-lm" install +scons \ + prefix=%{_prefix} \ + mandir=%{_mandir} \ + destdir=%{buildroot} \ + APPEND_CCFLAGS="%{optflags} -Wno-unused-variable -Wno-unused-but-set-variable" \ + APPEND_LINKFLAGS="-lm" \ + install install -D -m 0644 ffmpeg2theora.1 %{buildroot}%{_mandir}/man1/ffmpeg2theora.1 %files
View file
ffmpeg2theora-ffmpeg-2.0.patch
Deleted
@@ -1,58 +0,0 @@ -Index: ffmpeg2theora-0.29/src/ffmpeg2theora.c -=================================================================== ---- ffmpeg2theora-0.29.orig/src/ffmpeg2theora.c -+++ ffmpeg2theora-0.29/src/ffmpeg2theora.c -@@ -24,18 +24,19 @@ - #include <getopt.h> - #include <math.h> - #include <errno.h> -+#include <ctype.h> - --#include "libavformat/avformat.h" --#include "libavdevice/avdevice.h" -+#include <libavformat/avformat.h> -+#include <libavdevice/avdevice.h> - #ifdef HAVE_FRAMEHOOK --#include "libavformat/framehook.h" -+#include <libavformat/framehook.h> - #endif --#include "libswscale/swscale.h" --#include "libpostproc/postprocess.h" -+#include <libswscale/swscale.h> -+#include <libpostproc/postprocess.h> - --#include "theora/theoraenc.h" --#include "vorbis/codec.h" --#include "vorbis/vorbisenc.h" -+#include <theora/theoraenc.h> -+#include <vorbis/codec.h> -+#include <vorbis/vorbisenc.h> - - #ifdef WIN32 - #include "fcntl.h" -@@ -48,6 +49,7 @@ - #include "avinfo.h" - - #define LENGTH(x) (sizeof(x) / sizeof(*x)) -+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 19200 // 1 second of 48khz 32bit audio - - enum { - NULL_FLAG, -@@ -1424,7 +1426,7 @@ void ff2theora_output(ff2theora this) { - - if (venc_pix_fmt != this->pix_fmt) { - sws_scale(this->sws_colorspace_ctx, -- frame->data, frame->linesize, 0, display_height, -+ (const uint8_t * const*)frame->data, frame->linesize, 0, display_height, - output_tmp->data, output_tmp->linesize); - } - else{ -@@ -1468,7 +1470,7 @@ void ff2theora_output(ff2theora this) { - } - if (this->sws_scale_ctx) { - sws_scale(this->sws_scale_ctx, -- output_cropped->data, -+ (const uint8_t * const*)output_cropped->data, - output_cropped->linesize, 0, - display_height - (this->frame_topBand + this->frame_bottomBand), - output_resized->data,
View file
ffmpeg2theora-implicit-declaration.patch
Deleted
@@ -1,22 +0,0 @@ -Index: ffmpeg2theora-0.29/src/iso639.c -=================================================================== ---- ffmpeg2theora-0.29.orig/src/iso639.c -+++ ffmpeg2theora-0.29/src/iso639.c -@@ -1,4 +1,5 @@ - #include <stddef.h> -+#include <string.h> - #include "iso639.h" - - static const struct { -Index: ffmpeg2theora-0.29/src/avinfo.c -=================================================================== ---- ffmpeg2theora-0.29.orig/src/avinfo.c -+++ ffmpeg2theora-0.29/src/avinfo.c -@@ -40,6 +40,7 @@ - #include <math.h> - #include <errno.h> - #include <sys/stat.h> -+#include <ctype.h> - - #include "libavformat/avformat.h" - #include "libavutil/pixdesc.h"
View file
ffmpeg2theora.sort.patch
Added
@@ -0,0 +1,11 @@ +--- a/SConstruct ++++ b/SConstruct +@@ -228,7 +228,7 @@ env = conf.Finish() + + # ffmpeg2theora + ffmpeg2theora = env.Clone() +-ffmpeg2theora_sources = glob('src/*.c') ++ffmpeg2theora_sources = sorted(glob('src/*.c')) + ffmpeg2theora.Program('ffmpeg2theora', ffmpeg2theora_sources) + + ffmpeg2theora.Install(bin_dir, 'ffmpeg2theora')
View file
ffmpeg2theora-0.29.tar.bz2/patches
Deleted
-(directory)
View file
ffmpeg2theora-0.30.tar.bz2/.gitignore
Added
@@ -0,0 +1,5 @@ +/.sconf_temp +/.sconsign.dblite +/config.log +/ffmpeg2theora +/src/*.o
View file
ffmpeg2theora-0.29.tar.bz2/ChangeLog -> ffmpeg2theora-0.30.tar.bz2/ChangeLog
Changed
@@ -1,3 +1,7 @@ +0.30 2014-12-12 + - various bugfixes + - update to compile with ffmpeg 2.9 + 0.29 2012-06-25 - use GPL 2 or later, to make use of some decoders only available in GPL 2 version of ffmpeg
View file
ffmpeg2theora-0.29.tar.bz2/Makefile -> ffmpeg2theora-0.30.tar.bz2/Makefile
Changed
@@ -8,6 +8,5 @@ scons install $(PREFIX) dist: - svn export . ffmpeg2theora-`grep ^pkg_version= SConstruct | cut -d\" -f2` - tar cjf ffmpeg2theora-`grep ^pkg_version= SConstruct | cut -d\" -f2`.tar.bz2 ffmpeg2theora-`grep ^pkg_version= SConstruct | cut -d\" -f2` - rm -r ffmpeg2theora-`grep ^pkg_version= SConstruct | cut -d\" -f2` + git archive --format=tar --prefix=ffmpeg2theora-`./version.sh`/ master | bzip2 >ffmpeg2theora-`./version.sh`.tar.bz2 + ls -lah ffmpeg2theora-`./version.sh`.tar.bz2
View file
ffmpeg2theora-0.29.tar.bz2/SConstruct -> ffmpeg2theora-0.30.tar.bz2/SConstruct
Changed
@@ -6,12 +6,13 @@ import SCons def version(): + #return "0.29" f = os.popen("./version.sh") version = f.read().strip() f.close() return version -pkg_version="0.29" +pkg_version=version() pkg_name="ffmpeg2theora" @@ -161,6 +162,19 @@ env.Append(CCFLAGS= '-Iffmpeg' ) + for lib in FFMPEG_LIBS: + lib = lib.split(' ')0 + env.Append(LINKFLAGS= + '-Lffmpeg/' + lib + ) + + if conf.CheckPKG('libswresample'): + FFMPEG_LIBS.append('libswresample') + env.Append(CCFLAGS= + '-DUSE_SWRESAMPLE' + ) + elif conf.CheckPKG('libavresample'): + FFMPEG_LIBS.append('libavresample') if not conf.CheckPKG(' '.join(FFMPEG_LIBS)): print """
View file
ffmpeg2theora-0.29.tar.bz2/build_ffmpeg.sh -> ffmpeg2theora-0.30.tar.bz2/build_ffmpeg.sh
Changed
@@ -21,5 +21,5 @@ uname | grep MINGW && options="$common --enable-memalign-hack --enable-mingw32 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib $extra" #configure and build ffmpeg -cd $FFMPEG_CO_DIR && ./configure $options && make +cd $FFMPEG_CO_DIR && ./configure $options && make -j8
View file
ffmpeg2theora-0.29.tar.bz2/ffmpeg2theora.pmdoc/01ffmpeg.xml -> ffmpeg2theora-0.30.tar.bz2/ffmpeg2theora.pmdoc/01ffmpeg.xml
Changed
@@ -1,1 +1,1 @@ -<pkgref spec="1.12" uuid="01291888-CCA4-41A5-AAB3-BC2E3CFE6477"><config><identifier>cc.v2v.ffmpeg2theora</identifier><version>0.28</version><description/><post-install type="none"/><requireAuthorization/><installFrom mod="true">/tmp/ffmpeg2theora/</installFrom><installTo>/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>installTo.isRelativeType</mod><mod>installTo</mod><mod>installTo.isAbsoluteType</mod><mod>installFrom.path</mod><mod>identifier</mod><mod>parent</mod><mod>version</mod></config><contents><file-list>01ffmpeg-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass</filter></contents></pkgref> \ No newline at end of file +<pkgref spec="1.12" uuid="01291888-CCA4-41A5-AAB3-BC2E3CFE6477"><config><identifier>cc.v2v.ffmpeg2theora</identifier><version>0.29</version><description></description><post-install type="none"/><requireAuthorization/><installFrom mod="true">/tmp/ffmpeg2theora/</installFrom><installTo>/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.isRelativeType</mod><mod>installTo</mod><mod>installFrom.path</mod><mod>installTo.isAbsoluteType</mod><mod>identifier</mod><mod>parent</mod><mod>version</mod></config><contents><file-list>01ffmpeg-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass</filter></contents></pkgref> \ No newline at end of file
View file
ffmpeg2theora-0.29.tar.bz2/ffmpeg2theora.pmdoc/index.xml -> ffmpeg2theora-0.30.tar.bz2/ffmpeg2theora.pmdoc/index.xml
Changed
@@ -1,1 +1,1 @@ -<pkmkdoc spec="1.12"><properties><title>ffmpeg2theora</title><build>/Users/build/ffmpeg2theora-0.28.pkg</build><organization>org.xiph</organization><userSees ui="easy"/><min-target os="3"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>Commandline tool to encode video in Ogg Theora</description><contents><choice title="ffmpeg2theora" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="cc.v2v.ffmpeg2theora"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"/></resources><flags/><item type="file">01ffmpeg.xml</item></pkmkdoc> +<pkmkdoc spec="1.12"><properties><title>ffmpeg2theora</title><build>/Users/build/ffmpeg2theora-0.29.pkg</build><organization>org.xiph</organization><userSees ui="easy"/><min-target os="3"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>Commandline tool to encode video in Ogg Theora</description><contents><choice title="ffmpeg2theora" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="cc.v2v.ffmpeg2theora"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"/></resources><flags/><item type="file">01ffmpeg.xml</item></pkmkdoc>
View file
ffmpeg2theora-0.29.tar.bz2/src/avinfo.c -> ffmpeg2theora-0.30.tar.bz2/src/avinfo.c
Changed
@@ -36,6 +36,7 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> +#include <ctype.h> #include <getopt.h> #include <math.h> #include <errno.h> @@ -107,7 +108,7 @@ char *p, *p_str = str, *p_buffer = (char *)buffer; int len = strlen(str); strncpy(p_buffer, str, len); - while (p = strstr(p_str, orig)) { + while ((p = strstr(p_str, orig))) { strncpy(p_buffer, p_str, p-p_str); p_buffer += (p-p_str); len = len - strlen(orig) + strlen(rep); @@ -143,6 +144,9 @@ p = (char *)value; p = replace_str_all(p, "\\", "\\\\"); p = replace_str_all(p, "\"", "\\\""); + p = replace_str_all(p, "\n", ""); + p = replace_str_all(p, "\f", ""); + p = replace_str_all(p, "\r", ""); fprintf(output, "\"%s\": \"%s\"", key, p); free(p); break; @@ -165,42 +169,17 @@ void json_codec_info(FILE *output, AVCodecContext *enc, int indent) { const char *codec_name; - AVCodec *p; char buf132; int bitrate; AVRational display_aspect_ratio; - p = avcodec_find_decoder(enc->codec_id); - - if (p) { - codec_name = p->name; - } else if (enc->codec_id == CODEC_ID_MPEG2TS) { - /* fake mpeg2 transport stream codec (currently not - registered) */ - codec_name = "mpeg2ts"; - } else if (enc->codec_name0 != '\0') { - codec_name = enc->codec_name; - } else { - /* output avi tags */ - if( isprint(enc->codec_tag&0xFF) && isprint((enc->codec_tag>>8)&0xFF) - && isprint((enc->codec_tag>>16)&0xFF) && isprint((enc->codec_tag>>24)&0xFF)){ - snprintf(buf1, sizeof(buf1), "%c%c%c%c / 0x%04X", - enc->codec_tag & 0xff, - (enc->codec_tag >> 8) & 0xff, - (enc->codec_tag >> 16) & 0xff, - (enc->codec_tag >> 24) & 0xff, - enc->codec_tag); - } else { - snprintf(buf1, sizeof(buf1), "0x%04x", enc->codec_tag); - } - codec_name = buf1; - } + codec_name = avcodec_get_name(enc->codec_id); switch(enc->codec_type) { case AVMEDIA_TYPE_VIDEO: codec_name = fix_codec_name(codec_name); json_add_key_value(output, "codec", (void *)codec_name, JSON_STRING, 0, indent); - if (enc->pix_fmt != PIX_FMT_NONE) { + if (enc->pix_fmt != AV_PIX_FMT_NONE) { json_add_key_value(output, "pixel_format", (void *)av_get_pix_fmt_name(enc->pix_fmt), JSON_STRING, 0, indent); } if (enc->width) { @@ -235,37 +214,37 @@ /* for PCM codecs, compute bitrate directly */ switch(enc->codec_id) { - case CODEC_ID_PCM_F64BE: - case CODEC_ID_PCM_F64LE: + case AV_CODEC_ID_PCM_F64BE: + case AV_CODEC_ID_PCM_F64LE: bitrate = enc->sample_rate * enc->channels * 64; break; - case CODEC_ID_PCM_S32LE: - case CODEC_ID_PCM_S32BE: - case CODEC_ID_PCM_U32LE: - case CODEC_ID_PCM_U32BE: - case CODEC_ID_PCM_F32BE: - case CODEC_ID_PCM_F32LE: + case AV_CODEC_ID_PCM_S32LE: + case AV_CODEC_ID_PCM_S32BE: + case AV_CODEC_ID_PCM_U32LE: + case AV_CODEC_ID_PCM_U32BE: + case AV_CODEC_ID_PCM_F32BE: + case AV_CODEC_ID_PCM_F32LE: bitrate = enc->sample_rate * enc->channels * 32; break; - case CODEC_ID_PCM_S24LE: - case CODEC_ID_PCM_S24BE: - case CODEC_ID_PCM_U24LE: - case CODEC_ID_PCM_U24BE: - case CODEC_ID_PCM_S24DAUD: + case AV_CODEC_ID_PCM_S24LE: + case AV_CODEC_ID_PCM_S24BE: + case AV_CODEC_ID_PCM_U24LE: + case AV_CODEC_ID_PCM_U24BE: + case AV_CODEC_ID_PCM_S24DAUD: bitrate = enc->sample_rate * enc->channels * 24; break; - case CODEC_ID_PCM_S16LE: - case CODEC_ID_PCM_S16BE: - case CODEC_ID_PCM_S16LE_PLANAR: - case CODEC_ID_PCM_U16LE: - case CODEC_ID_PCM_U16BE: + case AV_CODEC_ID_PCM_S16LE: + case AV_CODEC_ID_PCM_S16BE: + case AV_CODEC_ID_PCM_S16LE_PLANAR: + case AV_CODEC_ID_PCM_U16LE: + case AV_CODEC_ID_PCM_U16BE: bitrate = enc->sample_rate * enc->channels * 16; break; - case CODEC_ID_PCM_S8: - case CODEC_ID_PCM_U8: - case CODEC_ID_PCM_ALAW: - case CODEC_ID_PCM_MULAW: - case CODEC_ID_PCM_ZORK: + case AV_CODEC_ID_PCM_S8: + case AV_CODEC_ID_PCM_U8: + case AV_CODEC_ID_PCM_ALAW: + case AV_CODEC_ID_PCM_MULAW: + case AV_CODEC_ID_PCM_ZORK: bitrate = enc->sample_rate * enc->channels * 8; break; default: @@ -300,54 +279,6 @@ } } - -static void json_stream_format(FILE *output, AVFormatContext *ic, int i, int indent, int first, int type_filter) { - static int _first = 1; - char buf132; - - AVStream *st = ic->streamsi; - - if (first) - _first = 1; - - if(st->codec->codec_type == type_filter){ - if (!_first) - fprintf(output, ", "); - _first = 0; - fprintf(output, "{\n"); - - json_codec_info(output, st->codec, indent + 1); - if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){ - if (st->time_base.den && st->time_base.num && av_q2d(st->time_base) > 0.001) { - snprintf(buf1, sizeof(buf1), "%d:%d", - st->time_base.den, st->time_base.num); - json_add_key_value(output, "framerate", buf1, JSON_STRING, 0, indent + 1); - } else { - snprintf(buf1, sizeof(buf1), "%d:%d", - st->r_frame_rate.num, st->r_frame_rate.den); - json_add_key_value(output, "framerate", buf1, JSON_STRING, 0, 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); - } - } - json_add_key_value(output, "id", &i, JSON_INT, 1, indent + 1); - do_indent(output, indent-1); - fprintf(output, "}"); - } -} - static int utf8_validate (char *s, int n) { int i; int extra_bytes; @@ -387,38 +318,79 @@ error: return i == n; } -int _json_metadata(FILE *output, AVDictionary *m, int first, int indent) + + +void json_metadata(FILE *output, AVDictionary *m, int indent) { - int i = 0; + int first = 1; AVDictionaryEntry *tag = NULL; while ((tag = av_dict_get(m, "", tag, AV_DICT_IGNORE_SUFFIX))) { if (strlen(tag->value) && utf8_validate (tag->value, strlen(tag->value))) { if (first) { first = 0; - do_indent(output, 1); + do_indent(output, indent); fprintf(output, "\"metadata\": {\n"); + do_indent(output, indent + 1); } else { - do_indent(output, 2); + do_indent(output, indent + 1); fprintf(output, ","); - indent=0; } - json_add_key_value(output, tag->key, tag->value, JSON_STRING, 1, indent); + json_add_key_value(output, tag->key, tag->value, JSON_STRING, 1, 0); } } - return first; + if (!first) { + do_indent(output, indent); + fprintf(output, "},\n"); + } } -void json_metadata(FILE *output, const AVFormatContext *av) -{ - int first = 1, indent=2, i=0; - first = _json_metadata(output, av->metadata, first, indent); - for(i=0;i<av->nb_streams;i++) { - first = _json_metadata(output, av->streamsi->metadata, first, indent); - } - if (!first) { - do_indent(output, 1); - fprintf(output, "},\n"); + +static void json_stream_format(FILE *output, AVFormatContext *ic, int i, int indent, int first, int type_filter) { + static int _first = 1; + char buf132; + + AVStream *st = ic->streamsi; + + if (first) + _first = 1; + + if(st->codec->codec_type == type_filter){ + if (!_first) + fprintf(output, ", "); + _first = 0; + fprintf(output, "{\n"); + + json_codec_info(output, st->codec, indent + 1); + if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){ + if (st->time_base.den && st->time_base.num && av_q2d(st->time_base) > 0.001) { + snprintf(buf1, sizeof(buf1), "%d:%d", + st->time_base.den, st->time_base.num); + json_add_key_value(output, "framerate", buf1, JSON_STRING, 0, indent + 1); + } else { + snprintf(buf1, sizeof(buf1), "%d:%d", + st->avg_frame_rate.num, st->avg_frame_rate.den); + json_add_key_value(output, "framerate", buf1, JSON_STRING, 0, 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); + } + } + json_metadata(output, st->metadata, indent + 1); + json_add_key_value(output, "id", &i, JSON_INT, 1, indent + 1); + do_indent(output, indent-1); + fprintf(output, "}"); } } @@ -462,6 +434,8 @@ char hash32; #ifdef WIN32 sprintf(hash,"%016I64x", gen_oshash(filename)); +#elif defined (__SVR4) && defined (__sun) + sprintf(hash,"%016llx", gen_oshash(filename)); #else sprintf(hash,"%016qx", gen_oshash(filename)); #endif @@ -519,7 +493,7 @@ } } fprintf(output, ",\n"); - json_metadata(output, ic); + json_metadata(output, ic->metadata, 1); } else { json_add_key_value(output, "code", "badfile", JSON_STRING, 0, 1); json_add_key_value(output, "error", "file does not exist or has unknown format.", JSON_STRING, 0, 1); @@ -536,9 +510,7 @@ #ifdef AVINFO int main(int argc, char **argv) { char inputfile_name255; - AVInputFormat *input_fmt = NULL; - AVFormatParameters *formatParams = NULL; - AVFormatContext *context; + AVFormatContext *context = NULL; FILE* output = stdout; avcodec_register_all(); @@ -553,8 +525,8 @@ output = fopen(argv2, "w"); } - if (av_open_input_file(&context, inputfile_name, input_fmt, 0, formatParams) >= 0) { - if (av_find_stream_info(context) >= 0) { + if (avformat_open_input(&context, inputfile_name, NULL, NULL) >= 0) { + if (avformat_find_stream_info(context, NULL) >= 0) { json_format_info(output, context, inputfile_name); } }
View file
ffmpeg2theora-0.29.tar.bz2/src/ffmpeg2theora.c -> ffmpeg2theora-0.30.tar.bz2/src/ffmpeg2theora.c
Changed
@@ -21,6 +21,7 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> +#include <ctype.h> #include <getopt.h> #include <math.h> #include <errno.h> @@ -33,6 +34,11 @@ #include "libswscale/swscale.h" #include "libpostproc/postprocess.h" +#include "libavutil/opt.h" +#include "libavutil/channel_layout.h" +#include "libavutil/samplefmt.h" +#include "libswresample_compat.h" + #include "theora/theoraenc.h" #include "vorbis/codec.h" #include "vorbis/vorbisenc.h" @@ -47,6 +53,9 @@ #include "ffmpeg2theora.h" #include "avinfo.h" +#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio + + #define LENGTH(x) (sizeof(x) / sizeof(*x)) enum { @@ -140,13 +149,13 @@ uint8_t *picture_buf; int size; - picture = avcodec_alloc_frame(); + picture = av_frame_alloc(); if (!picture) return NULL; size = avpicture_get_size (pix_fmt, width, height); picture_buf = av_malloc (size); if (!picture_buf) { - av_free (picture); + av_frame_free (&picture); return NULL; } avpicture_fill((AVPicture *) picture, picture_buf, pix_fmt, width, height); @@ -159,7 +168,7 @@ static void frame_dealloc(AVFrame *frame) { if (frame) { avpicture_free((AVPicture*)frame); - av_free(frame); + av_frame_free(&frame); } } @@ -223,7 +232,7 @@ this->kate_streams=NULL; this->ignore_non_utf8 = 0; - this->pix_fmt = PIX_FMT_YUV420P; + this->pix_fmt = AV_PIX_FMT_YUV420P; // ffmpeg2theora --nosound -f dv -H 32000 -S 0 -v 8 -x 384 -y 288 -G 1.5 input.dv this->video_gamma = 0.0; @@ -347,14 +356,14 @@ AVCodecContext *enc = this->context->streamsidx->codec; if (enc->codec_type != AVMEDIA_TYPE_SUBTITLE) return 0; switch (enc->codec_id) { - case CODEC_ID_TEXT: - case CODEC_ID_SSA: - case CODEC_ID_MOV_TEXT: + case AV_CODEC_ID_TEXT: + case AV_CODEC_ID_SSA: + case AV_CODEC_ID_MOV_TEXT: if (included_subtitles & INCSUB_TEXT) return "SUB"; else return NULL; - case CODEC_ID_DVD_SUBTITLE: + case AV_CODEC_ID_DVD_SUBTITLE: if (included_subtitles & INCSUB_SPU) return "K-SPU"; else @@ -513,6 +522,74 @@ return lang; } +static void delete_filter_graph(ff2theora this) { + if (this->filter_graph) { + av_frame_free(&this->filter_frame); + avfilter_graph_free(&this->filter_graph); + } +} + +static int init_filter_graph(ff2theora this, enum AVPixelFormat pixfmt, int width, int height) { + AVFilterInOut *inputs = NULL, *outputs = NULL; + char args512; + int res; + + delete_filter_graph(this); + this->filter_graph = avfilter_graph_alloc(); + snprintf(args, sizeof(args), + "buffer=video_size=%dx%d:pix_fmt=%d:time_base=1/1:pixel_aspect=0/1in;" + "inyadifout;" + "outbuffersink", + width, height, pixfmt); + res = avfilter_graph_parse2(this->filter_graph, args, &inputs, &outputs); + if (res < 0) + return res; + if(inputs || outputs) + return -1; + res = avfilter_graph_config(this->filter_graph, NULL); + if (res < 0) + return res; + + this->buffersrc_ctx = avfilter_graph_get_filter(this->filter_graph, "Parsed_buffer_0"); + this->buffersink_ctx = avfilter_graph_get_filter(this->filter_graph, "Parsed_buffersink_2"); + if (!this->buffersrc_ctx || !this->buffersink_ctx) + return -1; + this->filter_frame = av_frame_alloc(); + this->last_width = width; + this->last_height = height; + this->last_pixfmt = pixfmt; + + return 0; +} + +static int process_filter_graph(ff2theora this, AVPicture *dst, const AVPicture *src, + enum AVPixelFormat pixfmt, int width, int height) { + int res; + + if (!this->filter_graph || width != this->last_width || + height != this->last_height || pixfmt != this->last_pixfmt) { + res = init_filter_graph(this, pixfmt, width, height); + if (res < 0) + return res; + } + + memcpy(this->filter_frame->data, src->data, sizeof(src->data)); + memcpy(this->filter_frame->linesize, src->linesize, sizeof(src->linesize)); + this->filter_frame->width = width; + this->filter_frame->height = height; + this->filter_frame->format = pixfmt; + res = av_buffersrc_add_frame(this->buffersrc_ctx, this->filter_frame); + if (res < 0) + return res; + res = av_buffersink_get_frame(this->buffersink_ctx, this->filter_frame); + if (res < 0) + return res; + av_picture_copy(dst, (const AVPicture *) this->filter_frame, pixfmt, width, height); + av_frame_unref(this->filter_frame); + + return 0; +} + void ff2theora_output(ff2theora this) { unsigned int i; AVCodecContext *aenc = NULL; @@ -534,6 +611,11 @@ int synced = this->start_time == 0.0; AVRational display_aspect_ratio, sample_aspect_ratio; + struct SwrContext *swr_ctx; + uint8_t **dst_audio_data = NULL; + int dst_linesize; + int src_nb_samples = 1024, dst_nb_samples, max_dst_nb_samples; + if (this->audiostream >= 0 && this->context->nb_streams > this->audiostream) { AVCodecContext *enc = this->context->streamsthis->audiostream->codec; if (enc->codec_type == AVMEDIA_TYPE_AUDIO) { @@ -590,11 +672,12 @@ vstream_fps.num = venc->time_base.den; vstream_fps.den = venc->time_base.num * venc->ticks_per_frame; } - if (av_q2d(vstream->r_frame_rate) < av_q2d(vstream_fps)) { - vstream_fps = vstream->r_frame_rate; + if (av_q2d(vstream->avg_frame_rate) < av_q2d(vstream_fps)) { + vstream_fps = vstream->avg_frame_rate; } this->fps = fps = av_q2d(vstream_fps); + venc->thread_count = 1; if (vcodec == NULL || avcodec_open2 (venc, vcodec, NULL) < 0) { this->video_index = -1; } @@ -885,8 +968,8 @@ /*Force the offsets to be even so that chroma samples line up like we expect.*/ - this->frame_x_offset = this->frame_width-this->picture_width>>1&~1; - this->frame_y_offset = this->frame_height-this->picture_height>>1&~1; + this->frame_x_offset = (this->frame_width-this->picture_width)>>1&~1; + this->frame_y_offset = (this->frame_height-this->picture_height)>>1&~1; //Bicubic (best for upscaling), if (sws_flags < 0) { @@ -954,26 +1037,47 @@ if (this->channels > aenc->channels) this->channels = aenc->channels; } - + aenc->thread_count = 1; if (acodec != NULL && avcodec_open2 (aenc, acodec, NULL) >= 0) { if (this->sample_rate != sample_rate || this->channels != aenc->channels - || aenc->sample_fmt != AV_SAMPLE_FMT_S16) { - // values take from libavcodec/resample.c - this->audio_resample_ctx = av_audio_resample_init(this->channels, aenc->channels, - this->sample_rate, sample_rate, - AV_SAMPLE_FMT_S16, aenc->sample_fmt, - 16, 10, 0, 0.8); - if (!this->audio_resample_ctx) { - this->channels = aenc->channels; + || aenc->sample_fmt != AV_SAMPLE_FMT_FLTP) { + swr_ctx = swr_alloc(); + /* set options */ + if (aenc->channel_layout) { + av_opt_set_int(swr_ctx, "in_channel_layout", aenc->channel_layout, 0); + } else { + av_opt_set_int(swr_ctx, "in_channel_layout", av_get_default_channel_layout(aenc->channels), 0); + } + av_opt_set_int(swr_ctx, "in_sample_rate", aenc->sample_rate, 0); + av_opt_set_int(swr_ctx, "in_sample_fmt", aenc->sample_fmt, 0); + + av_opt_set_int(swr_ctx, "out_channel_layout", av_get_default_channel_layout(this->channels), 0); + av_opt_set_int(swr_ctx, "out_sample_rate", this->sample_rate, 0); + av_opt_set_int(swr_ctx, "out_sample_fmt", AV_SAMPLE_FMT_FLTP, 0); + + /* initialize the resampling context */ + if (swr_init(swr_ctx) < 0) { + fprintf(stderr, "Failed to initialize the resampling context\n"); + exit(1); + } + + max_dst_nb_samples = dst_nb_samples = + av_rescale_rnd(src_nb_samples, this->sample_rate, sample_rate, AV_ROUND_UP); + + if (av_samples_alloc(dst_audio_data, &dst_linesize, this->channels, + dst_nb_samples, AV_SAMPLE_FMT_FLTP, 0) < 0) { + fprintf(stderr, "Could not allocate destination samples\n"); + exit(1); } + if (!info.frontend && this->sample_rate!=sample_rate) fprintf(stderr, " Resample: %dHz => %dHz\n", sample_rate,this->sample_rate); if (!info.frontend && this->channels!=aenc->channels) fprintf(stderr, " Channels: %d => %d\n",aenc->channels,this->channels); } else{ - this->audio_resample_ctx=NULL; + swr_ctx = NULL; } } else{ @@ -1064,13 +1168,12 @@ AVPacket pkt; AVPacket avpkt; int len1; - int got_picture; + int got_frame; int first = 1; int audio_eos = 0, video_eos = 0, audio_done = 0, video_done = 0; int ret; - int16_t *audio_buf=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE); - int16_t *resampled=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE); - int16_t *audio_p=NULL; + AVFrame *audio_frame = NULL; + uint8_t **audio_p = NULL; int no_frames; int no_samples; @@ -1339,6 +1442,10 @@ exit(1); } + if (!(audio_frame = av_frame_alloc())) { + fprintf(stderr, "Failed to allocate memory\n"); + exit(1); + } av_init_packet(&avpkt); /* main decoding loop */ @@ -1366,7 +1473,7 @@ first frame decodec in case its not a keyframe */ if (pkt.stream_index == this->video_index) { - avcodec_decode_video2(venc, frame, &got_picture, &pkt); + avcodec_decode_video2(venc, frame, &got_frame, &pkt); } av_free_packet (&pkt); continue; @@ -1385,9 +1492,9 @@ while(video_eos || avpkt.size > 0) { int dups = 0; static th_ycbcr_buffer ycbcr; - len1 = avcodec_decode_video2(venc, frame, &got_picture, &avpkt); + len1 = avcodec_decode_video2(venc, frame, &got_frame, &avpkt); if (len1>=0) { - if (got_picture) { + if (got_frame) { // this is disabled by default since it does not work // for all input formats the way it should. if (this->sync == 1 && pkt.dts != AV_NOPTS_VALUE) { @@ -1424,7 +1531,7 @@ if (venc_pix_fmt != this->pix_fmt) { sws_scale(this->sws_colorspace_ctx, - frame->data, frame->linesize, 0, display_height, + (const uint8_t * const*)frame->data, frame->linesize, 0, display_height, output_tmp->data, output_tmp->linesize); } else{ @@ -1434,12 +1541,14 @@ } if ((this->deinterlace==0 && frame->interlaced_frame) || this->deinterlace==1) { - if (avpicture_deinterlace((AVPicture *)output,(AVPicture *)output_tmp,this->pix_fmt,display_width,display_height)<0) { + + if (process_filter_graph(this, (AVPicture *)output,(AVPicture *)output_tmp,this->pix_fmt,display_width,display_height)<0) { fprintf(stderr, "Deinterlace failed.\n"); exit(1); } } - else{ + else + { av_picture_copy((AVPicture *)output, (AVPicture *)output_tmp, this->pix_fmt, display_width, display_height); } @@ -1468,7 +1577,7 @@ } if (this->sws_scale_ctx) { sws_scale(this->sws_scale_ctx, - output_cropped->data, + (const uint8_t * const*)output_cropped->data, output_cropped->linesize, 0, display_height - (this->frame_topBand + this->frame_bottomBand), output_resized->data, @@ -1496,7 +1605,7 @@ //now output_resized if (!first) { - if (got_picture || video_eos) { + if (got_frame || video_eos) { prepare_ycbcr_buffer(this, ycbcr, output_buffered); if(dups>0) { //this only works if dups < keyint, @@ -1516,11 +1625,11 @@ info.videotime = this->frame_count / av_q2d(this->framerate); } } - if (got_picture) { + if (got_frame) { first=0; av_picture_copy((AVPicture *)output_buffered, (AVPicture *)output_padded, this->pix_fmt, this->frame_width, this->frame_height); } - if (!got_picture) { + if (!got_frame) { break; } } @@ -1528,42 +1637,57 @@ if (info.passno!=1) if ((audio_eos && !audio_done) || (ret >= 0 && pkt.stream_index == this->audio_index)) { while((audio_eos && !audio_done) || avpkt.size > 0 ) { - int samples=0; - int samples_out=0; - int data_size = 4*AVCODEC_MAX_AUDIO_FRAME_SIZE; int bytes_per_sample = av_get_bytes_per_sample(aenc->sample_fmt); if (avpkt.size > 0) { - len1 = avcodec_decode_audio3(astream->codec, audio_buf, &data_size, &avpkt); + len1 = avcodec_decode_audio4(astream->codec, audio_frame, &got_frame, &avpkt); if (len1 < 0) { /* if error, we skip the frame */ break; } - avpkt.size -= len1; - avpkt.data += len1; - if (data_size >0) { - samples = data_size / (aenc->channels * bytes_per_sample); - samples_out = samples; - if (this->audio_resample_ctx) { - samples_out = audio_resample(this->audio_resample_ctx, resampled, audio_buf, samples); - audio_p = resampled; + /* Some audio decoders decode only part of the packet, and have to be + * called again with the remainder of the packet data. + * Sample: http://fate-suite.libav.org/lossless-audio/luckynight-partial.shn + * Also, some decoders might over-read the packet. */ + len1 = FFMIN(len1, avpkt.size); + if (got_frame) { + dst_nb_samples = audio_frame->nb_samples; + if (swr_ctx) { + dst_nb_samples = av_rescale_rnd(audio_frame->nb_samples, + this->sample_rate, aenc->sample_rate, AV_ROUND_UP); + if (dst_nb_samples > max_dst_nb_samples) { + av_free(dst_audio_data0); + if (av_samples_alloc(dst_audio_data, &dst_linesize, this->channels, + dst_nb_samples, AV_SAMPLE_FMT_FLTP, 1) < 0) { + fprintf(stderr, "Error while converting audio\n"); + exit(1); + } + max_dst_nb_samples = dst_nb_samples; + } + if (swr_convert(swr_ctx, dst_audio_data, dst_nb_samples, + (const uint8_t**)audio_frame->extended_data, audio_frame->nb_samples) < 0) { + fprintf(stderr, "Error while converting audio\n"); + exit(1); + } + audio_p = dst_audio_data; + } else { + audio_p = audio_frame->extended_data; } - else - audio_p = audio_buf; } + avpkt.size -= len1; + avpkt.data += len1; } - - if (no_samples > 0 && this->sample_count + samples_out > no_samples) { - audio_eos = 1; - samples_out = no_samples - this->sample_count; - if (samples_out <= 0) { - break; + if(got_frame || audio_eos) { + if (no_samples > 0 && this->sample_count + dst_nb_samples > no_samples) { + audio_eos = 1; + dst_nb_samples = no_samples - this->sample_count; + if (dst_nb_samples <= 0) { + break; + } } + oggmux_add_audio(&info, audio_p, dst_nb_samples, audio_eos); + this->sample_count += dst_nb_samples; } - - oggmux_add_audio(&info, audio_p, - samples_out * (this->channels), samples_out, audio_eos); - this->sample_count += samples_out; if(audio_eos) { audio_done = 1; } @@ -1639,16 +1763,16 @@ } } } - else if (enc->codec_id == CODEC_ID_TEXT) { - utf8 = pkt.data; + else if (enc->codec_id == AV_CODEC_ID_TEXT) { + utf8 = (const char *)pkt.data; utf8len = pkt.size; } - else if (enc->codec_id == CODEC_ID_SSA) { + else if (enc->codec_id == AV_CODEC_ID_SSA) { // SSA has control stuff in there, extract raw text extra_info_from_ssa(&pkt,&utf8,&utf8len,&allocated_utf8,&duration); } - else if (enc->codec_id == CODEC_ID_MOV_TEXT) { - utf8 = pkt.data; + else if (enc->codec_id == AV_CODEC_ID_MOV_TEXT) { + utf8 = (const char *)pkt.data; utf8len = pkt.size; if (utf8len >= 2) { const unsigned char *data = (const unsigned char*)pkt.data; @@ -1748,8 +1872,8 @@ avcodec_close(venc); } if (this->audio_index >= 0) { - if (this->audio_resample_ctx) - audio_resample_close(this->audio_resample_ctx); + if (swr_ctx) + swr_free(&swr_ctx); avcodec_close(aenc); } @@ -1758,11 +1882,12 @@ write_seek_index (&info); } + av_frame_free(&audio_frame); oggmux_close(&info); if (ppContext) pp_free_context(ppContext); if (!info.audio_only) { - av_free(frame_p); + av_frame_free(&frame_p); frame_dealloc(output_p); frame_dealloc(output_tmp_p); frame_dealloc(output_resized_p); @@ -1770,8 +1895,12 @@ frame_dealloc(output_cropped_p); frame_dealloc(output_padded_p); } - av_free(audio_buf); - av_free(resampled); + if (dst_audio_data) + av_freep(&dst_audio_data0); + av_freep(&dst_audio_data); + if(swr_ctx) { + swr_close(swr_ctx); + } } else{ fprintf(stderr, "No video or audio stream found.\n"); @@ -1779,6 +1908,7 @@ } void ff2theora_close(ff2theora this) { + delete_filter_graph(this); sws_freeContext(this->sws_colorspace_ctx); sws_freeContext(this->sws_scale_ctx); this->sws_colorspace_ctx = NULL; @@ -1788,7 +1918,7 @@ free_subtitles(this); this->context = NULL; if (info.twopass != 3) { - av_free(this); + free(this); } } @@ -2769,6 +2899,9 @@ outputfile_set=1; } optind++; + } else { + fprintf(stderr, "ERROR: no input specified\n"); + exit(1); } if(optind<argc) { fprintf(stderr, "WARNING: Only one input file supported, others will be ignored\n"); @@ -2824,7 +2957,7 @@ for(info.passno=(info.twopass==3?1:info.twopass);info.passno<=(info.twopass==3?2:info.twopass);info.passno++){ //detect image sequences and set framerate if provided - if (input_fmt != NULL && strcmp(input_fmt->name, "video4linux") >= 0) { + if (!input_fmt || (input_fmt != NULL && strcmp(input_fmt->name, "video4linux") >= 0)) { char buf100; av_dict_set(&format_opts, "channel", "0", 0); if (convert->picture_width || convert->picture_height) {
View file
ffmpeg2theora-0.29.tar.bz2/src/ffmpeg2theora.h -> ffmpeg2theora-0.30.tar.bz2/src/ffmpeg2theora.h
Changed
@@ -2,6 +2,9 @@ #define _F2T_FFMPEG2THEORA_H_ #include "subtitles.h" +#include <libavfilter/avfilter.h> +#include <libavfilter/buffersrc.h> +#include <libavfilter/buffersink.h> typedef struct ff2theora_subtitle{ char *text; @@ -62,7 +65,6 @@ double fps; struct SwsContext *sws_colorspace_ctx; /* for image resampling/resizing */ struct SwsContext *sws_scale_ctx; /* for image resampling/resizing */ - ReSampleContext *audio_resample_ctx; ogg_int32_t aspect_numerator; ogg_int32_t aspect_denominator; int colorspace; @@ -118,6 +120,13 @@ unsigned char y_lut256; unsigned char uv_lut256; + AVFilterContext *buffersink_ctx; + AVFilterContext *buffersrc_ctx; + AVFilterGraph *filter_graph; + AVFrame *filter_frame; + int last_width; + int last_height; + enum AVPixelFormat last_pixfmt; } *ff2theora;
View file
ffmpeg2theora-0.29.tar.bz2/src/iso639.c -> ffmpeg2theora-0.30.tar.bz2/src/iso639.c
Changed
@@ -1,4 +1,5 @@ #include <stddef.h> +#include <strings.h> #include "iso639.h" static const struct {
View file
ffmpeg2theora-0.30.tar.bz2/src/libswresample_compat.h
Added
@@ -0,0 +1,21 @@ +// This header serves to smooth out the differences in FFmpeg and LibAV. + +#ifdef USE_SWRESAMPLE + + #include <libswresample/swresample.h> + +#else + + #include <libavresample/avresample.h> + #include <libavutil/mathematics.h> + + #define SwrContext AVAudioResampleContext + #define swr_init(ctx) avresample_open(ctx) + #define swr_close(ctx) avresample_close(ctx) + #define swr_free(ctx) avresample_free(ctx) + #define swr_alloc() avresample_alloc_context() + #define swr_get_delay(ctx, ...) avresample_get_delay(ctx) + #define swr_convert(ctx, out, out_count, in, in_count) \ + avresample_convert(ctx, out, 0, out_count, (uint8_t **)in, 0, in_count) + +#endif
View file
ffmpeg2theora-0.29.tar.bz2/src/theorautils.c -> ffmpeg2theora-0.30.tar.bz2/src/theorautils.c
Changed
@@ -1219,17 +1219,16 @@ /** * adds audio samples to encoding sink * @param buffer pointer to buffer - * @param bytes bytes in buffer * @param samples samples in buffer * @param e_o_s 1 indicates end of stream. */ -void oggmux_add_audio (oggmux_info *info, int16_t * buffer, int bytes, int samples, int e_o_s) { +void oggmux_add_audio (oggmux_info *info, uint8_t **buffer, int samples, int e_o_s) { ogg_packet op; int i, j, k, count = 0; float **vorbis_buffer; - if (bytes <= 0 && samples <= 0) { + if (samples <= 0) { /* end of audio stream */ if (e_o_s) vorbis_analysis_wrote (&info->vd, 0); @@ -1252,7 +1251,7 @@ default: k = j; } } - vorbis_bufferki = buffercount++ / 32768.f; + vorbis_bufferki = ((const float *)bufferj)i; } } vorbis_analysis_wrote (&info->vd, samples); @@ -1291,8 +1290,8 @@ 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 %lld has calculated start" - " granule of %lld, but it should be non-negative!", + fprintf(stderr, "WARNING: vorbis packet %" PRId64 " has calculated start" + " granule of %" PRId64 ", but it should be non-negative!", op.packetno, start_granule); } start_granule = 0; @@ -1302,7 +1301,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 %lld (granulepos %lld) starts before" + fprintf(stderr, "WARNING: vorbis packet %" PRId64 " (granulepos %" PRId64 ") starts before" " the end of the preceeding packet!", op.packetno, op.granulepos); } start_granule = info->vorbis_granulepos;
View file
ffmpeg2theora-0.29.tar.bz2/src/theorautils.h -> ffmpeg2theora-0.30.tar.bz2/src/theorautils.h
Changed
@@ -168,7 +168,7 @@ extern void oggmux_setup_kate_streams(oggmux_info *info, int n_kate_streams); extern void oggmux_init (oggmux_info *info); extern void oggmux_add_video (oggmux_info *info, th_ycbcr_buffer ycbcr, int e_o_s); -extern void oggmux_add_audio (oggmux_info *info, int16_t * readbuffer, int bytesread, int samplesread,int e_o_s); +extern void oggmux_add_audio (oggmux_info *info, uint8_t **buffer, int samples,int e_o_s); #ifdef HAVE_KATE extern void oggmux_add_kate_text (oggmux_info *info, int idx, double t0, double t1, const char *text, size_t len, int x1, int x2, int y1, int y2); extern void oggmux_add_kate_image (oggmux_info *info, int idx, double t0, double t1, const kate_region *kr, const kate_palette *kp, const kate_bitmap *kb);
View file
ffmpeg2theora-0.29.tar.bz2/version.sh -> ffmpeg2theora-0.30.tar.bz2/version.sh
Changed
@@ -1,11 +1,8 @@ #!/bin/bash cd `dirname $0` version='0.29' -test -e .svn && svnversion=`which svnversion` -echo -n $version -if "x$svnversion" != "x" ; then - echo -n "+svn" - svnversion -else - echo +test -e .git && git=`which git` +if "x$git" != "x" ; then + version=$(cd "$1" && git describe --tags 2> /dev/null) fi +echo $version
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.