gkv311 / sview

Stereoscopic media player
GNU General Public License v3.0
97 stars 35 forks source link

Not building against ffmpeg v7 #130

Closed arusahni closed 2 months ago

arusahni commented 4 months ago

On Linux, attempting to build this results in an error

/home/aru/code/sview/src/sview-301eccf5f81e0483710e01ec477906a13fb8988b/StShared/StAVIOContext.cpp: In constructor ‘StAVIOContext::StAVIOContext()’:
/home/aru/code/sview/src/sview-301eccf5f81e0483710e01ec477906a13fb8988b/StShared/StAVIOContext.cpp:50:83: error: invalid conversion from ‘int (*)(void*, uint8_t*, int)’ {aka ‘int (*)(void*, unsigned char*, int)’} to ‘int (*)(void*, const uint8_t*, int)’ {aka ‘int (*)(void*, const unsigned char*, int)’} [-fpermissive]
   50 |     myAvioCtx = avio_alloc_context(aBufferIO, aBufferSize, 0, this, readCallback, writeCallback, seekCallback);
      |                                                                                   ^~~~~~~~~~~~~
      |                                                                                   |
      |                                                                                   int (*)(void*, uint8_t*, int) {aka int (*)(void*, unsigned char*, int)}
In file included from /usr/include/libavformat/avformat.h:319,
                 from /home/aru/code/sview/src/sview-301eccf5f81e0483710e01ec477906a13fb8988b/include/StAV/stAV.h:21,
                 from /home/aru/code/sview/src/sview-301eccf5f81e0483710e01ec477906a13fb8988b/include/StAV/StAVIOContext.h:10,
                 from /home/aru/code/sview/src/sview-301eccf5f81e0483710e01ec477906a13fb8988b/StShared/StAVIOContext.cpp:7:

ffmpeg:

ffmpeg version n7.0.1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.1.1 (GCC) 20240522
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-mbedtls --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil      59.  8.100 / 59.  8.100
libavcodec     61.  3.100 / 61.  3.100
libavformat    61.  1.100 / 61.  1.100
libavdevice    61.  1.100 / 61.  1.100
libavfilter    10.  1.100 / 10.  1.100
libswscale      8.  1.100 /  8.  1.100
libswresample   5.  1.100 /  5.  1.100
libpostproc    58.  1.100 / 58.  1.100
gkv311 commented 2 months ago

Pushed a patch fixing building issues when using FFmpeg 7.0. Have done only superficial testing so far.