
Recherche avancée
Médias (91)
-
999,999
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (66)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (12214)
-
Anomalie #4515 (Fermé) : Fatal error en php 8.0
9 juillet 2020, par Franck DHello, :)
Windows 10 (1909)
Firefox 78.0.2
Easyphp
Apache 2.4.43 x64
PHP 8.0.0 alpha1 x64
MySQL 8.0.20 x64
PhpMyAdmin 5.0.2memory_limit 512M
post_max_size 130M
upload_max_filesize 64M
max_execution_time 300
max_input_time -1Comme php 8.0 sort le 26 novembre, https://wiki.php.net/todo/php80 et que spip 3.4 ne sortira sans doute pas avant 2022... Je commence à faire des tests avec php 8 (plus c’est tôt mieux c’est) histoire de voir si cela posera de gros problèmes avec spip 3.3 !
J’ai donc fait l’installation d’un spip 3.3 (24642) en php 7.4 puis, je change la version de php de esayphp pour lui mettre php 8.0 alpha1Résultat, j’ai de suite une page blanche avec :
Fatal error : Uncaught Error : Call to undefined function get_magic_quotes_gpc() in C :\Program Files (x86)\EasyPHP-Devserver-17\eds-www\test3\config\ecran_securite.php:350 Stack trace : #0 C :\Program Files (x86)\EasyPHP-Devserver-17\eds-www\test3\ecrire\inc_version.php(130) : include() #1 C :\Program Files (x86)\EasyPHP-Devserver-17\eds-www\test3\ecrire\index.php(22) : include(’C :\Program File...’) #2 main thrown in C :\Program Files (x86)\EasyPHP-Devserver-17\eds-www\test3\config\ecran_securite.php on line 350Je monte la priorité du ticket à "haut" car cela serait bien que spip 3.3 fonctionne en php 8, mais après, c’est discutable !
-
Matomo to end support for Internet Explorer 11
21 septembre 2021, par Matomo Core Team — CommunityA lot of the Matomo user interface is built on top of a programming framework called “Angular.js”. The support for this framework will end very soon, meaning we have to migrate the Matomo user interface to an alternative framework. The Matomo development team has chosen this new framework to be “Vue.js 3”.
Unfortunately, Vue.js does not support Internet Explorer 11 (IE 11). Therefore, we have to drop the support for IE 11. Many other popular services like Microsoft and WordPress recently did the same. This is happening because IE 11 was released about 8 years ago and is now used by less than 0.5% of the internet.
When will this change happen ?
Our next release (Matomo 4.5) will still support IE 11. It will show a notification in the user interface if you are using Internet Explorer to make you aware of this upcoming change.
When Matomo 4.6 is released around November 2021, then IE 11 will no longer be supported.
What does “end support” mean ?
The Matomo user interface will work less and less over time for people using IE 11 as a browser. While Matomo 4.6 might still mostly work with IE 11, once we migrate more of the user interface the functionality will stop working completely. It’s possible that even Matomo 4.6 will no longer be functional with IE 11 at all.
What should I do now ?
If you are impacted by this, then we strongly recommend that you switch to a more modern browser. Preferably a privacy-friendly browser like Mozilla Firefox or Brave. But any modern browser including Microsoft Edge, Safari and Google Chrome will work just fine.
If you can’t use a different browser and you are using Matomo On-Premise, then you can install and configure this new plugin which lets you only receive Matomo core updates that are compatible with IE 11. This will prevent you from accidentally upgrading to a Matomo core release that doesn’t work with IE 11, and you can still receive critical security updates and bug fixes until February 2022.
Will this affect the Matomo JavaScript tracker ?
No, all visitors using IE 11 will still be tracked and Matomo tracker will support the same browsers as before. Meaning also some older versions of Internet Explorer are still supported.
Have any questions about this ?
-
ffmpeg Undefined referance to several swr functions [duplicate]
21 mai 2022, par user19068953I'm trying to staticly link ffmpeg to my project, i downloaded the ffmpeg source files from a github repo because it had pre writen cmake files, which i needed for this exact problem but it changed nothing (https://github.com/Pawday/ffmpeg-cmake). I edited the file a little and posted it below, and added them to lib/ffmpeg in my project directory. I first ran ./configure, then ran make, then make install like the install guide suggested. Then i ran cmake . followed by make. It compiled just fine and i ran a test without any errors :


extern "C"{
 #include <libavcodec></libavcodec>avcodec.h>
}

#include <iostream>
int main(int argc, char* argv[]) {
 if (argc < 2) {
 std::cout << "provide a filename" << std::endl;
 return -1;
 AVPacket *pkt = av_packet_alloc();
 }
}
</iostream>


I was following the examples that ffmpeg provides, so i added this :


const AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);



But now i have this huge error :


/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function 

