aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffmpeg-0.10/avformat.pas
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffmpeg-0.10/avformat.pas')
-rw-r--r--src/lib/ffmpeg-0.10/avformat.pas43
1 files changed, 14 insertions, 29 deletions
diff --git a/src/lib/ffmpeg-0.10/avformat.pas b/src/lib/ffmpeg-0.10/avformat.pas
index eab33a63..e2b464d3 100644
--- a/src/lib/ffmpeg-0.10/avformat.pas
+++ b/src/lib/ffmpeg-0.10/avformat.pas
@@ -441,46 +441,31 @@ procedure av_metadata_free(var m: PAVDictionary);
(* packet functions *)
-const
- PKT_FLAG_KEY = $0001;
-
-procedure av_destruct_packet_nofree(var pkt: TAVPacket);
- cdecl; external av__format;
-
-(**
- * Default packet destructor.
- *)
-procedure av_destruct_packet(var pkt: TAVPacket);
- cdecl; external av__format;
-
-(**
- * Initialize optional fields of a packet with default values.
- *
- * @param pkt packet
- *)
-procedure av_init_packet(var pkt: TAVPacket);
- cdecl; external av__format;
-
(**
- * Allocate the payload of a packet and initialize its fields with
+ * Allocate and read the payload of a packet and initialize its fields with
* default values.
*
* @param pkt packet
- * @param size wanted payload size
- * @return 0 if OK, AVERROR_xxx otherwise
+ * @param size desired payload size
+ * @return >0 (read size) if OK, AVERROR_xxx otherwise
*)
-function av_new_packet(var pkt: TAVPacket; size: cint): cint;
+function av_get_packet(s: PAVIOContext; var pkt: TAVPacket; size: cint): cint;
cdecl; external av__format;
(**
- * Allocate and read the payload of a packet and initialize its fields with
- * default values.
+ * Read data and append it to the current content of the AVPacket.
+ * If pkt->size is 0 this is identical to av_get_packet.
+ * Note that this uses av_grow_packet and thus involves a realloc
+ * which is inefficient. Thus this function should only be used
+ * when there is no reasonable way to know (an upper bound of)
+ * the final size.
*
* @param pkt packet
- * @param size desired payload size
- * @return >0 (read size) if OK, AVERROR_xxx otherwise
+ * @param size amount of data to read
+ * @return >0 (read size) if OK, AVERROR_xxx otherwise, previous data
+ * will not be lost even if an error occurs.
*)
-function av_get_packet(s: PByteIOContext; var pkt: TAVPacket; size: cint): cint;
+function av_append_packet(s: PAVIOContext; var pkt: TAVPacket; size: cint): cint;
cdecl; external av__format;
(*************************************************)