aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffmpeg/rational.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-01 12:28:15 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-01 12:28:15 +0000
commit08a0ddf3d8f9eb819e03d9cd6c8d79bd8634fec6 (patch)
treeb69df695577ecfecc3c12805faa49bd3b4d53576 /src/lib/ffmpeg/rational.pas
parent392718a615f10c62e710eca46a095cb37928fe1b (diff)
downloadusdx-08a0ddf3d8f9eb819e03d9cd6c8d79bd8634fec6.tar.gz
usdx-08a0ddf3d8f9eb819e03d9cd6c8d79bd8634fec6.tar.xz
usdx-08a0ddf3d8f9eb819e03d9cd6c8d79bd8634fec6.zip
- 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
Diffstat (limited to 'src/lib/ffmpeg/rational.pas')
-rw-r--r--src/lib/ffmpeg/rational.pas24
1 files changed, 23 insertions, 1 deletions
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;