`opus_decode_subpacket':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:346: undefined reference to `swr_is_initialized'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_frame':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:188: undefined reference to `swr_is_initialized'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_init_resample':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:136: undefined reference to `swr_init'
/usr/bin/ld: /home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:142: undefined reference to `swr_convert'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_frame':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:202: undefined reference to `swr_convert'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_flush_resample':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:90: undefined reference to `swr_convert'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_subpacket':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:379: undefined reference to `swr_close'
/usr/bin/ld: /home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:346: undefined reference to `swr_is_initialized'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_flush':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:582: undefined reference to `swr_close'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_close':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:607: undefined reference to `swr_free'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_init':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:660: undefined reference to `swr_alloc'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/Interview.dir/build.make:122: bin/Interview] Error 1
make[1]: *** [CMakeFiles/Makefile2:420: CMakeFiles/Interview.dir/all] Error 2
make: *** [Makefile:84: all] Error 2



I find some questions with similar issues to no avail :


FFmpeg seems to be version conflict
Linking libavcodec and libavformat : Undefined references


NOTE : previously i tried downloading ffmpeg with home-brew and pkg-config maybe that is causing an error, but my guess is my cmake file is faulty.


project/CMakeLists :


cmake_minimum_required(VERSION 3.14)

project(Interview C CXX)
set(CMAKE_CXX_STANDARD 14)

SET( EXECUTABLE_OUTPUT_PATH ${dir}/bin )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin )
set( CMAKE_C_FLAGS "-lswresample")

add_subdirectory(lib/ffmpeg)

add_definitions(-DGL_SILENCE_DEPRECATION)

list(APPEND SOURCES
 src/main.cpp
 src/vipch.h
 src/VideoDecoder.cpp
 src/VideoDecoder.h
 src/Application.cpp
 src/Application.h
 #src/OpenGLRenderer.cpp
 #src/OpenGLRenderer.h
 #src/Layer.h
 #src/Layer.cpp
)

find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
find_library(AVFORMAT_LIBRARY avformat)

find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)
find_library(AVDEVICE_LIBRARY avdevice)

find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

add_executable(Interview src/main.cpp src/Application.cpp src/Application.h ${SOURCES})

target_link_libraries(Interview PRIVATE Threads::Threads)

if(APPLE)
 list(APPEND EXTRA_LIBS
 "-framework OpenGL"
 )

 configure_file(
 ${CMAKE_CURRENT_SOURCE_DIR}/assets/MacOSXBundleInfo.plist.in
 ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

 set_target_properties(Interview PROPERTIES
 MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

elseif(WIN32)
 list(APPEND EXTRA_LIBS
 "-lglu32 -lopengl32"
 )
 set(CMAKE_EXE_LINKER_FLAGS "-std=gnu99 -static -static-libgcc -static-libstdc++ -mwindows")

endif()

list(APPEND EXTRA_LIBS
"-lGL -lGLU -lX11 -lz -lva -lswresample"
)

find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)

#target_link_libraries(Interview ${CORELIBS})


target_include_directories(Interview PRIVATE 
 ${AVCODEC_INCLUDE_DIR} 
 ${AVFORMAT_INCLUDE_DIR}
 ${AVUTIL_INCLUDE_DIR}
 ${AVDEVICE_INCLUDE_DIR} 
 ${OPENGL_INCLUDE_DIR}
 ${GLEW_INCLUDE_DIRS}
)

target_link_libraries(Interview PRIVATE 
 ${AVCODEC_LIBRARY} 
 ${AVFORMAT_LIBRARY} 
 ${AVUTIL_LIBRARY} 
 ${AVDEVICE_LIBRARY} 
 ${OPENGL_LIBRARY}
 ${GLEW_LIBRARIES}
)



NOTE : i previously had a really similar error with pthread but with some fixes to cmake and installing pthread i fixed it.


project/lib/ffmpeg/CMakeLists :


cmake_minimum_required(VERSION 3.15)

project(FFMPEG C CXX)

add_library(ffmpeg_config INTERFACE)

#TODO:[cmake] COMMON DEFINES (config.h)
# create list with all that and then pick required from that list in each target
target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_CONFIGURATION="")
target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_DATADIR="")
target_compile_definitions(ffmpeg_config INTERFACE AVCONV_DATADIR="")
target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_LICENSE="")

target_compile_definitions(ffmpeg_config INTERFACE CC_IDENT="")

target_compile_definitions(ffmpeg_config INTERFACE HAVE_THREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_PTHREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_W32THREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_OS2THREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ISNAN=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMXEXT=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX2=HAVE_MMXEXT)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX2=HAVE_MMXEXT)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX_INLINE=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_AV_CONFIG_H=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ALTIVEC=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMXEXT_INLINE=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_NEON=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_AMD3DNOW_INLINE=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_X86ASM=0)
if(WIN32)
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_MKSTEMP=0)
else()
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_MKSTEMP=1)
endif()


#TODO:[cmake] detect each function and set to 0 if missing (they are in math.h)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_CBRT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_CBRTF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_COPYSIGN=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ERF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_HYPOT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_RINT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_LRINT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_LRINTF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ROUND=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ROUNDF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_TRUNC=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_TRUNCF=1)


target_link_libraries(ffmpeg_config INTERFACE ffmpeg_compat)

include (TestBigEndian)
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
if(IS_BIG_ENDIAN)
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_BIGENDIAN=1)
else()
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_BIGENDIAN=0)
endif()

