Browse Source

Updated FFmpeg.

master
Christopher Snowhill 2 years ago
parent
commit
aa7cd57b19
61 changed files with 7040 additions and 1230 deletions
  1. +3
    -3
      Scripts/ffmpeg-build.sh
  2. +36
    -0
      ThirdParty/ffmpeg/include/libavcodec/ac3_parser.h
  3. +37
    -0
      ThirdParty/ffmpeg/include/libavcodec/adts_parser.h
  4. +284
    -677
      ThirdParty/ffmpeg/include/libavcodec/avcodec.h
  5. +0
    -109
      ThirdParty/ffmpeg/include/libavcodec/vaapi.h
  6. +0
    -77
      ThirdParty/ffmpeg/include/libavcodec/vdpau.h
  7. +10
    -122
      ThirdParty/ffmpeg/include/libavcodec/version.h
  8. +63
    -75
      ThirdParty/ffmpeg/include/libavformat/avformat.h
  9. +2
    -8
      ThirdParty/ffmpeg/include/libavformat/avio.h
  10. +16
    -31
      ThirdParty/ffmpeg/include/libavformat/version.h
  11. +7
    -7
      ThirdParty/ffmpeg/include/libavutil/attributes.h
  12. +1
    -1
      ThirdParty/ffmpeg/include/libavutil/avconfig.h
  13. +31
    -1
      ThirdParty/ffmpeg/include/libavutil/common.h
  14. +0
    -4
      ThirdParty/ffmpeg/include/libavutil/crc.h
  15. +1
    -1
      ThirdParty/ffmpeg/include/libavutil/ffversion.h
  16. +41
    -3
      ThirdParty/ffmpeg/include/libavutil/frame.h
  17. +1
    -1
      ThirdParty/ffmpeg/include/libavutil/hmac.h
  18. +3
    -1
      ThirdParty/ffmpeg/include/libavutil/hwcontext.h
  19. +1
    -0
      ThirdParty/ffmpeg/include/libavutil/hwcontext_d3d11va.h
  20. +36
    -0
      ThirdParty/ffmpeg/include/libavutil/hwcontext_mediacodec.h
  21. +1
    -6
      ThirdParty/ffmpeg/include/libavutil/intreadwrite.h
  22. +0
    -14
      ThirdParty/ffmpeg/include/libavutil/log.h
  23. +20
    -19
      ThirdParty/ffmpeg/include/libavutil/mem.h
  24. +0
    -3
      ThirdParty/ffmpeg/include/libavutil/opt.h
  25. +0
    -5
      ThirdParty/ffmpeg/include/libavutil/pixdesc.h
  26. +10
    -21
      ThirdParty/ffmpeg/include/libavutil/pixfmt.h
  27. +24
    -0
      ThirdParty/ffmpeg/include/libavutil/stereo3d.h
  28. +12
    -25
      ThirdParty/ffmpeg/include/libavutil/version.h
  29. +3
    -3
      ThirdParty/ffmpeg/include/libswresample/version.h
  30. BIN
      ThirdParty/ffmpeg/lib/libavcodec.a
  31. BIN
      ThirdParty/ffmpeg/lib/libavformat.a
  32. BIN
      ThirdParty/ffmpeg/lib/libavutil.a
  33. BIN
      ThirdParty/ffmpeg/lib/libswresample.a
  34. +3
    -3
      ThirdParty/ffmpeg/lib/pkgconfig/libavcodec.pc
  35. +3
    -3
      ThirdParty/ffmpeg/lib/pkgconfig/libavformat.pc
  36. +2
    -2
      ThirdParty/ffmpeg/lib/pkgconfig/libavutil.pc
  37. +5
    -5
      ThirdParty/ffmpeg/lib/pkgconfig/libswresample.pc
  38. +50
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/Makefile
  39. +23
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/README
  40. +180
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/avio_dir_cmd.c
  41. +136
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/avio_reading.c
  42. +187
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/decode_audio.c
  43. +188
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/decode_video.c
  44. +393
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/demuxing_decoding.c
  45. +241
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/encode_audio.c
  46. +199
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/encode_video.c
  47. +180
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/extract_mvs.c
  48. +365
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/filter_audio.c
  49. +296
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/filtering_audio.c
  50. +292
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/filtering_video.c
  51. +157
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/http_multiclient.c
  52. +256
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/hw_decode.c
  53. +56
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/metadata.c
  54. +670
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/muxing.c
  55. +274
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/qsvdec.c
  56. +193
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/remuxing.c
  57. +214
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/resampling_audio.c
  58. +140
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/scaling_video.c
  59. +847
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/transcode_aac.c
  60. +622
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/transcoding.c
  61. +225
    -0
      ThirdParty/ffmpeg/share/ffmpeg/examples/vaapi_encode.c

+ 3
- 3
Scripts/ffmpeg-build.sh View File

@@ -1,5 +1,5 @@
# This is the commands used to build the ffmpeg libs provided here
./configure --extra-cflags="-fPIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.6" --extra-ldflags="-mmacosx-version-min=10.6"\
./configure --extra-cflags="-fPIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.8" --extra-ldflags="-mmacosx-version-min=10.8"\
--enable-static --disable-shared --prefix=$HOME/Source/Repos/cog/ThirdParty/ffmpeg\
--enable-pic --enable-gpl --disable-doc --disable-ffplay\
--disable-ffprobe --disable-ffserver --disable-avdevice --disable-ffmpeg\
@@ -8,8 +8,8 @@
--disable-dxva2 --disable-everything --enable-hwaccels\
--enable-swresample\
--enable-parser=ac3,mpegaudio,xma,vorbis,opus\
--enable-demuxer=ac3,asf,xwma,mov,oma,ogg,tak,dsf,wav,aac,dts,dtshd,mp3,bink,flac,msf,xmv,caf,ape,smacker\
--enable-decoder=ac3,wmapro,wmav1,wmav2,wmavoice,wmalossless,xma1,xma2,dca,tak,dsd_lsbf,dsd_lsbf_planar,dsd_mbf,dsd_msbf_planar,aac,atrac3,atrac3p,mp3float,bink,binkaudio_dct,binkaudio_rdft,flac,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,vorbis,ape,adpcm_ima_qt,smackaud,opus\
--enable-demuxer=ac3,asf,xwma,mov,oma,ogg,tak,dsf,wav,aac,dts,dtshd,mp3,bink,flac,msf,xmv,caf,ape,smacker,pcm_s8,spdif,mpc,mpc8,rm\
--enable-decoder=ac3,wmapro,wmav1,wmav2,wmavoice,wmalossless,xma1,xma2,dca,tak,dsd_lsbf,dsd_lsbf_planar,dsd_mbf,dsd_msbf_planar,aac,atrac3,atrac3p,mp3float,bink,binkaudio_dct,binkaudio_rdft,flac,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,vorbis,ape,adpcm_ima_qt,smackaud,opus,pcm_s8,pcm_s8_planar,mpc7,mpc8,cook\
--disable-parser=mpeg4video,h263\
--disable-decoder=mpeg2video,h263,h264,mpeg1video,mpeg2video,mpeg4,hevc,vp9\
--disable-version3


+ 36
- 0
ThirdParty/ffmpeg/include/libavcodec/ac3_parser.h View File

@@ -0,0 +1,36 @@
/*
* AC-3 parser prototypes
* Copyright (c) 2003 Fabrice Bellard
* Copyright (c) 2003 Michael Niedermayer
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef AVCODEC_AC3_PARSER_H
#define AVCODEC_AC3_PARSER_H

#include <stddef.h>
#include <stdint.h>

/**
* Extract the bitstream ID and the frame size from AC-3 data.
*/
int av_ac3_parse_header(const uint8_t *buf, size_t size,
uint8_t *bitstream_id, uint16_t *frame_size);


#endif /* AVCODEC_AC3_PARSER_H */

+ 37
- 0
ThirdParty/ffmpeg/include/libavcodec/adts_parser.h View File

@@ -0,0 +1,37 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef AVCODEC_ADTS_PARSER_H
#define AVCODEC_ADTS_PARSER_H

#include <stddef.h>
#include <stdint.h>

#define AV_AAC_ADTS_HEADER_SIZE 7

/**
* Extract the number of samples and frames from AAC data.
* @param[in] buf pointer to AAC data buffer
* @param[out] samples Pointer to where number of samples is written
* @param[out] frames Pointer to where number of frames is written
* @return Returns 0 on success, error code on failure.
*/
int av_adts_header_parse(const uint8_t *buf, uint32_t *samples,
uint8_t *frames);

#endif /* AVCODEC_ADTS_PARSER_H */

+ 284
- 677
ThirdParty/ffmpeg/include/libavcodec/avcodec.h
File diff suppressed because it is too large
View File


+ 0
- 109
ThirdParty/ffmpeg/include/libavcodec/vaapi.h View File

