http://dvbcut.sourceforge.net/download.html
and compile it as stated in src/README.ffmpeg. The make resulted in:
src/playaudio.cpp: In function void playaudio(const void*, uint32_t,
AVCodecContext*, AVCodec*):
src/playaudio.cpp:41: error: expected primary-expression before ?
token
and various secondary errors.
Line 41 is the following declaration. I don't recognise the ">?"
construct. Is it valid in C++?
int16_t samples[MIN_BUFFER_SAMPLES >? avcc->frame_size];
James
No! Maybe it's some form of gcc extension? C style VLAs support is a
g++ extension.
--
Ian Collins
> Line 41 is the following declaration. I don't recognise the ">?"
> construct. Is it valid in C++?
>
> int16_t samples[MIN_BUFFER_SAMPLES >? avcc->frame_size];
At least it does not look like any valid C or C++ construct that
I would recognise. MIN_BUFFER_SAMPLES seems to be a simple
#define'd number. Maybe it's remnants of a ?-: operator, but it
will be difficult to 'guess' the original intended meaning.
My guess is that the corresponding code has not been used for
quite some time. The release 0.5.4 also seems to be quite old.
You are probably better off trying a fresh SVN checkout.
Regards,
Robert
I believe they were removed some time ago, but here's a link showing
this can be replaced with std::max():
http://gcc.gnu.org/onlinedocs/gcc-3.3.6/gcc/Min-and-Max.html
Cheers,
Tony
Unfortunately that seems to be broken too. Running either make or make
FFMPEG=/usr results in
a@jet1:~/svn/dvbcut$ make
*** Attention, please! ***
The old scons-based build procedure does not work anymore.
Please run "./configure && make && make install" instead.
*** We apologize for any inconvenience. ***
a@jet1:~/svn/dvbcut$
The only configure script is in the ffmpeg.src directory
a@jet1:~/svn/dvbcut$ find . -name configure
./ffmpeg.src/configure
a@jet1:~/svn/dvbcut$
Configure works quickly but the make fails with
make: *** No rule to make target `ffmpeg.o', needed by `ffmpeg_g'.
Stop.
I guess the package is just broken. Thanks for the effort to help,
though.
James
So >? was to yield the max of the two values. Given that this was in a
declaration (and going back to C++ rather than the program written in
it) would it bevalid to write
int16_t samples[MAX > siz ? MAX : siz];
In other words can the ternary operator be used in this way at
declaration time?
James