UPDATE: stepmania - FFmpeg API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

UPDATE: stepmania - FFmpeg API

Brad Smith-14
Update API usage to deal with current vs new FFmpeg API.


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/games/stepmania/Makefile,v
retrieving revision 1.24
diff -u -p -u -p -r1.24 Makefile
--- Makefile 5 Dec 2018 20:19:01 -0000 1.24
+++ Makefile 17 Feb 2019 22:48:52 -0000
@@ -7,7 +7,7 @@ CATEGORIES = games emulators
 
 DISTNAME = stepmania-5.0b2a
 PKGNAME = stepmania-5.0beta2a
-REVISION = 12
+REVISION = 13
 EXTRACT_SUFX = -src.tar.bz2
 HOMEPAGE = http://www.stepmania.com
 MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=stepmania/}
Index: patches/patch-src_arch_MovieTexture_MovieTexture_FFMpeg_cpp
===================================================================
RCS file: patches/patch-src_arch_MovieTexture_MovieTexture_FFMpeg_cpp
diff -N patches/patch-src_arch_MovieTexture_MovieTexture_FFMpeg_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_arch_MovieTexture_MovieTexture_FFMpeg_cpp 17 Feb 2019 22:34:45 -0000
@@ -0,0 +1,122 @@
+$OpenBSD$
+
+Update API usage to deal with current vs new FFmpeg API.
+
+Index: src/arch/MovieTexture/MovieTexture_FFMpeg.cpp
+--- src/arch/MovieTexture/MovieTexture_FFMpeg.cpp.orig
++++ src/arch/MovieTexture/MovieTexture_FFMpeg.cpp
+@@ -35,7 +35,7 @@ static struct AVPixelFormat_t
+ {
+ int bpp;
+ uint32_t masks[4];
+- avcodec::PixelFormat pf;
++ avcodec::AVPixelFormat pf;
+ bool bHighColor;
+ bool bByteSwapOnLittleEndian;
+ MovieDecoderPixelFormatYCbCr YUV;
+@@ -46,7 +46,7 @@ static struct AVPixelFormat_t
+  0x00FF0000,
+  0x0000FF00,
+  0x000000FF },
+- avcodec::PIX_FMT_YUYV422,
++ avcodec::AV_PIX_FMT_YUYV422,
+ false, /* N/A */
+ true,
+ PixelFormatYCbCr_YUYV422,
+@@ -57,7 +57,7 @@ static struct AVPixelFormat_t
+  0x00FF0000,
+  0xFF000000,
+  0x000000FF },
+- avcodec::PIX_FMT_BGRA,
++ avcodec::AV_PIX_FMT_BGRA,
+ true,
+ true,
+ PixelFormatYCbCr_Invalid,
+@@ -68,7 +68,7 @@ static struct AVPixelFormat_t
+  0x0000FF00,
+  0x000000FF,
+  0xFF000000 },
+- avcodec::PIX_FMT_ARGB,
++ avcodec::AV_PIX_FMT_ARGB,
+ true,
+ true,
+ PixelFormatYCbCr_Invalid,
+@@ -80,7 +80,7 @@ static struct AVPixelFormat_t
+  0x0000FF00,
+  0x00FF0000,
+  0xFF000000 },
+- avcodec::PIX_FMT_ABGR,
++ avcodec::AV_PIX_FMT_ABGR,
+ true,
+ true,
+ PixelFormatYCbCr_Invalid,
+@@ -91,7 +91,7 @@ static struct AVPixelFormat_t
+  0x00FF0000,
+  0x0000FF00,
+  0x000000FF },
+- avcodec::PIX_FMT_RGBA,
++ avcodec::AV_PIX_FMT_RGBA,
+ true,
+ true,
+ PixelFormatYCbCr_Invalid,
+@@ -102,7 +102,7 @@ static struct AVPixelFormat_t
+  0x00FF00,
+  0x0000FF,
+  0x000000 },
+- avcodec::PIX_FMT_RGB24,
++ avcodec::AV_PIX_FMT_RGB24,
+ true,
+ true,
+ PixelFormatYCbCr_Invalid,
+@@ -113,7 +113,7 @@ static struct AVPixelFormat_t
+  0x00FF00,
+  0xFF0000,
+  0x000000 },
+- avcodec::PIX_FMT_BGR24,
++ avcodec::AV_PIX_FMT_BGR24,
+ true,
+ true,
+ PixelFormatYCbCr_Invalid,
+@@ -124,12 +124,12 @@ static struct AVPixelFormat_t
+  0x03E0,
+  0x001F,
+  0x0000 },
+- avcodec::PIX_FMT_RGB555,
++ avcodec::AV_PIX_FMT_RGB555,
+ false,
+ false,
+ PixelFormatYCbCr_Invalid,
+ },
+- { 0, { 0,0,0,0 }, avcodec::PIX_FMT_NB, true, false, PixelFormatYCbCr_Invalid }
++ { 0, { 0,0,0,0 }, avcodec::AV_PIX_FMT_NB, true, false, PixelFormatYCbCr_Invalid }
+ };
+
+ static void FixLilEndian()
+@@ -266,7 +266,7 @@ class MovieDecoder_FFMpeg: public MovieDecoder (privat
+
+ avcodec::AVStream *m_pStream;
+ avcodec::AVFrame m_Frame;
+- avcodec::PixelFormat m_AVTexfmt; /* PixelFormat of output surface */
++ avcodec::AVPixelFormat m_AVTexfmt; /* PixelFormat of output surface */
+ avcodec::SwsContext *m_swsctx;
+
+ float m_fPTS;
+@@ -648,7 +648,7 @@ RString MovieDecoder_FFMpeg::Open( RString sFile )
+ return "Couldn't find any video streams";
+ m_pStream = m_fctx->streams[stream_idx];
+
+- if( m_pStream->codec->codec_id == avcodec::CODEC_ID_NONE )
++ if( m_pStream->codec->codec_id == avcodec::AV_CODEC_ID_NONE )
+ return ssprintf( "Unsupported codec %08x", m_pStream->codec->codec_tag );
+
+ RString sError = OpenCodec();
+@@ -676,9 +676,6 @@ RString MovieDecoder_FFMpeg::OpenCodec()
+ m_pStream->codec->workaround_bugs   = 1;
+ m_pStream->codec->idct_algo         = FF_IDCT_AUTO;
+ m_pStream->codec->error_concealment = 3;
+-
+- if( pCodec->capabilities & CODEC_CAP_DR1 )
+- m_pStream->codec->flags |= CODEC_FLAG_EMU_EDGE;
+
+ LOG->Trace("Opening codec %s", pCodec->name );
+