Bug#888348: lives: FTBFS with FFmpeg 3.5

2018-02-12 Thread James Cowgill
Control: tags -1 fixed-upstream

Hi,

On 12/02/18 00:51, salsaman wrote:
> Sorry,  my bad: I forgot to update the constants in the .h files. I was
> looking in the .c files by mistake.
> 
> Also, I think it should be AV_CODEC_ID_* in the headers (although
> AV_CODEC_* seemed to work too).

Thanks. All the errors are fixed now.

James



signature.asc
Description: OpenPGP digital signature


Bug#888348: lives: FTBFS with FFmpeg 3.5

2018-02-11 Thread salsaman
Sorry,  my bad: I forgot to update the constants in the .h files. I was
looking in the .c files by mistake.

Also, I think it should be AV_CODEC_ID_* in the headers (although
AV_CODEC_* seemed to work too).


Bug#888348: lives: FTBFS with FFmpeg 3.5

2018-02-11 Thread James Cowgill
On 11/02/18 23:49, salsaman wrote:
> Please check that you are compiling with the current versions of those
> files. There are no instances of CODEC_* any more in those files.
> 

I see them here, am I looking at the wrong place?
https://sourceforge.net/p/lives/code/HEAD/tree/trunk/lives-plugins/plugins/decoders/mkv_decoder.h#l883

James



signature.asc
Description: OpenPGP digital signature


Bug#888348: lives: FTBFS with FFmpeg 3.5

2018-02-11 Thread salsaman
Please check that you are compiling with the current versions of those
files. There are no instances of CODEC_* any more in those files.


Bug#888348: lives: FTBFS with FFmpeg 3.5

2018-02-11 Thread James Cowgill
Hi,

