[GRASS-dev] build error in lib/ogsf

Glynn Clements glynn at gclements.plus.com
Fri Jul 22 22:44:43 EDT 2011


massimo di stefano wrote:

> tring to build grass-trunk on a ubuntu-11.10 64bit
> i had this error in the osgf library :

> gsd_img_mpeg.c: In function �add_video_stream�:
> gsd_img_mpeg.c:69:21: error: �CODEC_TYPE_VIDEO� undeclared (first use in this function)

avcodec.h has this:

	#if LIBAVCODEC_VERSION_MAJOR < 53
	#define CodecType AVMediaType
	
	#define CODEC_TYPE_UNKNOWN    AVMEDIA_TYPE_UNKNOWN
	#define CODEC_TYPE_VIDEO      AVMEDIA_TYPE_VIDEO
	#define CODEC_TYPE_AUDIO      AVMEDIA_TYPE_AUDIO
	#define CODEC_TYPE_DATA       AVMEDIA_TYPE_DATA
	#define CODEC_TYPE_SUBTITLE   AVMEDIA_TYPE_SUBTITLE
	#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
	#define CODEC_TYPE_NB         AVMEDIA_TYPE_NB
	#endif

So it appears that CODEC_TYPE_* have been deprecated in favour of
AVMEDIA_TYPE_*, and have been removed altogethr in version 53. 
Similarly for:

	#define AV_PKT_FLAG_KEY   0x0001
	#if LIBAVCODEC_VERSION_MAJOR < 53
	#define PKT_FLAG_KEY AV_PKT_FLAG_KEY
	#endif

As you might have guessed from "version 53", ffmpeg tends to change
quite frequently.

The question for us is whether the "new" names have been in use long
enough that we can just change the code to use the new names, or
whether that will break compilation for anyone using last week's
version of ffmpeg.

In the meantime, you can just drop --with-ffmpeg if you don't actually
need to generate video files from NVIZ.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list