Hi,

> building dvbcut with "make FFMPEG=/usr" does not compile
> and link any more with the latest snapshot of ffmpeg,

Yes; this has been true for quite some time.

> because they have change the API:
>       - C++ support has been removed -> ffmpeg headers have to be included
>         within a extern "C" directive

True, ffmpeg developers say "C++ support is now up to C++ users".
There is in fact a point to this because even before the change,
not _all_ ffmpeg headers had extern "C" in them.
Now it is at least more consistent.

>       - new software scaler library libswscale introduced -> img_convert has 
> been
>           removed from libavcodec -> replace with swscale stuff

Really?  My libavcodec.a (SVN 9816) compiled today still contains
img_convert.  It is marked deprecated, but still exists.  Maybe you
have configured your ffmpeg in some non-standard way?

I'd say the change from img_convert to swscale should be done in a
separate patch.

> The attached patch fix this for SVN revision 59 of dvbcut.

I think basically such a patch is a good idea; I'll reply to Michael
R.'s concerns separately.  I have compiled a patch (appended below)
which has an equivalent of your changes but without the swscale
changes.  In a few places, the ffmpeg includes are _removed_ by this
patch, except for one (src/stream.h) where they are definitely
necessary.  So, even if the goal is to remove ffmpeg dependencies,
then this is a worthwhile change.

I have checked on two different machines that with my patch dvbcut
still builds with the included old ffmpeg.

> --- ./SConstruct      2007-07-27 23:11:54.000000000 +0200
> +++ ./SConstruct      2007-07-27 23:58:55.000000000 +0200
> @@ -112,11 +112,12 @@
>  else:
>    localffmpeg=False
>    ffmpegpath=env["FFMPEG"].rstrip("/")
> +  env.Append(CPPDEFINES="__STDC_CONSTANT_MACROS")

For me, this wasn't sufficient, also I think it should
be under " if (localffmpeg==False)" for now.

> --- ./src/lavfmuxer.cpp       2007-07-27 23:11:54.000000000 +0200
> +++ ./src/lavfmuxer.cpp       2007-07-26 00:49:21.000000000 +0200
> @@ -18,8 +18,10 @@
>  
>  /* $Id: lavfmuxer.cpp 58 2007-07-23 07:03:07Z too-tired $ */
>  
> +extern "C" {
>  #include <ffmpeg/avformat.h>
>  #include <ffmpeg/avcodec.h>
> +}
>  #include <string.h>
>  #include <utility>
>  #include <list>
> @@ -88,7 +90,7 @@
>       if (sd->getitemlistsize() > 1) {
>         if (!avcodec_open(s->codec,
>                           (mpg.getstreamtype(astr)==streamtype::ac3audio) ?
> -                         &liba52_decoder : &mp2_decoder)) {
> +                         avcodec_find_decoder(CODEC_ID_AC3) : 
> avcodec_find_decoder(CODEC_ID_MP2))) {

This can be done in a shorter way..

> --- ./src/psfile.cpp  2007-07-27 23:11:54.000000000 +0200
> +++ ./src/psfile.cpp  2007-07-27 23:25:49.000000000 +0200
> @@ -21,7 +21,10 @@
>  #include "psfile.h"
>  #include "streamhandle.h"
>  #include "stream.h"
> +
> +extern "C" {
>  #include <ffmpeg/avcodec.h>
> +}

I've changed this so this include here...

> --- ./src/tsfile.cpp  2007-07-27 23:11:54.000000000 +0200
> +++ ./src/tsfile.cpp  2007-07-27 23:24:16.000000000 +0200
> @@ -24,7 +24,9 @@
>  #include <list>
>  #include <utility>
>  
> +extern "C" {
>  #include <ffmpeg/avcodec.h>
> +}

... and here isn't necessary any more.

Regards,
Wolfram.

Attachment: dvbcut-59-wgmin.diff
Description: Binary data

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user

Reply via email to