On 04/02/18 18:10, salsaman wrote:
> I believe all the issues noted should be fixed now. You will need to
> replace the follwoing files:
> configure.ac
> libweed/weed-compat.h
> libweed/weed-compat.pc
> plugins/decoders/*
> 
> (the weed-compat changes are unrelated, but you will need to update them to
> compile the current decoder plugins).

Sorry for the delay in replying. I tried compiling trunk again but there
are still some errors. Thankfully these are just the CODEC_ to AV_CODEC_
constant renames. Running the following fixes these for me:

sed -i 's/CODEC_/AV_CODEC_/g' lives-plugins/plugins/decoders/mkv_decoder.h
sed -i 's/CODEC_/AV_CODEC_/g' lives-plugins/plugins/decoders/mpegts_decoder.h

Thanks,
James



signature.asc
Description: OpenPGP digital signature


Bug#888348: lives: FTBFS with FFmpeg 3.5

2018-02-04 Thread salsaman
I believe all the issues noted should be fixed now. You will need to
replace the follwoing files:
configure.ac
libweed/weed-compat.h
libweed/weed-compat.pc
plugins/decoders/*

(the weed-compat changes are unrelated, but you will need to update them to
compile the current decoder plugins).


Bug#888348: lives: FTBFS with FFmpeg 3.5

2018-01-25 Thread James Cowgill
Hi,

On 25/01/18 10:55, salsaman wrote:
> If you have a moment, perhaps you could pull the newly updated files from
> lives/lives-plugins/plugins/decoders in subversion (
> http://svn.code.sf.net/p/lives/code/trunk) and recompile. It should fix the
> FTBFS.

Thanks. The errors in the original build log have now been fixed, but
there are some more further on (build was done with make -k):

> libav_stream.c: In function 'set_palette':
> libav_stream.c:251:15: error: 'PIX_FMT_YUV420P' undeclared (first use in this 
> function); did you mean 'AV_PIX_FMT_YUV420P'?
>avpalette = 
> PIX_FMT_YUV420P;//weed_palette_to_avi_pix_fmt(WEED_PALETTE_YUV420P, );
>^~~
>AV_PIX_FMT_YUV420P
> libav_stream.c:251:15: note: each undeclared identifier is reported only once 
> for each function it appears in
> libav_stream.c: In function 'add_stream':
> libav_stream.c:459:17: error: 'CODEC_FLAG_GLOBAL_HEADER' undeclared (first 
> use in this function); did you mean 'AV_CODEC_FLAG_GLOBAL_HEADER'?
>  c->flags |= CODEC_FLAG_GLOBAL_HEADER;
>  ^~~~
>  AV_CODEC_FLAG_GLOBAL_HEADER
> Makefile:852: recipe for target 'libav_stream_la-libav_stream.lo' failed
[...]
> avformat_decoder.c: In function 'attach_stream':
> avformat_decoder.c:360:44: error: 'AVCodecContext {aka struct 
> AVCodecContext}' has no member named 'codec_name'; did you mean 'codec_type'?
>sprintf(cdata->audio_name, "%s", cc->codec_name);
> ^~
> codec_type
> avformat_decoder.c:400:44: error: 'AVCodecContext {aka struct 
> AVCodecContext}' has no member named 'codec_name'; did you mean 'codec_type'?
>sprintf(cdata->video_name, "%s", cc->codec_name);
> ^~
> codec_type
> Makefile:862: recipe for target 'zzavformat_decoder_la-avformat_decoder.lo' 
> failed
[...]
> mpegts_decoder.c: In function 'attach_stream':
> mpegts_decoder.c:3144:29: error: 'CODEC_CAP_TRUNCATED' undeclared (first use 
> in this function); did you mean 'AV_CODEC_CAP_TRUNCATED'?
>if (codec->capabilities & CODEC_CAP_TRUNCATED)
>  ^~~
>  AV_CODEC_CAP_TRUNCATED
> mpegts_decoder.c:3144:29: note: each undeclared identifier is reported only 
> once for each function it appears in
> mpegts_decoder.c:3145:19: error: 'CODEC_FLAG_TRUNCATED' undeclared (first use 
> in this function); did you mean 'CODEC_CAP_TRUNCATED'?
>  ctx->flags |= CODEC_FLAG_TRUNCATED;
>^~~~
>CODEC_CAP_TRUNCATED
> At top level:
> mpegts_decoder.c:340:23: warning: 'options' defined but not used 
> [-Wunused-const-variable=]
>  static const AVOption options[] = {
>^~~
> Makefile:841: recipe for target 'mpegts_decoder_la-mpegts_decoder.lo' failed

James



signature.asc
Description: OpenPGP digital signature


Bug#888348: lives: FTBFS with FFmpeg 3.5

2018-01-25 Thread salsaman
If you have a moment, perhaps you could pull the newly updated files from
lives/lives-plugins/plugins/decoders in subversion (
http://svn.code.sf.net/p/lives/code/trunk) and recompile. It should fix the
FTBFS.

Gabriel.


Bug#888348: lives: FTBFS with FFmpeg 3.5

2018-01-25 Thread James Cowgill
Hi,

On 25/01/18 04:05, salsaman wrote:
> Thanks. Will take a look.
> 
> What is the recommended compile time check for this version ?
> LIBAVCODE_VERSION_MAJOR > ? ?

For libavcodec from FFmpeg 3.5 / Libav 12 you can use:
  LIBAVCODEC_VERSION_MAJOR >= 58

However, there should be no reason to do this because all the removed
APIs have been deprecated for years now. You should instead check the
version at the time the feature was removed.

In this case you want the version that AV_INPUT_BUFFER_PADDING_SIZE was
added. This can be found in doc/APIchanges:
> 2015-07-27 - lavc 56.56.100 / 56.35.0 - avcodec.h
>   94d68a4 / 7c6eb0a1 - Rename CODEC_FLAG* defines to AV_CODEC_FLAG*.
>   444e987 / def97856 - Rename CODEC_CAP_* defines to AV_CODEC_CAP_*.
>   29d147c / 059a9348 - Rename FF_INPUT_BUFFER_PADDING_SIZE and 
> FF_MIN_BUFFER_SIZE
>   to AV_INPUT_BUFFER_PADDING_SIZE and AV_INPUT_BUFFER_MIN_SIZE.

The first version is for FFmpeg, the second is for Libav (sigh).

So I think you want:
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 56, 0)

Alternatively since FFmpeg 3.0 bumped the major version, you could be
more strict and check on:
 #if LIBAVCODEC_VERSION_MAJOR >= 57

Thanks,
James



signature.asc
Description: OpenPGP digital signature