@@ -940,6 +940,7 @@ typedef struct AVStream {
940
940
*/
941
941
AVPacket attached_pic ;
942
942
943
+ #if FF_API_AVSTREAM_SIDE_DATA
943
944
/**
944
945
* An array of side data that applies to the whole stream (i.e. the
945
946
* container does not allow it to change between packets).
@@ -956,13 +957,20 @@ typedef struct AVStream {
956
957
*
957
958
* Freed by libavformat in avformat_free_context().
958
959
*
959
- * @see av_format_inject_global_side_data()
960
+ * @deprecated use AVStream's @ref AVCodecParameters.coded_side_data
961
+ * "codecpar side data".
960
962
*/
963
+ attribute_deprecated
961
964
AVPacketSideData * side_data ;
962
965
/**
963
966
* The number of elements in the AVStream.side_data array.
967
+ *
968
+ * @deprecated use AVStream's @ref AVCodecParameters.nb_coded_side_data
969
+ * "codecpar side data".
964
970
*/
971
+ attribute_deprecated
965
972
int nb_side_data ;
973
+ #endif
966
974
967
975
/**
968
976
* Flags indicating events happening on the stream, a combination of
@@ -1723,6 +1731,12 @@ typedef struct AVFormatContext {
1723
1731
/**
1724
1732
* This function will cause global side data to be injected in the next packet
1725
1733
* of each stream as well as after any subsequent seek.
1734
+ *
1735
+ * @note global side data is always available in every AVStream's
1736
+ * @ref AVCodecParameters.coded_side_data "codecpar side data" array, and
1737
+ * in a @ref AVCodecContext.coded_side_data "decoder's side data" array if
1738
+ * initialized with said stream's codecpar.
1739
+ * @see av_packet_side_data_get()
1726
1740
*/
1727
1741
void av_format_inject_global_side_data (AVFormatContext * s );
1728
1742
@@ -1849,6 +1863,7 @@ const AVClass *av_stream_get_class(void);
1849
1863
*/
1850
1864
AVStream * avformat_new_stream (AVFormatContext * s , const struct AVCodec * c );
1851
1865
1866
+ #if FF_API_AVSTREAM_SIDE_DATA
1852
1867
/**
1853
1868
* Wrap an existing array as stream side data.
1854
1869
*
@@ -1861,7 +1876,10 @@ AVStream *avformat_new_stream(AVFormatContext *s, const struct AVCodec *c);
1861
1876
*
1862
1877
* @return zero on success, a negative AVERROR code on failure. On failure,
1863
1878
* the stream is unchanged and the data remains owned by the caller.
1879
+ * @deprecated use av_packet_side_data_add() with the stream's
1880
+ * @ref AVCodecParameters.coded_side_data "codecpar side data"
1864
1881
*/
1882
+ attribute_deprecated
1865
1883
int av_stream_add_side_data (AVStream * st , enum AVPacketSideDataType type ,
1866
1884
uint8_t * data , size_t size );
1867
1885
@@ -1873,7 +1891,10 @@ int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
1873
1891
* @param size side information size
1874
1892
*
1875
1893
* @return pointer to fresh allocated data or NULL otherwise
1894
+ * @deprecated use av_packet_side_data_new() with the stream's
1895
+ * @ref AVCodecParameters.coded_side_data "codecpar side data"
1876
1896
*/
1897
+ attribute_deprecated
1877
1898
uint8_t * av_stream_new_side_data (AVStream * stream ,
1878
1899
enum AVPacketSideDataType type , size_t size );
1879
1900
/**
@@ -1885,9 +1906,13 @@ uint8_t *av_stream_new_side_data(AVStream *stream,
1885
1906
* or to zero if the desired side data is not present.
1886
1907
*
1887
1908
* @return pointer to data if present or NULL otherwise
1909
+ * @deprecated use av_packet_side_data_get() with the stream's
1910
+ * @ref AVCodecParameters.coded_side_data "codecpar side data"
1888
1911
*/
1912
+ attribute_deprecated
1889
1913
uint8_t * av_stream_get_side_data (const AVStream * stream ,
1890
1914
enum AVPacketSideDataType type , size_t * size );
1915
+ #endif
1891
1916
1892
1917
AVProgram * av_new_program (AVFormatContext * s , int id );
1893
1918
0 commit comments