@@ -77,115 +77,6 @@ struct attribute_deprecated vaapi_context {
* - decoding: Set by user
*/
uint32_t context_id;

#if FF_API_VAAPI_CONTEXT
/**
* VAPictureParameterBuffer ID
*
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
uint32_t pic_param_buf_id;

/**
* VAIQMatrixBuffer ID
*
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
uint32_t iq_matrix_buf_id;

/**
* VABitPlaneBuffer ID (for VC-1 decoding)
*
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
uint32_t bitplane_buf_id;

/**
* Slice parameter/data buffer IDs
*
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
uint32_t *slice_buf_ids;

/**
* Number of effective slice buffer IDs to send to the HW
*
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
unsigned int n_slice_buf_ids;

/**
* Size of pre-allocated slice_buf_ids
*
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
unsigned int slice_buf_ids_alloc;

/**
* Pointer to VASliceParameterBuffers
*
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
void *slice_params;

/**
* Size of a VASliceParameterBuffer element
*
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
unsigned int slice_param_size;

/**
* Size of pre-allocated slice_params
*
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
unsigned int slice_params_alloc;

/**
* Number of slices currently filled in
*
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
unsigned int slice_count;

/**
* Pointer to slice data buffer base
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
const uint8_t *slice_data;

/**
* Current size of slice data
*
* - encoding: unused
* - decoding: Set by libavcodec
*/
attribute_deprecated
uint32_t slice_data_size;
#endif
};

/* @} */


+ 0
- 77
ThirdParty/ffmpeg/include/libavcodec/vdpau.h View File

@@ -57,15 +57,6 @@
#include "avcodec.h"
#include "version.h"

#if FF_API_BUFS_VDPAU
union AVVDPAUPictureInfo {
VdpPictureInfoH264 h264;
VdpPictureInfoMPEG1Or2 mpeg;
VdpPictureInfoVC1 vc1;
VdpPictureInfoMPEG4Part2 mpeg4;
};
#endif

struct AVCodecContext;
struct AVFrame;

@@ -102,40 +93,6 @@ typedef struct AVVDPAUContext {
*/
VdpDecoderRender *render;

#if FF_API_BUFS_VDPAU
/**
* VDPAU picture information
*
* Set by libavcodec.
*/
attribute_deprecated
union AVVDPAUPictureInfo info;

/**
* Allocated size of the bitstream_buffers table.
*
* Set by libavcodec.
*/
attribute_deprecated
int bitstream_buffers_allocated;

/**
* Useful bitstream buffers in the bitstream buffers table.
*
* Set by libavcodec.
*/
attribute_deprecated
int bitstream_buffers_used;

/**
* Table of bitstream buffers.
* The user is responsible for freeing this buffer using av_freep().
*
* Set by libavcodec.
*/
attribute_deprecated
VdpBitstreamBuffer *bitstream_buffers;
#endif
AVVDPAU_Render2 render2;
} AVVDPAUContext;

@@ -214,40 +171,6 @@ attribute_deprecated
int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile);
#endif

#if FF_API_CAP_VDPAU
/** @brief The videoSurface is used for rendering. */
#define FF_VDPAU_STATE_USED_FOR_RENDER 1

/**
* @brief The videoSurface is needed for reference/prediction.
* The codec manipulates this.
*/
#define FF_VDPAU_STATE_USED_FOR_REFERENCE 2

/**
* @brief This structure is used as a callback between the FFmpeg
* decoder (vd_) and presentation (vo_) module.
* This is used for defining a video frame containing surface,
* picture parameter, bitstream information etc which are passed
* between the FFmpeg decoder and its clients.
*/
struct vdpau_render_state {
VdpVideoSurface surface; ///< Used as rendered surface, never changed.

int state; ///< Holds FF_VDPAU_STATE_* values.

/** picture parameter information for all supported codecs */
union AVVDPAUPictureInfo info;

/** Describe size/location of the compressed video data.
Set to 0 when freeing bitstream_buffers. */
int bitstream_buffers_allocated;
int bitstream_buffers_used;
/** The user is responsible for freeing this buffer using av_freep(). */
VdpBitstreamBuffer *bitstream_buffers;
};
#endif

/* @}*/

#endif /* AVCODEC_VDPAU_H */

+ 10
- 122
ThirdParty/ffmpeg/include/libavcodec/version.h View File

@@ -27,9 +27,9 @@

#include "libavutil/version.h"

#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 106
#define LIBAVCODEC_VERSION_MICRO 104
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 8
#define LIBAVCODEC_VERSION_MICRO 100

#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
@@ -51,136 +51,18 @@
* at once through the bump. This improves the git bisect-ability of the change.
*/

#ifndef FF_API_VIMA_DECODER
#define FF_API_VIMA_DECODER (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_AUDIO_CONVERT
#define FF_API_AUDIO_CONVERT (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_AVCODEC_RESAMPLE
#define FF_API_AVCODEC_RESAMPLE FF_API_AUDIO_CONVERT
#endif
#ifndef FF_API_MISSING_SAMPLE
#define FF_API_MISSING_SAMPLE (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_LOWRES
#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_CAP_VDPAU
#define FF_API_CAP_VDPAU (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_BUFS_VDPAU
#define FF_API_BUFS_VDPAU (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_VOXWARE
#define FF_API_VOXWARE (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_SET_DIMENSIONS
#define FF_API_SET_DIMENSIONS (LIBAVCODEC_VERSION_MAJOR < 58)
#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_DEBUG_MV
#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_AC_VLC
#define FF_API_AC_VLC (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_OLD_MSMPEG4
#define FF_API_OLD_MSMPEG4 (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_ASPECT_EXTENDED
#define FF_API_ASPECT_EXTENDED (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_ARCH_ALPHA
#define FF_API_ARCH_ALPHA (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_XVMC
#define FF_API_XVMC (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_ERROR_RATE
#define FF_API_ERROR_RATE (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_QSCALE_TYPE
#define FF_API_QSCALE_TYPE (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_MB_TYPE
#define FF_API_MB_TYPE (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_MAX_BFRAMES
#define FF_API_MAX_BFRAMES (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_NEG_LINESIZES
#define FF_API_NEG_LINESIZES (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_EMU_EDGE
#define FF_API_EMU_EDGE (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_ARCH_SH4
#define FF_API_ARCH_SH4 (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_ARCH_SPARC
#define FF_API_ARCH_SPARC (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_UNUSED_MEMBERS
#define FF_API_UNUSED_MEMBERS (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_IDCT_XVIDMMX
#define FF_API_IDCT_XVIDMMX (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_INPUT_PRESERVED
#define FF_API_INPUT_PRESERVED (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_NORMALIZE_AQP
#define FF_API_NORMALIZE_AQP (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_GMC
#define FF_API_GMC (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_MV0
#define FF_API_MV0 (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_CODEC_NAME
#define FF_API_CODEC_NAME (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_AFD
#define FF_API_AFD (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_VISMV
/* XXX: don't forget to drop the -vismv documentation */
#define FF_API_VISMV (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_AUDIOENC_DELAY
#define FF_API_AUDIOENC_DELAY (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_VAAPI_CONTEXT
#define FF_API_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_MERGE_SD
#define FF_API_MERGE_SD (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_AVCTX_TIMEBASE
#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_MPV_OPT
#define FF_API_MPV_OPT (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_STREAM_CODEC_TAG
#define FF_API_STREAM_CODEC_TAG (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_QUANT_BIAS
#define FF_API_QUANT_BIAS (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_RC_STRATEGY
#define FF_API_RC_STRATEGY (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_CODED_FRAME
#define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_MOTION_EST
#define FF_API_MOTION_EST (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_WITHOUT_PREFIX
#define FF_API_WITHOUT_PREFIX (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_SIDEDATA_ONLY_PKT
#define FF_API_SIDEDATA_ONLY_PKT (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
@@ -238,6 +120,12 @@
#ifndef FF_API_GETCHROMA
#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_CODEC_GET_SET
#define FF_API_CODEC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_USER_VISIBLE_AVHWACCEL
#define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 59)
#endif


#endif /* AVCODEC_VERSION_H */

+ 63
- 75
ThirdParty/ffmpeg/include/libavformat/avformat.h View File

@@ -437,19 +437,6 @@ int av_get_packet(AVIOContext *s, AVPacket *pkt, int size);
*/
int av_append_packet(AVIOContext *s, AVPacket *pkt, int size);

#if FF_API_LAVF_FRAC
/*************************************************/
/* fractional numbers for exact pts handling */

/**
* The exact value of the fractional number is: 'val + num / den'.
* num is assumed to be 0 <= num < den.
*/
typedef struct AVFrac {
int64_t val, num, den;
} AVFrac;
#endif

/*************************************************/
/* input/output formats */

