File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ extern "C" {
4949#endif // if AVCPP_HAS_AVFORMAT
5050// AVBuffer API switch to size_t
5151#define AVCPP_API_AVBUFFER_SIZE_T (AVCPP_AVUTIL_VERSION_MAJOR >= 57)
52+ // AVSideDataDescriptor exisits
53+ #define AVCPP_API_HAS_AVSIDEDATADESCRIPTOR (AVCPP_AVUTIL_VERSION_INT >= AV_VERSION_INT(59, 10, 100))
5254
5355#if defined(__ICL ) || defined (__INTEL_COMPILER )
5456# define FF_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:1478))
Original file line number Diff line number Diff line change @@ -893,6 +893,7 @@ Dictionary FrameSideData::metadata() const noexcept
893893 return m_raw ? Dictionary{m_raw->metadata , false } : Dictionary{};
894894}
895895
896+ #if AVCPP_API_HAS_AVSIDEDATADESCRIPTOR
896897std::optional<AVSideDataDescriptor> FrameSideData::descriptor () const noexcept
897898{
898899 return m_raw ? descriptor (m_raw->type ) : std::nullopt ;
@@ -903,6 +904,7 @@ std::optional<AVSideDataDescriptor> FrameSideData::descriptor(AVFrameSideDataTyp
903904 auto desc = av_frame_side_data_desc (type);
904905 return desc ? std::optional (*desc) : std::nullopt ;
905906}
907+ #endif
906908
907909bool FrameSideData::empty () const noexcept
908910{
Original file line number Diff line number Diff line change @@ -53,10 +53,12 @@ class FrameSideData : public FFWrapperPtr<AVFrameSideData>
5353 */
5454 Dictionary metadata () const noexcept ;
5555
56- std::optional<AVSideDataDescriptor> descriptor () const noexcept ;
57-
5856 static std::string_view name (AVFrameSideDataType type) noexcept ;
57+
58+ #if AVCPP_API_HAS_AVSIDEDATADESCRIPTOR
59+ std::optional<AVSideDataDescriptor> descriptor () const noexcept ;
5960 static std::optional<AVSideDataDescriptor> descriptor (AVFrameSideDataType type) noexcept ;
61+ #endif // AVCPP_API_HAS_AVSIDEDATADESCRIPTOR
6062
6163 bool empty () const noexcept ;
6264 operator bool () const noexcept ;
You can’t perform that action at this time.
0 commit comments