]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/packet.h
avutil/buffer: Switch AVBuffer API to size_t
[ffmpeg] / libavcodec / packet.h
index 47e9b8999b21bc29e52c2bb17467e3a9f297633b..fad8341c1296aceb921b6626e540ce03af40e53e 100644 (file)
@@ -305,11 +305,7 @@ enum AVPacketSideDataType {
 
 typedef struct AVPacketSideData {
     uint8_t *data;
-#if FF_API_BUFFER_SIZE_T
-    int      size;
-#else
     size_t   size;
-#endif
     enum AVPacketSideDataType type;
 } AVPacketSideData;
 
@@ -519,45 +515,6 @@ int av_grow_packet(AVPacket *pkt, int grow_by);
  */
 int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size);
 
-#if FF_API_AVPACKET_OLD_API
-/**
- * @warning This is a hack - the packet memory allocation stuff is broken. The
- * packet is allocated if it was not really allocated.
- *
- * @deprecated Use av_packet_ref or av_packet_make_refcounted
- */
-attribute_deprecated
-int av_dup_packet(AVPacket *pkt);
-/**
- * Copy packet, including contents
- *
- * @return 0 on success, negative AVERROR on fail
- *
- * @deprecated Use av_packet_ref
- */
-attribute_deprecated
-int av_copy_packet(AVPacket *dst, const AVPacket *src);
-
-/**
- * Copy packet side data
- *
- * @return 0 on success, negative AVERROR on fail
- *
- * @deprecated Use av_packet_copy_props
- */
-attribute_deprecated
-int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src);
-
-/**
- * Free a packet.
- *
- * @deprecated Use av_packet_unref
- *
- * @param pkt packet to free
- */
-attribute_deprecated
-void av_free_packet(AVPacket *pkt);
-#endif
 /**
  * Allocate new information of a packet.
  *
@@ -567,11 +524,7 @@ void av_free_packet(AVPacket *pkt);
  * @return pointer to fresh allocated data or NULL otherwise
  */
 uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
-#if FF_API_BUFFER_SIZE_T
-                                 int size);
-#else
                                  size_t size);
-#endif
 
 /**
  * Wrap an existing array as a packet side data.
@@ -598,11 +551,7 @@ int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
  * @return 0 on success, < 0 on failure
  */
 int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
-#if FF_API_BUFFER_SIZE_T
-                               int size);
-#else
                                size_t size);
-#endif
 
 /**
  * Get side information from packet.
@@ -614,19 +563,7 @@ int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
  * @return pointer to data if present or NULL otherwise
  */
 uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type,
-#if FF_API_BUFFER_SIZE_T
-                                 int *size);
-#else
                                  size_t *size);
-#endif
-
-#if FF_API_MERGE_SD_API
-attribute_deprecated
-int av_packet_merge_side_data(AVPacket *pkt);
-
-attribute_deprecated
-int av_packet_split_side_data(AVPacket *pkt);
-#endif
 
 const char *av_packet_side_data_name(enum AVPacketSideDataType type);
 
@@ -637,11 +574,7 @@ const char *av_packet_side_data_name(enum AVPacketSideDataType type);
  * @param size pointer to store the size of the returned data
  * @return pointer to data if successful, NULL otherwise
  */
-#if FF_API_BUFFER_SIZE_T
-uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size);
-#else
 uint8_t *av_packet_pack_dictionary(AVDictionary *dict, size_t *size);
-#endif
 /**
  * Unpack a dictionary from side_data.
  *
@@ -650,12 +583,8 @@ uint8_t *av_packet_pack_dictionary(AVDictionary *dict, size_t *size);
  * @param dict the metadata storage dictionary
  * @return 0 on success, < 0 on failure
  */
-#if FF_API_BUFFER_SIZE_T
-int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict);
-#else
 int av_packet_unpack_dictionary(const uint8_t *data, size_t size,
                                 AVDictionary **dict);
-#endif
 
 /**
  * Convenience function to free all the side data stored.