aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-05-24 08:33:49 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-05-24 08:33:49 +0000
commit660d185cb44ee5c8446d5019bdcf0a5f51862bc4 (patch)
tree13e8ee0996bf9f03c576a361abd8f62abe0e1d87 /src/lib
parent7d523b59769a7a99afdfe365ced3c6727018cf5a (diff)
downloadusdx-660d185cb44ee5c8446d5019bdcf0a5f51862bc4.tar.gz
usdx-660d185cb44ee5c8446d5019bdcf0a5f51862bc4.tar.xz
usdx-660d185cb44ee5c8446d5019bdcf0a5f51862bc4.zip
add missing avcodec_open2 and PPAVDictionary.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2885 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ffmpeg-0.7/avcodec.pas33
-rw-r--r--src/lib/ffmpeg-0.7/libavutil/dict.pas1
-rw-r--r--src/lib/ffmpeg-0.8/avcodec.pas34
-rw-r--r--src/lib/ffmpeg-0.8/libavutil/dict.pas1
4 files changed, 69 insertions, 0 deletions
diff --git a/src/lib/ffmpeg-0.7/avcodec.pas b/src/lib/ffmpeg-0.7/avcodec.pas
index 99f3e453..369a8e79 100644
--- a/src/lib/ffmpeg-0.7/avcodec.pas
+++ b/src/lib/ffmpeg-0.7/avcodec.pas
@@ -4065,6 +4065,39 @@ function avcodec_default_execute2(s: PAVCodecContext; func: TExecuteFunc; arg: P
function avcodec_open(avctx: PAVCodecContext; codec: PAVCodec): cint;
cdecl; external av__codec;
+(**
+ * Initialize the AVCodecContext to use the given AVCodec. Prior to using this
+ * function the context has to be allocated with avcodec_alloc_context().
+ *
+ * The functions avcodec_find_decoder_by_name(), avcodec_find_encoder_by_name(),
+ * avcodec_find_decoder() and avcodec_find_encoder() provide an easy way for
+ * retrieving a codec.
+ *
+ * @warning This function is not thread safe!
+ *
+ * @code
+ * avcodec_register_all();
+ * av_dict_set(&opts, "b", "2.5M", 0);
+ * codec = avcodec_find_decoder(CODEC_ID_H264);
+ * if (!codec)
+ * exit(1);
+ *
+ * context = avcodec_alloc_context();
+ *
+ * if (avcodec_open(context, codec, opts) < 0)
+ * exit(1);
+ * @endcode
+ *
+ * @param avctx The context to initialize.
+ * @param options A dictionary filled with AVCodecContext and codec-private options.
+ * On return this object will be filled with options that were not found.
+ *
+ * @return zero on success, a negative value on error
+ * @see avcodec_alloc_context3(), avcodec_find_decoder(), avcodec_find_encoder(),
+ * av_dict_set(), av_opt_find().
+ *)
+function avcodec_open2(avctx: PAVCodecContext; codec: PAVCodec; options: PPAVDictionary): cint;
+ cdecl; external av__codec;
{$IF FF_API_AUDIO_OLD}
(**
diff --git a/src/lib/ffmpeg-0.7/libavutil/dict.pas b/src/lib/ffmpeg-0.7/libavutil/dict.pas
index 6a924fd9..8235f108 100644
--- a/src/lib/ffmpeg-0.7/libavutil/dict.pas
+++ b/src/lib/ffmpeg-0.7/libavutil/dict.pas
@@ -41,6 +41,7 @@ type
(* with the "help" of libavutil/internal.h: *)
+ PPAVDictionary = ^PAVDictionary;
PAVDictionary = ^TAVDictionary;
TAVDictionary = record
count: cint;
diff --git a/src/lib/ffmpeg-0.8/avcodec.pas b/src/lib/ffmpeg-0.8/avcodec.pas
index a933fa8c..a8bae81f 100644
--- a/src/lib/ffmpeg-0.8/avcodec.pas
+++ b/src/lib/ffmpeg-0.8/avcodec.pas
@@ -3966,6 +3966,40 @@ function avcodec_open(avctx: PAVCodecContext; codec: PAVCodec): cint;
cdecl; external av__codec;
(**
+ * Initialize the AVCodecContext to use the given AVCodec. Prior to using this
+ * function the context has to be allocated with avcodec_alloc_context().
+ *
+ * The functions avcodec_find_decoder_by_name(), avcodec_find_encoder_by_name(),
+ * avcodec_find_decoder() and avcodec_find_encoder() provide an easy way for
+ * retrieving a codec.
+ *
+ * @warning This function is not thread safe!
+ *
+ * @code
+ * avcodec_register_all();
+ * av_dict_set(&opts, "b", "2.5M", 0);
+ * codec = avcodec_find_decoder(CODEC_ID_H264);
+ * if (!codec)
+ * exit(1);
+ *
+ * context = avcodec_alloc_context();
+ *
+ * if (avcodec_open(context, codec, opts) < 0)
+ * exit(1);
+ * @endcode
+ *
+ * @param avctx The context to initialize.
+ * @param options A dictionary filled with AVCodecContext and codec-private options.
+ * On return this object will be filled with options that were not found.
+ *
+ * @return zero on success, a negative value on error
+ * @see avcodec_alloc_context3(), avcodec_find_decoder(), avcodec_find_encoder(),
+ * av_dict_set(), av_opt_find().
+ *)
+function avcodec_open2(avctx: PAVCodecContext; codec: PAVCodec; options: PPAVDictionary): cint;
+ cdecl; external av__codec;
+
+(**
* Decode the audio frame of size avpkt->size from avpkt->data into samples.
* Some decoders may support multiple frames in a single AVPacket, such
* decoders would then just decode the first frame. In this case,
diff --git a/src/lib/ffmpeg-0.8/libavutil/dict.pas b/src/lib/ffmpeg-0.8/libavutil/dict.pas
index d50d3b0b..fc11f014 100644
--- a/src/lib/ffmpeg-0.8/libavutil/dict.pas
+++ b/src/lib/ffmpeg-0.8/libavutil/dict.pas
@@ -41,6 +41,7 @@ type
(* with the "help" of libavutil/internal.h: *)
+ PPAVDictionary = ^PAVDictionary;
PAVDictionary = ^TAVDictionary;
TAVDictionary = record
count: cint;