From 08a0ddf3d8f9eb819e03d9cd6c8d79bd8634fec6 Mon Sep 17 00:00:00 2001 From: tobigun Date: Wed, 1 Oct 2008 12:28:15 +0000 Subject: - FFmpeg header update - update to newest revision - if linked libs are too new, USDX will not compile anymore and display an error message (to avoid mysterious crashes if an unsupported version of FFmpeg is used) - comment change in UVisualizer.pas git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1428 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/ffmpeg/rational.pas | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src/lib/ffmpeg/rational.pas') diff --git a/src/lib/ffmpeg/rational.pas b/src/lib/ffmpeg/rational.pas index 5a2629a9..02d594ff 100644 --- a/src/lib/ffmpeg/rational.pas +++ b/src/lib/ffmpeg/rational.pas @@ -27,7 +27,7 @@ (* * Conversion of libavutil/rational.h - * revision 12498, Wed Mar 19 06:17:43 2008 UTC + * revision 15415, Thu Sep 25 19:23:13 2008 UTC *) unit rational; @@ -58,6 +58,9 @@ type den: cint; ///< denominator end; + TAVRationalArray = array[0 .. (MaxInt div SizeOf(TAVRational))-1] of TAVRational; + PAVRationalArray = ^TAVRationalArray; + (** * Compare two rationals. * @param a first rational @@ -131,6 +134,25 @@ function av_sub_q(b: TAVRational; c: TAVRational): TAVRational; function av_d2q(d: cdouble; max: cint): TAVRational; cdecl; external av__util; {av_const} +{$IF LIBAVUTIL_VERSION >= 49011000} // 49.11.0 + +(** + * @return 1 if \q1 is nearer to \p q than \p q2, -1 if \p q2 is nearer + * than \p q1, 0 if they have the same distance. + *) +function av_nearer_q(q, q1, q2: TAVRational): cint; + cdecl; external av__util; + +(** + * Finds the nearest value in \p q_list to \p q. + * @param q_list an array of rationals terminated by {0, 0} + * @return the index of the nearest value found in the array + *) +function av_find_nearest_q_idx(q: TAVRational; q_list: {const} PAVRationalArray): cint; + cdecl; external av__util; + +{$IFEND} + implementation function av_cmp_q (a: TAVRational; b: TAVRational): cint; -- cgit v1.2.3