Hi again,
Since I'm not that savy a svn user, I didn't realize that svn co wasn't
updating onto my changed files, and hence I missed the fact that the
addition of include algorithm hadn't fully fixed the upstream source for
compilation under gcc-4.3:
make FFMPEG=/usr
scons FFMPEG=/usr \
scons: Reading SConscript files ...
Checking for C header file libintl.h... (cached) yes
Checking for gettext() in C++ library intl... (cached) no
Checking for C library ao... yes
Checking for C library mad... yes
Checking for C library a52... (cached) yes
Checking for C library swscale... yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/tsfile.o -c -O3 -Wall -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DHAVE_LIBINTL_H -DHAVE_LIB_AO -DHAVE_LIB_MAD
-DHAVE_LIB_A52 -DQT_NO_DEBUG -D__STDC_CONSTANT_MACROS
-D__STDC_LIMIT_MACROS -DHAVE_LIB_SWSCALE -I/usr/lib/qt-3.3/include
-I/usr/include/ffmpeg src/tsfile.cpp
src/tsfile.cpp: In member function 'size_t
tsfile::get_si_table(uint8_t*, size_t, size_t&, int, int)':
src/tsfile.cpp:472: error: 'memcpy' was not declared in this scope
scons: *** [src/tsfile.o] Error 1
scons: building terminated because of errors.
make: *** [build] Error 2
=====
I also noticed these two {probably new 4.3 gcc} warnings {I guess the
suggestion is intended to help with code portability and readability,
and seems to be harmless - unless I read the code's intent incorrectly}:
g++ -o src/mpgfile.o -c -O3 -Wall -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DHAVE_LIBINTL_H -DHAVE_LIB_AO -DHAVE_LIB_MAD
-DHAVE_LIB_A52 -DQT_NO_DEBUG -D__STDC_CONSTANT_MACROS
-D__STDC_LIMIT_MACROS -DHAVE_LIB_SWSCALE -I/usr/lib/qt-3.3/include
-I/usr/include/ffmpeg src/mpgfile.cpp
src/mpgfile.cpp: In member function 'void mpgfile::fixtimecode(uint8_t*,
int, pts_t)':
src/mpgfile.cpp:801: warning: suggest parentheses around arithmetic in
operand of |
src/mpgfile.cpp:802: warning: suggest parentheses around arithmetic in
operand of |
src/mpgfile.cpp:803: warning: suggest parentheses around arithmetic in
operand of |
g++ -o src/psfile.o -c -O3 -Wall -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DHAVE_LIBINTL_H -DHAVE_LIB_AO -DHAVE_LIB_MAD
-DHAVE_LIB_A52 -DQT_NO_DEBUG -D__STDC_CONSTANT_MACROS
-D__STDC_LIMIT_MACROS -DHAVE_LIB_SWSCALE -I/usr/lib/qt-3.3/include
-I/usr/include/ffmpeg src/psfile.cpp
src/psfile.cpp: In member function 'virtual int
psfile::streamreader(streamhandle&)':
src/psfile.cpp:191: warning: suggest parentheses around comparison in
operand of &
=====
I thought I might have a go at changing to the swscale way of doing
deprecated img_copy, but it's out of my capabilities at the moment.
Is this a move that would be accepted - ie. is it worth learning how
that new code works ?
g++ -o src/avframe.o -c -O3 -Wall -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DHAVE_LIBINTL_H -DHAVE_LIB_AO -DHAVE_LIB_MAD
-DHAVE_LIB_A52 -DQT_NO_DEBUG -D__STDC_CONSTANT_MACROS
-D__STDC_LIMIT_MACROS -DHAVE_LIB_SWSCALE -I/usr/lib/qt-3.3/include
-I/usr/include/ffmpeg src/avframe.cpp
src/avframe.cpp: In constructor 'avframe::avframe(AVFrame*,
AVCodecContext*)':
src/avframe.cpp:44: warning: 'void img_copy(AVPicture*, const
AVPicture*, int, int, int)' is deprecated (declared at
/usr/include/ffmpeg/avcodec.h:2924)
src/avframe.cpp:45: warning: 'void img_copy(AVPicture*, const
AVPicture*, int, int, int)' is deprecated (declared at
/usr/include/ffmpeg/avcodec.h:2924)
=====
This one seems to be saying that __STDC_LIMIT_MACROS was already
supplied on the command line and doesn't need to be in the source as
well ? Need to check.
g++ -o src/buffer.o -c -O3 -Wall -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DHAVE_LIBINTL_H -DHAVE_LIB_AO -DHAVE_LIB_MAD
-DHAVE_LIB_A52 -DQT_NO_DEBUG -D__STDC_CONSTANT_MACROS
-D__STDC_LIMIT_MACROS -DHAVE_LIB_SWSCALE -I/usr/lib/qt-3.3/include
-I/usr/include/ffmpeg src/buffer.cpp
src/buffer.cpp:21:1: warning: "__STDC_LIMIT_MACROS" redefined
<command-line>: warning: this is the location of the previous definition
=====
g++ -o src/lavfmuxer.o -c -O3 -Wall -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DHAVE_LIBINTL_H -DHAVE_LIB_AO -DHAVE_LIB_MAD
-DHAVE_LIB_A52 -DQT_NO_DEBUG -D__STDC_CONSTANT_MACROS
-D__STDC_LIMIT_MACROS -DHAVE_LIB_SWSCALE -I/usr/lib/qt-3.3/include
-I/usr/include/ffmpeg src/lavfmuxer.cpp
src/lavfmuxer.cpp: In constructor 'lavfmuxer::lavfmuxer(const char*,
uint32_t, mpgfile&, const char*)':
src/lavfmuxer.cpp:92: warning: 'int
avcodec_decode_audio(AVCodecContext*, int16_t*, int*, uint8_t*, int)' is
deprecated (declared at /usr/include/ffmpeg/avcodec.h:2609)
src/lavfmuxer.cpp:93: warning: 'int
avcodec_decode_audio(AVCodecContext*, int16_t*, int*, uint8_t*, int)' is
deprecated (declared at /usr/include/ffmpeg/avcodec.h:2609)
=====
The attached patch is against r116. With it, dvbcut compiles on Fedora
8/Livna-devel ffmpeg, and also on Fedora-devel/livna-devel.
By the way, do you see a release of dvbcut on the horizon ?
David Timms
Index: src/buffer.cpp
===================================================================
--- src/buffer.cpp (revision 116)
+++ src/buffer.cpp (working copy)
@@ -18,8 +18,6 @@
/* $Id$ */
-#define __STDC_LIMIT_MACROS // for INT64_MAX
-
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
Index: src/mpgfile.cpp
===================================================================
--- src/mpgfile.cpp (revision 116)
+++ src/mpgfile.cpp (working copy)
@@ -798,9 +798,9 @@
int hh=mm/60; mm %= 60;
int pp=pts%90000;
pp=(pp*framerate)/90000;
- buf[4] = (hh<<2) & 0x7c | (mm>>4) & 0x03;
- buf[5] = (mm<<4) & 0xf0 | (ss>>3) & 0x07 | 0x08;
- buf[6] = (ss<<5) & 0xe0 | (pp>>1) & 0x1f;
+ buf[4] = ((hh<<2) & 0x7c) | ((mm>>4) & 0x03);
+ buf[5] = ((mm<<4) & 0xf0) | ((ss>>3) & 0x07) | 0x08;
+ buf[6] = ((ss<<5) & 0xe0) | ((pp>>1) & 0x1f);
buf[7] |= (pp<<7) & 0x80;
}
Index: src/lavfmuxer.cpp
===================================================================
--- src/lavfmuxer.cpp (revision 116)
+++ src/lavfmuxer.cpp (working copy)
@@ -89,7 +89,7 @@
int16_t samples[6*1536]; // must be enough for 6 AC-3 channels --mr
int frame_size=sizeof(samples);
//fprintf(stderr, "** decode audio size=%d\n", sd->inbytes());
- avcodec_decode_audio(s->codec,samples,&frame_size,
+ avcodec_decode_audio2(s->codec,samples,&frame_size,
(uint8_t*) sd->getdata(),sd->inbytes());
avcodec_close(s->codec);
}
Index: src/psfile.cpp
===================================================================
--- src/psfile.cpp (revision 116)
+++ src/psfile.cpp (working copy)
@@ -188,7 +188,7 @@
payloadbegin += 4;
else if (sid&0x300)
++payloadbegin;
- else if (sid&0xf0==0xe0) {
+ else if ((sid&0xf0)==0xe0) {
if ( *(uint32_t*)(data+payloadbegin)==mbo32(0x00000001) )
++payloadbegin;
}
Index: src/tsfile.cpp
===================================================================
--- src/tsfile.cpp (revision 116)
+++ src/tsfile.cpp (working copy)
@@ -24,6 +24,7 @@
#include <list>
#include <utility>
#include <algorithm>
+#include <cstring>
tsfile::tsfile(inbuffer &b, int initial_offset) : mpgfile(b, initial_offset)
{
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DVBCUT-user mailing list
DVBCUT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dvbcut-user