From 6084e90af46bac033d637a9075f308b4d2ec57fd Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 10 Jan 2008 23:26:03 +0000 Subject: "MATHEMATICS.pas" is now "mathematics.pas" git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@777 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/lib/ffmpeg/mathematics.pas | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Game/Code/lib/ffmpeg/mathematics.pas (limited to 'Game/Code/lib/ffmpeg/mathematics.pas') diff --git a/Game/Code/lib/ffmpeg/mathematics.pas b/Game/Code/lib/ffmpeg/mathematics.pas new file mode 100644 index 00000000..42a30925 --- /dev/null +++ b/Game/Code/lib/ffmpeg/mathematics.pas @@ -0,0 +1,79 @@ +unit mathematics; + +interface + +(* + * copyright (c) 2005 Michael Niedermayer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +(* This is a part of Pascal porting of ffmpeg. Originally by Victor Zinetz for Delphi and Free Pascal on Windows. +For Mac OS X, some modifications were made by The Creative CAT, denoted as CAT +in the source codes *) + +{$IFDEF FPC} + {$IFDEF LINUX} + {$LINKLIB libavutil} + {$ENDIF} + {$MODE DELPHI } (* CAT *) + {$PACKENUM 4} (* every enum type variables uses 4 bytes, CAT *) + {$PACKRECORDS C} (* GCC compatible, Record Packing, CAT *) +{$ENDIF} + +uses + rational; (* CAT *) + +const +{$IFDEF MSWINDOWS} + av__util = 'avutil-49.dll'; +{$ENDIF} +{$IFDEF LINUX} + av__util = 'libavutil.so'; // .0d +{$ENDIF} +{$IFDEF DARWIN} + av__util = 'libavutil.dylib'; +{$ENDIF} + +type + TAVRounding = ( + AV_ROUND_ZERO = 0, ///< round toward zero + AV_ROUND_INF = 1, ///< round away from zero + AV_ROUND_DOWN = 2, ///< round toward -infinity + AV_ROUND_UP = 3, ///< round toward +infinity + AV_ROUND_NEAR_INF = 5, ///< round to nearest and halfway cases away from zero + AV_ROUND_FUCKING = $FFFFFF + ); + +(** * rescale a 64bit integer with rounding to nearest. + * a simple a*b/c isn't possible as it can overflow *) +function av_rescale (a, b, c: int64): int64; + cdecl; external av__util; + +(** + * rescale a 64bit integer with specified rounding. + * a simple a*b/c isn't possible as it can overflow *) +function av_rescale_rnd (a, b, c: int64; enum: TAVRounding): int64; + cdecl; external av__util; + +(** + * rescale a 64bit integer by 2 rational numbers. *) +function av_rescale_q (a: int64; bq, cq: TAVRational): int64; + cdecl; external av__util; + +implementation + +end. + -- cgit v1.2.3 From 9ddb8c2b7c851d82922342ee8873267f0f1ae310 Mon Sep 17 00:00:00 2001 From: tobigun Date: Fri, 11 Jan 2008 03:26:05 +0000 Subject: there were some changes in the ffmpeg interface (for example TAVFormatContext's pb member is a pointer now). To better track version changes, version numbers of the dlls are now managed by the version.inc file. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@779 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/lib/ffmpeg/mathematics.pas | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'Game/Code/lib/ffmpeg/mathematics.pas') diff --git a/Game/Code/lib/ffmpeg/mathematics.pas b/Game/Code/lib/ffmpeg/mathematics.pas index 42a30925..3beef517 100644 --- a/Game/Code/lib/ffmpeg/mathematics.pas +++ b/Game/Code/lib/ffmpeg/mathematics.pas @@ -36,16 +36,7 @@ in the source codes *) uses rational; (* CAT *) -const -{$IFDEF MSWINDOWS} - av__util = 'avutil-49.dll'; -{$ENDIF} -{$IFDEF LINUX} - av__util = 'libavutil.so'; // .0d -{$ENDIF} -{$IFDEF DARWIN} - av__util = 'libavutil.dylib'; -{$ENDIF} +{$I version.inc} type TAVRounding = ( -- cgit v1.2.3 From 89ac41a2ccb85d6dfccb501ff4877231cab72094 Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 5 Feb 2008 13:43:38 +0000 Subject: Update of the ffmpeg headers to their current trunk versions. IMPORTANT: parameter of av_free_packet is a pointer now procedure av_free_packet (pkt: PAVPacket); as it is with av_free() and av_freep() git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@814 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/lib/ffmpeg/mathematics.pas | 41 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'Game/Code/lib/ffmpeg/mathematics.pas') diff --git a/Game/Code/lib/ffmpeg/mathematics.pas b/Game/Code/lib/ffmpeg/mathematics.pas index 3beef517..4ecdce8f 100644 --- a/Game/Code/lib/ffmpeg/mathematics.pas +++ b/Game/Code/lib/ffmpeg/mathematics.pas @@ -1,7 +1,3 @@ -unit mathematics; - -interface - (* * copyright (c) 2005 Michael Niedermayer * @@ -24,19 +20,23 @@ interface For Mac OS X, some modifications were made by The Creative CAT, denoted as CAT in the source codes *) +// Revision: 10765 + +unit mathematics; + {$IFDEF FPC} - {$IFDEF LINUX} - {$LINKLIB libavutil} - {$ENDIF} - {$MODE DELPHI } (* CAT *) - {$PACKENUM 4} (* every enum type variables uses 4 bytes, CAT *) - {$PACKRECORDS C} (* GCC compatible, Record Packing, CAT *) + {$MODE DELPHI } + {$PACKENUM 4} (* use 4-byte enums *) + {$PACKRECORDS C} (* C/C++-compatible record packing *) +{$ELSE} + {$MINENUMSIZE 4} (* use 4-byte enums *) {$ENDIF} -uses - rational; (* CAT *) +interface -{$I version.inc} +uses + rational, + UConfig; type TAVRounding = ( @@ -44,23 +44,26 @@ type AV_ROUND_INF = 1, ///< round away from zero AV_ROUND_DOWN = 2, ///< round toward -infinity AV_ROUND_UP = 3, ///< round toward +infinity - AV_ROUND_NEAR_INF = 5, ///< round to nearest and halfway cases away from zero - AV_ROUND_FUCKING = $FFFFFF + AV_ROUND_NEAR_INF = 5 ///< round to nearest and halfway cases away from zero ); -(** * rescale a 64bit integer with rounding to nearest. - * a simple a*b/c isn't possible as it can overflow *) +(** + * rescale a 64bit integer with rounding to nearest. + * a simple a*b/c isn't possible as it can overflow + *) function av_rescale (a, b, c: int64): int64; cdecl; external av__util; (** * rescale a 64bit integer with specified rounding. - * a simple a*b/c isn't possible as it can overflow *) + * a simple a*b/c isn't possible as it can overflow + *) function av_rescale_rnd (a, b, c: int64; enum: TAVRounding): int64; cdecl; external av__util; (** - * rescale a 64bit integer by 2 rational numbers. *) + * rescale a 64bit integer by 2 rational numbers. + *) function av_rescale_q (a: int64; bq, cq: TAVRational): int64; cdecl; external av__util; -- cgit v1.2.3 From f49d49ac6af3f39a00e19ce314636520e1ae1faf Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 7 Feb 2008 13:22:40 +0000 Subject: compatibility with the current svn-version git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@837 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/lib/ffmpeg/mathematics.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Game/Code/lib/ffmpeg/mathematics.pas') diff --git a/Game/Code/lib/ffmpeg/mathematics.pas b/Game/Code/lib/ffmpeg/mathematics.pas index 4ecdce8f..ae390e9d 100644 --- a/Game/Code/lib/ffmpeg/mathematics.pas +++ b/Game/Code/lib/ffmpeg/mathematics.pas @@ -20,7 +20,9 @@ For Mac OS X, some modifications were made by The Creative CAT, denoted as CAT in the source codes *) -// Revision: 10765 +(* + * Revision: 10765, Wed Oct 17 09:37:46 2007 UTC + *) unit mathematics; -- cgit v1.2.3