Compilation Error when Building Gizmo: AV_SAMPLE_FMT_S64 Not Declared
allycatty opened this issue · 0 comments
I'm encountering a compilation error while attempting to build Gizmo. The issue seems to be related to the usage of AV_SAMPLE_FMT_S64 and AV_SAMPLE_FMT_S64P in the file gizmo/media/stream.cpp. The compilation command and error messages are provided below:
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DNDEBUG=1 -DUSE_PYBIND11=1 -Igizmo -I/usr/include/python3.6m -I/usr/local/lib/python3.6/site-packages/pybind11/include -I/usr/local/lib/python3.6/site-packages/pybind11/include -I/root/subsync/gizmo/usr/include/ffmpeg -c gizmo/media/stream.cpp -o build/temp.linux-x86_64-3.6/gizmo/media/stream.o -O3 -g -std=c++11 -fvisibility=hidden -fomit-frame-pointer -fexpensive-optimizations
gizmo/media/stream.cpp: In function ‘const char* sampleFormatToName(AVSampleFormat)’:
gizmo/media/stream.cpp:28:8: error: ‘AV_SAMPLE_FMT_S64’ was not declared in this scope
case AV_SAMPLE_FMT_S64: return "S64";
^
gizmo/media/stream.cpp:29:8: error: ‘AV_SAMPLE_FMT_S64P’ was not declared in this scope
case AV_SAMPLE_FMT_S64P: return "S64P";
^
gizmo/media/stream.cpp: In function ‘AVCodecContext* makeCodecContext(const AVStream*)’:
gizmo/media/stream.cpp:37:14: error: ‘const AVStream’ has no member named ‘codecpar’
if (stream->codecpar == NULL)
^
gizmo/media/stream.cpp:40:59: error: ‘const AVStream’ has no member named ‘codecpar’
AVCodec codec = (AVCodec) avcodec_find_decoder(stream->codecpar->codec_id);
^
gizmo/media/stream.cpp:48:45: error: ‘const AVStream’ has no member named ‘codecpar’
avcodec_parameters_to_context(ctx, stream->codecpar);
^
gizmo/media/stream.cpp:48:53: error: ‘avcodec_parameters_to_context’ was not declared in this scope
avcodec_parameters_to_context(ctx, stream->codecpar);
^
gizmo/media/stream.cpp: In constructor ‘StreamFormat::StreamFormat(unsigned int, const AVStream*)’:
gizmo/media/stream.cpp:64:63: error: ‘const AVStream’ has no member named ‘codecpar’
if (AVCodec codec = (AVCodec) avcodec_find_decoder(stream->codecpar->codec_id))
^
gizmo/media/stream.cpp:81:14: error: ‘const AVStream’ has no member named ‘codecpar’
if (stream->codecpar)
^
gizmo/media/stream.cpp:85:19: error: ‘const AVStream’ has no member named ‘codecpar’
switch (stream->codecpar->codec_type)
^
error: command 'gcc' failed with exit status 1
Environment:
OS: CentOS 7.9.2009
Python: 3.6.8
Possible Solution:
Inspect the usage of AV_SAMPLE_FMT_S64 and AV_SAMPLE_FMT_S64P in the gizmo/media/stream.cpp file and provide necessary changes or updates to address the compilation issue.
Let me know if you need any additional information or assistance.