@@ -478,10 +465,6 @@ typedef struct AVProbeData {
#define AVFMT_NOFILE 0x0001
#define AVFMT_NEEDNUMBER 0x0002 /**< Needs '%d' in filename. */
#define AVFMT_SHOW_IDS 0x0008 /**< Show format stream IDs numbers. */
#if FF_API_LAVF_FMT_RAWPICTURE
#define AVFMT_RAWPICTURE 0x0020 /**< Format wants AVPicture structure for
raw picture data. @deprecated Not used anymore */
#endif
#define AVFMT_GLOBALHEADER 0x0040 /**< Format wants global header. */
#define AVFMT_NOTIMESTAMPS 0x0080 /**< Format does not need / have any timestamps. */
#define AVFMT_GENERIC_INDEX 0x0100 /**< Use generic index building code. */
@@ -802,9 +785,9 @@ enum AVStreamParseType {
AVSTREAM_PARSE_HEADERS, /**< Only parse headers, do not repack. */
AVSTREAM_PARSE_TIMESTAMPS, /**< full parsing and interpolation of timestamps for frames not starting on a packet boundary */
AVSTREAM_PARSE_FULL_ONCE, /**< full parsing and repack of the first frame only, only implemented for H.264 currently */
AVSTREAM_PARSE_FULL_RAW=MKTAG(0,'R','A','W'), /**< full parsing and repack with timestamp and position generation by parser for raw
this assumes that each packet in the file contains no demuxer level headers and
just codec level data, otherwise position generation would fail */
AVSTREAM_PARSE_FULL_RAW, /**< full parsing and repack with timestamp and position generation by parser for raw
this assumes that each packet in the file contains no demuxer level headers and
just codec level data, otherwise position generation would fail */
};

typedef struct AVIndexEntry {
@@ -894,14 +877,6 @@ typedef struct AVStream {
#endif
void *priv_data;

#if FF_API_LAVF_FRAC
/**
* @deprecated this field is unused
*/
attribute_deprecated
struct AVFrac pts;
#endif

/**
* This is the fundamental unit of time (in seconds) in terms
* of which frame timestamps are represented.
@@ -1001,6 +976,34 @@ typedef struct AVStream {
int event_flags;
#define AVSTREAM_EVENT_FLAG_METADATA_UPDATED 0x0001 ///< The call resulted in updated metadata.

/**
* Real base framerate of the stream.
* This is the lowest framerate with which all timestamps can be
* represented accurately (it is the least common multiple of all
* framerates in the stream). Note, this value is just a guess!
* For example, if the time base is 1/90000 and all frames have either
* approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.
*/
AVRational r_frame_rate;

/**
* String containing pairs of key and values describing recommended encoder configuration.
* Pairs are separated by ','.
* Keys are separated from values by '='.
*/
char *recommended_encoder_configuration;

/**
* Codec parameters associated with this stream. Allocated and freed by
* libavformat in avformat_new_stream() and avformat_free_context()
* respectively.
*
* - demuxing: filled by libavformat on stream creation or in
* avformat_find_stream_info()
* - muxing: filled by the caller before avformat_write_header()
*/
AVCodecParameters *codecpar;

/*****************************************************************
* All fields below this line are not part of the public API. They
* may not be used outside of libavformat and can be changed and
@@ -1023,6 +1026,7 @@ typedef struct AVStream {
double (*duration_error)[2][MAX_STD_TIMEBASES];
int64_t codec_info_duration;
int64_t codec_info_duration_fields;
int frame_delay_evidence;

/**
* 0 -> decoder has not been searched for yet.
@@ -1085,19 +1089,6 @@ typedef struct AVStream {
int nb_index_entries;
unsigned int index_entries_allocated_size;

/**
* Real base framerate of the stream.
* This is the lowest framerate with which all timestamps can be
* represented accurately (it is the least common multiple of all
* framerates in the stream). Note, this value is just a guess!
* For example, if the time base is 1/90000 and all frames have either
* approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.
*
* Code outside avformat should access this field using:
* av_stream_get/set_r_frame_rate(stream)
*/
AVRational r_frame_rate;

/**
* Stream Identifier
* This is the MPEG-TS stream identifier +1
@@ -1203,19 +1194,6 @@ typedef struct AVStream {
*/
int inject_global_side_data;

/*****************************************************************
* All fields above this line are not part of the public API.
* Fields below are part of the public API and ABI again.
*****************************************************************
*/

/**
* String containing paris of key and values describing recommended encoder configuration.
* Paris are separated by ','.
* Keys are separated from values by '='.
*/
char *recommended_encoder_configuration;

/**
* display aspect ratio (0 if unknown)
* - encoding: unused
@@ -1223,31 +1201,29 @@ typedef struct AVStream {
*/
AVRational display_aspect_ratio;

struct FFFrac *priv_pts;

/**
* An opaque field for libavformat internal usage.
* Must not be accessed in any way by callers.
*/
AVStreamInternal *internal;

/*
* Codec parameters associated with this stream. Allocated and freed by
* libavformat in avformat_new_stream() and avformat_free_context()
* respectively.
*
* - demuxing: filled by libavformat on stream creation or in
* avformat_find_stream_info()
* - muxing: filled by the caller before avformat_write_header()
*/
AVCodecParameters *codecpar;
} AVStream;

#if FF_API_FORMAT_GET_SET
/**
* Accessors for some AVStream fields. These used to be provided for ABI
* compatibility, and do not need to be used anymore.
*/
attribute_deprecated
AVRational av_stream_get_r_frame_rate(const AVStream *s);
attribute_deprecated
void av_stream_set_r_frame_rate(AVStream *s, AVRational r);
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
attribute_deprecated
char* av_stream_get_recommended_encoder_configuration(const AVStream *s);
attribute_deprecated
void av_stream_set_recommended_encoder_configuration(AVStream *s, char *configuration);
#endif

struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);

/**
* Returns the pts of the last muxed packet + its duration
@@ -1469,11 +1445,11 @@ typedef struct AVFormatContext {
#define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted)
#if FF_API_LAVF_KEEPSIDE_FLAG
#define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Don't merge side data but keep it separate. Deprecated, will be the default.
#define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Deprecated, does nothing.
#endif
#define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats
#define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops.
#define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Wait for packet data before writing a header, and add bitstream filters as requested by the muxer
#define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer

/**
* Maximum size of the data read from input for determining
@@ -1919,29 +1895,46 @@ typedef struct AVFormatContext {
int max_streams;
} AVFormatContext;

#if FF_API_FORMAT_GET_SET
/**
* Accessors for some AVFormatContext fields. These used to be provided for ABI
* compatibility, and do not need to be used anymore.
*/
attribute_deprecated
int av_format_get_probe_score(const AVFormatContext *s);
attribute_deprecated
AVCodec * av_format_get_video_codec(const AVFormatContext *s);
attribute_deprecated
void av_format_set_video_codec(AVFormatContext *s, AVCodec *c);
attribute_deprecated
AVCodec * av_format_get_audio_codec(const AVFormatContext *s);
attribute_deprecated
void av_format_set_audio_codec(AVFormatContext *s, AVCodec *c);
attribute_deprecated
AVCodec * av_format_get_subtitle_codec(const AVFormatContext *s);
attribute_deprecated
void av_format_set_subtitle_codec(AVFormatContext *s, AVCodec *c);
attribute_deprecated
AVCodec * av_format_get_data_codec(const AVFormatContext *s);
attribute_deprecated
void av_format_set_data_codec(AVFormatContext *s, AVCodec *c);
attribute_deprecated
int av_format_get_metadata_header_padding(const AVFormatContext *s);
attribute_deprecated
void av_format_set_metadata_header_padding(AVFormatContext *s, int c);
attribute_deprecated
void * av_format_get_opaque(const AVFormatContext *s);
attribute_deprecated
void av_format_set_opaque(AVFormatContext *s, void *opaque);
attribute_deprecated
av_format_control_message av_format_get_control_message_cb(const AVFormatContext *s);
attribute_deprecated
void av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback);
#if FF_API_OLD_OPEN_CALLBACKS
attribute_deprecated AVOpenCallback av_format_get_open_cb(const AVFormatContext *s);
attribute_deprecated void av_format_set_open_cb(AVFormatContext *s, AVOpenCallback callback);
#endif
#endif

/**
* This function will cause global side data to be injected in the next packet
@@ -2103,13 +2096,8 @@ uint8_t *av_stream_new_side_data(AVStream *stream,
* @param size pointer for side information size to store (optional)
* @return pointer to data if present or NULL otherwise
*/
#if FF_API_NOCONST_GET_SIDE_DATA
uint8_t *av_stream_get_side_data(AVStream *stream,
enum AVPacketSideDataType type, int *size);
#else
uint8_t *av_stream_get_side_data(const AVStream *stream,
enum AVPacketSideDataType type, int *size);
#endif

AVProgram *av_new_program(AVFormatContext *s, int id);



+ 2
- 8
ThirdParty/ffmpeg/include/libavformat/avio.h View File