target_compile_definitions(ffmpeg_config INTERFACE av_restrict=)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_THIS_YEAR=2021)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MEMORY_POISONING=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FRAME_THREAD_ENCODER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MEMORY_POISONING=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_GRAY=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_ERROR_RESILIENCE=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MPEGVIDEODEC=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SMALL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_D3D11VA_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_DXVA2_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_NVDEC_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VAAPI_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VIDEOTOOLBOX_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VDPAU_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_NETWORK=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_XVMC=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FORMAT_FILTER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_PNG_DECODER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_APNG_DECODER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_INFLATE_WRAPPER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_DEFLATE_WRAPPER=1)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVUTIL=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVCODEC=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVFORMAT=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVDEVICE=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWSCALE=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWRESAMPLE=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_POSTPROC=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVFILTER=1)



#CONFIG MUXERS
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_MUXER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE2_MUXER=1)

#CONFIG DEMUXERS
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE2_DEMUXER=1)

# look at the end of libavformat/img2dec.c file
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_BMP_PIPE_DEMUXER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_CRI_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_DDS_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_DPX_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_EXR_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_GEM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_GIF_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_J2K_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_JPEG_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_JPEGLS_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PAM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PBM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PCX_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGMYUV_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGX_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PHOTOCD_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PICTOR_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PNG_PIPE_DEMUXER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PPM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PSD_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_QDRAW_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SGI_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SVG_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_TIFF_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_WEBP_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XBM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XPM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XWD_PIPE_DEMUXER=0)


#CONFIG PROTOCOLS
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FILE_PROTOCOL=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_PIPE_PROTOCOL=1)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_ZLIB=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWSCALE_ALPHA=0)

target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86_32=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86_64=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_AARCH64=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_ARM=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_PPC=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_MIPS=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_ALPHA=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_LOONGARCH=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_LOONGARCH64=0)

target_compile_definitions(ffmpeg_config INTERFACE SWS_MAX_FILTER_SIZE=256)

#_________________________WARNINGS__________________________________________
#TODO[cmake]: set it for all targets individually or remove for WARNING HELL
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
 add_compile_options("-w")
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
 add_compile_options("-w")
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
 cmake_policy(SET CMP0092 NEW) #cmake disable std MSVC warnings in CMAKE_C_FLAGS
 #CMAKE_DEPFILE_FLAGS_C var in windows contains only /showIncludes and produce include tree
 set(CMAKE_DEPFILE_FLAGS_C "") #erase it
 add_compile_options("/w")
endif()

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/config.h "//cmake config will define all that")
target_include_directories(ffmpeg_config INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include)

#TODO[cmake]: resolve config_components.h
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/config_components.h "//")
target_include_directories(ffmpeg_config INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include)

add_subdirectory(compat)
add_subdirectory(libavutil)
add_subdirectory(libavcodec)
add_subdirectory(libavformat)
add_subdirectory(libavdevice)
add_subdirectory(libavfilter)
add_subdirectory(libswresample)
add_subdirectory(libswscale)
add_subdirectory(libpostproc)

add_subdirectory(fftools)

add_subdirectory(doc/examples)


find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
find_library(AVFORMAT_LIBRARY avformat)

find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)
find_library(AVDEVICE_LIBRARY avdevice)

find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

if(APPLE)
 list(APPEND EXTRA_LIBS
 "-framework OpenGL"
 )

 configure_file(
 ${CMAKE_CURRENT_SOURCE_DIR}/assets/MacOSXBundleInfo.plist.in
 ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

 set_target_properties(FFMPEG PROPERTIES
 MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

elseif(WIN32)
 list(APPEND EXTRA_LIBS
 "-lglu32 -lopengl32"
 )
 set(CMAKE_EXE_LINKER_FLAGS "-std=gnu99 -static -static-libgcc -static-libstdc++ -mwindows")
else()
 list(APPEND EXTRA_LIBS
 "-lGL -lGLU -lX11"
 )
endif()


#target_link_libraries(Interview ${CORELIBS})

set( CMAKE_C_FLAGS "-lswresample")

list(APPEND EXTRA_LIBS
"-lGL -lGLU -lX11 -lz -lva -lswresample"
)

target_include_directories(ffmpeg_config INTERFACE
 ${AVCODEC_INCLUDE_DIR} 
 ${AVFORMAT_INCLUDE_DIR}
 ${AVUTIL_INCLUDE_DIR}
 ${AVDEVICE_INCLUDE_DIR} 
 ${OPENGL_INCLUDE_DIR}
 ${GLEW_INCLUDE_DIRS}
)

target_link_libraries(ffmpeg_config INTERFACE
 ${AVCODEC_LIBRARY} 
 ${AVFORMAT_LIBRARY} 
 ${AVUTIL_LIBRARY} 
 ${AVDEVICE_LIBRARY} 
 ${OPENGL_LIBRARY}
 ${GLEW_LIBRARIES}
)



Ubuntu 22.04, cmake 3.16.3, ffmpeg version git-2022-05-20-cb47f66