diff --git a/.idea/deployment.xml b/.idea/deployment.xml
new file mode 100644
index 00000000..1a6c50e1
--- /dev/null
+++ b/.idea/deployment.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CC_SDK/CMakeLists.txt b/CC_SDK/CMakeLists.txt
index c9719f1b..9b5c2961 100644
--- a/CC_SDK/CMakeLists.txt
+++ b/CC_SDK/CMakeLists.txt
@@ -2,18 +2,23 @@ cmake_minimum_required(VERSION 3.0...3.5)
if(CMAKE_SYSTEM_NAME STREQUAL "OHOS")
message(WARNING "当前构建系统为 OpenHarmony")
- set(OS_OHOS TRUE PARENT_SCOPE)
+ set(OS_OHOS ON PARENT_SCOPE)
else()
- set(OS_OHOS FALSE PARENT_SCOPE)
+ set(OS_OHOS OFF PARENT_SCOPE)
endif()
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm|ARM|Armv[0-9]+")
message(STATUS "Target architecture is ARM")
message(STATUS "目标架构是 ARM")
- set(ARCH_ARM TRUE)
+ set(ARCH_ARM ON)
+ if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64|ARM64")
+ set(ARM64 ON PARENT_SCOPE)
+ elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm|ARM")
+ set(ARM32 ON PARENT_SCOPE)
+ endif ()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|x86_64|amd64|AMD64")
message(STATUS "Target architecture is x86/x86_64")
message(STATUS "目标架构是 x86/x86_64")
- set(ARCH_X86 TRUE)
+ set(ARCH_X86 ON PARENT_SCOPE)
else()
message(WARNING "Unknown architecture: ${CMAKE_SYSTEM_PROCESSOR}")
endif()
@@ -21,11 +26,36 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(ENABLE_INSTALL_RULES OFF CACHE BOOL "Disable install rules for cppp-reiconv")
add_subdirectory(Environment/cppp-reiconv)
-add_subdirectory(Environment/CSerialPort)
+
add_subdirectory(Environment/mirrors_nlohmann_json)
-add_subdirectory(Environment/portaudio)
add_subdirectory(Environment/openssl-cmake)
+option(SerialPort "CC_SerialPort_OAF" OFF)
+if (SerialPort)
+ message(STATUS "CSerialPort ON")
+ add_subdirectory(Environment/CSerialPort)
+ set(SerialPort_STATIC
+ src/Module/Comm/CCSerialPort.cpp
+ )
+endif ()
+
+option(AUDIO_IO "CC_Audio_IO_OAF" OFF)
+if (AUDIO_IO)
+ message(STATUS "AUDIO_IO ON")
+ set(AUDIO_IO_STATIC
+ src/Module/Multimedia/CCAudioIO.cpp
+ )
+endif ()
+
+option(PORTAUDIO "CC_PORTAUDIO_OAF" OFF)
+if (PORTAUDIO)
+ message(STATUS "PORTAUDIO ON")
+ add_subdirectory(Environment/portaudio)
+ set(portaudio_STATIC
+ src/Module/Multimedia/CCAudio.cpp
+ )
+endif ()
+
option(FFMPEG "CC_FFMPEG_OAF" OFF)
if (FFMPEG)
message(STATUS "FFMPEG ON")
@@ -50,48 +80,113 @@ if(LIBRTC)
add_subdirectory(Environment/libdatachannel)
endif()
+option(LIBJUICE "CC_LIBJUICE_OAF" OFF)
+if(LIBJUICE)
+ if (NOT LIBRTC)
+ add_subdirectory(Environment/libjuice)
+ endif ()
+endif()
+
+option(IMGUI "CC_ImGui_OAF" OFF)
+if (IMGUI)
+ message(STATUS "IMGUI ON")
+ set(IMGUI_SOURCES
+ src/Module/Window/ImGui/imgui.cpp
+ src/Module/Window/ImGui/imgui_draw.cpp
+ src/Module/Window/ImGui/imgui_impl_glfw.cpp
+ src/Module/Window/ImGui/imgui_impl_opengl3.cpp
+ src/Module/Window/ImGui/imgui_impl_win32.cpp
+ src/Module/Window/ImGui/imgui_tables.cpp
+ src/Module/Window/ImGui/imgui_widgets.cpp
+ src/Module/Window/CWidget.cpp
+ src/Module/Window/CApplication.cpp
+ src/Module/Window/Control/Button.cpp
+ src/Module/Window/Control/Combox.cpp
+ src/Module/Window/Control/Comboxs.cpp
+ src/Module/Window/Control/Image.cpp
+ src/Module/Window/Control/ImageButton.cpp
+ src/Module/Window/Control/Label.cpp
+ src/Module/Window/Control/Panel.cpp
+ src/Module/Window/Control/SliderBar.cpp
+ src/Module/Window/Control/SwitchBool.cpp
+ src/Module/Window/Control/TextBox.cpp
+ src/Module/Window/Drive/Drive.cpp
+ )
+endif ()
+
option(GLFW "CC_GLFW_OAF" OFF)
if (GLFW)
+ message(STATUS "GLFW ON")
add_subdirectory(Environment/glfw)
endif ()
+option(ZLIB "CC_ZLIB_OAF" OFF)
+if (ZLIB)
+ add_subdirectory(Environment/zlib)
+ set(MINIZIP_SOURCES
+ Environment/zlib/contrib/minizip/ioapi.c
+ Environment/zlib/contrib/minizip/iowin32.c
+ Environment/zlib/contrib/minizip/unzip.c
+ Environment/zlib/contrib/minizip/zip.c
+ )
+ add_library(minizip STATIC ${MINIZIP_SOURCES})
+ target_include_directories(minizip PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/Environment/zlib
+ ${CMAKE_CURRENT_SOURCE_DIR}/Environment/zlib/contrib/minizip
+ )
+ target_link_libraries(minizip zlib)
+endif ()
-set(INC_DIR ${PROJECT_SOURCE_DIR}/CC_SDK/Include)
-set(LINK_DIR ${PROJECT_SOURCE_DIR}/CC_SDK/Lib)
-set(LINK_DLL_DIR ${PROJECT_SOURCE_DIR}/CC_SDK/Bin)
-set(LIB_WX_D ${PROJECT_SOURCE_DIR}/CC_SDK/Lib/wx/libwxmsw32ud.a)
-set(LIB_WX_R ${PROJECT_SOURCE_DIR}/CC_SDK/Lib/wx/libwxmsw32u.a)
+set(INC_DIR ${CMAKE_CURRENT_LIST_DIR}/Include)
+set(LINK_DIR ${CMAKE_CURRENT_LIST_DIR}/Lib)
+set(LINK_DLL_DIR ${CMAKE_CURRENT_LIST_DIR}/Bin)
+set(LIB_WX_D ${CMAKE_CURRENT_LIST_DIR}/Lib/wx/libwxmsw32ud.a)
+set(LIB_WX_R ${CMAKE_CURRENT_LIST_DIR}/Lib/wx/libwxmsw32u.a)
set(CC_API_INC
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/basic
- ${PROJECT_SOURCE_DIR}/CC_SDK/Environment/CSerialPort/include
- ${PROJECT_SOURCE_DIR}/CC_SDK/Environment/mirrors_nlohmann_json/include
- ${PROJECT_SOURCE_DIR}/CC_SDK/Environment/mirrors_nlohmann_json/include/nlohmann
- ${PROJECT_SOURCE_DIR}/CC_SDK/Environment/portaudio/include
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/Multimedia
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/CCServlet/SQL
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/Module
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/Module/File
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/Module/Comm
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/Module/Data
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/Module/Multimedia
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/Module/IO
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/CCServlet/
- ${PROJECT_SOURCE_DIR}/CC_SDK/Environment/ImGUI/IMUI/Control
- ${PROJECT_SOURCE_DIR}/CC_SDK/Environment/ImGUI/IMUI/Drive
- ${PROJECT_SOURCE_DIR}/CC_SDK/Environment/ImGUI/IMUI/ImGui
- ${PROJECT_SOURCE_DIR}/CC_SDK/Environment/ImGUI/IMUI/WindowOS
- ${PROJECT_SOURCE_DIR}/CC_SDK/Environment/ImGUI/glfw/include
- ${PROJECT_SOURCE_DIR}/CC_SDK/Environment/mysql-9.0.1/include
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/CCServlet/openssl
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/Module/Comm/WebSocket
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/Module/Comm/WebRTC
- ${PROJECT_SOURCE_DIR}/CC_SDK/Include/Module/Window
+ ${CMAKE_CURRENT_LIST_DIR}/Include
+ ${CMAKE_CURRENT_LIST_DIR}/Include/basic
+ ${CMAKE_CURRENT_LIST_DIR}/Environment/mirrors_nlohmann_json/include
+ ${CMAKE_CURRENT_LIST_DIR}/Environment/mirrors_nlohmann_json/include/nlohmann
+ ${CMAKE_CURRENT_LIST_DIR}/Include/CCServlet/SQL
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/File
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/Comm
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/Data
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/IO
+ ${CMAKE_CURRENT_LIST_DIR}/Include/CCServlet
+ ${CMAKE_CURRENT_LIST_DIR}/Environment/ImGUI/IMUI/WindowOS
+ ${CMAKE_CURRENT_LIST_DIR}/Environment/ImGUI/glfw/include
+ ${CMAKE_CURRENT_LIST_DIR}/Environment/mysql-9.0.1/include
+ ${CMAKE_CURRENT_LIST_DIR}/Include/CCServlet/openssl
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/Comm/WebSocket
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/Window
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/Window/Control
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/Window/Drive
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/Window/ImGui
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/Comm/Socket
)
+if (AUDIO_IO)
+ list(APPEND CC_API_INC
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/Multimedia
+ )
+endif ()
+
+if (PORTAUDIO)
+ list(APPEND CC_API_INC
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Module/Multimedia
+ ${CMAKE_CURRENT_LIST_DIR}/Include/Multimedia
+ ${CMAKE_CURRENT_LIST_DIR}/Environment/portaudio/include
+ )
+endif ()
+
+if (SerialPort)
+ list(APPEND CC_API_INC ${CMAKE_CURRENT_LIST_DIR}/Environment/CSerialPort/include)
+endif ()
+
if (FFMPEG)
list(APPEND CC_API_INC ${CC_FFMPEG_INC})
endif ()
@@ -106,15 +201,48 @@ endif ()
if (LIBRTC)
list(APPEND CC_API_INC ${CMAKE_CURRENT_LIST_DIR}/Environment/libdatachannel/include)
+ list(APPEND CC_API_INC ${CMAKE_CURRENT_LIST_DIR}/Include/Module/Comm/WebRTC)
+ set(LIBRTC_STATIC src/Module/Comm/WebRTC/CCWebRTC.cpp)
+endif ()
+
+if (LIBJUICE)
+ if (NOT LIBRTC)
+ list(APPEND CC_API_INC ${CMAKE_CURRENT_LIST_DIR}/Environment/libjuice/include)
+ endif ()
+ set(CC_DataChannel
+ src/Module/Comm/DataChannel/RTCPeerConnection.cpp
+ )
endif ()
if (GLFW)
list(APPEND CC_API_INC ${CMAKE_CURRENT_LIST_DIR}/Environment/glfw/include)
endif ()
+if (IMGUI)
+
+endif ()
+
+if (ZLIB)
+ list(APPEND CC_API_INC ${CMAKE_CURRENT_LIST_DIR}/Environment/zlib/contrib/minizip)
+ list(APPEND CC_API_INC ${CMAKE_CURRENT_LIST_DIR}/Environment/zlib/contrib)
+ list(APPEND CC_API_INC ${CMAKE_CURRENT_LIST_DIR}/Environment/zlib)
+ list(APPEND CC_API_INC ${CMAKE_BINARY_DIR}/CC_SDK/Environment/zlib)
+ #list(APPEND CC_API_INC ${CMAKE_CURRENT_LIST_DIR}/Environment/zlib/include)
+ list(APPEND CC_API_INC ${CMAKE_CURRENT_LIST_DIR}/Include/Environment/zlib)
+ set(ZLIB_Module
+ Include/Environment/zlib/CCZip.cpp
+ Include/Environment/zlib/CCDataFormat.cpp
+ Include/Module/Multimedia/CCAudioIO.h
+ src/Module/Multimedia/CCAudioIO.cpp
+ Include/Module/Window/Control/Icon.h
+ )
+endif ()
+
+
option(APIS "APIS" ON)
if (APIS)
+
add_library(CC_API
STATIC
Include/basic/CCEncode.h
@@ -126,15 +254,13 @@ if (APIS)
src/basic/CCString.cpp
src/Module/File/CCFIleInStream.cpp
src/Module/File/CCFileOutStream.cpp
- src/Module/Comm/CCSocket.cpp
+ src/Module/Comm/Socket/CCSocket.cpp
src/Module/Data/CCJSONObject.cpp
src/Module/IO/CCThread.cpp
src/Module/IO/CCProcess.cpp
src/Module/IO/CCThreadPool.cpp
src/Module/IO/CCTimeData.cpp
- src/Module/Multimedia/CCAudio.cpp
src/Module/Comm/CCEpoll.cpp
- src/Module/Comm/CCSerialPort.cpp
src/CCServlet/CCRequest.cpp
src/CCServlet/CCResponse.cpp
src/CCServlet/CCSQLite3.cpp
@@ -177,9 +303,7 @@ if (APIS)
Include/basic/ConcurrentLinkedList.h
src/basic/CCTimer.cpp
src/Module/File/CCLogger.cpp
- Include/Module/Comm/WebRTC/CCWebRTC.cpp
- Include/Module/Comm/WebRTC/CCWebRTC.h
- Include/Module/Comm/WebRTC/CCWCTool.h
+ ${LIBRTC_STATIC}
src/DataModule/NetSqlite.cpp
Include/DataModule/NetSqlite.h
Include/Module/Window/CCSystem.h
@@ -187,6 +311,17 @@ if (APIS)
Include/basic/StreamHandler.h
Include/Multimedia/CCMiniMP3.cpp
Include/Multimedia/CCMiniMP3.h
+ ${ZLIB_Module}
+ ${SerialPort_STATIC}
+ ${portaudio_STATIC}
+ ${IMGUI_SOURCES}
+ Include/TL/Array_CTL.h
+ Include/TL/Map_CTL.h
+ ${AUDIO_IO_STATIC}
+ src/Module/Comm/Socket/CCDatagramSocket.cpp
+ src/Module/Comm/Socket/CCServerSocket.cpp
+ src/Module/Comm/Socket/CCClientSocket.cpp
+ ${CC_DataChannel}
)
target_include_directories(CC_API PUBLIC
${CC_API_INC}
@@ -196,26 +331,34 @@ if (APIS)
endif()
if(CMAKE_HOST_UNIX)
target_link_libraries(CC_API PUBLIC
- libcserialport
nlohmann_json
- PortAudio
libcppp-reiconv.shared
crypto ssl
)
+ if (AUDIO_IO)
+ target_link_libraries(CC_API PUBLIC asound)
+ endif ()
elseif(CMAKE_HOST_WIN32)
target_link_libraries(CC_API PUBLIC
- libcserialport
nlohmann_json
- PortAudio
libcppp-reiconv.shared
crypto ssl
- shlwapi shell32 Pdh iphlpapi
)
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL "OHOS")
+ target_link_libraries(CC_API PUBLIC shlwapi shell32 Pdh iphlpapi winmm)
+ endif ()
add_compile_definitions(UNICODE _UNICODE) # 强制使用Unicode
else()
endif()
+
+ if (PORTAUDIO)
+ target_link_libraries(CC_API PUBLIC PortAudio)
+ endif ()
+ if (SerialPort)
+ target_link_libraries(CC_API PUBLIC libcserialport)
+ endif ()
if (FFMPEG)
target_link_libraries(CC_API PUBLIC CC_FFmpeg_API)
endif ()
@@ -247,9 +390,28 @@ if (APIS)
if (LIBRTC)
target_link_libraries(CC_API PUBLIC datachannel)
endif ()
+ if (LIBJUICE)
+ if (NOT LIBRTC)
+ target_link_libraries(CC_API PUBLIC LibJuice::LibJuiceStatic)
+ endif ()
+ add_definitions(-DLIBJUICE_INC)
+ target_compile_definitions(CC_API PUBLIC LIBJUICE_INC)
+ endif ()
if (GLFW)
target_link_libraries(CC_API PUBLIC glfw)
endif ()
+ if (IMGUI)
+ if(CMAKE_HOST_UNIX)
+ target_link_libraries(CC_API PUBLIC GL glfw X11)
+ elseif(CMAKE_HOST_WIN32)
+ target_link_libraries(CC_API PUBLIC opengl32 dwmapi glfw)
+ else()
+
+ endif ()
+ endif ()
+ if (ZLIB)
+ target_link_libraries(CC_API PUBLIC zlib minizip)
+ endif ()
endif(APIS)
diff --git a/CC_SDK/Environment/FFmpeg/CMakeLists.txt b/CC_SDK/Environment/FFmpeg/CMakeLists.txt
index 10a948d2..3a996118 100644
--- a/CC_SDK/Environment/FFmpeg/CMakeLists.txt
+++ b/CC_SDK/Environment/FFmpeg/CMakeLists.txt
@@ -29,6 +29,46 @@ if (WIN32)
${CMAKE_CURRENT_LIST_DIR}/bin/Windows/swresample-6.dll
${CMAKE_CURRENT_LIST_DIR}/bin/Windows/swscale-9.dll
)
+ add_custom_command(TARGET CC_FFmpeg_API POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Windows/avcodec-62.dll
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Windows/avdevice-62.dll
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Windows/avfilter-11.dll
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Windows/avformat-62.dll
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Windows/avutil-60.dll
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Windows/swresample-6.dll
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Windows/swscale-9.dll
+ ${CMAKE_BINARY_DIR}/bin
+ COMMENT "Copying FFmpeg DLLs to bin directory"
+ )
+elseif (CMAKE_SYSTEM_NAME STREQUAL "OHOS")
+ if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm|ARM")
+ target_include_directories(CC_FFmpeg_API PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}/include/OHOS/Armv7/include
+ )
+ target_link_libraries(CC_FFmpeg_API PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Armv7/libavcodec.so.60.3.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Armv7/libavdevice.so.60.1.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Armv7/libavfilter.so.9.3.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Armv7/libavformat.so.60.3.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Armv7/libswresample.so.4.10.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Armv7/libswscale.so.7.1.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Armv7/libavutil.so.58.2.100
+ )
+ elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64|ARM64")
+ target_include_directories(CC_FFmpeg_API PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}/include/OHOS/Arm64/include
+ )
+ target_link_libraries(CC_FFmpeg_API PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Arm64/libavcodec.so.60.3.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Arm64/libavdevice.so.60.1.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Arm64/libavfilter.so.9.3.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Arm64/libavformat.so.60.3.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Arm64/libswresample.so.4.10.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Arm64/libswscale.so.7.1.100
+ ${CMAKE_CURRENT_LIST_DIR}/bin/OHOS/Arm64/libavutil.so.58.2.100
+ )
+ endif()
elseif (UNIX)
message(STATUS "FFMPEG Linux")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
@@ -46,6 +86,18 @@ elseif (UNIX)
${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Arm64/libswresample.so
${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Arm64/libswscale.so
)
+ add_custom_command(TARGET CC_FFmpeg_API POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Arm64/libavcodec.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Arm64/libavdevice.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Arm64/libavfilter.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Arm64/libavformat.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Arm64/libavutil.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Arm64/libswresample.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Arm64/libswscale.so
+ ${CMAKE_BINARY_DIR}/bin
+ COMMENT "Copying FFmpeg DLLs to bin directory"
+ )
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|AMD64")
message(STATUS "ffmpeg target architecture is X86_64")
target_include_directories(CC_FFmpeg_API PUBLIC
@@ -60,6 +112,18 @@ elseif (UNIX)
${CMAKE_CURRENT_LIST_DIR}/bin/Linux/x86/libswresample.so
${CMAKE_CURRENT_LIST_DIR}/bin/Linux/x86/libswscale.so
)
+ add_custom_command(TARGET CC_FFmpeg_API POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/x86/libavcodec.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/x86/libavdevice.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/x86/libavfilter.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/x86/libavformat.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/x86/libavutil.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/x86/libswresample.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/x86/libswscale.so
+ ${CMAKE_BINARY_DIR}/bin
+ COMMENT "Copying FFmpeg DLLs to bin directory"
+ )
endif()
else ()
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm|ARM")
@@ -78,6 +142,20 @@ elseif (UNIX)
${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Armv7/libswresample.so.5.3.100
${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Armv7/libswscale.so.8.3.100
)
+ add_custom_command(TARGET CC_FFmpeg_API POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Armv7/libavcodec.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Armv7/libavdevice.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Armv7/libavfilter.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Armv7/libavformat.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Armv7/libavutil.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Armv7/libswresample.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Armv7/libpostproc.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Armv7/libswscale.so
+ ${CMAKE_CURRENT_LIST_DIR}/bin/Linux/Armv7/libx264.so
+ ${CMAKE_BINARY_DIR}/bin
+ COMMENT "Copying FFmpeg DLLs to bin directory"
+ )
else()
target_include_directories(CC_FFmpeg_API PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include/Linux/Armv7/include
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/avcodec.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/avcodec.h
index a004cccd..77ca8dee 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/avcodec.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/avcodec.h
@@ -187,6 +187,17 @@ struct AVCodecParameters;
* @{
*/
+#if FF_API_BUFFER_MIN_SIZE
+/**
+ * @ingroup lavc_encoding
+ * minimum encoding buffer size
+ * Used to avoid some checks during header writing.
+ * @deprecated Unused: avcodec_receive_packet() does not work
+ * with preallocated packet buffers.
+ */
+#define AV_INPUT_BUFFER_MIN_SIZE 16384
+#endif
+
/**
* @ingroup lavc_encoding
*/
@@ -223,6 +234,15 @@ typedef struct RcOverride{
* Use qpel MC.
*/
#define AV_CODEC_FLAG_QPEL (1 << 4)
+#if FF_API_DROPCHANGED
+/**
+ * Don't output frames whose parameters differ from first
+ * decoded frame in stream.
+ *
+ * @deprecated callers should implement this functionality in their own code
+ */
+#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
+#endif
/**
* Request the encoder to output reconstructed frames, i.e.\ frames that would
* be produced by decoding the encoded bistream. These frames may be retrieved
@@ -495,21 +515,16 @@ typedef struct AVCodecContext {
int flags2;
/**
- * Out-of-band global headers that may be used by some codecs.
- *
- * - decoding: Should be set by the caller when available (typically from a
- * demuxer) before opening the decoder; some decoders require this to be
- * set and will fail to initialize otherwise.
- *
- * The array must be allocated with the av_malloc() family of functions;
- * allocated size must be at least AV_INPUT_BUFFER_PADDING_SIZE bytes
- * larger than extradata_size.
- *
- * - encoding: May be set by the encoder in avcodec_open2() (possibly
- * depending on whether the AV_CODEC_FLAG_GLOBAL_HEADER flag is set).
- *
- * After being set, the array is owned by the codec and freed in
- * avcodec_free_context().
+ * some codecs need / can use extradata like Huffman tables.
+ * MJPEG: Huffman tables
+ * rv10: additional flags
+ * MPEG-4: global headers (they can be in the bitstream or here)
+ * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
+ * than extradata_size to avoid problems if it is read with the bitstream reader.
+ * The bytewise contents of extradata must not depend on the architecture or CPU endianness.
+ * Must be allocated with the av_malloc() family of functions.
+ * - encoding: Set/allocated/freed by libavcodec.
+ * - decoding: Set/allocated/freed by user.
*/
uint8_t *extradata;
int extradata_size;
@@ -550,6 +565,23 @@ typedef struct AVCodecContext {
*/
AVRational framerate;
+#if FF_API_TICKS_PER_FRAME
+ /**
+ * For some codecs, the time base is closer to the field rate than the frame rate.
+ * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
+ * if no telecine is used ...
+ *
+ * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
+ *
+ * @deprecated
+ * - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS
+ * - encoding: Set AVCodecContext.framerate instead
+ *
+ */
+ attribute_deprecated
+ int ticks_per_frame;
+#endif
+
/**
* Codec delay.
*
@@ -1616,29 +1648,165 @@ typedef struct AVCodecContext {
* See the AV_PROFILE_* defines in defs.h.
*/
int profile;
+#if FF_API_FF_PROFILE_LEVEL
+ /** @deprecated The following defines are deprecated; use AV_PROFILE_*
+ * in defs.h instead. */
+#define FF_PROFILE_UNKNOWN -99
+#define FF_PROFILE_RESERVED -100
+
+#define FF_PROFILE_AAC_MAIN 0
+#define FF_PROFILE_AAC_LOW 1
+#define FF_PROFILE_AAC_SSR 2
+#define FF_PROFILE_AAC_LTP 3
+#define FF_PROFILE_AAC_HE 4
+#define FF_PROFILE_AAC_HE_V2 28
+#define FF_PROFILE_AAC_LD 22
+#define FF_PROFILE_AAC_ELD 38
+#define FF_PROFILE_MPEG2_AAC_LOW 128
+#define FF_PROFILE_MPEG2_AAC_HE 131
+
+#define FF_PROFILE_DNXHD 0
+#define FF_PROFILE_DNXHR_LB 1
+#define FF_PROFILE_DNXHR_SQ 2
+#define FF_PROFILE_DNXHR_HQ 3
+#define FF_PROFILE_DNXHR_HQX 4
+#define FF_PROFILE_DNXHR_444 5
+
+#define FF_PROFILE_DTS 20
+#define FF_PROFILE_DTS_ES 30
+#define FF_PROFILE_DTS_96_24 40
+#define FF_PROFILE_DTS_HD_HRA 50
+#define FF_PROFILE_DTS_HD_MA 60
+#define FF_PROFILE_DTS_EXPRESS 70
+#define FF_PROFILE_DTS_HD_MA_X 61
+#define FF_PROFILE_DTS_HD_MA_X_IMAX 62
+
+
+#define FF_PROFILE_EAC3_DDP_ATMOS 30
+
+#define FF_PROFILE_TRUEHD_ATMOS 30
+
+#define FF_PROFILE_MPEG2_422 0
+#define FF_PROFILE_MPEG2_HIGH 1
+#define FF_PROFILE_MPEG2_SS 2
+#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
+#define FF_PROFILE_MPEG2_MAIN 4
+#define FF_PROFILE_MPEG2_SIMPLE 5
+
+#define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
+#define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
+
+#define FF_PROFILE_H264_BASELINE 66
+#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
+#define FF_PROFILE_H264_MAIN 77
+#define FF_PROFILE_H264_EXTENDED 88
+#define FF_PROFILE_H264_HIGH 100
+#define FF_PROFILE_H264_HIGH_10 110
+#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_MULTIVIEW_HIGH 118
+#define FF_PROFILE_H264_HIGH_422 122
+#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_STEREO_HIGH 128
+#define FF_PROFILE_H264_HIGH_444 144
+#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
+#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
+#define FF_PROFILE_H264_CAVLC_444 44
+
+#define FF_PROFILE_VC1_SIMPLE 0
+#define FF_PROFILE_VC1_MAIN 1
+#define FF_PROFILE_VC1_COMPLEX 2
+#define FF_PROFILE_VC1_ADVANCED 3
+
+#define FF_PROFILE_MPEG4_SIMPLE 0
+#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
+#define FF_PROFILE_MPEG4_CORE 2
+#define FF_PROFILE_MPEG4_MAIN 3
+#define FF_PROFILE_MPEG4_N_BIT 4
+#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
+#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
+#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
+#define FF_PROFILE_MPEG4_HYBRID 8
+#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
+#define FF_PROFILE_MPEG4_CORE_SCALABLE 10
+#define FF_PROFILE_MPEG4_ADVANCED_CODING 11
+#define FF_PROFILE_MPEG4_ADVANCED_CORE 12
+#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
+#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
+#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
+
+#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
+#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
+#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
+#define FF_PROFILE_JPEG2000_DCINEMA_2K 3
+#define FF_PROFILE_JPEG2000_DCINEMA_4K 4
+
+#define FF_PROFILE_VP9_0 0
+#define FF_PROFILE_VP9_1 1
+#define FF_PROFILE_VP9_2 2
+#define FF_PROFILE_VP9_3 3
+
+#define FF_PROFILE_HEVC_MAIN 1
+#define FF_PROFILE_HEVC_MAIN_10 2
+#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
+#define FF_PROFILE_HEVC_REXT 4
+#define FF_PROFILE_HEVC_SCC 9
+
+#define FF_PROFILE_VVC_MAIN_10 1
+#define FF_PROFILE_VVC_MAIN_10_444 33
+
+#define FF_PROFILE_AV1_MAIN 0
+#define FF_PROFILE_AV1_HIGH 1
+#define FF_PROFILE_AV1_PROFESSIONAL 2
+
+#define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
+#define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
+#define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
+#define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
+#define FF_PROFILE_MJPEG_JPEG_LS 0xf7
+
+#define FF_PROFILE_SBC_MSBC 1
+
+#define FF_PROFILE_PRORES_PROXY 0
+#define FF_PROFILE_PRORES_LT 1
+#define FF_PROFILE_PRORES_STANDARD 2
+#define FF_PROFILE_PRORES_HQ 3
+#define FF_PROFILE_PRORES_4444 4
+#define FF_PROFILE_PRORES_XQ 5
+
+#define FF_PROFILE_ARIB_PROFILE_A 0
+#define FF_PROFILE_ARIB_PROFILE_C 1
+
+#define FF_PROFILE_KLVA_SYNC 0
+#define FF_PROFILE_KLVA_ASYNC 1
+
+#define FF_PROFILE_EVC_BASELINE 0
+#define FF_PROFILE_EVC_MAIN 1
+#endif
/**
* Encoding level descriptor.
* - encoding: Set by user, corresponds to a specific level defined by the
* codec, usually corresponding to the profile level, if not specified it
- * is set to AV_LEVEL_UNKNOWN.
+ * is set to FF_LEVEL_UNKNOWN.
* - decoding: Set by libavcodec.
* See AV_LEVEL_* in defs.h.
*/
int level;
+#if FF_API_FF_PROFILE_LEVEL
+ /** @deprecated The following define is deprecated; use AV_LEVEL_UNKOWN
+ * in defs.h instead. */
+#define FF_LEVEL_UNKNOWN -99
+#endif
-#if FF_API_CODEC_PROPS
/**
* Properties of the stream that gets decoded
* - encoding: unused
* - decoding: set by libavcodec
*/
- attribute_deprecated
unsigned properties;
#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
#define FF_CODEC_PROPERTY_FILM_GRAIN 0x00000004
-#endif
/**
* Skip loop filtering for selected frames.
@@ -1727,13 +1895,8 @@ typedef struct AVCodecContext {
* For SUBTITLE_ASS subtitle type, it should contain the whole ASS
* [Script Info] and [V4+ Styles] section, plus the [Events] line and
* the Format line following. It shouldn't include any Dialogue line.
- *
- * - encoding: May be set by the caller before avcodec_open2() to an array
- * allocated with the av_malloc() family of functions.
- * - decoding: May be set by libavcodec in avcodec_open2().
- *
- * After being set, the array is owned by the codec and freed in
- * avcodec_free_context().
+ * - encoding: Set/allocated/freed by user (before avcodec_open2())
+ * - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())
*/
int subtitle_header_size;
uint8_t *subtitle_header;
@@ -2217,6 +2380,24 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
*/
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
+#if FF_API_AVCODEC_CLOSE
+/**
+ * Close a given AVCodecContext and free all the data associated with it
+ * (but not the AVCodecContext itself).
+ *
+ * Calling this function on an AVCodecContext that hasn't been opened will free
+ * the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL
+ * codec. Subsequent calls will do nothing.
+ *
+ * @deprecated Do not use this function. Use avcodec_free_context() to destroy a
+ * codec context (either open or closed). Opening and closing a codec context
+ * multiple times is not supported anymore -- use multiple codec contexts
+ * instead.
+ */
+attribute_deprecated
+int avcodec_close(AVCodecContext *avctx);
+#endif
+
/**
* Free all allocated data in the given subtitle struct.
*
@@ -2935,8 +3116,8 @@ void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
/**
- * @return a positive value if s is open (i.e. avcodec_open2() was called on it),
- * 0 otherwise.
+ * @return a positive value if s is open (i.e. avcodec_open2() was called on it
+ * with no corresponding avcodec_close()), 0 otherwise.
*/
int avcodec_is_open(AVCodecContext *s);
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/codec.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/codec.h
index f509e5d9..f7541ffc 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/codec.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/codec.h
@@ -80,6 +80,21 @@
*/
#define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
+#if FF_API_SUBFRAMES
+/**
+ * Codec can output multiple frames per AVPacket
+ * Normally demuxers return one frame at a time, demuxers which do not do
+ * are connected to a parser to split what they return into proper frames.
+ * This flag is reserved to the very rare category of codecs which have a
+ * bitstream that cannot be split into frames without timeconsuming
+ * operations like full decoding. Demuxers carrying such bitstreams thus
+ * may return multiple frames in a packet. This has many disadvantages like
+ * prohibiting stream copy in many cases thus it should only be considered
+ * as a last resort.
+ */
+#define AV_CODEC_CAP_SUBFRAMES (1 << 8)
+#endif
+
/**
* Codec is experimental and is thus avoided in favor of non experimental
* encoders
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/codec_id.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/codec_id.h
index 09dff298..0a8d3bed 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/codec_id.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/codec_id.h
@@ -206,9 +206,7 @@ enum AVCodecID {
AV_CODEC_ID_BMV_VIDEO,
AV_CODEC_ID_VBLE,
AV_CODEC_ID_DXTORY,
-#if FF_API_V408_CODECID
AV_CODEC_ID_V410,
-#endif
AV_CODEC_ID_XWD,
AV_CODEC_ID_CDXL,
AV_CODEC_ID_XBM,
@@ -256,10 +254,8 @@ enum AVCodecID {
AV_CODEC_ID_012V,
AV_CODEC_ID_AVUI,
AV_CODEC_ID_TARGA_Y216,
-#if FF_API_V408_CODECID
AV_CODEC_ID_V308,
AV_CODEC_ID_V408,
-#endif
AV_CODEC_ID_YUV4,
AV_CODEC_ID_AVRN,
AV_CODEC_ID_CPIA,
@@ -326,10 +322,6 @@ enum AVCodecID {
AV_CODEC_ID_RTV1,
AV_CODEC_ID_VMIX,
AV_CODEC_ID_LEAD,
- AV_CODEC_ID_DNXUC,
- AV_CODEC_ID_RV60,
- AV_CODEC_ID_JPEGXL_ANIM,
- AV_CODEC_ID_APV,
/* various PCM "codecs" */
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
@@ -424,7 +416,6 @@ enum AVCodecID {
AV_CODEC_ID_ADPCM_IMA_MOFLEX,
AV_CODEC_ID_ADPCM_IMA_ACORN,
AV_CODEC_ID_ADPCM_XMD,
- AV_CODEC_ID_ADPCM_IMA_XBOX,
/* AMR */
AV_CODEC_ID_AMR_NB = 0x12000,
@@ -553,7 +544,6 @@ enum AVCodecID {
AV_CODEC_ID_OSQ,
AV_CODEC_ID_QOA,
AV_CODEC_ID_LC3,
- AV_CODEC_ID_G728,
/* subtitle codecs */
AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
@@ -583,7 +573,6 @@ enum AVCodecID {
AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
AV_CODEC_ID_TTML,
AV_CODEC_ID_ARIB_CAPTION,
- AV_CODEC_ID_IVTV_VBI,
/* other specific kind of codecs (generally used for attachments) */
AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/defs.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/defs.h
index e0df6021..24250f8a 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/defs.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/defs.h
@@ -194,14 +194,6 @@
#define AV_PROFILE_EVC_BASELINE 0
#define AV_PROFILE_EVC_MAIN 1
-#define AV_PROFILE_APV_422_10 33
-#define AV_PROFILE_APV_422_12 44
-#define AV_PROFILE_APV_444_10 55
-#define AV_PROFILE_APV_444_12 66
-#define AV_PROFILE_APV_4444_10 77
-#define AV_PROFILE_APV_4444_12 88
-#define AV_PROFILE_APV_400_10 99
-
#define AV_LEVEL_UNKNOWN -99
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/packet.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/packet.h
index 71bc2e05..0a280105 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/packet.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/packet.h
@@ -356,6 +356,10 @@ enum AVPacketSideDataType {
AV_PKT_DATA_NB
};
+#if FF_API_QUALITY_FACTOR
+#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED
+#endif
+
/**
* This structure stores auxiliary information for decoding, presenting, or
* otherwise processing the coded stream. It is typically exported by demuxers
@@ -364,11 +368,11 @@ enum AVPacketSideDataType {
*
* Global side data is handled as follows:
* - During demuxing, it may be exported through
- * @ref AVCodecParameters.coded_side_data "AVStream's codec parameters", which can
+ * @ref AVStream.codecpar.side_data "AVStream's codec parameters", which can
* then be passed as input to decoders through the
* @ref AVCodecContext.coded_side_data "decoder context's side data", for
* initialization.
- * - For muxing, it can be fed through @ref AVCodecParameters.coded_side_data
+ * - For muxing, it can be fed through @ref AVStream.codecpar.side_data
* "AVStream's codec parameters", typically the output of encoders through
* the @ref AVCodecContext.coded_side_data "encoder context's side data", for
* initialization.
@@ -876,13 +880,6 @@ int av_packet_make_writable(AVPacket *pkt);
*/
void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst);
-/**
- * Allocate an AVContainerFifo instance for AVPacket.
- *
- * @param flags currently unused
- */
-struct AVContainerFifo *av_container_fifo_alloc_avpacket(unsigned flags);
-
/**
* @}
*/
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/vdpau.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/vdpau.h
index da77c5da..8021c257 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/vdpau.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/vdpau.h
@@ -93,6 +93,28 @@ typedef struct AVVDPAUContext {
AVVDPAU_Render2 render2;
} AVVDPAUContext;
+#if FF_API_VDPAU_ALLOC_GET_SET
+/**
+ * @brief allocation function for AVVDPAUContext
+ *
+ * Allows extending the struct without breaking API/ABI
+ * @deprecated use av_vdpau_bind_context() instead
+ */
+attribute_deprecated
+AVVDPAUContext *av_alloc_vdpaucontext(void);
+
+/**
+ * @deprecated render2 is public and can be accessed directly
+ */
+attribute_deprecated
+AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *);
+/**
+ * @deprecated render2 is public and can be accessed directly
+ */
+attribute_deprecated
+void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);
+#endif
+
/**
* Associate a VDPAU device with a codec context for hardware acceleration.
* This function is meant to be called from the get_format() codec callback,
@@ -133,6 +155,17 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
uint32_t *width, uint32_t *height);
+#if FF_API_VDPAU_ALLOC_GET_SET
+/**
+ * Allocate an AVVDPAUContext.
+ *
+ * @return Newly-allocated AVVDPAUContext or NULL on failure.
+ * @deprecated use av_vdpau_bind_context() instead
+ */
+attribute_deprecated
+AVVDPAUContext *av_vdpau_alloc_context(void);
+#endif
+
/** @} */
#endif /* AVCODEC_VDPAU_H */
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/version.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/version.h
index 06631ffa..b6ca025f 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/version.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/version.h
@@ -29,8 +29,8 @@
#include "version_major.h"
-#define LIBAVCODEC_VERSION_MINOR 4
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MINOR 19
+#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/version_major.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/version_major.h
index 14e49f0e..63df40e9 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/version_major.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavcodec/version_major.h
@@ -25,7 +25,7 @@
* Libavcodec version macros.
*/
-#define LIBAVCODEC_VERSION_MAJOR 62
+#define LIBAVCODEC_VERSION_MAJOR 61
/**
* FF_API_* defines may be placed below to indicate public API that will be
@@ -37,17 +37,16 @@
* at once through the bump. This improves the git bisect-ability of the change.
*/
-#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 63)
+#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_API_SUBFRAMES (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_API_DROPCHANGED (LIBAVCODEC_VERSION_MAJOR < 62)
-#define FF_API_V408_CODECID (LIBAVCODEC_VERSION_MAJOR < 63)
-#define FF_API_CODEC_PROPS (LIBAVCODEC_VERSION_MAJOR < 63)
-#define FF_API_EXR_GAMMA (LIBAVCODEC_VERSION_MAJOR < 63)
-
-// reminder to remove the OMX encoder on next major bump
-#define FF_CODEC_OMX (LIBAVCODEC_VERSION_MAJOR < 63)
-// reminder to remove Sonic Lossy/Lossless encoders on next major bump
-#define FF_CODEC_SONIC_ENC (LIBAVCODEC_VERSION_MAJOR < 63)
-// reminder to remove Sonic decoder on next-next major bump
-#define FF_CODEC_SONIC_DEC (LIBAVCODEC_VERSION_MAJOR < 63)
+#define FF_API_AVFFT (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_API_FF_PROFILE_LEVEL (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_API_AVCODEC_CLOSE (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_API_BUFFER_MIN_SIZE (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_API_VDPAU_ALLOC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_API_QUALITY_FACTOR (LIBAVCODEC_VERSION_MAJOR < 62)
#endif /* AVCODEC_VERSION_MAJOR_H */
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavdevice/version.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavdevice/version.h
index 25befdea..7608a860 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavdevice/version.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavdevice/version.h
@@ -29,7 +29,7 @@
#include "version_major.h"
-#define LIBAVDEVICE_VERSION_MINOR 0
+#define LIBAVDEVICE_VERSION_MINOR 3
#define LIBAVDEVICE_VERSION_MICRO 100
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavdevice/version_major.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavdevice/version_major.h
index 191511cd..f16abb69 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavdevice/version_major.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavdevice/version_major.h
@@ -25,7 +25,7 @@
* Libavdevice version macros
*/
-#define LIBAVDEVICE_VERSION_MAJOR 62
+#define LIBAVDEVICE_VERSION_MAJOR 61
/**
* FF_API_* defines may be placed below to indicate public API that will be
@@ -33,6 +33,11 @@
* the public API and may change, break or disappear at any time.
*/
-#define FF_API_ALSA_CHANNELS (LIBAVDEVICE_VERSION_MAJOR < 63)
+// reminder to remove the bktr device on next major bump
+#define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
+// reminder to remove the opengl device on next major bump
+#define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
+// reminder to remove the sdl2 device on next major bump
+#define FF_API_SDL2_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
#endif /* AVDEVICE_VERSION_MAJOR_H */
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/avfilter.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/avfilter.h
index f85929dc..1401577c 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/avfilter.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/avfilter.h
@@ -43,6 +43,7 @@
#include "libavutil/dict.h"
#include "libavutil/frame.h"
#include "libavutil/log.h"
+#include "libavutil/samplefmt.h"
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
@@ -69,6 +70,7 @@ const char *avfilter_configuration(void);
*/
const char *avfilter_license(void);
+typedef struct AVFilterContext AVFilterContext;
typedef struct AVFilterLink AVFilterLink;
typedef struct AVFilterPad AVFilterPad;
typedef struct AVFilterFormats AVFilterFormats;
@@ -96,18 +98,6 @@ const char *avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx);
*/
enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);
-/**
- * Get the hardware frames context of a filter link.
- *
- * @param link an AVFilterLink
- *
- * @return a ref-counted copy of the link's hw_frames_ctx field if there is
- * a hardware frames context associated with the link or NULL otherwise.
- * The returned AVBufferRef needs to be released with av_buffer_unref()
- * when it is no longer used.
- */
-AVBufferRef* avfilter_link_get_hw_frames_ctx(AVFilterLink *link);
-
/**
* Lists of formats / etc. supported by an end of a link.
*
@@ -253,6 +243,204 @@ typedef struct AVFilter {
* A combination of AVFILTER_FLAG_*
*/
int flags;
+
+ /*****************************************************************
+ * All fields below this line are not part of the public API. They
+ * may not be used outside of libavfilter and can be changed and
+ * removed at will.
+ * New public fields should be added right above.
+ *****************************************************************
+ */
+
+ /**
+ * The number of entries in the list of inputs.
+ */
+ uint8_t nb_inputs;
+
+ /**
+ * The number of entries in the list of outputs.
+ */
+ uint8_t nb_outputs;
+
+ /**
+ * This field determines the state of the formats union.
+ * It is an enum FilterFormatsState value.
+ */
+ uint8_t formats_state;
+
+ /**
+ * Filter pre-initialization function
+ *
+ * This callback will be called immediately after the filter context is
+ * allocated, to allow allocating and initing sub-objects.
+ *
+ * If this callback is not NULL, the uninit callback will be called on
+ * allocation failure.
+ *
+ * @return 0 on success,
+ * AVERROR code on failure (but the code will be
+ * dropped and treated as ENOMEM by the calling code)
+ */
+ int (*preinit)(AVFilterContext *ctx);
+
+ /**
+ * Filter initialization function.
+ *
+ * This callback will be called only once during the filter lifetime, after
+ * all the options have been set, but before links between filters are
+ * established and format negotiation is done.
+ *
+ * Basic filter initialization should be done here. Filters with dynamic
+ * inputs and/or outputs should create those inputs/outputs here based on
+ * provided options. No more changes to this filter's inputs/outputs can be
+ * done after this callback.
+ *
+ * This callback must not assume that the filter links exist or frame
+ * parameters are known.
+ *
+ * @ref AVFilter.uninit "uninit" is guaranteed to be called even if
+ * initialization fails, so this callback does not have to clean up on
+ * failure.
+ *
+ * @return 0 on success, a negative AVERROR on failure
+ */
+ int (*init)(AVFilterContext *ctx);
+
+ /**
+ * Filter uninitialization function.
+ *
+ * Called only once right before the filter is freed. Should deallocate any
+ * memory held by the filter, release any buffer references, etc. It does
+ * not need to deallocate the AVFilterContext.priv memory itself.
+ *
+ * This callback may be called even if @ref AVFilter.init "init" was not
+ * called or failed, so it must be prepared to handle such a situation.
+ */
+ void (*uninit)(AVFilterContext *ctx);
+
+ /**
+ * The state of the following union is determined by formats_state.
+ * See the documentation of enum FilterFormatsState in internal.h.
+ */
+ union {
+ /**
+ * Query formats supported by the filter on its inputs and outputs.
+ *
+ * This callback is called after the filter is initialized (so the inputs
+ * and outputs are fixed), shortly before the format negotiation. This
+ * callback may be called more than once.
+ *
+ * This callback must set ::AVFilterLink's
+ * @ref AVFilterFormatsConfig.formats "outcfg.formats"
+ * on every input link and
+ * @ref AVFilterFormatsConfig.formats "incfg.formats"
+ * on every output link to a list of pixel/sample formats that the filter
+ * supports on that link.
+ * For video links, this filter may also set
+ * @ref AVFilterFormatsConfig.color_spaces "incfg.color_spaces"
+ * /
+ * @ref AVFilterFormatsConfig.color_spaces "outcfg.color_spaces"
+ * and @ref AVFilterFormatsConfig.color_ranges "incfg.color_ranges"
+ * /
+ * @ref AVFilterFormatsConfig.color_ranges "outcfg.color_ranges"
+ * analogously.
+ * For audio links, this filter must also set
+ * @ref AVFilterFormatsConfig.samplerates "incfg.samplerates"
+ * /
+ * @ref AVFilterFormatsConfig.samplerates "outcfg.samplerates"
+ * and @ref AVFilterFormatsConfig.channel_layouts "incfg.channel_layouts"
+ * /
+ * @ref AVFilterFormatsConfig.channel_layouts "outcfg.channel_layouts"
+ * analogously.
+ *
+ * This callback must never be NULL if the union is in this state.
+ *
+ * @return zero on success, a negative value corresponding to an
+ * AVERROR code otherwise
+ */
+ int (*query_func)(AVFilterContext *);
+
+ /**
+ * Same as query_func(), except this function writes the results into
+ * provided arrays.
+ *
+ * @param cfg_in array of input format configurations with as many
+ * members as the filters has inputs (NULL when there are
+ * no inputs);
+ * @param cfg_out array of output format configurations with as many
+ * members as the filters has outputs (NULL when there
+ * are no outputs);
+ */
+ int (*query_func2)(const AVFilterContext *,
+ struct AVFilterFormatsConfig **cfg_in,
+ struct AVFilterFormatsConfig **cfg_out);
+ /**
+ * A pointer to an array of admissible pixel formats delimited
+ * by AV_PIX_FMT_NONE. The generic code will use this list
+ * to indicate that this filter supports each of these pixel formats,
+ * provided that all inputs and outputs use the same pixel format.
+ *
+ * In addition to that the generic code will mark all inputs
+ * and all outputs as supporting all color spaces and ranges, as
+ * long as all inputs and outputs use the same color space/range.
+ *
+ * This list must never be NULL if the union is in this state.
+ * The type of all inputs and outputs of filters using this must
+ * be AVMEDIA_TYPE_VIDEO.
+ */
+ const enum AVPixelFormat *pixels_list;
+ /**
+ * Analogous to pixels, but delimited by AV_SAMPLE_FMT_NONE
+ * and restricted to filters that only have AVMEDIA_TYPE_AUDIO
+ * inputs and outputs.
+ *
+ * In addition to that the generic code will mark all inputs
+ * and all outputs as supporting all sample rates and every
+ * channel count and channel layout, as long as all inputs
+ * and outputs use the same sample rate and channel count/layout.
+ */
+ const enum AVSampleFormat *samples_list;
+ /**
+ * Equivalent to { pix_fmt, AV_PIX_FMT_NONE } as pixels_list.
+ */
+ enum AVPixelFormat pix_fmt;
+ /**
+ * Equivalent to { sample_fmt, AV_SAMPLE_FMT_NONE } as samples_list.
+ */
+ enum AVSampleFormat sample_fmt;
+ } formats;
+
+ int priv_size; ///< size of private data to allocate for the filter
+
+ int flags_internal; ///< Additional flags for avfilter internal use only.
+
+ /**
+ * Make the filter instance process a command.
+ *
+ * @param cmd the command to process, for handling simplicity all commands must be alphanumeric only
+ * @param arg the argument for the command
+ * @param res a buffer with size res_size where the filter(s) can return a response. This must not change when the command is not supported.
+ * @param flags if AVFILTER_CMD_FLAG_FAST is set and the command would be
+ * time consuming then a filter should treat it like an unsupported command
+ *
+ * @returns >=0 on success otherwise an error code.
+ * AVERROR(ENOSYS) on unsupported commands
+ */
+ int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags);
+
+ /**
+ * Filter activation function.
+ *
+ * Called when any processing is needed from the filter, instead of any
+ * filter_frame and request_frame on pads.
+ *
+ * The function must examine inlinks and outlinks and perform a single
+ * step of processing. If there is nothing to do, the function must do
+ * nothing and not return an error. If more steps are or may be
+ * possible, it must use ff_filter_set_ready() to schedule another
+ * activation.
+ */
+ int (*activate)(AVFilterContext *ctx);
} AVFilter;
/**
@@ -266,7 +454,7 @@ unsigned avfilter_filter_pad_count(const AVFilter *filter, int is_output);
#define AVFILTER_THREAD_SLICE (1 << 0)
/** An instance of a filter */
-typedef struct AVFilterContext {
+struct AVFilterContext {
const AVClass *av_class; ///< needed for av_log() and filters common options
const AVFilter *filter; ///< the AVFilter of which this is an instance
@@ -310,32 +498,12 @@ typedef struct AVFilterContext {
*/
int nb_threads;
-#if FF_API_CONTEXT_PUBLIC
- /**
- * @deprecated unused
- */
- attribute_deprecated
struct AVFilterCommand *command_queue;
-#endif
char *enable_str; ///< enable expression string
-#if FF_API_CONTEXT_PUBLIC
- /**
- * @deprecated unused
- */
- attribute_deprecated
- void *enable;
- /**
- * @deprecated unused
- */
- double *var_values;
-#endif
- /**
- * MUST NOT be accessed from outside avfilter.
- *
- * the enabled state from the last expression evaluation
- */
- int is_disabled;
+ void *enable; ///< parsed expression (AVExpr*)
+ double *var_values; ///< variable values for the enable expression
+ int is_disabled; ///< the enabled state from the last expression evaluation
/**
* For filters which will create hardware frames, sets the device the
@@ -350,13 +518,12 @@ typedef struct AVFilterContext {
*/
AVBufferRef *hw_device_ctx;
-#if FF_API_CONTEXT_PUBLIC
/**
- * @deprecated this field should never have been accessed by callers
+ * Ready status of the filter.
+ * A non-0 value means that the filter needs activating;
+ * a higher value suggests a more urgent activation.
*/
- attribute_deprecated
unsigned ready;
-#endif
/**
* Sets the number of extra hardware frames which the filter will
@@ -373,7 +540,7 @@ typedef struct AVFilterContext {
* configured.
*/
int extra_hw_frames;
-} AVFilterContext;
+};
/**
* A link between two filters. This contains pointers to the source and
@@ -425,9 +592,6 @@ struct AVFilterLink {
*/
AVRational time_base;
- AVFrameSideData **side_data;
- int nb_side_data;
-
/*****************************************************************
* All fields below this line are not part of the public API. They
* may not be used outside of libavfilter and can be changed and
@@ -459,6 +623,20 @@ struct AVFilterLink {
int avfilter_link(AVFilterContext *src, unsigned srcpad,
AVFilterContext *dst, unsigned dstpad);
+#if FF_API_LINK_PUBLIC
+/**
+ * @deprecated this function should never be called by users
+ */
+attribute_deprecated
+void avfilter_link_free(AVFilterLink **link);
+
+/**
+ * @deprecated this function should never be called by users
+ */
+attribute_deprecated
+int avfilter_config_links(AVFilterContext *filter);
+#endif
+
#define AVFILTER_CMD_FLAG_ONE 1 ///< Stop once a filter understood the command (for target=all for example), fast filters are favored automatically
#define AVFILTER_CMD_FLAG_FAST 2 ///< Only execute command when its fast (like a video out that supports contrast adjustment in hw)
@@ -667,9 +845,9 @@ AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph,
AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *name);
/**
- * A convenience wrapper that allocates and initializes a filter in a single
- * step. The filter instance is created from the filter filt and inited with the
- * parameter args. opaque is currently ignored.
+ * Create and add a filter instance into an existing graph.
+ * The filter instance is created from the filter filt and inited
+ * with the parameter args. opaque is currently ignored.
*
* In case of success put in *filt_ctx the pointer to the created
* filter instance, otherwise set *filt_ctx to NULL.
@@ -678,12 +856,6 @@ AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *nam
* @param graph_ctx the filter graph
* @return a negative AVERROR error code in case of failure, a non
* negative value otherwise
- *
- * @warning Since the filter is initialized after this function successfully
- * returns, you MUST NOT set any further options on it. If you need to
- * do that, call ::avfilter_graph_alloc_filter(), followed by setting
- * the options, followed by ::avfilter_init_dict() instead of this
- * function.
*/
int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt,
const char *name, const char *args, void *opaque,
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/buffersink.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/buffersink.h
index a8435eea..361d6036 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/buffersink.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/buffersink.h
@@ -48,20 +48,26 @@
* - av_buffersink_get_channels(),
* - av_buffersink_get_ch_layout(),
* - av_buffersink_get_sample_rate().
- * - av_buffersink_get_side_data().
*
* The layout returned by av_buffersink_get_ch_layout() must de uninitialized
* by the caller.
*
* The format can be constrained by setting options, using av_opt_set() and
* related functions with the AV_OPT_SEARCH_CHILDREN flag.
- * - pixel_formats (array of pixel formats),
- * - colorspaces (array of int),
- * - colorranges (array of int),
- * - sample_formats (array of sample formats),
- * - samplerates (array of int),
- * - channel_layouts (array of channel layouts)
- * If an option is not set, all corresponding formats are accepted.
+ * - pix_fmts (int list),
+ * - color_spaces (int list),
+ * - color_ranges (int list),
+ * - sample_fmts (int list),
+ * - sample_rates (int list),
+ * - ch_layouts (string),
+ * - channel_counts (int list),
+ * - all_channel_counts (bool).
+ * Most of these options are of type binary, and should be set using
+ * av_opt_set_int_list() or av_opt_set_bin(). If they are not set, all
+ * corresponding formats are accepted.
+ *
+ * As a special case, if ch_layouts is not set, all valid channel layouts are
+ * accepted except for UNSPEC layouts, unless all_channel_counts is set.
*/
/**
@@ -123,9 +129,6 @@ int av_buffersink_get_sample_rate (const AVFilterContext *c
AVBufferRef * av_buffersink_get_hw_frames_ctx (const AVFilterContext *ctx);
-const AVFrameSideData *const *av_buffersink_get_side_data(const AVFilterContext *ctx,
- int *nb_side_data);
-
/** @} */
/**
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/buffersrc.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/buffersrc.h
index 2db9b8fb..6f3344f4 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/buffersrc.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/buffersrc.h
@@ -120,9 +120,6 @@ typedef struct AVBufferSrcParameters {
*/
enum AVColorSpace color_space;
enum AVColorRange color_range;
-
- AVFrameSideData **side_data;
- int nb_side_data;
} AVBufferSrcParameters;
/**
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/version.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/version.h
index d5a6bc14..4d8f28e5 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/version.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/version.h
@@ -31,7 +31,7 @@
#include "version_major.h"
-#define LIBAVFILTER_VERSION_MINOR 0
+#define LIBAVFILTER_VERSION_MINOR 4
#define LIBAVFILTER_VERSION_MICRO 100
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/version_major.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/version_major.h
index af6f5983..c5e660ee 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/version_major.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavfilter/version_major.h
@@ -27,7 +27,7 @@
* Libavfilter version macros
*/
-#define LIBAVFILTER_VERSION_MAJOR 11
+#define LIBAVFILTER_VERSION_MAJOR 10
/**
* FF_API_* defines may be placed below to indicate public API that will be
@@ -35,7 +35,6 @@
* the public API and may change, break or disappear at any time.
*/
-#define FF_API_BUFFERSINK_OPTS (LIBAVFILTER_VERSION_MAJOR < 12)
-#define FF_API_CONTEXT_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 12)
+#define FF_API_LINK_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 11)
#endif /* AVFILTER_VERSION_MAJOR_H */
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/avformat.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/avformat.h
index b6c63e22..56c1c802 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/avformat.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/avformat.h
@@ -146,8 +146,8 @@
* consumed). The calling program can handle such unrecognized options as it
* wishes, e.g.
* @code
- * const AVDictionaryEntry *e;
- * if ((e = av_dict_iterate(options, NULL))) {
+ * AVDictionaryEntry *e;
+ * if (e = av_dict_get(options, "", NULL, AV_DICT_IGNORE_SUFFIX)) {
* fprintf(stderr, "Option %s not recognized by the demuxer.\n", e->key);
* abort();
* }
@@ -459,7 +459,7 @@ typedef struct AVProbeData {
#define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1)
#define AVPROBE_SCORE_EXTENSION 50 ///< score for file extension
-#define AVPROBE_SCORE_MIME_BONUS 30 ///< score added for matching mime type
+#define AVPROBE_SCORE_MIME 75 ///< score for file mime type
#define AVPROBE_SCORE_MAX 100 ///< maximum score
#define AVPROBE_PADDING_SIZE 32 ///< extra allocated bytes at the end of the probe buffer
@@ -470,7 +470,8 @@ typedef struct AVProbeData {
/**
* The muxer/demuxer is experimental and should be used with caution.
*
- * It will not be selected automatically, and must be specified explicitly.
+ * - demuxers: will not be selected automatically by probing, must be specified
+ * explicitly.
*/
#define AVFMT_EXPERIMENTAL 0x0004
#define AVFMT_SHOW_IDS 0x0008 /**< Show format stream IDs numbers. */
@@ -484,6 +485,9 @@ typedef struct AVProbeData {
#define AVFMT_NOBINSEARCH 0x2000 /**< Format does not allow to fall back on binary search via read_timestamp */
#define AVFMT_NOGENSEARCH 0x4000 /**< Format does not allow to fall back on generic search */
#define AVFMT_NO_BYTE_SEEK 0x8000 /**< Format does not allow seeking by bytes */
+#if FF_API_ALLOW_FLUSH
+#define AVFMT_ALLOW_FLUSH 0x10000 /**< @deprecated: Just send a NULL packet if you want to flush a muxer. */
+#endif
#define AVFMT_TS_NONSTRICT 0x20000 /**< Format does not require strictly
increasing timestamps, but they must
still be monotonic */
@@ -843,6 +847,38 @@ typedef struct AVStream {
*/
AVPacket attached_pic;
+#if FF_API_AVSTREAM_SIDE_DATA
+ /**
+ * An array of side data that applies to the whole stream (i.e. the
+ * container does not allow it to change between packets).
+ *
+ * There may be no overlap between the side data in this array and side data
+ * in the packets. I.e. a given side data is either exported by the muxer
+ * (demuxing) / set by the caller (muxing) in this array, then it never
+ * appears in the packets, or the side data is exported / sent through
+ * the packets (always in the first packet where the value becomes known or
+ * changes), then it does not appear in this array.
+ *
+ * - demuxing: Set by libavformat when the stream is created.
+ * - muxing: May be set by the caller before avformat_write_header().
+ *
+ * Freed by libavformat in avformat_free_context().
+ *
+ * @deprecated use AVStream's @ref AVCodecParameters.coded_side_data
+ * "codecpar side data".
+ */
+ attribute_deprecated
+ AVPacketSideData *side_data;
+ /**
+ * The number of elements in the AVStream.side_data array.
+ *
+ * @deprecated use AVStream's @ref AVCodecParameters.nb_coded_side_data
+ * "codecpar side data".
+ */
+ attribute_deprecated
+ int nb_side_data;
+#endif
+
/**
* Flags indicating events happening on the stream, a combination of
* AVSTREAM_EVENT_FLAG_*.
@@ -1046,19 +1082,6 @@ typedef struct AVStreamGroupTileGrid {
* final image before presentation.
*/
int height;
-
- /**
- * Additional data associated with the grid.
- *
- * Should be allocated with av_packet_side_data_new() or
- * av_packet_side_data_add(), and will be freed by avformat_free_context().
- */
- AVPacketSideData *coded_side_data;
-
- /**
- * Amount of entries in @ref coded_side_data.
- */
- int nb_coded_side_data;
} AVStreamGroupTileGrid;
/**
@@ -1434,6 +1457,9 @@ typedef struct AVFormatContext {
#define AVFMT_FLAG_BITEXACT 0x0400
#define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
#define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats
+#if FF_API_LAVF_SHORTEST
+#define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops.
+#endif
#define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer
/**
@@ -1869,6 +1895,10 @@ typedef struct AVFormatContext {
/**
* A callback for closing the streams opened with AVFormatContext.io_open().
*
+ * Using this is preferred over io_close, because this can return an error.
+ * Therefore this callback is used instead of io_close by the generic
+ * libavformat code if io_close is NULL or the default.
+ *
* @param s the format context
* @param pb IO context to be closed and freed
* @return 0 on success, a negative AVERROR code on failure
@@ -1886,6 +1916,29 @@ typedef struct AVFormatContext {
int64_t duration_probesize;
} AVFormatContext;
+/**
+ * This function will cause global side data to be injected in the next packet
+ * of each stream as well as after any subsequent seek.
+ *
+ * @note global side data is always available in every AVStream's
+ * @ref AVCodecParameters.coded_side_data "codecpar side data" array, and
+ * in a @ref AVCodecContext.coded_side_data "decoder's side data" array if
+ * initialized with said stream's codecpar.
+ * @see av_packet_side_data_get()
+ */
+void av_format_inject_global_side_data(AVFormatContext *s);
+
+#if FF_API_GET_DUR_ESTIMATE_METHOD
+/**
+ * Returns the method used to set ctx->duration.
+ *
+ * @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE.
+ * @deprecated duration_estimation_method is public and can be read directly.
+ */
+attribute_deprecated
+enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx);
+#endif
+
/**
* @defgroup lavf_core Core functions
* @ingroup libavf
@@ -2063,6 +2116,57 @@ AVStream *avformat_new_stream(AVFormatContext *s, const struct AVCodec *c);
*/
int avformat_stream_group_add_stream(AVStreamGroup *stg, AVStream *st);
+#if FF_API_AVSTREAM_SIDE_DATA
+/**
+ * Wrap an existing array as stream side data.
+ *
+ * @param st stream
+ * @param type side information type
+ * @param data the side data array. It must be allocated with the av_malloc()
+ * family of functions. The ownership of the data is transferred to
+ * st.
+ * @param size side information size
+ *
+ * @return zero on success, a negative AVERROR code on failure. On failure,
+ * the stream is unchanged and the data remains owned by the caller.
+ * @deprecated use av_packet_side_data_add() with the stream's
+ * @ref AVCodecParameters.coded_side_data "codecpar side data"
+ */
+attribute_deprecated
+int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
+ uint8_t *data, size_t size);
+
+/**
+ * Allocate new information from stream.
+ *
+ * @param stream stream
+ * @param type desired side information type
+ * @param size side information size
+ *
+ * @return pointer to fresh allocated data or NULL otherwise
+ * @deprecated use av_packet_side_data_new() with the stream's
+ * @ref AVCodecParameters.coded_side_data "codecpar side data"
+ */
+attribute_deprecated
+uint8_t *av_stream_new_side_data(AVStream *stream,
+ enum AVPacketSideDataType type, size_t size);
+/**
+ * Get side information from stream.
+ *
+ * @param stream stream
+ * @param type desired side information type
+ * @param size If supplied, *size will be set to the size of the side data
+ * or to zero if the desired side data is not present.
+ *
+ * @return pointer to data if present or NULL otherwise
+ * @deprecated use av_packet_side_data_get() with the stream's
+ * @ref AVCodecParameters.coded_side_data "codecpar side data"
+ */
+attribute_deprecated
+uint8_t *av_stream_get_side_data(const AVStream *stream,
+ enum AVPacketSideDataType type, size_t *size);
+#endif
+
AVProgram *av_new_program(AVFormatContext *s, int id);
/**
@@ -2171,7 +2275,7 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt,
* which case an AVFormatContext is allocated by this
* function and written into ps.
* Note that a user-supplied AVFormatContext will be freed
- * on failure and its pointer set to NULL.
+ * on failure.
* @param url URL of the stream to open.
* @param fmt If non-NULL, this parameter forces a specific input format.
* Otherwise the format is autodetected.
@@ -2180,8 +2284,7 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt,
* On return this parameter will be destroyed and replaced with
* a dict containing options that were not found. May be NULL.
*
- * @return 0 on success; on failure: frees ps, sets its pointer to NULL,
- * and returns a negative AVERROR.
+ * @return 0 on success, a negative AVERROR on failure.
*
* @note If you want to use custom IO, preallocate the format context and set its pb field.
*/
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/version.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/version.h
index b32ddb36..70c554c1 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/version.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/version.h
@@ -31,8 +31,8 @@
#include "version_major.h"
-#define LIBAVFORMAT_VERSION_MINOR 1
-#define LIBAVFORMAT_VERSION_MICRO 101
+#define LIBAVFORMAT_VERSION_MINOR 7
+#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/version_major.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/version_major.h
index 61338d33..7a9b0670 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/version_major.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavformat/version_major.h
@@ -29,7 +29,7 @@
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
// Also please add any ticket numbers that you believe might be affected here
-#define LIBAVFORMAT_VERSION_MAJOR 62
+#define LIBAVFORMAT_VERSION_MAJOR 61
/**
* FF_API_* defines may be placed below to indicate public API that will be
@@ -41,9 +41,13 @@
* at once through the bump. This improves the git bisect-ability of the change.
*
*/
-#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 63)
+#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 62)
+#define FF_API_LAVF_SHORTEST (LIBAVFORMAT_VERSION_MAJOR < 62)
+#define FF_API_ALLOW_FLUSH (LIBAVFORMAT_VERSION_MAJOR < 62)
+#define FF_API_AVSTREAM_SIDE_DATA (LIBAVFORMAT_VERSION_MAJOR < 62)
-#define FF_API_INTERNAL_TIMING (LIBAVFORMAT_VERSION_MAJOR < 63)
+#define FF_API_GET_DUR_ESTIMATE_METHOD (LIBAVFORMAT_VERSION_MAJOR < 62)
+#define FF_API_INTERNAL_TIMING (LIBAVFORMAT_VERSION_MAJOR < 62)
#define FF_API_R_FRAME_RATE 1
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avassert.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avassert.h
index 8dbdb015..1895fb75 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avassert.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avassert.h
@@ -31,7 +31,6 @@
#ifdef HAVE_AV_CONFIG_H
# include "config.h"
#endif
-#include "attributes.h"
#include "log.h"
#include "macros.h"
@@ -76,45 +75,4 @@
*/
void av_assert0_fpu(void);
-/**
- * Asserts that are used as compiler optimization hints depending
- * upon ASSERT_LEVEL and NBDEBUG.
- *
- * Undefined behaviour occurs if execution reaches a point marked
- * with av_unreachable() or if a condition used with av_assume()
- * is false.
- *
- * The condition used with av_assume() should not have side-effects
- * and should be visible to the compiler.
- */
-#if defined(ASSERT_LEVEL) ? ASSERT_LEVEL > 0 : !defined(HAVE_AV_CONFIG_H) && !defined(NDEBUG)
-#define av_unreachable(msg) \
-do { \
- av_log(NULL, AV_LOG_PANIC, \
- "Reached supposedly unreachable code at %s:%d: %s\n", \
- __FILE__, __LINE__, msg); \
- abort(); \
-} while (0)
-#define av_assume(cond) av_assert0(cond)
-#else
-#if AV_GCC_VERSION_AT_LEAST(4, 5) || AV_HAS_BUILTIN(__builtin_unreachable)
-#define av_unreachable(msg) __builtin_unreachable()
-#elif defined(_MSC_VER)
-#define av_unreachable(msg) __assume(0)
-#define av_assume(cond) __assume(cond)
-#elif __STDC_VERSION__ >= 202311L
-#include
-#define av_unreachable(msg) unreachable()
-#else
-#define av_unreachable(msg) ((void)0)
-#endif
-
-#ifndef av_assume
-#define av_assume(cond) do { \
- if (!(cond)) \
- av_unreachable(); \
-} while (0)
-#endif
-#endif
-
#endif /* AVUTIL_AVASSERT_H */
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avconfig.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avconfig.h
index c289fbb5..8558b350 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avconfig.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avconfig.h
@@ -2,5 +2,5 @@
#ifndef AVUTIL_AVCONFIG_H
#define AVUTIL_AVCONFIG_H
#define AV_HAVE_BIGENDIAN 0
-#define AV_HAVE_FAST_UNALIGNED 1
+#define AV_HAVE_FAST_UNALIGNED 0
#endif /* AVUTIL_AVCONFIG_H */
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avutil.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avutil.h
index c8ae114a..d2900dcb 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avutil.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/avutil.h
@@ -41,6 +41,7 @@
* @li @ref lavd "libavdevice" special devices muxing/demuxing library
* @li @ref lavu "libavutil" common utility library
* @li @ref lswr "libswresample" audio resampling, format conversion and mixing
+ * @li @ref lpp "libpostproc" post processing library
* @li @ref libsws "libswscale" color conversion and scaling library
*
* @section ffmpeg_versioning Versioning and compatibility
@@ -313,7 +314,6 @@ static inline void *av_x_if_null(const void *p, const void *x)
return (void *)(intptr_t)(p ? p : x);
}
-#if FF_API_OPT_INT_LIST
/**
* Compute the length of an integer list.
*
@@ -322,7 +322,6 @@ static inline void *av_x_if_null(const void *p, const void *x)
* @param list pointer to the list
* @return length of the list, in elements, not counting the terminator
*/
-attribute_deprecated
unsigned av_int_list_length_for_size(unsigned elsize,
const void *list, uint64_t term) av_pure;
@@ -335,7 +334,6 @@ unsigned av_int_list_length_for_size(unsigned elsize,
*/
#define av_int_list_length(list, term) \
av_int_list_length_for_size(sizeof(*(list)), list, term)
-#endif
/**
* Return the fractional representation of the internal time base.
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/channel_layout.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/channel_layout.h
index b82d07eb..3a96c2d9 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/channel_layout.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/channel_layout.h
@@ -45,7 +45,7 @@
*/
enum AVChannel {
- /// Invalid channel index
+ ///< Invalid channel index
AV_CHAN_NONE = -1,
AV_CHAN_FRONT_LEFT,
AV_CHAN_FRONT_RIGHT,
@@ -84,9 +84,6 @@ enum AVChannel {
AV_CHAN_TOP_SURROUND_LEFT, ///< +110 degrees, Lvs, TpLS
AV_CHAN_TOP_SURROUND_RIGHT, ///< -110 degrees, Rvs, TpRS
- AV_CHAN_BINAURAL_LEFT = 61,
- AV_CHAN_BINAURAL_RIGHT,
-
/** Channel is empty can be safely skipped. */
AV_CHAN_UNUSED = 0x200,
@@ -206,8 +203,6 @@ enum AVChannelOrder {
#define AV_CH_SIDE_SURROUND_RIGHT (1ULL << AV_CHAN_SIDE_SURROUND_RIGHT )
#define AV_CH_TOP_SURROUND_LEFT (1ULL << AV_CHAN_TOP_SURROUND_LEFT )
#define AV_CH_TOP_SURROUND_RIGHT (1ULL << AV_CHAN_TOP_SURROUND_RIGHT )
-#define AV_CH_BINAURAL_LEFT (1ULL << AV_CHAN_BINAURAL_LEFT )
-#define AV_CH_BINAURAL_RIGHT (1ULL << AV_CHAN_BINAURAL_RIGHT )
/**
* @}
@@ -240,20 +235,17 @@ enum AVChannelOrder {
#define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
-#define AV_CH_LAYOUT_5POINT1POINT2 (AV_CH_LAYOUT_5POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
#define AV_CH_LAYOUT_5POINT1POINT2_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
#define AV_CH_LAYOUT_CUBE (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
-#define AV_CH_LAYOUT_5POINT1POINT4_BACK (AV_CH_LAYOUT_5POINT1POINT2|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
+#define AV_CH_LAYOUT_5POINT1POINT4_BACK (AV_CH_LAYOUT_5POINT1POINT2_BACK|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
#define AV_CH_LAYOUT_7POINT1POINT2 (AV_CH_LAYOUT_7POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
#define AV_CH_LAYOUT_7POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
#define AV_CH_LAYOUT_7POINT2POINT3 (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_CENTER|AV_CH_LOW_FREQUENCY_2)
#define AV_CH_LAYOUT_9POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
-#define AV_CH_LAYOUT_9POINT1POINT6 (AV_CH_LAYOUT_9POINT1POINT4_BACK|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT)
#define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
-#define AV_CH_LAYOUT_BINAURAL (AV_CH_BINAURAL_LEFT|AV_CH_BINAURAL_RIGHT)
#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
-#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_9POINT1POINT6|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
+#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
#define AV_CH_LAYOUT_7POINT1_TOP_BACK AV_CH_LAYOUT_5POINT1POINT2_BACK
@@ -417,7 +409,6 @@ typedef struct AVChannelLayout {
#define AV_CHANNEL_LAYOUT_7POINT1 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1)
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE)
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE_BACK)
-#define AV_CHANNEL_LAYOUT_5POINT1POINT2 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_5POINT1POINT2)
#define AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_5POINT1POINT2_BACK)
#define AV_CHANNEL_LAYOUT_OCTAGONAL AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_OCTAGONAL)
#define AV_CHANNEL_LAYOUT_CUBE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_CUBE)
@@ -426,9 +417,7 @@ typedef struct AVChannelLayout {
#define AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT1POINT4_BACK)
#define AV_CHANNEL_LAYOUT_7POINT2POINT3 AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT2POINT3)
#define AV_CHANNEL_LAYOUT_9POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(14, AV_CH_LAYOUT_9POINT1POINT4_BACK)
-#define AV_CHANNEL_LAYOUT_9POINT1POINT6 AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_9POINT1POINT6)
#define AV_CHANNEL_LAYOUT_HEXADECAGONAL AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_HEXADECAGONAL)
-#define AV_CHANNEL_LAYOUT_BINAURAL AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_BINAURAL)
#define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO_DOWNMIX)
#define AV_CHANNEL_LAYOUT_22POINT2 AV_CHANNEL_LAYOUT_MASK(24, AV_CH_LAYOUT_22POINT2)
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/cpu.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/cpu.h
index 5ef5da58..ba6c234e 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/cpu.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/cpu.h
@@ -72,8 +72,6 @@
#define AV_CPU_FLAG_VFP_VM (1 << 7) ///< VFPv2 vector mode, deprecated in ARMv7-A and unavailable in various CPUs implementations
#define AV_CPU_FLAG_DOTPROD (1 << 8)
#define AV_CPU_FLAG_I8MM (1 << 9)
-#define AV_CPU_FLAG_SVE (1 <<10)
-#define AV_CPU_FLAG_SVE2 (1 <<11)
#define AV_CPU_FLAG_SETEND (1 <<16)
#define AV_CPU_FLAG_MMI (1 << 0)
@@ -101,9 +99,6 @@
#define AV_CPU_FLAG_RV_MISALIGNED (1 <<10) ///< Fast misaligned accesses
#define AV_CPU_FLAG_RVB (1 <<11) ///< B (bit manipulations)
-// WASM extensions
-#define AV_CPU_FLAG_SIMD128 (1 << 0)
-
/**
* Return the flags which specify extensions supported by the CPU.
* The returned value is affected by av_force_cpu_flags() if that was used
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/csp.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/csp.h
index 9b74c631..73bce52b 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/csp.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/csp.h
@@ -81,12 +81,8 @@ typedef struct AVColorPrimariesDesc {
} AVColorPrimariesDesc;
/**
- * Function pointer representing a double -> double transfer function that
- * performs either an OETF transfer function, or alternatively an inverse EOTF
- * function (in particular, for SMPTE ST 2084 / PQ). This function inputs
- * linear light, and outputs gamma encoded light.
- *
- * See ITU-T H.273 for more information.
+ * Function pointer representing a double -> double transfer function that performs
+ * an EOTF transfer inversion. This function outputs linear light.
*/
typedef double (*av_csp_trc_function)(double);
@@ -147,44 +143,6 @@ double av_csp_approximate_trc_gamma(enum AVColorTransferCharacteristic trc);
*/
av_csp_trc_function av_csp_trc_func_from_id(enum AVColorTransferCharacteristic trc);
-/**
- * Returns the mathematical inverse of the corresponding TRC function.
- */
-av_csp_trc_function av_csp_trc_func_inv_from_id(enum AVColorTransferCharacteristic trc);
-
-/**
- * Function pointer representing an ITU EOTF transfer for a given reference
- * display configuration.
- *
- * @param Lw The white point luminance of the display, in nits (cd/m^2).
- * @param Lb The black point luminance of the display, in nits (cd/m^2).
- */
-typedef void (*av_csp_eotf_function)(double Lw, double Lb, double c[3]);
-
-/**
- * Returns the ITU EOTF corresponding to a given TRC. This converts from the
- * signal level [0,1] to the raw output display luminance in nits (cd/m^2).
- * This is done per channel in RGB space, except for AVCOL_TRC_SMPTE428, which
- * assumes CIE XYZ in- and output.
- *
- * @return A pointer to the function implementing the given TRC, or NULL if no
- * such function is defined.
- *
- * @note In general, the resulting function is defined (wherever possible) for
- * out-of-range values, even though these values do not have a physical
- * meaning on the given display. Users should clamp inputs (or outputs)
- * if this behavior is not desired.
- *
- * This is also the case for functions like PQ, which are defined over an
- * absolute signal range independent of the target display capabilities.
- */
-av_csp_eotf_function av_csp_itu_eotf(enum AVColorTransferCharacteristic trc);
-
-/**
- * Returns the mathematical inverse of the corresponding EOTF.
- */
-av_csp_eotf_function av_csp_itu_eotf_inv(enum AVColorTransferCharacteristic trc);
-
/**
* @}
*/
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/dict.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/dict.h
index 654e7c35..713c9e36 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/dict.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/dict.h
@@ -82,7 +82,6 @@
#define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no
delimiter is added, the strings are simply concatenated. */
#define AV_DICT_MULTIKEY 64 /**< Allow to store several equal keys in the dictionary */
-#define AV_DICT_DEDUP 128 /**< If inserting a value that already exists for a key, do nothing. Only relevant with AV_DICT_MULTIKEY. */
/**
* @}
*/
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/ffversion.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/ffversion.h
index 0dd58433..48f04a6a 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/ffversion.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-120057-g7d38486975-20250628"
+#define FFMPEG_VERSION "7.1.1"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/film_grain_params.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/film_grain_params.h
index 7e8d3337..ccacab88 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/film_grain_params.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/film_grain_params.h
@@ -136,6 +136,43 @@ typedef struct AVFilmGrainH274Params {
*/
int model_id;
+#if FF_API_H274_FILM_GRAIN_VCS
+ /**
+ * TODO: On this ABI bump, please also re-order the fields in
+ * AVFilmGrainParams (see below)
+ */
+
+ /**
+ * Specifies the bit depth used for the luma component.
+ *
+ * @deprecated use AVFilmGrainParams.bit_depth_luma.
+ */
+ attribute_deprecated
+ int bit_depth_luma;
+
+ /**
+ * Specifies the bit depth used for the chroma components.
+ *
+ * @deprecated use AVFilmGrainParams.bit_depth_chroma.
+ */
+ attribute_deprecated
+ int bit_depth_chroma;
+
+ /**
+ * Specifies the video signal characteristics.
+ *
+ * @deprecated use AVFilmGrainParams.color_{range,primaries,trc,space}.
+ */
+ attribute_deprecated
+ enum AVColorRange color_range;
+ attribute_deprecated
+ enum AVColorPrimaries color_primaries;
+ attribute_deprecated
+ enum AVColorTransferCharacteristic color_trc;
+ attribute_deprecated
+ enum AVColorSpace color_space;
+#endif
+
/**
* Specifies the blending mode used to blend the simulated film grain
* with the decoded images.
@@ -212,6 +249,18 @@ typedef struct AVFilmGrainParams {
*/
uint64_t seed;
+ /**
+ * Additional fields may be added both here and in any structure included.
+ * If a codec's film grain structure differs slightly over another
+ * codec's, fields within may change meaning depending on the type.
+ *
+ * TODO: Move this to the end of the structure, at the next ABI bump.
+ */
+ union {
+ AVFilmGrainAOMParams aom;
+ AVFilmGrainH274Params h274;
+ } codec;
+
/**
* Intended display resolution. May be 0 if the codec does not specify
* any restrictions.
@@ -238,15 +287,6 @@ typedef struct AVFilmGrainParams {
int bit_depth_luma;
int bit_depth_chroma;
- /**
- * Additional fields may be added both here and in any structure included.
- * If a codec's film grain structure differs slightly over another
- * codec's, fields within may change meaning depending on the type.
- */
- union {
- AVFilmGrainAOMParams aom;
- AVFilmGrainH274Params h274;
- } codec;
} AVFilmGrainParams;
/**
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/frame.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/frame.h
index 8493233b..f7806566 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/frame.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/frame.h
@@ -283,27 +283,6 @@ enum AVSideDataProps {
* a single side data array.
*/
AV_SIDE_DATA_PROP_MULTI = (1 << 1),
-
- /**
- * Side data depends on the video dimensions. Side data with this property
- * loses its meaning when rescaling or cropping the image, unless
- * either recomputed or adjusted to the new resolution.
- */
- AV_SIDE_DATA_PROP_SIZE_DEPENDENT = (1 << 2),
-
- /**
- * Side data depends on the video color space. Side data with this property
- * loses its meaning when changing the video color encoding, e.g. by
- * adapting to a different set of primaries or transfer characteristics.
- */
- AV_SIDE_DATA_PROP_COLOR_DEPENDENT = (1 << 3),
-
- /**
- * Side data depends on the channel layout. Side data with this property
- * loses its meaning when downmixing or upmixing, unless either recomputed
- * or adjusted to the new layout.
- */
- AV_SIDE_DATA_PROP_CHANNEL_DEPENDENT = (1 << 4),
};
/**
@@ -496,6 +475,16 @@ typedef struct AVFrame {
*/
int format;
+#if FF_API_FRAME_KEY
+ /**
+ * 1 -> keyframe, 0-> not
+ *
+ * @deprecated Use AV_FRAME_FLAG_KEY instead
+ */
+ attribute_deprecated
+ int key_frame;
+#endif
+
/**
* Picture type of the frame.
*/
@@ -567,6 +556,32 @@ typedef struct AVFrame {
*/
int repeat_pict;
+#if FF_API_INTERLACED_FRAME
+ /**
+ * The content of the picture is interlaced.
+ *
+ * @deprecated Use AV_FRAME_FLAG_INTERLACED instead
+ */
+ attribute_deprecated
+ int interlaced_frame;
+
+ /**
+ * If the content is interlaced, is top field displayed first.
+ *
+ * @deprecated Use AV_FRAME_FLAG_TOP_FIELD_FIRST instead
+ */
+ attribute_deprecated
+ int top_field_first;
+#endif
+
+#if FF_API_PALETTE_HAS_CHANGED
+ /**
+ * Tell user application that palette has changed from previous frame.
+ */
+ attribute_deprecated
+ int palette_has_changed;
+#endif
+
/**
* Sample rate of the audio data.
*/
@@ -636,14 +651,6 @@ typedef struct AVFrame {
* is interlaced.
*/
#define AV_FRAME_FLAG_TOP_FIELD_FIRST (1 << 4)
-/**
- * A decoder can use this flag to mark frames which were originally encoded losslessly.
- *
- * For coding bitstream formats which support both lossless and lossy
- * encoding, it is sometimes possible for a decoder to determine which method
- * was used when the bitsream was encoded.
- */
-#define AV_FRAME_FLAG_LOSSLESS (1 << 5)
/**
* @}
*/
@@ -680,6 +687,18 @@ typedef struct AVFrame {
*/
int64_t best_effort_timestamp;
+#if FF_API_FRAME_PKT
+ /**
+ * reordered pos from the last AVPacket that has been input into the decoder
+ * - encoding: unused
+ * - decoding: Read by user.
+ * @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user
+ * data from packets to frames
+ */
+ attribute_deprecated
+ int64_t pkt_pos;
+#endif
+
/**
* metadata.
* - encoding: Set by user.
@@ -700,6 +719,20 @@ typedef struct AVFrame {
#define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4
#define FF_DECODE_ERROR_DECODE_SLICES 8
+#if FF_API_FRAME_PKT
+ /**
+ * size of the corresponding packet containing the compressed
+ * frame.
+ * It is set to a negative value if unknown.
+ * - encoding: unused
+ * - decoding: set by libavcodec, read by user.
+ * @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user
+ * data from packets to frames
+ */
+ attribute_deprecated
+ int pkt_size;
+#endif
+
/**
* For hwaccel-format frames, this should be a reference to the
* AVHWFramesContext describing the frame.
@@ -739,13 +772,17 @@ typedef struct AVFrame {
*/
/**
- * RefStruct reference for internal use by a single libav* library.
+ * AVBufferRef for internal use by a single libav* library.
* Must not be used to transfer data between libraries.
* Has to be NULL when ownership of the frame leaves the respective library.
*
- * Code outside the FFmpeg libs must never check or change private_ref.
+ * Code outside the FFmpeg libs should never check or change the contents of the buffer ref.
+ *
+ * FFmpeg calls av_buffer_unref() on it when the frame is unreferenced.
+ * av_frame_copy_props() calls create a new reference with av_buffer_ref()
+ * for the target frame's private_ref field.
*/
- void *private_ref;
+ AVBufferRef *private_ref;
/**
* Channel layout of the audio data.
@@ -850,10 +887,9 @@ void av_frame_move_ref(AVFrame *dst, AVFrame *src);
* cases.
*
* @param frame frame in which to store the new buffers.
- * @param align Required buffer size and data pointer alignment. If equal to 0,
- * alignment will be chosen automatically for the current CPU.
- * It is highly recommended to pass 0 here unless you know what
- * you are doing.
+ * @param align Required buffer size alignment. If equal to 0, alignment will be
+ * chosen automatically for the current CPU. It is highly
+ * recommended to pass 0 here unless you know what you are doing.
*
* @return 0 on success, a negative AVERROR on error.
*/
@@ -1027,11 +1063,6 @@ void av_frame_side_data_free(AVFrameSideData ***sd, int *nb_sd);
* Applies only for side data types without the AV_SIDE_DATA_PROP_MULTI prop.
*/
#define AV_FRAME_SIDE_DATA_FLAG_REPLACE (1 << 1)
-/**
- * Create a new reference to the passed in buffer instead of taking ownership
- * of it.
- */
-#define AV_FRAME_SIDE_DATA_FLAG_NEW_REF (1 << 2)
/**
* Add new side data entry to an array.
@@ -1137,14 +1168,6 @@ const AVFrameSideData *av_frame_side_data_get(AVFrameSideData * const *sd,
*/
void av_frame_side_data_remove(AVFrameSideData ***sd, int *nb_sd,
enum AVFrameSideDataType type);
-
-/**
- * Remove and free all side data instances that match any of the given
- * side data properties. (See enum AVSideDataProps)
- */
-void av_frame_side_data_remove_by_props(AVFrameSideData ***sd, int *nb_sd,
- int props);
-
/**
* @}
*/
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hdr_dynamic_vivid_metadata.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hdr_dynamic_vivid_metadata.h
index a9d4797f..4524a815 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hdr_dynamic_vivid_metadata.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hdr_dynamic_vivid_metadata.h
@@ -168,6 +168,60 @@ typedef struct AVHDRVividColorToneMappingParams {
*/
int three_Spline_num;
+#if FF_API_HDR_VIVID_THREE_SPLINE
+ /**
+ * The mode of three Spline. the value shall be in the range
+ * of 0 to 3, inclusive.
+ * @deprecated Use three_spline instead
+ */
+ attribute_deprecated
+ int three_Spline_TH_mode;
+
+ /**
+ * three_Spline_TH_enable_MB is in the range of 0.0 to 1.0, inclusive
+ * and in multiples of 1.0/255.
+ * @deprecated Use three_spline instead
+ */
+ attribute_deprecated
+ AVRational three_Spline_TH_enable_MB;
+
+ /**
+ * 3Spline_TH_enable of three Spline.
+ * The value shall be in the range of 0.0 to 1.0, inclusive.
+ * and in multiples of 1.0/4095.
+ * @deprecated Use three_spline instead
+ */
+ attribute_deprecated
+ AVRational three_Spline_TH_enable;
+
+ /**
+ * 3Spline_TH_Delta1 of three Spline.
+ * The value shall be in the range of 0.0 to 0.25, inclusive,
+ * and in multiples of 0.25/1023.
+ * @deprecated Use three_spline instead
+ */
+ attribute_deprecated
+ AVRational three_Spline_TH_Delta1;
+
+ /**
+ * 3Spline_TH_Delta2 of three Spline.
+ * The value shall be in the range of 0.0 to 0.25, inclusive,
+ * and in multiples of 0.25/1023.
+ * @deprecated Use three_spline instead
+ */
+ attribute_deprecated
+ AVRational three_Spline_TH_Delta2;
+
+ /**
+ * 3Spline_enable_Strength of three Spline.
+ * The value shall be in the range of 0.0 to 1.0, inclusive,
+ * and in multiples of 1.0/255.
+ * @deprecated Use three_spline instead
+ */
+ attribute_deprecated
+ AVRational three_Spline_enable_Strength;
+#endif
+
AVHDRVivid3SplineParams three_spline[2];
} AVHDRVividColorToneMappingParams;
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hwcontext.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hwcontext.h
index 96042ba1..bac30deb 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hwcontext.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hwcontext.h
@@ -38,7 +38,6 @@ enum AVHWDeviceType {
AV_HWDEVICE_TYPE_MEDIACODEC,
AV_HWDEVICE_TYPE_VULKAN,
AV_HWDEVICE_TYPE_D3D12VA,
- AV_HWDEVICE_TYPE_AMF,
};
/**
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hwcontext_vulkan.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hwcontext_vulkan.h
index 6ab74579..2688a475 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hwcontext_vulkan.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/hwcontext_vulkan.h
@@ -197,6 +197,11 @@ typedef enum AVVkFrameFlags {
* device and tiling during av_hwframe_ctx_init(). */
AV_VK_FRAME_FLAG_NONE = (1ULL << 0),
+#if FF_API_VULKAN_CONTIGUOUS_MEMORY
+ /* DEPRECATED: does nothing. Replaced by multiplane images. */
+ AV_VK_FRAME_FLAG_CONTIGUOUS_MEMORY = (1ULL << 1),
+#endif
+
/* Disables multiplane images.
* This is required to export/import images from CUDA. */
AV_VK_FRAME_FLAG_DISABLE_MULTIPLANE = (1ULL << 2),
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/iamf.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/iamf.h
index 2ed7b0f2..1fa73893 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/iamf.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/iamf.h
@@ -493,14 +493,10 @@ typedef struct AVIAMFSubmixElement {
enum AVIAMFSubmixLayoutType {
/**
* The layout follows the loudspeaker sound system convention of ITU-2051-3.
- * @ref AVIAMFSubmixLayout.sound_system must be set.
*/
AV_IAMF_SUBMIX_LAYOUT_TYPE_LOUDSPEAKERS = 2,
/**
* The layout is binaural.
- *
- * @note @ref AVIAMFSubmixLayout.sound_system may be set to
- * AV_CHANNEL_LAYOUT_BINAURAL to simplify API usage, but it's not mandatory.
*/
AV_IAMF_SUBMIX_LAYOUT_TYPE_BINAURAL = 3,
};
@@ -518,9 +514,9 @@ typedef struct AVIAMFSubmixLayout {
/**
* Channel layout matching one of Sound Systems A to J of ITU-2051-3, plus
- * 7.1.2ch, 3.1.2ch, and binaural.
- * If layout_type is not AV_IAMF_SUBMIX_LAYOUT_TYPE_LOUDSPEAKERS or
- * AV_IAMF_SUBMIX_LAYOUT_TYPE_BINAURAL, this field is undefined.
+ * 7.1.2ch and 3.1.2ch
+ * If layout_type is not AV_IAMF_SUBMIX_LAYOUT_TYPE_LOUDSPEAKERS, this field
+ * is undefined.
*/
AVChannelLayout sound_system;
/**
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/log.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/log.h
index ac5b08b6..ab7ceabe 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/log.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/log.h
@@ -37,7 +37,6 @@ typedef enum {
AV_CLASS_CATEGORY_BITSTREAM_FILTER,
AV_CLASS_CATEGORY_SWSCALER,
AV_CLASS_CATEGORY_SWRESAMPLER,
- AV_CLASS_CATEGORY_HWDEVICE,
AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT = 40,
AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
@@ -47,15 +46,6 @@ typedef enum {
AV_CLASS_CATEGORY_NB ///< not part of ABI/API
}AVClassCategory;
-enum AVClassStateFlags {
- /**
- * Object initialization has finished and it is now in the 'runtime' stage.
- * This affects e.g. what options can be set on the object (only
- * AV_OPT_FLAG_RUNTIME_PARAM options can be set on initialized objects).
- */
- AV_CLASS_STATE_INITIALIZED = (1 << 0),
-};
-
#define AV_IS_INPUT_DEVICE(category) \
(((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT) || \
((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT) || \
@@ -87,9 +77,7 @@ typedef struct AVClass {
const char* (*item_name)(void* ctx);
/**
- * An array of options for the structure or NULL.
- * When non-NULL, the array must be terminated by an option with a NULL
- * name.
+ * a pointer to the first option specified in the class if any or NULL
*
* @see av_set_default_options()
*/
@@ -97,50 +85,43 @@ typedef struct AVClass {
/**
* LIBAVUTIL_VERSION with which this structure was created.
- * This is used to allow fields to be added to AVClass without requiring
- * major version bumps everywhere.
+ * This is used to allow fields to be added without requiring major
+ * version bumps everywhere.
*/
int version;
/**
- * Offset in the structure where the log level offset is stored. The log
- * level offset is an int added to the log level for logging with this
- * object as the context.
- *
- * 0 means there is no such variable.
+ * Offset in the structure where log_level_offset is stored.
+ * 0 means there is no such variable
*/
int log_level_offset_offset;
/**
* Offset in the structure where a pointer to the parent context for
* logging is stored. For example a decoder could pass its AVCodecContext
- * to eval as such a parent context, which an ::av_log() implementation
+ * to eval as such a parent context, which an av_log() implementation
* could then leverage to display the parent context.
- *
- * When the pointer is NULL, or this offset is zero, the object is assumed
- * to have no parent.
+ * The offset can be NULL.
*/
int parent_log_context_offset;
/**
- * Category used for visualization (like color).
- *
- * Only used when ::get_category() is NULL. Use this field when all
- * instances of this class have the same category, use ::get_category()
- * otherwise.
+ * Category used for visualization (like color)
+ * This is only set if the category is equal for all objects using this class.
+ * available since version (51 << 16 | 56 << 8 | 100)
*/
AVClassCategory category;
/**
- * Callback to return the instance category. Use this callback when
- * different instances of this class may have different categories,
- * ::category otherwise.
+ * Callback to return the category.
+ * available since version (51 << 16 | 59 << 8 | 100)
*/
AVClassCategory (*get_category)(void* ctx);
/**
* Callback to return the supported/allowed ranges.
+ * available since version (52.12)
*/
int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
@@ -158,22 +139,11 @@ typedef struct AVClass {
* @return AVClass for the next AVOptions-enabled child or NULL if there are
* no more such children.
*
- * @note The difference between ::child_next() and ::child_class_iterate()
- * is that ::child_next() iterates over _actual_ children of an
- * _existing_ object instance, while ::child_class_iterate() iterates
- * over the classes of all _potential_ children of any possible
- * instance of this class.
+ * @note The difference between child_next and this is that child_next
+ * iterates over _already existing_ objects, while child_class_iterate
+ * iterates over _all possible_ children.
*/
const struct AVClass* (*child_class_iterate)(void **iter);
-
- /**
- * When non-zero, offset in the object to an unsigned int holding object
- * state flags, a combination of AVClassStateFlags values. The flags are
- * updated by the object to signal its state to the generic code.
- *
- * Added in version 59.41.100.
- */
- int state_flags_offset;
} AVClass;
/**
@@ -407,16 +377,6 @@ int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl,
*/
#define AV_LOG_PRINT_LEVEL 2
-/**
- * Include system time in log output.
- */
-#define AV_LOG_PRINT_TIME 4
-
-/**
- * Include system date and time in log output.
- */
-#define AV_LOG_PRINT_DATETIME 8
-
void av_log_set_flags(int arg);
int av_log_get_flags(void);
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/opt.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/opt.h
index d3136792..be189f76 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/opt.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/opt.h
@@ -886,7 +886,6 @@ int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layo
*/
int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, int search_flags);
-#if FF_API_OPT_INT_LIST
/**
* Set a binary option to an integer list.
*
@@ -902,7 +901,6 @@ int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, in
AVERROR(EINVAL) : \
av_opt_set_bin(obj, name, (const uint8_t *)(val), \
av_int_list_length(val, term) * sizeof(*(val)), flags))
-#endif
/**
* Add, replace, or remove elements for an array option. Which of these
@@ -1071,7 +1069,6 @@ int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational
* @}
*/
-#if FF_API_OPT_PTR
/**
* Gets a pointer to the requested field in a struct.
* This function allows accessing a struct even when its fields are moved or
@@ -1079,12 +1076,8 @@ int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational
*
* @returns a pointer to the field, it can be cast to the correct type and read
* or written to.
- *
- * @deprecated direct access to AVOption-exported fields is not supported
*/
-attribute_deprecated
void *av_opt_ptr(const AVClass *avclass, void *obj, const char *name);
-#endif
/**
* Check if given option is set to its default value.
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/pixfmt.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/pixfmt.h
index bf1b8ed0..a7f50e16 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/pixfmt.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/pixfmt.h
@@ -398,12 +398,12 @@ enum AVPixelFormat {
AV_PIX_FMT_P416BE, ///< interleaved chroma YUV 4:4:4, 48bpp, big-endian
AV_PIX_FMT_P416LE, ///< interleaved chroma YUV 4:4:4, 48bpp, little-endian
- AV_PIX_FMT_VUYA, ///< packed VUYA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), VUYAVUYA...
+ AV_PIX_FMT_VUYA, ///< packed VUYA 4:4:4, 32bpp, VUYAVUYA...
AV_PIX_FMT_RGBAF16BE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian
AV_PIX_FMT_RGBAF16LE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian
- AV_PIX_FMT_VUYX, ///< packed VUYX 4:4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
+ AV_PIX_FMT_VUYX, ///< packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
AV_PIX_FMT_P012LE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, little-endian
AV_PIX_FMT_P012BE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, big-endian
@@ -439,55 +439,6 @@ enum AVPixelFormat {
*/
AV_PIX_FMT_D3D12,
- AV_PIX_FMT_AYUV, ///< packed AYUV 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), AYUVAYUV...
-
- AV_PIX_FMT_UYVA, ///< packed UYVA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), UYVAUYVA...
-
- AV_PIX_FMT_VYU444, ///< packed VYU 4:4:4, 24bpp (1 Cr & Cb sample per 1x1 Y), VYUVYU...
-
- AV_PIX_FMT_V30XBE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), big-endian
- AV_PIX_FMT_V30XLE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), little-endian
-
- AV_PIX_FMT_RGBF16BE, ///< IEEE-754 half precision packed RGB 16:16:16, 48bpp, RGBRGB..., big-endian
- AV_PIX_FMT_RGBF16LE, ///< IEEE-754 half precision packed RGB 16:16:16, 48bpp, RGBRGB..., little-endian
-
- AV_PIX_FMT_RGBA128BE, ///< packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian
- AV_PIX_FMT_RGBA128LE, ///< packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian
-
- AV_PIX_FMT_RGB96BE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., big-endian
- AV_PIX_FMT_RGB96LE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., little-endian
-
- AV_PIX_FMT_Y216BE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, big-endian
- AV_PIX_FMT_Y216LE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, little-endian
-
- AV_PIX_FMT_XV48BE, ///< packed XVYU 4:4:4, 64bpp, big-endian, variant of Y416 where alpha channel is left undefined
- AV_PIX_FMT_XV48LE, ///< packed XVYU 4:4:4, 64bpp, little-endian, variant of Y416 where alpha channel is left undefined
-
- AV_PIX_FMT_GBRPF16BE, ///< IEEE-754 half precision planer GBR 4:4:4, 48bpp, big-endian
- AV_PIX_FMT_GBRPF16LE, ///< IEEE-754 half precision planer GBR 4:4:4, 48bpp, little-endian
- AV_PIX_FMT_GBRAPF16BE, ///< IEEE-754 half precision planar GBRA 4:4:4:4, 64bpp, big-endian
- AV_PIX_FMT_GBRAPF16LE, ///< IEEE-754 half precision planar GBRA 4:4:4:4, 64bpp, little-endian
-
- AV_PIX_FMT_GRAYF16BE, ///< IEEE-754 half precision Y, 16bpp, big-endian
- AV_PIX_FMT_GRAYF16LE, ///< IEEE-754 half precision Y, 16bpp, little-endian
-
- /**
- * HW acceleration through AMF. data[0] contain AMFSurface pointer
- */
- AV_PIX_FMT_AMF_SURFACE,
-
- AV_PIX_FMT_GRAY32BE, ///< Y , 32bpp, big-endian
- AV_PIX_FMT_GRAY32LE, ///< Y , 32bpp, little-endian
-
- AV_PIX_FMT_YAF32BE, ///< IEEE-754 single precision packed YA, 32 bits gray, 32 bits alpha, 64bpp, big-endian
- AV_PIX_FMT_YAF32LE, ///< IEEE-754 single precision packed YA, 32 bits gray, 32 bits alpha, 64bpp, little-endian
-
- AV_PIX_FMT_YAF16BE, ///< IEEE-754 half precision packed YA, 16 bits gray, 16 bits alpha, 32bpp, big-endian
- AV_PIX_FMT_YAF16LE, ///< IEEE-754 half precision packed YA, 16 bits gray, 16 bits alpha, 32bpp, little-endian
-
- AV_PIX_FMT_GBRAP32BE, ///< planar GBRA 4:4:4:4 128bpp, big-endian
- AV_PIX_FMT_GBRAP32LE, ///< planar GBRA 4:4:4:4 128bpp, little-endian
-
AV_PIX_FMT_NB ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
};
@@ -509,7 +460,6 @@ enum AVPixelFormat {
#define AV_PIX_FMT_GRAY12 AV_PIX_FMT_NE(GRAY12BE, GRAY12LE)
#define AV_PIX_FMT_GRAY14 AV_PIX_FMT_NE(GRAY14BE, GRAY14LE)
#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
-#define AV_PIX_FMT_GRAY32 AV_PIX_FMT_NE(GRAY32BE, GRAY32LE)
#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE)
#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE)
#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE)
@@ -549,24 +499,17 @@ enum AVPixelFormat {
#define AV_PIX_FMT_GBRAP12 AV_PIX_FMT_NE(GBRAP12BE, GBRAP12LE)
#define AV_PIX_FMT_GBRAP14 AV_PIX_FMT_NE(GBRAP14BE, GBRAP14LE)
#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
-#define AV_PIX_FMT_GBRAP32 AV_PIX_FMT_NE(GBRAP32BE, GBRAP32LE)
#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE)
#define AV_PIX_FMT_BAYER_RGGB16 AV_PIX_FMT_NE(BAYER_RGGB16BE, BAYER_RGGB16LE)
#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE, BAYER_GBRG16LE)
#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE, BAYER_GRBG16LE)
-#define AV_PIX_FMT_GBRPF16 AV_PIX_FMT_NE(GBRPF16BE, GBRPF16LE)
-#define AV_PIX_FMT_GBRAPF16 AV_PIX_FMT_NE(GBRAPF16BE, GBRAPF16LE)
#define AV_PIX_FMT_GBRPF32 AV_PIX_FMT_NE(GBRPF32BE, GBRPF32LE)
#define AV_PIX_FMT_GBRAPF32 AV_PIX_FMT_NE(GBRAPF32BE, GBRAPF32LE)
-#define AV_PIX_FMT_GRAYF16 AV_PIX_FMT_NE(GRAYF16BE, GRAYF16LE)
#define AV_PIX_FMT_GRAYF32 AV_PIX_FMT_NE(GRAYF32BE, GRAYF32LE)
-#define AV_PIX_FMT_YAF16 AV_PIX_FMT_NE(YAF16BE, YAF16LE)
-#define AV_PIX_FMT_YAF32 AV_PIX_FMT_NE(YAF32BE, YAF32LE)
-
#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)
#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)
@@ -588,11 +531,8 @@ enum AVPixelFormat {
#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)
#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)
-#define AV_PIX_FMT_Y216 AV_PIX_FMT_NE(Y216BE, Y216LE)
#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)
#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)
-#define AV_PIX_FMT_XV48 AV_PIX_FMT_NE(XV48BE, XV48LE)
-#define AV_PIX_FMT_V30X AV_PIX_FMT_NE(V30XBE, V30XLE)
#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
#define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)
@@ -603,15 +543,11 @@ enum AVPixelFormat {
#define AV_PIX_FMT_P216 AV_PIX_FMT_NE(P216BE, P216LE)
#define AV_PIX_FMT_P416 AV_PIX_FMT_NE(P416BE, P416LE)
-#define AV_PIX_FMT_RGBF16 AV_PIX_FMT_NE(RGBF16BE, RGBF16LE)
#define AV_PIX_FMT_RGBAF16 AV_PIX_FMT_NE(RGBAF16BE, RGBAF16LE)
#define AV_PIX_FMT_RGBF32 AV_PIX_FMT_NE(RGBF32BE, RGBF32LE)
#define AV_PIX_FMT_RGBAF32 AV_PIX_FMT_NE(RGBAF32BE, RGBAF32LE)
-#define AV_PIX_FMT_RGB96 AV_PIX_FMT_NE(RGB96BE, RGB96LE)
-#define AV_PIX_FMT_RGBA128 AV_PIX_FMT_NE(RGBA128BE, RGBA128LE)
-
/**
* Chromaticity coordinates of the source primaries.
* These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.1 and ITU-T H.273.
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/version.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/version.h
index 2979f802..753f85b9 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/version.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libavutil/version.h
@@ -78,8 +78,8 @@
* @{
*/
-#define LIBAVUTIL_VERSION_MAJOR 60
-#define LIBAVUTIL_VERSION_MINOR 3
+#define LIBAVUTIL_VERSION_MAJOR 59
+#define LIBAVUTIL_VERSION_MINOR 39
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
@@ -105,11 +105,16 @@
* @{
*/
-#define FF_API_MOD_UINTP2 (LIBAVUTIL_VERSION_MAJOR < 61)
-#define FF_API_RISCV_FD_ZBA (LIBAVUTIL_VERSION_MAJOR < 61)
-#define FF_API_VULKAN_FIXED_QUEUES (LIBAVUTIL_VERSION_MAJOR < 61)
-#define FF_API_OPT_INT_LIST (LIBAVUTIL_VERSION_MAJOR < 61)
-#define FF_API_OPT_PTR (LIBAVUTIL_VERSION_MAJOR < 61)
+#define FF_API_HDR_VIVID_THREE_SPLINE (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_FRAME_PKT (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_INTERLACED_FRAME (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_FRAME_KEY (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_PALETTE_HAS_CHANGED (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_H274_FILM_GRAIN_VCS (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_MOD_UINTP2 (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_RISCV_FD_ZBA (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_VULKAN_FIXED_QUEUES (LIBAVUTIL_VERSION_MAJOR < 60)
/**
* @}
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswresample/version.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswresample/version.h
index 70302309..d1795b55 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswresample/version.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswresample/version.h
@@ -30,7 +30,7 @@
#include "version_major.h"
-#define LIBSWRESAMPLE_VERSION_MINOR 0
+#define LIBSWRESAMPLE_VERSION_MINOR 3
#define LIBSWRESAMPLE_VERSION_MICRO 100
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswresample/version_major.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswresample/version_major.h
index 4e0bc0ab..dd13f2bb 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswresample/version_major.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswresample/version_major.h
@@ -26,6 +26,6 @@
* Libswresample version macros
*/
-#define LIBSWRESAMPLE_VERSION_MAJOR 6
+#define LIBSWRESAMPLE_VERSION_MAJOR 5
#endif /* SWRESAMPLE_VERSION_MAJOR_H */
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/swscale.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/swscale.h
index b04aa182..e575695c 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/swscale.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/swscale.h
@@ -1,5 +1,4 @@
/*
- * Copyright (C) 2024 Niklas Haas
* Copyright (C) 2001-2011 Michael Niedermayer
*
* This file is part of FFmpeg.
@@ -62,308 +61,60 @@ const char *swscale_configuration(void);
*/
const char *swscale_license(void);
-/**
- * Get the AVClass for SwsContext. It can be used in combination with
- * AV_OPT_SEARCH_FAKE_OBJ for examining options.
- *
- * @see av_opt_find().
- */
-const AVClass *sws_get_class(void);
-
-/******************************
- * Flags and quality settings *
- ******************************/
-
-typedef enum SwsDither {
- SWS_DITHER_NONE = 0, /* disable dithering */
- SWS_DITHER_AUTO, /* auto-select from preset */
- SWS_DITHER_BAYER, /* ordered dither matrix */
- SWS_DITHER_ED, /* error diffusion */
- SWS_DITHER_A_DITHER, /* arithmetic addition */
- SWS_DITHER_X_DITHER, /* arithmetic xor */
- SWS_DITHER_NB, /* not part of the ABI */
-} SwsDither;
-
-typedef enum SwsAlphaBlend {
- SWS_ALPHA_BLEND_NONE = 0,
- SWS_ALPHA_BLEND_UNIFORM,
- SWS_ALPHA_BLEND_CHECKERBOARD,
- SWS_ALPHA_BLEND_NB, /* not part of the ABI */
-} SwsAlphaBlend;
-
-typedef enum SwsFlags {
- /**
- * Scaler selection options. Only one may be active at a time.
- */
- SWS_FAST_BILINEAR = 1 << 0, ///< fast bilinear filtering
- SWS_BILINEAR = 1 << 1, ///< bilinear filtering
- SWS_BICUBIC = 1 << 2, ///< 2-tap cubic B-spline
- SWS_X = 1 << 3, ///< experimental
- SWS_POINT = 1 << 4, ///< nearest neighbor
- SWS_AREA = 1 << 5, ///< area averaging
- SWS_BICUBLIN = 1 << 6, ///< bicubic luma, bilinear chroma
- SWS_GAUSS = 1 << 7, ///< gaussian approximation
- SWS_SINC = 1 << 8, ///< unwindowed sinc
- SWS_LANCZOS = 1 << 9, ///< 3-tap sinc/sinc
- SWS_SPLINE = 1 << 10, ///< cubic Keys spline
-
- /**
- * Return an error on underspecified conversions. Without this flag,
- * unspecified fields are defaulted to sensible values.
- */
- SWS_STRICT = 1 << 11,
-
- /**
- * Emit verbose log of scaling parameters.
- */
- SWS_PRINT_INFO = 1 << 12,
-
- /**
- * Perform full chroma upsampling when upscaling to RGB.
- *
- * For example, when converting 50x50 yuv420p to 100x100 rgba, setting this flag
- * will scale the chroma plane from 25x25 to 100x100 (4:4:4), and then convert
- * the 100x100 yuv444p image to rgba in the final output step.
- *
- * Without this flag, the chroma plane is instead scaled to 50x100 (4:2:2),
- * with a single chroma sample being re-used for both of the horizontally
- * adjacent RGBA output pixels.
- */
- SWS_FULL_CHR_H_INT = 1 << 13,
-
- /**
- * Perform full chroma interpolation when downscaling RGB sources.
- *
- * For example, when converting a 100x100 rgba source to 50x50 yuv444p, setting
- * this flag will generate a 100x100 (4:4:4) chroma plane, which is then
- * downscaled to the required 50x50.
- *
- * Without this flag, the chroma plane is instead generated at 50x100 (dropping
- * every other pixel), before then being downscaled to the required 50x50
- * resolution.
- */
- SWS_FULL_CHR_H_INP = 1 << 14,
-
- /**
- * Force bit-exact output. This will prevent the use of platform-specific
- * optimizations that may lead to slight difference in rounding, in favor
- * of always maintaining exact bit output compatibility with the reference
- * C code.
- *
- * Note: It is recommended to set both of these flags simultaneously.
- */
- SWS_ACCURATE_RND = 1 << 18,
- SWS_BITEXACT = 1 << 19,
-
- /**
- * Deprecated flags.
- */
- SWS_DIRECT_BGR = 1 << 15, ///< This flag has no effect
- SWS_ERROR_DIFFUSION = 1 << 23, ///< Set `SwsContext.dither` instead
-} SwsFlags;
-
-typedef enum SwsIntent {
- SWS_INTENT_PERCEPTUAL = 0, ///< Perceptual tone mapping
- SWS_INTENT_RELATIVE_COLORIMETRIC = 1, ///< Relative colorimetric clipping
- SWS_INTENT_SATURATION = 2, ///< Saturation mapping
- SWS_INTENT_ABSOLUTE_COLORIMETRIC = 3, ///< Absolute colorimetric clipping
- SWS_INTENT_NB, ///< not part of the ABI
-} SwsIntent;
-
-/***********************************
- * Context creation and management *
- ***********************************/
-
-/**
- * Main external API structure. New fields can be added to the end with
- * minor version bumps. Removal, reordering and changes to existing fields
- * require a major version bump. sizeof(SwsContext) is not part of the ABI.
- */
-typedef struct SwsContext {
- const AVClass *av_class;
-
- /**
- * Private data of the user, can be used to carry app specific stuff.
- */
- void *opaque;
-
- /**
- * Bitmask of SWS_*. See `SwsFlags` for details.
- */
- unsigned flags;
-
- /**
- * Extra parameters for fine-tuning certain scalers.
- */
- double scaler_params[2];
-
- /**
- * How many threads to use for processing, or 0 for automatic selection.
- */
- int threads;
-
- /**
- * Dither mode.
- */
- SwsDither dither;
-
- /**
- * Alpha blending mode. See `SwsAlphaBlend` for details.
- */
- SwsAlphaBlend alpha_blend;
-
- /**
- * Use gamma correct scaling.
- */
- int gamma_flag;
-
- /**
- * Deprecated frame property overrides, for the legacy API only.
- *
- * Ignored by sws_scale_frame() when used in dynamic mode, in which
- * case all properties are instead taken from the frame directly.
- */
- int src_w, src_h; ///< Width and height of the source frame
- int dst_w, dst_h; ///< Width and height of the destination frame
- int src_format; ///< Source pixel format
- int dst_format; ///< Destination pixel format
- int src_range; ///< Source is full range
- int dst_range; ///< Destination is full range
- int src_v_chr_pos; ///< Source vertical chroma position in luma grid / 256
- int src_h_chr_pos; ///< Source horizontal chroma position
- int dst_v_chr_pos; ///< Destination vertical chroma position
- int dst_h_chr_pos; ///< Destination horizontal chroma position
-
- /**
- * Desired ICC intent for color space conversions.
- */
- int intent;
-
- /* Remember to add new fields to graph.c:opts_equal() */
-} SwsContext;
-
-/**
- * Allocate an empty SwsContext and set its fields to default values.
- */
-SwsContext *sws_alloc_context(void);
-
-/**
- * Free the context and everything associated with it, and write NULL
- * to the provided pointer.
- */
-void sws_free_context(SwsContext **ctx);
-
-/***************************
- * Supported frame formats *
- ***************************/
-
-/**
- * Test if a given pixel format is supported.
- *
- * @param output If 0, test if compatible with the source/input frame;
- * otherwise, with the destination/output frame.
- * @param format The format to check.
- *
- * @return A positive integer if supported, 0 otherwise.
- */
-int sws_test_format(enum AVPixelFormat format, int output);
-
-/**
- * Test if a given color space is supported.
- *
- * @param output If 0, test if compatible with the source/input frame;
- * otherwise, with the destination/output frame.
- * @param colorspace The colorspace to check.
- *
- * @return A positive integer if supported, 0 otherwise.
- */
-int sws_test_colorspace(enum AVColorSpace colorspace, int output);
-
-/**
- * Test if a given set of color primaries is supported.
- *
- * @param output If 0, test if compatible with the source/input frame;
- * otherwise, with the destination/output frame.
- * @param primaries The color primaries to check.
- *
- * @return A positive integer if supported, 0 otherwise.
- */
-int sws_test_primaries(enum AVColorPrimaries primaries, int output);
-
-/**
- * Test if a given color transfer function is supported.
- *
- * @param output If 0, test if compatible with the source/input frame;
- * otherwise, with the destination/output frame.
- * @param trc The color transfer function to check.
- *
- * @return A positive integer if supported, 0 otherwise.
- */
-int sws_test_transfer(enum AVColorTransferCharacteristic trc, int output);
-
-/**
- * Helper function to run all sws_test_* against a frame, as well as testing
- * the basic frame properties for sanity. Ignores irrelevant properties - for
- * example, AVColorSpace is not checked for RGB frames.
- */
-int sws_test_frame(const AVFrame *frame, int output);
-
-/**
- * Like `sws_scale_frame`, but without actually scaling. It will instead
- * merely initialize internal state that *would* be required to perform the
- * operation, as well as returning the correct error code for unsupported
- * frame combinations.
- *
- * @param ctx The scaling context.
- * @param dst The destination frame to consider.
- * @param src The source frame to consider.
- * @return 0 on success, a negative AVERROR code on failure.
- */
-int sws_frame_setup(SwsContext *ctx, const AVFrame *dst, const AVFrame *src);
-
-/********************
- * Main scaling API *
- ********************/
-
-/**
- * Check if a given conversion is a noop. Returns a positive integer if
- * no operation needs to be performed, 0 otherwise.
- */
-int sws_is_noop(const AVFrame *dst, const AVFrame *src);
-
-/**
- * Scale source data from `src` and write the output to `dst`.
- *
- * This function can be used directly on an allocated context, without setting
- * up any frame properties or calling `sws_init_context()`. Such usage is fully
- * dynamic and does not require reallocation if the frame properties change.
- *
- * Alternatively, this function can be called on a context that has been
- * explicitly initialized. However, this is provided only for backwards
- * compatibility. In this usage mode, all frame properties must be correctly
- * set at init time, and may no longer change after initialization.
- *
- * @param ctx The scaling context.
- * @param dst The destination frame. The data buffers may either be already
- * allocated by the caller or left clear, in which case they will
- * be allocated by the scaler. The latter may have performance
- * advantages - e.g. in certain cases some (or all) output planes
- * may be references to input planes, rather than copies.
- * @param src The source frame. If the data buffers are set to NULL, then
- * this function behaves identically to `sws_frame_setup`.
- * @return >= 0 on success, a negative AVERROR code on failure.
- */
-int sws_scale_frame(SwsContext *c, AVFrame *dst, const AVFrame *src);
-
-/*************************
- * Legacy (stateful) API *
- *************************/
+/* values for the flags, the stuff on the command line is different */
+#define SWS_FAST_BILINEAR 1
+#define SWS_BILINEAR 2
+#define SWS_BICUBIC 4
+#define SWS_X 8
+#define SWS_POINT 0x10
+#define SWS_AREA 0x20
+#define SWS_BICUBLIN 0x40
+#define SWS_GAUSS 0x80
+#define SWS_SINC 0x100
+#define SWS_LANCZOS 0x200
+#define SWS_SPLINE 0x400
#define SWS_SRC_V_CHR_DROP_MASK 0x30000
#define SWS_SRC_V_CHR_DROP_SHIFT 16
#define SWS_PARAM_DEFAULT 123456
+#define SWS_PRINT_INFO 0x1000
+
+//the following 3 flags are not completely implemented
+
+/**
+ * Perform full chroma upsampling when upscaling to RGB.
+ *
+ * For example, when converting 50x50 yuv420p to 100x100 rgba, setting this flag
+ * will scale the chroma plane from 25x25 to 100x100 (4:4:4), and then convert
+ * the 100x100 yuv444p image to rgba in the final output step.
+ *
+ * Without this flag, the chroma plane is instead scaled to 50x100 (4:2:2),
+ * with a single chroma sample being re-used for both of the horizontally
+ * adjacent RGBA output pixels.
+ */
+#define SWS_FULL_CHR_H_INT 0x2000
+
+/**
+ * Perform full chroma interpolation when downscaling RGB sources.
+ *
+ * For example, when converting a 100x100 rgba source to 50x50 yuv444p, setting
+ * this flag will generate a 100x100 (4:4:4) chroma plane, which is then
+ * downscaled to the required 50x50.
+ *
+ * Without this flag, the chroma plane is instead generated at 50x100 (dropping
+ * every other pixel), before then being downscaled to the required 50x50
+ * resolution.
+ */
+#define SWS_FULL_CHR_H_INP 0x4000
+
+#define SWS_DIRECT_BGR 0x8000
+
+#define SWS_ACCURATE_RND 0x40000
+#define SWS_BITEXACT 0x80000
+#define SWS_ERROR_DIFFUSION 0x800000
+
#define SWS_MAX_REDUCE_CUTOFF 0.002
#define SWS_CS_ITU709 1
@@ -399,6 +150,8 @@ typedef struct SwsFilter {
SwsVector *chrV;
} SwsFilter;
+struct SwsContext;
+
/**
* Return a positive value if pix_fmt is a supported input format, 0
* otherwise.
@@ -418,25 +171,27 @@ int sws_isSupportedOutput(enum AVPixelFormat pix_fmt);
*/
int sws_isSupportedEndiannessConversion(enum AVPixelFormat pix_fmt);
+/**
+ * Allocate an empty SwsContext. This must be filled and passed to
+ * sws_init_context(). For filling see AVOptions, options.c and
+ * sws_setColorspaceDetails().
+ */
+struct SwsContext *sws_alloc_context(void);
+
/**
* Initialize the swscaler context sws_context.
*
- * This function is considered deprecated, and provided only for backwards
- * compatibility with sws_scale() and sws_start_frame(). The preferred way to
- * use libswscale is to set all frame properties correctly and call
- * sws_scale_frame() directly, without explicitly initializing the context.
- *
* @return zero or positive value on success, a negative value on
* error
*/
av_warn_unused_result
-int sws_init_context(SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter);
+int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter);
/**
* Free the swscaler context swsContext.
* If swsContext is NULL, then does nothing.
*/
-void sws_freeContext(SwsContext *swsContext);
+void sws_freeContext(struct SwsContext *swsContext);
/**
* Allocate and return an SwsContext. You need it to perform
@@ -459,16 +214,15 @@ void sws_freeContext(SwsContext *swsContext);
* @note this function is to be removed after a saner alternative is
* written
*/
-SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat,
- int dstW, int dstH, enum AVPixelFormat dstFormat,
- int flags, SwsFilter *srcFilter,
- SwsFilter *dstFilter, const double *param);
+struct SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat,
+ int dstW, int dstH, enum AVPixelFormat dstFormat,
+ int flags, SwsFilter *srcFilter,
+ SwsFilter *dstFilter, const double *param);
/**
* Scale the image slice in srcSlice and put the resulting scaled
* slice in the image in dst. A slice is a sequence of consecutive
- * rows in an image. Requires a context that has been previously
- * been initialized with sws_init_context().
+ * rows in an image.
*
* Slices have to be provided in sequential order, either in
* top-bottom or bottom-top order. If slices are provided in
@@ -491,15 +245,31 @@ SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat,
* the destination image
* @return the height of the output slice
*/
-int sws_scale(SwsContext *c, const uint8_t *const srcSlice[],
+int sws_scale(struct SwsContext *c, const uint8_t *const srcSlice[],
const int srcStride[], int srcSliceY, int srcSliceH,
uint8_t *const dst[], const int dstStride[]);
+/**
+ * Scale source data from src and write the output to dst.
+ *
+ * This is merely a convenience wrapper around
+ * - sws_frame_start()
+ * - sws_send_slice(0, src->height)
+ * - sws_receive_slice(0, dst->height)
+ * - sws_frame_end()
+ *
+ * @param c The scaling context
+ * @param dst The destination frame. See documentation for sws_frame_start() for
+ * more details.
+ * @param src The source frame.
+ *
+ * @return 0 on success, a negative AVERROR code on failure
+ */
+int sws_scale_frame(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
+
/**
* Initialize the scaling process for a given pair of source/destination frames.
* Must be called before any calls to sws_send_slice() and sws_receive_slice().
- * Requires a context that has been previously been initialized with
- * sws_init_context().
*
* This function will retain references to src and dst, so they must both use
* refcounted buffers (if allocated by the caller, in case of dst).
@@ -522,7 +292,7 @@ int sws_scale(SwsContext *c, const uint8_t *const srcSlice[],
*
* @see sws_frame_end()
*/
-int sws_frame_start(SwsContext *c, AVFrame *dst, const AVFrame *src);
+int sws_frame_start(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
/**
* Finish the scaling process for a pair of source/destination frames previously
@@ -532,7 +302,7 @@ int sws_frame_start(SwsContext *c, AVFrame *dst, const AVFrame *src);
*
* @param c The scaling context
*/
-void sws_frame_end(SwsContext *c);
+void sws_frame_end(struct SwsContext *c);
/**
* Indicate that a horizontal slice of input data is available in the source
@@ -546,7 +316,7 @@ void sws_frame_end(SwsContext *c);
*
* @return a non-negative number on success, a negative AVERROR code on failure.
*/
-int sws_send_slice(SwsContext *c, unsigned int slice_start,
+int sws_send_slice(struct SwsContext *c, unsigned int slice_start,
unsigned int slice_height);
/**
@@ -566,19 +336,18 @@ int sws_send_slice(SwsContext *c, unsigned int slice_start,
* output can be produced
* another negative AVERROR code on other kinds of scaling failure
*/
-int sws_receive_slice(SwsContext *c, unsigned int slice_start,
+int sws_receive_slice(struct SwsContext *c, unsigned int slice_start,
unsigned int slice_height);
/**
- * Get the alignment required for slices. Requires a context that has been
- * previously been initialized with sws_init_context().
+ * Get the alignment required for slices
*
* @param c The scaling context
* @return alignment required for output slices requested with sws_receive_slice().
* Slice offsets and sizes passed to sws_receive_slice() must be
* multiples of the value returned from this function.
*/
-unsigned int sws_receive_slice_alignment(const SwsContext *c);
+unsigned int sws_receive_slice_alignment(const struct SwsContext *c);
/**
* @param c the scaling context
@@ -593,7 +362,7 @@ unsigned int sws_receive_slice_alignment(const SwsContext *c);
* @return A negative error code on error, non negative otherwise.
* If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported.
*/
-int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4],
+int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
int srcRange, const int table[4], int dstRange,
int brightness, int contrast, int saturation);
@@ -601,7 +370,7 @@ int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4],
* @return A negative error code on error, non negative otherwise.
* If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported.
*/
-int sws_getColorspaceDetails(SwsContext *c, int **inv_table,
+int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table,
int *srcRange, int **table, int *dstRange,
int *brightness, int *contrast, int *saturation);
@@ -646,11 +415,11 @@ void sws_freeFilter(SwsFilter *filter);
* Be warned that srcFilter and dstFilter are not checked, they
* are assumed to remain the same.
*/
-SwsContext *sws_getCachedContext(SwsContext *context, int srcW, int srcH,
- enum AVPixelFormat srcFormat, int dstW, int dstH,
- enum AVPixelFormat dstFormat, int flags,
- SwsFilter *srcFilter, SwsFilter *dstFilter,
- const double *param);
+struct SwsContext *sws_getCachedContext(struct SwsContext *context,
+ int srcW, int srcH, enum AVPixelFormat srcFormat,
+ int dstW, int dstH, enum AVPixelFormat dstFormat,
+ int flags, SwsFilter *srcFilter,
+ SwsFilter *dstFilter, const double *param);
/**
* Convert an 8-bit paletted frame into a frame with a color depth of 32 bits.
@@ -676,6 +445,14 @@ void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, int num_pix
*/
void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette);
+/**
+ * Get the AVClass for swsContext. It can be used in combination with
+ * AV_OPT_SEARCH_FAKE_OBJ for examining options.
+ *
+ * @see av_opt_find().
+ */
+const AVClass *sws_get_class(void);
+
/**
* @}
*/
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/version.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/version.h
index 148efd83..51eb013a 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/version.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/version.h
@@ -28,7 +28,7 @@
#include "version_major.h"
-#define LIBSWSCALE_VERSION_MINOR 0
+#define LIBSWSCALE_VERSION_MINOR 3
#define LIBSWSCALE_VERSION_MICRO 100
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
diff --git a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/version_major.h b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/version_major.h
index 0dc50792..fd259f95 100644
--- a/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/version_major.h
+++ b/CC_SDK/Environment/FFmpeg/include/Linux/Armv7/include/libswscale/version_major.h
@@ -24,7 +24,7 @@
* swscale version macros
*/
-#define LIBSWSCALE_VERSION_MAJOR 9
+#define LIBSWSCALE_VERSION_MAJOR 8
/**
* FF_API_* defines may be placed below to indicate public API that will be
diff --git a/CC_SDK/Environment/FFmpeg/src/CCMP3.cpp b/CC_SDK/Environment/FFmpeg/src/CCMP3.cpp
index 28ad8415..0ec0341c 100644
--- a/CC_SDK/Environment/FFmpeg/src/CCMP3.cpp
+++ b/CC_SDK/Environment/FFmpeg/src/CCMP3.cpp
@@ -8,14 +8,39 @@ CTL::MP3Header::MP3Header(const char *filename) {
CTL::MP3Header::~MP3Header() {
if (codec_ctx) {
+ AVPacket empty_pkt = {nullptr};
+ empty_pkt.data = nullptr;
+ empty_pkt.size = 0;
+ empty_pkt.stream_index = audio_stream_index;
+
+ // 刷新解码器
+ avcodec_send_packet(codec_ctx, &empty_pkt);
+ av_packet_unref(&empty_pkt);
+
+ // 处理剩余帧(可选)
+ AVFrame* frame = av_frame_alloc();
+ while (avcodec_receive_frame(codec_ctx, frame) >= 0) {
+ av_frame_unref(frame);
+ }
+ av_frame_free(&frame);
avcodec_free_context(&codec_ctx);
codec_ctx = nullptr;
}
- avformat_close_input(&format_ctx);
- format_ctx = nullptr;
+ if (format_ctx) {
+ avformat_close_input(&format_ctx);
+ format_ctx = nullptr;
+ }
}
void CTL::MP3Header::Init(const char *filename) {
+ if (format_ctx || codec_ctx || codec_params) {
+ avcodec_free_context(&codec_ctx);
+ codec_ctx = nullptr;
+ avformat_close_input(&format_ctx);
+ format_ctx = nullptr;
+ avcodec_parameters_free(&codec_params);
+ codec_params = nullptr;
+ }
FILE* file = nullptr;
#ifdef _WIN32
SetConsoleOutputCP(65001);
@@ -127,6 +152,10 @@ void CTL::MP3Header::Init(const char *filename) {
}
}
+void CTL::MP3Header::SetLevelLog(int level) {
+ av_log_set_level(level);
+}
+
AVFormatContext * CTL::MP3Header::GetFormatContext() const {
return format_ctx;
}
@@ -145,32 +174,21 @@ int CTL::MP3Header::GetAudioStreamIndex() const {
std::vector> CTL::MP3Header::ExtractMP3Frames() {
std::vector> allFrames;
-
- // 确保已初始化格式上下文
- if (!format_ctx) {
- std::cerr << "Format context not initialized" << std::endl;
- return allFrames;
- }
-
- // 分配AVPacket
AVPacket* packet = av_packet_alloc();
if (!packet) {
std::cerr << "Failed to allocate packet" << std::endl;
return allFrames;
}
- // 读取每一帧
while (av_read_frame(format_ctx, packet) >= 0) {
- // 只处理音频流
- if (packet->stream_index == audio_stream_index && packet->size > 0) {
- // 创建一个新的vector存储当前帧数据
+ if (packet->stream_index == audio_stream_index) {
std::vector frameData(packet->data, packet->data + packet->size);
allFrames.push_back(std::move(frameData));
}
- av_packet_unref(packet);
+ av_packet_unref(packet); // 仅在循环内释放
}
- av_packet_free(&packet);
+ av_packet_free(&packet); // 循环结束后统一释放
return allFrames;
}
@@ -192,6 +210,7 @@ int CTL::MP3Header::GetFrameLength(const int audio_stream_index) const {
}
av_seek_frame(format_ctx, audio_stream_index, 0, AVSEEK_FLAG_BACKWARD);
+ av_packet_unref(packet);
av_packet_free(&packet); // 新增:释放packet内存
return total_frames;
@@ -285,6 +304,7 @@ CTL::PCM CTL::MP3Frame::DecodeAudioFrames(const MP3Header* header,const PCM_Form
int out_linesize = 0;
if (av_samples_alloc(out_data, &out_linesize, format.Channels,
max_out_samples, out_sample_fmt, 0) < 0) {
+ av_freep(&out_data[0]);
swr_free(&swr);
continue;
}
@@ -308,7 +328,11 @@ CTL::PCM CTL::MP3Frame::DecodeAudioFrames(const MP3Header* header,const PCM_Form
// 释放重采样器和输出缓冲区
av_freep(&out_data[0]);
- swr_free(&swr);
+ swr_close(swr);
+ if (swr) {
+ swr_free(&swr); // 显式释放 SwrContext
+ swr = nullptr;
+ }
}
}
diff --git a/CC_SDK/Environment/FFmpeg/src/CCMP3.h b/CC_SDK/Environment/FFmpeg/src/CCMP3.h
index 3accfb98..69f64515 100644
--- a/CC_SDK/Environment/FFmpeg/src/CCMP3.h
+++ b/CC_SDK/Environment/FFmpeg/src/CCMP3.h
@@ -39,6 +39,7 @@ namespace CTL {
explicit MP3Header(const char* filename);
~MP3Header();
void Init(const char* filename);
+ static void SetLevelLog(int level);
[[nodiscard]] AVFormatContext* GetFormatContext() const;
[[nodiscard]] AVCodecParameters* GetCodecParameters() const;
[[nodiscard]] AVCodecContext* GetAVCodecContext() const;
diff --git a/CC_SDK/Environment/cppp-reiconv/CMakeLists.txt b/CC_SDK/Environment/cppp-reiconv/CMakeLists.txt
index 5e962677..c4ca3013 100644
--- a/CC_SDK/Environment/cppp-reiconv/CMakeLists.txt
+++ b/CC_SDK/Environment/cppp-reiconv/CMakeLists.txt
@@ -121,11 +121,24 @@ install(FILES "${output_includedir}/cppp/reiconv.hpp.inst"
RENAME "cppp/reiconv.hpp"
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
-file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+if (CMAKE_HOST_WIN32)
+ file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+ add_custom_command(TARGET libcppp-reiconv.shared POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ $
+ ${CMAKE_BINARY_DIR}/bin
+ COMMENT "Copying libcppp-reiconv.shared library to bin directory"
+ )
+else ()
+ set(BIN_DIR "${CMAKE_BINARY_DIR}/bin")
+ file(TO_NATIVE_PATH "${BIN_DIR}" NATIVE_BIN_DIR)
-add_custom_command(TARGET libcppp-reiconv.static POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- $
- ${CMAKE_BINARY_DIR}/bin
- COMMENT "Copying libcppp-reiconv.static library to bin directory"
-)
\ No newline at end of file
+ add_custom_command(TARGET libcppp-reiconv.shared POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E make_directory "${NATIVE_BIN_DIR}"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "$"
+ "${NATIVE_BIN_DIR}"
+ COMMENT "Copying library..."
+ VERBATIM
+ )
+endif ()
\ No newline at end of file
diff --git a/CC_SDK/Environment/libdatachannel/deps/plog/CMakeLists.txt b/CC_SDK/Environment/libdatachannel/deps/plog/CMakeLists.txt
index 57c1f518..3de1e68b 100644
--- a/CC_SDK/Environment/libdatachannel/deps/plog/CMakeLists.txt
+++ b/CC_SDK/Environment/libdatachannel/deps/plog/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.0...3.5)
project(plog VERSION 1.1.10 LANGUAGES CXX)
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/CMakeLists.txt b/CC_SDK/Environment/libdatachannel/deps/usrsctp/CMakeLists.txt
index 3fc4ec6a..16a2cd18 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/CMakeLists.txt
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/CMakeLists.txt
@@ -30,7 +30,7 @@
#
project(usrsctplib C)
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.0...3.5)
# Debug build type as default
if (NOT CMAKE_BUILD_TYPE)
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/programs/http_client_upcall.c b/CC_SDK/Environment/libdatachannel/deps/usrsctp/programs/http_client_upcall.c
index 04221c25..c3e57993 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/programs/http_client_upcall.c
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/programs/http_client_upcall.c
@@ -73,6 +73,10 @@ char request[512];
typedef char* caddr_t;
#endif
+#if defined (__OHOS__)
+
+#endif
+
#define BUFFERSIZE (1<<16)
static void handle_upcall(struct socket *sock, void *arg, int flgs)
@@ -112,6 +116,10 @@ static void handle_upcall(struct socket *sock, void *arg, int flgs)
} else {
#ifdef _WIN32
_write(_fileno(stdout), buf, (unsigned int)n);
+#elif __OHOS__
+ if (fwrite(buf, 1, n, stdout) != (size_t)n) {
+ perror("fwrite");
+ }
#else
if (write(fileno(stdout), buf, n) < 0) {
perror("write");
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/programs/programs_helper.h b/CC_SDK/Environment/libdatachannel/deps/usrsctp/programs/programs_helper.h
index 97a47101..866401c3 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/programs/programs_helper.h
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/programs/programs_helper.h
@@ -28,6 +28,9 @@
#ifndef __PROGRAMS_HELPER_H__
#define __PROGRAMS_HELPER_H__
+
+
+
#ifndef _WIN32
#define SCTP_PACKED __attribute__((packed))
#else
@@ -35,6 +38,13 @@
#define SCTP_PACKED
#endif
+#if defined (__OHOS__)
+#include "_bab_tpyes_t.h"
+#include "stdint.h"
+#include
+#include
+#endif
+
struct sctp_chunk_header {
uint8_t chunk_type; /* chunk type */
uint8_t chunk_flags; /* chunk flags */
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/_bab_tpyes_t.h b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/_bab_tpyes_t.h
index 8f8d2d81..7c3af8d7 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/_bab_tpyes_t.h
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/_bab_tpyes_t.h
@@ -4,6 +4,7 @@
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
+//typedef unsigned long size_t;
#pragma push_macro("u_long")
#undef u_long
typedef unsigned long u_long;
@@ -17,6 +18,29 @@ typedef unsigned long long u_int64;
#endif /* _BSDTYPES_DEFINED */
+#ifdef __OHOS__
+#include "sys/time.h"
+typedef char* caddr_t;
+#ifndef timersub
+#define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \
+ ((a)->tv_usec = (s)->tv_usec - (t)->tv_usec) < 0 && \
+ ((a)->tv_usec += 1000000, (a)->tv_sec--) )
+#endif // timersub
+
+#ifndef timercmp
+#define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \
+ (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec)
+#endif // timercmp
+
+#ifndef timeradd
+#define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \
+ ((a)->tv_usec = (s)->tv_usec + (t)->tv_usec) >= 1000000 && \
+ ((a)->tv_usec -= 1000000, (a)->tv_sec++) )
+#endif // timeradd
+
+#endif // __OHOS__
+
+
#if defined (__LP64__) && defined (u_long)
typedef unsigned __LONG32 u_long;
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_asconf.c b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_asconf.c
index 5d9edd3e..7a6faba6 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_asconf.c
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_asconf.c
@@ -1,37 +1,3 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
- * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved.
- * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * a) Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * b) Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the distribution.
- *
- * c) Neither the name of Cisco Systems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
#include
#include
#include
@@ -42,35 +8,14 @@
#include
#include
-/*
- * debug flags:
- * SCTP_DEBUG_ASCONF1: protocol info, general info and errors
- * SCTP_DEBUG_ASCONF2: detailed info
- */
-/*
- * RFC 5061
- *
- * An ASCONF parameter queue exists per asoc which holds the pending address
- * operations. Lists are updated upon receipt of ASCONF-ACK.
- *
- * A restricted_addrs list exists per assoc to hold local addresses that are
- * not (yet) usable by the assoc as a source address. These addresses are
- * either pending an ASCONF operation (and exist on the ASCONF parameter
- * queue), or they are permanently restricted (the peer has returned an
- * ERROR indication to an ASCONF(ADD), or the peer does not support ASCONF).
- *
- * Deleted addresses are always immediately removed from the lists as they will
- * (shortly) no longer exist in the kernel. We send ASCONFs as a courtesy,
- * only if allowed.
- */
-/*
- * ASCONF parameter processing.
- * response_required: set if a reply is required (eg. SUCCESS_REPORT).
- * returns a mbuf to an "error" response parameter or NULL/"success" if ok.
- * FIX: allocating this many mbufs on the fly is pretty inefficient...
- */
+#if defined (__OHOS__)
+#include "_bab_tpyes_t.h"
+#include
+#include "user_queue.h" // 确保 TAILQ_HEAD 等宏被正确定义
+#endif
+
static struct mbuf *
sctp_asconf_success_response(uint32_t id)
{
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_indata.c b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_indata.c
index 91980d3a..f38d9036 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_indata.c
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_indata.c
@@ -53,6 +53,11 @@
#if defined(__FreeBSD__) && !defined(__Userspace__)
#include
#endif
+
+#if defined (__OHOS__)
+#include "../_bab_tpyes_t.h"
+#endif
+
/*
* NOTES: On the outbound side of things I need to check the sack timer to
* see if I should generate a sack into the chunk queue (if I have data to
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_os_userspace.h b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_os_userspace.h
index 493ae026..ef7b78b6 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_os_userspace.h
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_os_userspace.h
@@ -41,6 +41,7 @@
* We will place them in userspace stack build directory.
*/
+
#include
#if defined(_WIN32)
@@ -298,6 +299,16 @@ typedef pthread_cond_t userland_cond_t;
typedef pthread_t userland_thread_t;
#endif
+#if defined (__OHOS__)
+#define IFNAMSIZ 64
+#include "_bab_tpyes_t.h"
+#include "stdint.h"
+#if !defined(_WIN32) && !defined(__native_client__)
+#include // 确保在此处包含
+#endif
+#include
+#endif
+
#if defined(_WIN32) || defined(__native_client__)
#define IFNAMSIZ 64
@@ -360,11 +371,16 @@ struct udphdr {
uint16_t uh_sum;
};
+#if !defined(__OHOS__)
struct iovec {
size_t len;
char *buf;
};
+#define iov_base buf
+#define iov_len len
+#endif
+
#define iov_base buf
#define iov_len len
@@ -461,7 +477,7 @@ struct sx {int dummy;};
* userspace as well? */
/* on FreeBSD, this results in a redefintion of struct route */
/* #include */
-#if !defined(_WIN32) && !defined(__native_client__)
+#if !defined(_WIN32) && !defined(__native_client__) && !defined(__OHOS__)
#include
#include
#include
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_output.c b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_output.c
index 85b78864..1e8a49ad 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_output.c
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_output.c
@@ -80,6 +80,10 @@
#endif
#endif
+#if defined (__OHOS__)
+#include "../_bab_tpyes_t.h"
+#endif
+
#define SCTP_MAX_GAPS_INARRAY 4
struct sack_track {
uint8_t right_edge; /* mergable on the right edge */
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_pcb.h b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_pcb.h
index 5298afc2..92e717c9 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_pcb.h
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_pcb.h
@@ -50,6 +50,10 @@ LIST_HEAD(sctp_ifalist, sctp_ifa);
TAILQ_HEAD(sctp_readhead, sctp_queued_to_read);
TAILQ_HEAD(sctp_streamhead, sctp_stream_queue_pending);
+#if defined (__OHOS__)
+#include "sctp_os_userspace.h"
+#endif
+
#include
#include
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_timer.c b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_timer.c
index 497f2f0b..f9d65a50 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_timer.c
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/netinet/sctp_timer.c
@@ -57,6 +57,10 @@
#endif
#endif
+#if defined (__OHOS__)
+#include "../_bab_tpyes_t.h"
+#endif
+
void
sctp_audit_retranmission_queue(struct sctp_association *asoc)
{
@@ -622,11 +626,18 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb,
}
if (stcb->asoc.prsctp_supported && PR_SCTP_TTL_ENABLED(chk->flags)) {
/* Is it expired? */
-#if !(defined(__FreeBSD__) && !defined(__Userspace__))
- if (timercmp(&now, &chk->rec.data.timetodrop, >)) {
+#if defined (__OHOS__) && 0
+ if ((now.tv_sec > chk->rec.data.timetodrop.tv_sec) ||
+ (now.tv_sec == chk->rec.data.timetodrop.tv_sec &&
+ now.tv_usec > chk->rec.data.timetodrop.tv_usec)) {
#else
- if (timevalcmp(&now, &chk->rec.data.timetodrop, >)) {
+ #if !(defined(__FreeBSD__) && !defined(__Userspace__))
+ if (timercmp(&now, &chk->rec.data.timetodrop, >)) {
+ #else
+ if (timevalcmp(&now, &chk->rec.data.timetodrop, >)) {
+ #endif
#endif
+
/* Yes so drop it */
if (chk->data) {
(void)sctp_release_pr_sctp_chunk(stcb,
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/user_malloc.h b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/user_malloc.h
index c588e094..6996e6cc 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/user_malloc.h
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/user_malloc.h
@@ -52,6 +52,10 @@
#include
#endif
+#if defined (__OHOS__)
+#include "_bab_tpyes_t.h"
+#endif
+
#define MINALLOCSIZE UMA_SMALLEST_UNIT
/*
diff --git a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/user_socketvar.h b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/user_socketvar.h
index e8eccc7f..d80fe5c6 100644
--- a/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/user_socketvar.h
+++ b/CC_SDK/Environment/libdatachannel/deps/usrsctp/usrsctplib/user_socketvar.h
@@ -33,11 +33,20 @@
#ifndef _USER_SOCKETVAR_H_
#define _USER_SOCKETVAR_H_
+
+
#if defined(__APPLE__)
#include
#include
#endif
+#if defined (__OHOS__)
+#include "_bab_tpyes_t.h"
+#include "netinet/sctp_os_userspace.h"
+#include "user_malloc.h"
+#include "user_queue.h"
+#endif
+
/* #include */ /*__Userspace__ alternative?*/ /* for struct selinfo */
/* #include was 0 byte file */
/* #include was 0 byte file */
diff --git a/CC_SDK/Environment/libdatachannel/src/impl/utils.cpp b/CC_SDK/Environment/libdatachannel/src/impl/utils.cpp
index ea5f10d4..4b25b6f0 100644
--- a/CC_SDK/Environment/libdatachannel/src/impl/utils.cpp
+++ b/CC_SDK/Environment/libdatachannel/src/impl/utils.cpp
@@ -155,7 +155,7 @@ void thread_set_name_self(const char *name) {
HMODULE kernel32 = GetModuleHandleW(L"kernel32.dll");
if (kernel32 != nullptr) {
auto pSetThreadDescription =
- (pfnSetThreadDescription)GetProcAddress(kernel32, "SetThreadDescription");
+ reinterpret_cast(GetProcAddress(kernel32, "SetThreadDescription"));
if (pSetThreadDescription != nullptr) {
pSetThreadDescription(GetCurrentThread(), wname.c_str());
}
diff --git a/CC_SDK/Include/CCServlet/CCHttpClient.h b/CC_SDK/Include/CCServlet/CCHttpClient.h
index ec07532a..e31386c0 100644
--- a/CC_SDK/Include/CCServlet/CCHttpClient.h
+++ b/CC_SDK/Include/CCServlet/CCHttpClient.h
@@ -3,7 +3,7 @@
#pragma once
// 包含必要的头文件
-#include "CCSocket.h"
+#include "../Module/Comm/Socket/CCSocket.h"
#include "CCJSONObject.h"
#include "CCString.h"
#include
diff --git a/CC_SDK/Include/CCServlet/CCRequest.h b/CC_SDK/Include/CCServlet/CCRequest.h
index 11362c47..f579525b 100644
--- a/CC_SDK/Include/CCServlet/CCRequest.h
+++ b/CC_SDK/Include/CCServlet/CCRequest.h
@@ -19,7 +19,7 @@
// 定义请求和响应的缓冲区大小以及文件缓冲区的最大值
#define CC_R_BUFFER_SIZE 1
#define CC_S_BUFFER_SIZE 1024
-// #define File_Buffer_Max 4096
+#define File_Buffer_Max 4096
namespace CTL {
// 请求数据结构体,用于存储HTTP请求的相关信息
@@ -51,7 +51,7 @@ namespace CTL {
CORS* cors = nullptr;
// SSL对象指针
SSL* ssl = nullptr;
- int File_Buffer_Max = 4096;
+ // int File_Buffer_Max = 4096;
bool IsFileUploadSize = true;
public:
/**
@@ -90,7 +90,7 @@ namespace CTL {
* 获取JSON对象
* @return JSON对象
*/
- CTL::JSONObject GetJson();
+ CTL::JSONObject GetJson() const;
/**
* 获取媒体文件
diff --git a/CC_SDK/Include/CCServlet/CCResponse.h b/CC_SDK/Include/CCServlet/CCResponse.h
index 67003bce..cd3ec702 100644
--- a/CC_SDK/Include/CCServlet/CCResponse.h
+++ b/CC_SDK/Include/CCServlet/CCResponse.h
@@ -147,7 +147,7 @@ namespace CTL {
* @param size 缓冲区大小。
* @return 如果数据发送成功返回 true,否则返回 false。
*/
- bool WriteSSLResponse(SSL* ssl, const char* buffer, size_t size);
+ int WriteSSLResponse(SSL* ssl, const char* buffer, size_t size);
private:
/// 文件头信息映射表。
@@ -164,6 +164,8 @@ namespace CTL {
/// SSL 对象。
SSL* ssl = nullptr;
+
+ bool m_status = false;
};
}
diff --git a/CC_SDK/Include/CCServlet/CCWebServlet.h b/CC_SDK/Include/CCServlet/CCWebServlet.h
index 1f5bcb5d..5942704d 100644
--- a/CC_SDK/Include/CCServlet/CCWebServlet.h
+++ b/CC_SDK/Include/CCServlet/CCWebServlet.h
@@ -63,6 +63,7 @@ namespace CTL {
// 设置请求头缓冲区大小
unsigned int ReadHBuff = 4096;
IPVX IPvx = IPV4;
+ bool source_map_ = false;
public:
// 构造函数
WebServlet();
@@ -73,7 +74,7 @@ namespace CTL {
// 初始化服务器
bool Init(const String& address,int Port,bool ChokeUp = true);
// 设置 WebSocket 配置
- bool SetWebSocket(const WebSocket& ws);
+ bool SetWebSocket(const WebSocketBind& bind);
// 初始化 SSL 配置
bool InitSSL();
// 加载 SSL 证书
@@ -82,10 +83,8 @@ namespace CTL {
bool LoadSSLKey(const CTL::String &KeyPath, const CTL::String &Passwd) const;
// 加载 SSL 客户端验证证书
bool LoadSSLVerify(const CTL::String& CA_Path) const;
- // 运行服务器,支持 WebSocket
- int Running(const WebSocket& ws,bool InitStaticFlag = true);
// 运行服务器
- int Running(bool InitStaticFlag = true);
+ int Running(bool Ws = false,bool InitStaticFlag = true);
// 停止服务器
void Stop();
// 添加静态资源路径 请填写相对路径
@@ -97,7 +96,7 @@ namespace CTL {
// 设置 CORS 配置
void SetWebCORS(const CORS& cors);
// 获取 WebSocket 对象
- WebSocket& GetWebSocket();
+ WebSocket* GetWebSocket();
// 设置请求超时时间
void SetTimeout(unsigned long MS);
// 设置接收数据头缓冲区大小
@@ -110,6 +109,7 @@ namespace CTL {
void InitStatic();
// 设置最大文件上传数量
static void SetMaxConcurrentFileUploads(int Num);
+ void SetSourceMap(bool flag);
private:
// 打印消息
void MessagePrint(const CTL::String& str);
@@ -142,12 +142,7 @@ namespace CTL {
void ErrorHandling(CTL::Socket& client,Request& request,SSL* ssl = nullptr);
String FormatRequest(const String& str);
};
- // 实现 Running 成员函数,初始化 WebSocket 并设置 WebSocketFlag 标志,然后调用 Running() 启动服务器
- inline int WebServlet::Running(const WebSocket& ws,bool InitStaticFlag) {
- m_WebSocket.Init(ws,this->ssl_ctx);
- WebSocketFlag = true;
- return Running(InitStaticFlag);
- }
+
}
#endif
diff --git a/CC_SDK/Include/DataModule/NetSqlite.h b/CC_SDK/Include/DataModule/NetSqlite.h
index 6f543784..8117b6e1 100644
--- a/CC_SDK/Include/DataModule/NetSqlite.h
+++ b/CC_SDK/Include/DataModule/NetSqlite.h
@@ -29,7 +29,6 @@ namespace CTL {
//--------------------------------------------------------------------------------------------------------------
SQLite3 m_Sqlite;
WebServlet m_Socket;
- WebSocket m_WebSocket;
CTL::Map m_Sqlite_List_User;
bool Flag = false;
String m_User = "";
diff --git a/CC_SDK/Include/Module/Comm/CCEpoll.h b/CC_SDK/Include/Module/Comm/CCEpoll.h
index 5ec176ae..abcd7815 100644
--- a/CC_SDK/Include/Module/Comm/CCEpoll.h
+++ b/CC_SDK/Include/Module/Comm/CCEpoll.h
@@ -1,7 +1,7 @@
#ifndef CC_EPOLL_H_
#define CC_EPOLL_H_
#define MAX_EVENTS 1024
-#include "CCSocket.h"
+#include "Socket/CCSocket.h"
diff --git a/CC_SDK/Include/Module/Comm/CCNetwork.h b/CC_SDK/Include/Module/Comm/CCNetwork.h
index 5b4061f6..352a0d66 100644
--- a/CC_SDK/Include/Module/Comm/CCNetwork.h
+++ b/CC_SDK/Include/Module/Comm/CCNetwork.h
@@ -1,7 +1,7 @@
#ifndef CC_NETWORK_H
#define CC_NETWORK_H
-#include "CCSocket.h"
+#include "Socket/CCSocket.h"
#include "CC.h"
/**
diff --git a/CC_SDK/Include/Module/Comm/WebRTC/CCWebRTC.h b/CC_SDK/Include/Module/Comm/WebRTC/CCWebRTC.h
index bae1c0f6..01531151 100644
--- a/CC_SDK/Include/Module/Comm/WebRTC/CCWebRTC.h
+++ b/CC_SDK/Include/Module/Comm/WebRTC/CCWebRTC.h
@@ -1,21 +1,105 @@
#ifndef CC_WEBRTC_H
#define CC_WEBRTC_H
-#include "CCWCTool.h"
+#include
+#include
+#include
+#include "CCByteArray.h"
+#include