@@ -236,7 +236,6 @@ typedef struct AVIOContext {
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
int64_t (*seek)(void *opaque, int64_t offset, int whence);
int64_t pos; /**< position in the file of the current buffer */
int must_flush; /**< unused */
int eof_reached; /**< true if eof reached */
int write_flag; /**< true if open for writing */
int max_packet_size;
@@ -452,6 +451,8 @@ void avio_free_directory_entry(AVIODirEntry **entry);
* @param write_flag Set to 1 if the buffer should be writable, 0 otherwise.
* @param opaque An opaque pointer to user-specific data.
* @param read_packet A function for refilling the buffer, may be NULL.
* For stream protocols, must never return 0 but rather
* a proper AVERROR code.
* @param write_packet A function for writing the buffer contents, may be NULL.
* The function may not change the input buffers content.
* @param seek A function for seeking to specified byte position, may be NULL.
@@ -569,13 +570,6 @@ int64_t avio_size(AVIOContext *s);
* @return non zero if and only if end of file
*/
int avio_feof(AVIOContext *s);
#if FF_API_URL_FEOF
/**
* @deprecated use avio_feof()
*/
attribute_deprecated
int url_feof(AVIOContext *s);
#endif

/** @warning Writes up to 4 KiB per call */
int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);


+ 16
- 31
ThirdParty/ffmpeg/include/libavformat/version.h View File

@@ -31,9 +31,9 @@

// 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 57
#define LIBAVFORMAT_VERSION_MINOR 82
#define LIBAVFORMAT_VERSION_MICRO 102
#define LIBAVFORMAT_VERSION_MAJOR 58
#define LIBAVFORMAT_VERSION_MINOR 3
#define LIBAVFORMAT_VERSION_MICRO 100

#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
@@ -55,47 +55,32 @@
* at once through the bump. This improves the git bisect-ability of the change.
*
*/
#ifndef FF_API_LAVF_BITEXACT
#define FF_API_LAVF_BITEXACT (LIBAVFORMAT_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_LAVF_FRAC
#define FF_API_LAVF_FRAC (LIBAVFORMAT_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_LAVF_CODEC_TB
#define FF_API_LAVF_CODEC_TB (LIBAVFORMAT_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_URL_FEOF
#define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_LAVF_FMT_RAWPICTURE
#define FF_API_LAVF_FMT_RAWPICTURE (LIBAVFORMAT_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_COMPUTE_PKT_FIELDS2
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 58)
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_OLD_OPEN_CALLBACKS
#define FF_API_OLD_OPEN_CALLBACKS (LIBAVFORMAT_VERSION_MAJOR < 58)
#define FF_API_OLD_OPEN_CALLBACKS (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_LAVF_AVCTX
#define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_NOCONST_GET_SIDE_DATA
#define FF_API_NOCONST_GET_SIDE_DATA (LIBAVFORMAT_VERSION_MAJOR < 58)
#define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_HTTP_USER_AGENT
#define FF_API_HTTP_USER_AGENT (LIBAVFORMAT_VERSION_MAJOR < 58)
#define FF_API_HTTP_USER_AGENT (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_HLS_WRAP
#define FF_API_HLS_WRAP (LIBAVFORMAT_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_LAVF_MERGE_SD
#define FF_API_LAVF_MERGE_SD (LIBAVFORMAT_VERSION_MAJOR < 58)
#define FF_API_HLS_WRAP (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_LAVF_KEEPSIDE_FLAG
#define FF_API_LAVF_KEEPSIDE_FLAG (LIBAVFORMAT_VERSION_MAJOR < 58)
#define FF_API_LAVF_KEEPSIDE_FLAG (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_OLD_ROTATE_API
#define FF_API_OLD_ROTATE_API (LIBAVFORMAT_VERSION_MAJOR < 58)
#define FF_API_OLD_ROTATE_API (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_FORMAT_GET_SET
#define FF_API_FORMAT_GET_SET (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_OLD_AVIO_EOF_0
#define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif




+ 7
- 7
ThirdParty/ffmpeg/include/libavutil/attributes.h View File

@@ -66,19 +66,19 @@
# define av_noinline
#endif

#if AV_GCC_VERSION_AT_LEAST(3,1)
#if AV_GCC_VERSION_AT_LEAST(3,1) || defined(__clang__)
# define av_pure __attribute__((pure))
#else
# define av_pure
#endif

#if AV_GCC_VERSION_AT_LEAST(2,6)
#if AV_GCC_VERSION_AT_LEAST(2,6) || defined(__clang__)
# define av_const __attribute__((const))
#else
# define av_const
#endif

#if AV_GCC_VERSION_AT_LEAST(4,3)
#if AV_GCC_VERSION_AT_LEAST(4,3) || defined(__clang__)
# define av_cold __attribute__((cold))
#else
# define av_cold
@@ -138,19 +138,19 @@
# define av_used
#endif

#if AV_GCC_VERSION_AT_LEAST(3,3)
#if AV_GCC_VERSION_AT_LEAST(3,3) || defined(__clang__)
# define av_alias __attribute__((may_alias))
#else
# define av_alias
#endif

#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__INTEL_COMPILER)
# define av_uninit(x) x=x
#else
# define av_uninit(x) x
#endif

#ifdef __GNUC__
#if defined(__GNUC__) || defined(__clang__)
# define av_builtin_constant_p __builtin_constant_p
# define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
#else
@@ -158,7 +158,7 @@
# define av_printf_format(fmtpos, attrpos)
#endif

#if AV_GCC_VERSION_AT_LEAST(2,5)
#if AV_GCC_VERSION_AT_LEAST(2,5) || defined(__clang__)
# define av_noreturn __attribute__((noreturn))
#else
# define av_noreturn


+ 1
- 1
ThirdParty/ffmpeg/include/libavutil/avconfig.h View File

@@ -1,4 +1,4 @@
/* Generated by ffconf */
/* Generated by ffmpeg configure */
#ifndef AVUTIL_AVCONFIG_H
#define AVUTIL_AVCONFIG_H
#define AV_HAVE_BIGENDIAN 0


+ 31
- 1
ThirdParty/ffmpeg/include/libavutil/common.h View File

@@ -260,13 +260,37 @@ static av_always_inline int av_sat_add32_c(int a, int b)
*
* @param a first value
* @param b value doubled and added to a
* @return sum with signed saturation
* @return sum sat(a + sat(2*b)) with signed saturation
*/
static av_always_inline int av_sat_dadd32_c(int a, int b)
{
return av_sat_add32(a, av_sat_add32(b, b));
}

/**
* Subtract two signed 32-bit values with saturation.
*
* @param a one value
* @param b another value
* @return difference with signed saturation
*/
static av_always_inline int av_sat_sub32_c(int a, int b)
{
return av_clipl_int32((int64_t)a - b);
}

/**
* Subtract a doubled value from another value with saturation at both stages.
*
* @param a first value
* @param b value doubled and subtracted from a
* @return difference sat(a - sat(2*b)) with signed saturation
*/
static av_always_inline int av_sat_dsub32_c(int a, int b)
{
return av_sat_sub32(a, av_sat_add32(b, b));
}

/**
* Clip a float value into the amin-amax range.
* @param a value to clip
@@ -513,6 +537,12 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
#ifndef av_sat_dadd32
# define av_sat_dadd32 av_sat_dadd32_c
#endif
#ifndef av_sat_sub32
# define av_sat_sub32 av_sat_sub32_c
#endif
#ifndef av_sat_dsub32
# define av_sat_dsub32 av_sat_dsub32_c
#endif
#ifndef av_clipf
# define av_clipf av_clipf_c
#endif


+ 0
- 4
ThirdParty/ffmpeg/include/libavutil/crc.h View File

@@ -53,11 +53,7 @@ typedef enum {
AV_CRC_32_IEEE,
AV_CRC_32_IEEE_LE, /*< reversed bitorder version of AV_CRC_32_IEEE */
AV_CRC_16_ANSI_LE, /*< reversed bitorder version of AV_CRC_16_ANSI */
#if FF_API_CRC_BIG_TABLE
AV_CRC_24_IEEE = 12,
#else
AV_CRC_24_IEEE,
#endif /* FF_API_CRC_BIG_TABLE */
AV_CRC_MAX, /*< Not part of public API! Do not use outside libavutil. */
}AVCRCId;



+ 1
- 1
ThirdParty/ffmpeg/include/libavutil/ffversion.h View File

@@ -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-87647-g2d286a1f3f"
#define FFMPEG_VERSION "N-89516-g97cf1d4c49"
#endif /* AVUTIL_FFVERSION_H */

+ 41
- 3
ThirdParty/ffmpeg/include/libavutil/frame.h View File

@@ -563,39 +563,77 @@ typedef struct AVFrame {
/**
* @}
*/

/**
* 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 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.
*/
AVBufferRef *private_ref;
} AVFrame;

#if FF_API_FRAME_GET_SET
/**
* Accessors for some AVFrame fields. These used to be provided for ABI
* compatibility, and do not need to be used anymore.
*/
attribute_deprecated
int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);
attribute_deprecated
void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);
attribute_deprecated
int64_t av_frame_get_pkt_duration (const AVFrame *frame);
attribute_deprecated
void av_frame_set_pkt_duration (AVFrame *frame, int64_t val);
attribute_deprecated
int64_t av_frame_get_pkt_pos (const AVFrame *frame);
attribute_deprecated
void av_frame_set_pkt_pos (AVFrame *frame, int64_t val);
attribute_deprecated
int64_t av_frame_get_channel_layout (const AVFrame *frame);
attribute_deprecated
void av_frame_set_channel_layout (AVFrame *frame, int64_t val);
attribute_deprecated
int av_frame_get_channels (const AVFrame *frame);
attribute_deprecated
void av_frame_set_channels (AVFrame *frame, int val);
attribute_deprecated
int av_frame_get_sample_rate (const AVFrame *frame);
attribute_deprecated
void av_frame_set_sample_rate (AVFrame *frame, int val);
attribute_deprecated
AVDictionary *av_frame_get_metadata (const AVFrame *frame);
attribute_deprecated
void av_frame_set_metadata (AVFrame *frame, AVDictionary *val);
attribute_deprecated
int av_frame_get_decode_error_flags (const AVFrame *frame);
attribute_deprecated
void av_frame_set_decode_error_flags (AVFrame *frame, int val);
attribute_deprecated
int av_frame_get_pkt_size(const AVFrame *frame);
attribute_deprecated
void av_frame_set_pkt_size(AVFrame *frame, int val);
AVDictionary **avpriv_frame_get_metadatap(AVFrame *frame);
#if FF_API_FRAME_QP
attribute_deprecated
int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type);
attribute_deprecated
int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type);
#endif
attribute_deprecated
enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame);
attribute_deprecated
void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val);
attribute_deprecated
enum AVColorRange av_frame_get_color_range(const AVFrame *frame);
attribute_deprecated
void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val);
#endif

/**
* Get the name of a colorspace.
@@ -783,8 +821,8 @@ enum {
/**
* Apply the maximum possible cropping, even if it requires setting the
* AVFrame.data[] entries to unaligned pointers. Passing unaligned data
* to Libav API is generally not allowed, and causes undefined behavior
* (such as crashes). You can pass unaligned data only to Libav APIs that
* to FFmpeg API is generally not allowed, and causes undefined behavior
* (such as crashes). You can pass unaligned data only to FFmpeg APIs that
* are explicitly documented to accept it. Use this flag only if you
* absolutely know what you are doing.
*/


+ 1
- 1
ThirdParty/ffmpeg/include/libavutil/hmac.h View File

@@ -35,7 +35,7 @@ enum AVHMACType {
AV_HMAC_SHA1,
AV_HMAC_SHA224,
AV_HMAC_SHA256,
AV_HMAC_SHA384 = 12,
AV_HMAC_SHA384,
AV_HMAC_SHA512,
};



+ 3
- 1
ThirdParty/ffmpeg/include/libavutil/hwcontext.h View File

@@ -25,15 +25,17 @@
#include "pixfmt.h"

enum AVHWDeviceType {
AV_HWDEVICE_TYPE_NONE,
AV_HWDEVICE_TYPE_VDPAU,
AV_HWDEVICE_TYPE_CUDA,
AV_HWDEVICE_TYPE_VAAPI,
AV_HWDEVICE_TYPE_DXVA2,
AV_HWDEVICE_TYPE_QSV,
AV_HWDEVICE_TYPE_VIDEOTOOLBOX,
AV_HWDEVICE_TYPE_NONE,
AV_HWDEVICE_TYPE_D3D11VA,
AV_HWDEVICE_TYPE_DRM,
AV_HWDEVICE_TYPE_OPENCL,
AV_HWDEVICE_TYPE_MEDIACODEC,
};

typedef struct AVHWDeviceInternal AVHWDeviceInternal;


+ 1
- 0
ThirdParty/ffmpeg/include/libavutil/hwcontext_d3d11va.h View File

@@ -37,6 +37,7 @@
*/

#include <d3d11.h>
#include <stdint.h>

/**
* This struct is allocated as AVHWDeviceContext.hwctx


+ 36
- 0
ThirdParty/ffmpeg/include/libavutil/hwcontext_mediacodec.h View File

@@ -0,0 +1,36 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef AVUTIL_HWCONTEXT_MEDIACODEC_H
#define AVUTIL_HWCONTEXT_MEDIACODEC_H

/**
* MediaCodec details.
*
* Allocated as AVHWDeviceContext.hwctx
*/
typedef struct AVMediaCodecDeviceContext {
/**
* android/view/Surface handle, to be filled by the user.
*
* This is the default surface used by decoders on this device.
*/
void *surface;
} AVMediaCodecDeviceContext;

#endif /* AVUTIL_HWCONTEXT_MEDIACODEC_H */

+ 1
- 6
ThirdParty/ffmpeg/include/libavutil/intreadwrite.h View File

@@ -215,7 +215,7 @@ typedef union {
* by per-arch headers.
*/

#if defined(__GNUC__) && !defined(__TI_COMPILER_VERSION__)
#if defined(__GNUC__)

union unaligned_64 { uint64_t l; } __attribute__((packed)) av_alias;
union unaligned_32 { uint32_t l; } __attribute__((packed)) av_alias;
@@ -224,11 +224,6 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
# define AV_RN(s, p) (((const union unaligned_##s *) (p))->l)
# define AV_WN(s, p, v) ((((union unaligned_##s *) (p))->l) = (v))

#elif defined(__DECC)

# define AV_RN(s, p) (*((const __unaligned uint##s##_t*)(p)))
# define AV_WN(s, p, v) (*((__unaligned uint##s##_t*)(p)) = (v))

#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_X64)) && AV_HAVE_FAST_UNALIGNED

# define AV_RN(s, p) (*((const __unaligned uint##s##_t*)(p)))


+ 0
- 14
ThirdParty/ffmpeg/include/libavutil/log.h View File

@@ -334,20 +334,6 @@ void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl,
char *line, int line_size, int *print_prefix);

#if FF_API_DLOG
/**
* av_dlog macros
* @deprecated unused
* Useful to print debug messages that shouldn't get compiled in normally.
*/

#ifdef DEBUG
# define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
#else
# define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
#endif
#endif /* FF_API_DLOG */

/**
* Skip repeated messages, this requires the user app to use av_log() instead of
* (f)printf as the 2 would otherwise interfere and lead to


+ 20
- 19
ThirdParty/ffmpeg/include/libavutil/mem.h View File

@@ -73,6 +73,19 @@
* @param v Name of the variable
*/

/**
* @def DECLARE_ASM_ALIGNED(n,t,v)
* Declare an aligned variable appropriate for use in inline assembly code.
*
* @code{.c}
* DECLARE_ASM_ALIGNED(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008);
* @endcode
*
* @param n Minimum alignment in bytes
* @param t Type of the variable (or array element)
* @param v Name of the variable
*/

/**
* @def DECLARE_ASM_CONST(n,t,v)
* Declare a static constant aligned variable appropriate for use in inline
@@ -89,25 +102,23 @@

#if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C)
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
#define DECLARE_ASM_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
#define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v
#elif defined(__TI_COMPILER_VERSION__)
#define DECLARE_ALIGNED(n,t,v) \
AV_PRAGMA(DATA_ALIGN(v,n)) \
t __attribute__((aligned(n))) v
#define DECLARE_ASM_CONST(n,t,v) \
AV_PRAGMA(DATA_ALIGN(v,n)) \
static const t __attribute__((aligned(n))) v
#elif defined(__DJGPP__)
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (FFMIN(n, 16)))) v
#define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
#define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
#elif defined(__GNUC__) || defined(__clang__)
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
#define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (n))) v
#define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v
#elif defined(_MSC_VER)
#define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
#define DECLARE_ASM_ALIGNED(n,t,v) __declspec(align(n)) t v
#define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
#else
#define DECLARE_ALIGNED(n,t,v) t v
#define DECLARE_ASM_ALIGNED(n,t,v) t v
#define DECLARE_ASM_CONST(n,t,v) static const t v
#endif

@@ -206,12 +217,7 @@ void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1);
* be allocated
* @see av_malloc()
*/
av_alloc_size(1, 2) static inline void *av_malloc_array(size_t nmemb, size_t size)
{
if (!size || nmemb >= INT_MAX / size)
return NULL;
return av_malloc(nmemb * size);
}
av_alloc_size(1, 2) void *av_malloc_array(size_t nmemb, size_t size);

/**
* Allocate a memory block for an array with av_mallocz().
@@ -226,12 +232,7 @@ av_alloc_size(1, 2) static inline void *av_malloc_array(size_t nmemb, size_t siz
* @see av_mallocz()
* @see av_malloc_array()
*/
av_alloc_size(1, 2) static inline void *av_mallocz_array(size_t nmemb, size_t size)
{
if (!size || nmemb >= INT_MAX / size)
return NULL;
return av_mallocz(nmemb * size);
}
av_alloc_size(1, 2) void *av_mallocz_array(size_t nmemb, size_t size);

/**
* Non-inlined equivalent of av_mallocz_array().


+ 0
- 3
ThirdParty/ffmpeg/include/libavutil/opt.h View File

@@ -275,9 +275,6 @@ typedef struct AVOption {
int flags;
#define AV_OPT_FLAG_ENCODING_PARAM 1 ///< a generic parameter which can be set by the user for muxing or encoding
#define AV_OPT_FLAG_DECODING_PARAM 2 ///< a generic parameter which can be set by the user for demuxing or decoding
#if FF_API_OPT_TYPE_METADATA
#define AV_OPT_FLAG_METADATA 4 ///< some data extracted or inserted into the file like title, comment, ...
#endif
#define AV_OPT_FLAG_AUDIO_PARAM 8
#define AV_OPT_FLAG_VIDEO_PARAM 16
#define AV_OPT_FLAG_SUBTITLE_PARAM 32


+ 0
- 5
ThirdParty/ffmpeg/include/libavutil/pixdesc.h View File

@@ -225,11 +225,6 @@ enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc);
* Utility function to access log2_chroma_w log2_chroma_h from
* the pixel format AVPixFmtDescriptor.
*
* See av_get_chroma_sub_sample() for a function that asserts a
* valid pixel format instead of returning an error code.
* Its recommended that you use avcodec_get_chroma_sub_sample unless
* you do check the return code!
*
* @param[in] pix_fmt the pixel format
* @param[out] h_shift store log2_chroma_w (horizontal/width shift)
* @param[out] v_shift store log2_chroma_h (vertical/height shift)


+ 10
- 21
ThirdParty/ffmpeg/include/libavutil/pixfmt.h View File

@@ -74,11 +74,6 @@ enum AVPixelFormat {
AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range
AV_PIX_FMT_YUVJ422P, ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting color_range
AV_PIX_FMT_YUVJ444P, ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting color_range
#if FF_API_XVMC
AV_PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing
AV_PIX_FMT_XVMC_MPEG2_IDCT,
AV_PIX_FMT_XVMC = AV_PIX_FMT_XVMC_MPEG2_IDCT,
#endif /* FF_API_XVMC */
AV_PIX_FMT_UYVY422, ///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
AV_PIX_FMT_UYYVYY411, ///< packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
AV_PIX_FMT_BGR8, ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
@@ -100,13 +95,6 @@ enum AVPixelFormat {
AV_PIX_FMT_YUV440P, ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
AV_PIX_FMT_YUVJ440P, ///< planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
AV_PIX_FMT_YUVA420P, ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
#if FF_API_VDPAU
AV_PIX_FMT_VDPAU_H264,///< H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
AV_PIX_FMT_VDPAU_MPEG1,///< MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
AV_PIX_FMT_VDPAU_MPEG2,///< MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
AV_PIX_FMT_VDPAU_WMV3,///< WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
AV_PIX_FMT_VDPAU_VC1, ///< VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
#endif
AV_PIX_FMT_RGB48BE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big-endian
AV_PIX_FMT_RGB48LE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as little-endian

@@ -142,9 +130,6 @@ enum AVPixelFormat {
AV_PIX_FMT_YUV422P16BE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
AV_PIX_FMT_YUV444P16LE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
AV_PIX_FMT_YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
#if FF_API_VDPAU
AV_PIX_FMT_VDPAU_MPEG4, ///< MPEG-4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
#endif
AV_PIX_FMT_DXVA2_VLD, ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer

AV_PIX_FMT_RGB444LE, ///< packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined
@@ -176,7 +161,6 @@ enum AVPixelFormat {
AV_PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
AV_PIX_FMT_YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
AV_PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
AV_PIX_FMT_VDA_VLD, ///< hardware decoding through VDA
AV_PIX_FMT_GBRP, ///< planar GBR 4:4:4 24bpp
AV_PIX_FMT_GBR24P = AV_PIX_FMT_GBRP, // alias for #AV_PIX_FMT_GBRP
AV_PIX_FMT_GBRP9BE, ///< planar GBR 4:4:4 27bpp, big-endian
@@ -221,8 +205,6 @@ enum AVPixelFormat {

AV_PIX_FMT_YVYU422, ///< packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb

AV_PIX_FMT_VDA, ///< HW acceleration through VDA, data[3] contains a CVPixelBufferRef

AV_PIX_FMT_YA16BE, ///< 16 bits gray, 16 bits alpha (big-endian)
AV_PIX_FMT_YA16LE, ///< 16 bits gray, 16 bits alpha (little-endian)

@@ -248,7 +230,7 @@ enum AVPixelFormat {
*/
AV_PIX_FMT_CUDA,

AV_PIX_FMT_0RGB=0x123+4,///< packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
AV_PIX_FMT_0RGB, ///< packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
AV_PIX_FMT_RGB0, ///< packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
AV_PIX_FMT_0BGR, ///< packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
AV_PIX_FMT_BGR0, ///< packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
@@ -283,9 +265,9 @@ enum AVPixelFormat {
AV_PIX_FMT_BAYER_GBRG16BE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian */
AV_PIX_FMT_BAYER_GRBG16LE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian */
AV_PIX_FMT_BAYER_GRBG16BE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian */
#if !FF_API_XVMC
AV_PIX_FMT_XVMC,///< XVideo Motion Acceleration via common packet passing
#endif /* !FF_API_XVMC */
AV_PIX_FMT_YUV440P10LE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
AV_PIX_FMT_YUV440P10BE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
AV_PIX_FMT_YUV440P12LE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
@@ -340,6 +322,13 @@ enum AVPixelFormat {
* data[0] points to an AVDRMFrameDescriptor.
*/
AV_PIX_FMT_DRM_PRIME,
/**
* Hardware surfaces for OpenCL.
*
* data[i] contain 2D image objects (typed in C as cl_mem, used
* in OpenCL as image2d_t) for each plane of the surface.
*/
AV_PIX_FMT_OPENCL,

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
};


+ 24
- 0
ThirdParty/ffmpeg/include/libavutil/stereo3d.h View File

@@ -141,6 +141,25 @@ enum AVStereo3DType {
AV_STEREO3D_COLUMNS,
};

/**
* List of possible view types.
*/
enum AVStereo3DView {
/**
* Frame contains two packed views.
*/
AV_STEREO3D_VIEW_PACKED,

/**
* Frame contains only the left view.
*/
AV_STEREO3D_VIEW_LEFT,

/**
* Frame contains only the right view.
*/
AV_STEREO3D_VIEW_RIGHT,
};

/**
* Inverted views, Right/Bottom represents the left view.
@@ -164,6 +183,11 @@ typedef struct AVStereo3D {
* Additional information about the frame packing.
*/
int flags;

/**
* Determines which views are packed.
*/
enum AVStereo3DView view;
} AVStereo3D;

/**


+ 12
- 25
ThirdParty/ffmpeg/include/libavutil/version.h View File

@@ -78,10 +78,9 @@
* @{
*/


#define LIBAVUTIL_VERSION_MAJOR 55
#define LIBAVUTIL_VERSION_MINOR 77
#define LIBAVUTIL_VERSION_MICRO 101
#define LIBAVUTIL_VERSION_MAJOR 56
#define LIBAVUTIL_VERSION_MINOR 6
#define LIBAVUTIL_VERSION_MICRO 100

#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
@@ -106,38 +105,26 @@
* @{
*/

#ifndef FF_API_VDPAU
#define FF_API_VDPAU (LIBAVUTIL_VERSION_MAJOR < 56)
#endif
#ifndef FF_API_XVMC
#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 56)
#endif
#ifndef FF_API_OPT_TYPE_METADATA
#define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 56)
#endif
#ifndef FF_API_DLOG
#define FF_API_DLOG (LIBAVUTIL_VERSION_MAJOR < 56)
#endif
#ifndef FF_API_VAAPI
#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 56)
#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 57)
#endif
#ifndef FF_API_FRAME_QP
#define FF_API_FRAME_QP (LIBAVUTIL_VERSION_MAJOR < 56)
#define FF_API_FRAME_QP (LIBAVUTIL_VERSION_MAJOR < 57)
#endif
#ifndef FF_API_PLUS1_MINUS1
#define FF_API_PLUS1_MINUS1 (LIBAVUTIL_VERSION_MAJOR < 56)
#define FF_API_PLUS1_MINUS1 (LIBAVUTIL_VERSION_MAJOR < 57)
#endif
#ifndef FF_API_ERROR_FRAME
#define FF_API_ERROR_FRAME (LIBAVUTIL_VERSION_MAJOR < 56)
#endif
#ifndef FF_API_CRC_BIG_TABLE
#define FF_API_CRC_BIG_TABLE (LIBAVUTIL_VERSION_MAJOR < 56)
#define FF_API_ERROR_FRAME (LIBAVUTIL_VERSION_MAJOR < 57)
#endif
#ifndef FF_API_PKT_PTS
#define FF_API_PKT_PTS (LIBAVUTIL_VERSION_MAJOR < 56)
#define FF_API_PKT_PTS (LIBAVUTIL_VERSION_MAJOR < 57)
#endif
#ifndef FF_API_CRYPTO_SIZE_T
#define FF_API_CRYPTO_SIZE_T (LIBAVUTIL_VERSION_MAJOR < 56)
#define FF_API_CRYPTO_SIZE_T (LIBAVUTIL_VERSION_MAJOR < 57)
#endif
#ifndef FF_API_FRAME_GET_SET
#define FF_API_FRAME_GET_SET (LIBAVUTIL_VERSION_MAJOR < 57)
#endif




+ 3
- 3
ThirdParty/ffmpeg/include/libswresample/version.h View File

@@ -28,9 +28,9 @@

#include "libavutil/avutil.h"

#define LIBSWRESAMPLE_VERSION_MAJOR 2
#define LIBSWRESAMPLE_VERSION_MINOR 8
#define LIBSWRESAMPLE_VERSION_MICRO 100
#define LIBSWRESAMPLE_VERSION_MAJOR 3
#define LIBSWRESAMPLE_VERSION_MINOR 0
#define LIBSWRESAMPLE_VERSION_MICRO 101

#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
LIBSWRESAMPLE_VERSION_MINOR, \


BIN
ThirdParty/ffmpeg/lib/libavcodec.a View File


BIN
ThirdParty/ffmpeg/lib/libavformat.a View File


BIN
ThirdParty/ffmpeg/lib/libavutil.a View File


BIN
ThirdParty/ffmpeg/lib/libswresample.a View File


+ 3
- 3
ThirdParty/ffmpeg/lib/pkgconfig/libavcodec.pc View File

@@ -5,10 +5,10 @@ includedir=/Users/chris/Source/Repos/cog/ThirdParty/ffmpeg/include

Name: libavcodec
Description: FFmpeg codec library
Version: 57.106.104
Requires: libswresample >= 2.8.100, libavutil >= 55.77.101
Version: 58.8.100
Requires: libswresample >= 3.0.101, libavutil >= 56.6.100
Requires.private:
Conflicts:
Libs: -L${libdir} -lavcodec -framework CoreFoundation -framework VideoToolbox -framework CoreMedia -framework CoreVideo -liconv -Wl,-framework,CoreFoundation -Wl,-framework,Security -lm -lbz2 -lz -pthread -pthread -framework CoreServices -framework CoreGraphics -framework VideoToolbox -framework CoreImage -framework AVFoundation -framework AudioToolbox -framework AppKit -mmacosx-version-min=10.6
Libs: -L${libdir} -lavcodec -pthread -lm
Libs.private:
Cflags: -I${includedir}

+ 3
- 3
ThirdParty/ffmpeg/lib/pkgconfig/libavformat.pc View File

@@ -5,10 +5,10 @@ includedir=/Users/chris/Source/Repos/cog/ThirdParty/ffmpeg/include

Name: libavformat
Description: FFmpeg container format library
Version: 57.82.102
Requires: libavcodec >= 57.106.104, libswresample >= 2.8.100, libavutil >= 55.77.101
Version: 58.3.100
Requires: libavcodec >= 58.8.100, libswresample >= 3.0.101, libavutil >= 56.6.100
Requires.private:
Conflicts:
Libs: -L${libdir} -lavformat -framework CoreFoundation -framework VideoToolbox -framework CoreMedia -framework CoreVideo -liconv -Wl,-framework,CoreFoundation -Wl,-framework,Security -lm -lbz2 -lz -pthread -pthread -framework CoreServices -framework CoreGraphics -framework VideoToolbox -framework CoreImage -framework AVFoundation -framework AudioToolbox -framework AppKit -mmacosx-version-min=10.6
Libs: -L${libdir} -lavformat -lm -lz
Libs.private:
Cflags: -I${includedir}

+ 2
- 2
ThirdParty/ffmpeg/lib/pkgconfig/libavutil.pc View File

@@ -5,10 +5,10 @@ includedir=/Users/chris/Source/Repos/cog/ThirdParty/ffmpeg/include

Name: libavutil
Description: FFmpeg utility library
Version: 55.77.101
Version: 56.6.100
Requires:
Requires.private:
Conflicts:
Libs: -L${libdir} -lavutil -lm
Libs: -L${libdir} -lavutil -pthread -lm -framework VideoToolbox -framework CoreFoundation -framework CoreMedia -framework CoreVideo -framework CoreServices
Libs.private:
Cflags: -I${includedir}

+ 5
- 5
ThirdParty/ffmpeg/lib/pkgconfig/libswresample.pc View File

@@ -1,12 +1,12 @@
prefix=/usr/local
prefix=/Users/chris/Source/Repos/cog/ThirdParty/ffmpeg
exec_prefix=${prefix}
libdir=/usr/local/lib
includedir=/usr/local/include
libdir=/Users/chris/Source/Repos/cog/ThirdParty/ffmpeg/lib
includedir=/Users/chris/Source/Repos/cog/ThirdParty/ffmpeg/include

Name: libswresample
Description: FFmpeg audio resampling library
Version: 2.8.100
Requires: libavutil >= 55.74.100
Version: 3.0.101
Requires: libavutil >= 56.6.100
Requires.private:
Conflicts:
Libs: -L${libdir} -lswresample -lm


+ 50
- 0
ThirdParty/ffmpeg/share/ffmpeg/examples/Makefile View File

@@ -0,0 +1,50 @@
# use pkg-config for getting CFLAGS and LDLIBS
FFMPEG_LIBS= libavdevice \
libavformat \
libavfilter \
libavcodec \
libswresample \
libswscale \
libavutil \

CFLAGS += -Wall -g
CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS)
LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS)

EXAMPLES= avio_dir_cmd \
avio_reading \
decode_audio \
decode_video \
demuxing_decoding \
encode_audio \
encode_video \
extract_mvs \
filtering_video \
filtering_audio \
http_multiclient \
hw_decode \
metadata \
muxing \
remuxing \
resampling_audio \
scaling_video \
transcode_aac \
transcoding \

OBJS=$(addsuffix .o,$(EXAMPLES))

# the following examples make explicit use of the math library
avcodec: LDLIBS += -lm
encode_audio: LDLIBS += -lm
muxing: LDLIBS += -lm
resampling_audio: LDLIBS += -lm

.phony: all clean-test clean

all: $(OBJS) $(EXAMPLES)

clean-test:
$(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg

clean: clean-test
$(RM) $(EXAMPLES) $(OBJS)

+ 23
- 0
ThirdParty/ffmpeg/share/ffmpeg/examples/README View File

@@ -0,0 +1,23 @@
FFmpeg examples README
----------------------

Both following use cases rely on pkg-config and make, thus make sure
that you have them installed and working on your system.


Method 1: build the installed examples in a generic read/write user directory

Copy to a read/write user directory and just use "make", it will link
to the libraries on your system, assuming the PKG_CONFIG_PATH is
correctly configured.

Method 2: build the examples in-tree

Assuming you are in the source FFmpeg checkout directory, you need to build
FFmpeg (no need to make install in any prefix). Then just run "make examples".
This will build the examples using the FFmpeg build system. You can clean those
examples using "make examplesclean"

If you want to try the dedicated Makefile examples (to emulate the first
method), go into doc/examples and run a command such as
PKG_CONFIG_PATH=pc-uninstalled make.

+ 180
- 0
ThirdParty/ffmpeg/share/ffmpeg/examples/avio_dir_cmd.c View File

@@ -0,0 +1,180 @@
/*
* Copyright (c) 2014 Lukasz Marek
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavformat/avio.h>

static const char *type_string(int type)
{
switch (type) {
case AVIO_ENTRY_DIRECTORY:
return "<DIR>";
case AVIO_ENTRY_FILE:
return "<FILE>";
case AVIO_ENTRY_BLOCK_DEVICE:
return "<BLOCK DEVICE>";
case AVIO_ENTRY_CHARACTER_DEVICE:
return "<CHARACTER DEVICE>";
case AVIO_ENTRY_NAMED_PIPE:
return "<PIPE>";
case AVIO_ENTRY_SYMBOLIC_LINK:
return "<LINK>";
case AVIO_ENTRY_SOCKET:
return "<SOCKET>";
case AVIO_ENTRY_SERVER:
return "<SERVER>";
case AVIO_ENTRY_SHARE:
return "<SHARE>";
case AVIO_ENTRY_WORKGROUP:
return "<WORKGROUP>";
case AVIO_ENTRY_UNKNOWN:
default:
break;
}
return "<UNKNOWN>";
}

static int list_op(const char *input_dir)
{
AVIODirEntry *entry = NULL;
AVIODirContext *ctx = NULL;
int cnt, ret;
char filemode[4], uid_and_gid[20];

if ((ret = avio_open_dir(&ctx, input_dir, NULL)) < 0) {
av_log(NULL, AV_LOG_ERROR, "Cannot open directory: %s.\n", av_err2str(ret));
goto fail;
}

cnt = 0;
for (;;) {
if ((ret = avio_read_dir(ctx, &entry)) < 0) {
av_log(NULL, AV_LOG_ERROR, "Cannot list directory: %s.\n", av_err2str(ret));
goto fail;
}
if (!entry)
break;
if (entry->filemode == -1) {
snprintf(filemode, 4, "???");
} else {
snprintf(filemode, 4, "%3"PRIo64, entry->filemode);
}
snprintf(uid_and_gid, 20, "%"PRId64"(%"PRId64")", entry->user_id, entry->group_id);
if (cnt == 0)
av_log(NULL, AV_LOG_INFO, "%-9s %12s %30s %10s %s %16s %16s %16s\n",
"TYPE", "SIZE", "NAME", "UID(GID)", "UGO", "MODIFIED",
"ACCESSED", "STATUS_CHANGED");
av_log(NULL, AV_LOG_INFO, "%-9s %12"PRId64" %30s %10s %s %16"PRId64" %16"PRId64" %16"PRId64"\n",
type_string(entry->type),
entry->size,
entry->name,
uid_and_gid,
filemode,
entry->modification_timestamp,
entry->access_timestamp,
entry->status_change_timestamp);
avio_free_directory_entry(&entry);
cnt++;
};

fail:
avio_close_dir(&ctx);
return ret;
}

static int del_op(const char *url)
{
int ret = avpriv_io_delete(url);
if (ret < 0)
av_log(NULL, AV_LOG_ERROR, "Cannot delete '%s': %s.\n", url, av_err2str(ret));
return ret;
}

static int move_op(const char *src, const char *dst)
{
int ret = avpriv_io_move(src, dst);
if (ret < 0)
av_log(NULL, AV_LOG_ERROR, "Cannot move '%s' into '%s': %s.\n", src, dst, av_err2str(ret));
return ret;
}


static void usage(const char *program_name)
{
fprintf(stderr, "usage: %s OPERATION entry1 [entry2]\n"
"API example program to show how to manipulate resources "
"accessed through AVIOContext.\n"
"OPERATIONS:\n"
"list list content of the directory\n"
"move rename content in directory\n"
"del delete content in directory\n",
program_name);
}

int main(int argc, char *argv[])
{
const char *op = NULL;
int ret;

av_log_set_level(AV_LOG_DEBUG);

if (argc < 2) {
usage(argv[0]);
return 1;
}

/* register codecs and formats and other lavf/lavc components*/
av_register_all();
avformat_network_init();

op = argv[1];
if (strcmp(op, "list") == 0) {
if (argc < 3) {
av_log(NULL, AV_LOG_INFO, "Missing argument for list operation.\n");
ret = AVERROR(EINVAL);
} else {
ret = list_op(argv[2]);
}
} else if (strcmp(op, "del") == 0) {
if (argc < 3) {
av_log(NULL, AV_LOG_INFO, "Missing argument for del operation.\n");
ret = AVERROR(EINVAL);
} else {
ret = del_op(argv[2]);
}
} else if (strcmp(op, "move") == 0) {
if (argc < 4) {
av_log(NULL, AV_LOG_INFO, "Missing argument for move operation.\n");
ret = AVERROR(EINVAL);
} else {
ret = move_op(argv[2], argv[3]);
}
} else {
av_log(NULL, AV_LOG_INFO, "Invalid operation %s\n", op);
ret = AVERROR(EINVAL);
}

avformat_network_deinit();

return ret < 0 ? 1 : 0;
}

+ 136
- 0
ThirdParty/ffmpeg/share/ffmpeg/examples/avio_reading.c View File

@@ -0,0 +1,136 @@
/*
* Copyright (c) 2014 Stefano Sabatini
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

/**
* @file
* libavformat AVIOContext API example.
*
* Make libavformat demuxer access media content through a custom
* AVIOContext read callback.
* @example avio_reading.c
*/

#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavformat/avio.h>
#include <libavutil/file.h>

struct buffer_data {
uint8_t *ptr;
size_t size; ///< size left in the buffer
};

static int read_packet(void *opaque, uint8_t *buf, int buf_size)
{
struct buffer_data *bd = (struct buffer_data *)opaque;
buf_size = FFMIN(buf_size, bd->size);

if (!buf_size)
return AVERROR_EOF;
printf("ptr:%p size:%zu\n", bd->ptr, bd->size);

/* copy internal buffer data to buf */
memcpy(buf, bd->ptr, buf_size);
bd->ptr += buf_size;
bd->size -= buf_size;

return buf_size;
}

int main(int argc, char *argv[])
{
AVFormatContext *fmt_ctx = NULL;
AVIOContext *avio_ctx = NULL;
uint8_t *buffer = NULL, *avio_ctx_buffer = NULL;
size_t buffer_size, avio_ctx_buffer_size = 4096;
char *input_filename = NULL;
int ret = 0;
struct buffer_data bd = { 0 };

if (argc != 2) {
fprintf(stderr, "usage: %s input_file\n"
"API example program to show how to read from a custom buffer "
"accessed through AVIOContext.\n", argv[0]);
return 1;
}
input_filename = argv[1];

/* register codecs and formats and other lavf/lavc components*/
av_register_all();

/* slurp file content into buffer */
ret = av_file_map(input_filename, &buffer, &buffer_size, 0, NULL);
if (ret < 0)
goto end;

/* fill opaque structure used by the AVIOContext read callback */
bd.ptr = buffer;
bd.size = buffer_size;

if (!(fmt_ctx = avformat_alloc_context())) {
ret = AVERROR(ENOMEM);
goto end;
}

avio_ctx_buffer = av_malloc(avio_ctx_buffer_size);
if (!avio_ctx_buffer) {
ret = AVERROR(ENOMEM);
goto end;
}
avio_ctx = avio_alloc_context(avio_ctx_buffer, avio_ctx_buffer_size,
0, &bd, &read_packet, NULL, NULL);
if (!avio_ctx) {
ret = AVERROR(ENOMEM);
goto end;
}
fmt_ctx->pb = avio_ctx;

ret = avformat_open_input(&fmt_ctx, NULL, NULL, NULL);
if (ret < 0) {
fprintf(stderr, "Could not open input\n");
goto end;
}

ret = avformat_find_stream_info(fmt_ctx, NULL);
if (ret < 0) {
fprintf(stderr, "Could not find stream information\n");
goto end;
}

av_dump_format(fmt_ctx, 0, input_filename, 0);

end:
avformat_close_input(&fmt_ctx);
/* note: the internal buffer could have changed, and be != avio_ctx_buffer */
if (avio_ctx) {
av_freep(&avio_ctx->buffer);
av_freep(&avio_ctx);
}
av_file_unmap(buffer, buffer_size);

if (ret < 0) {
fprintf(stderr, "Error occurred: %s\n", av_err2str(ret));
return 1;
}

return 0;
}

+ 187
- 0
ThirdParty/ffmpeg/share/ffmpeg/examples/decode_audio.c View File

@@ -0,0 +1,187 @@
/*
* Copyright (c) 2001 Fabrice Bellard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

/**
* @file
* audio decoding with libavcodec API example
*
* @example decode_audio.c
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <libavutil/frame.h>
#include <libavutil/mem.h>

#include <libavcodec/avcodec.h>

#define AUDIO_INBUF_SIZE 20480
#define AUDIO_REFILL_THRESH 4096

static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame,
FILE *outfile)
{
int i, ch;
int ret, data_size;

/* send the packet with the compressed data to the decoder */
ret = avcodec_send_packet(dec_ctx, pkt);
if (ret < 0) {
fprintf(stderr, "Error submitting the packet to the decoder\n");
exit(1);
}

/* read all the output frames (in general there may be any number of them */
while (ret >= 0) {
ret = avcodec_receive_frame(dec_ctx, frame);
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
return;
else if (ret < 0) {
fprintf(stderr, "Error during decoding\n");
exit(1);
}
data_size = av_get_bytes_per_sample(dec_ctx->sample_fmt);
if (data_size < 0) {
/* This should not occur, checking just for paranoia */
fprintf(stderr, "Failed to calculate data size\n");
exit(1);
}
for (i = 0; i < frame->nb_samples; i++)
for (ch = 0; ch < dec_ctx->channels; ch++)
fwrite(frame->data[ch] + data_size*i, 1, data_size, outfile);
}
}

int main(int argc, char **argv)
{
const char *outfilename, *filename;
const AVCodec *codec;
AVCodecContext *c= NULL;
AVCodecParserContext *parser = NULL;
int len, ret;
FILE *f, *outfile;
uint8_t inbuf[AUDIO_INBUF_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
uint8_t *data;
size_t data_size;
AVPacket *pkt;
AVFrame *decoded_frame = NULL;

if (argc <= 2) {
fprintf(stderr, "Usage: %s <input file> <output file>\n", argv[0]);
exit(0);
}
filename = argv[1];
outfilename = argv[2];

/* register all the codecs */
avcodec_register_all();

pkt = av_packet_alloc();

/* find the MPEG audio decoder */
codec = avcodec_find_decoder(AV_CODEC_ID_MP2);
if (!codec) {
fprintf(stderr, "Codec not found\n");
exit(1);
}

parser = av_parser_init(codec->id);
if (!parser) {
fprintf(stderr, "Parser not found\n");
exit(1);
}

c = avcodec_alloc_context3(codec);
if (!c) {
fprintf(stderr, "Could not allocate audio codec context\n");
exit(1);
}

/* open it */
if (avcodec_open2(c, codec, NULL) < 0) {
fprintf(stderr, "Could not open codec\n");
exit(1);
}