From 30343a531999b5e50673ee1731f1c54cbc008dfd Mon Sep 17 00:00:00 2001 From: jaybinks Date: Wed, 5 Sep 2007 12:02:06 +0000 Subject: added 3rd party dependencies ( except Jedi-SDL ) modified DPR to statically include all files needed (using relative paths) this means 3rd party components should not need installation in the IDE, or adding to search paths. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@368 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/lib/ffmpeg/opt.pas | 101 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 Game/Code/lib/ffmpeg/opt.pas (limited to 'Game/Code/lib/ffmpeg/opt.pas') diff --git a/Game/Code/lib/ffmpeg/opt.pas b/Game/Code/lib/ffmpeg/opt.pas new file mode 100644 index 00000000..f78ef201 --- /dev/null +++ b/Game/Code/lib/ffmpeg/opt.pas @@ -0,0 +1,101 @@ +(* + * AVOptions + * 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 +*) +unit opt; + +interface + +uses + windows, rational; + +type + TAVOptionType = ( + FF_OPT_TYPE_FLAGS, + FF_OPT_TYPE_INT, + FF_OPT_TYPE_INT64, + FF_OPT_TYPE_DOUBLE, + FF_OPT_TYPE_FLOAT, + FF_OPT_TYPE_STRING, + FF_OPT_TYPE_RATIONAL, + FF_OPT_TYPE_CONST = 128 + ); + +const + av__codec = 'avcodec-51.dll'; + + AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding + AV_OPT_FLAG_DECODING_PARAM = 2; ///< a generic parameter which can be set by the user for demuxing or decoding + AV_OPT_FLAG_METADATA = 4; ///< some data extracted or inserted into the file like title, comment, ... + AV_OPT_FLAG_AUDIO_PARAM = 8; + AV_OPT_FLAG_VIDEO_PARAM = 16; + AV_OPT_FLAG_SUBTITLE_PARAM = 32; + +type + PAVOption = ^TAVOption; + TAVOption = record + name: pchar; + help: pchar; + offset: integer; ///< offset to context structure where the parsed value should be stored + _type: TAVOptionType; + + default_val: double; + min: double; + max: double; + + flags: integer; +//FIXME think about enc-audio, ... style flags + _unit: pchar; + end; + + +function av_set_string (obj: pointer; name: pchar; val: pchar): PAVOption; + cdecl; external av__codec; + +function av_set_double (obj: pointer; name: pchar; n: double): PAVOption; + cdecl; external av__codec; + +function av_set_q (obj: pointer; name: pchar; n: TAVRational): PAVOption; + cdecl; external av__codec; + +function av_set_int (obj: pointer; name: pchar; n: int64): PAVOption; + cdecl; external av__codec; + +function av_get_double (obj: pointer; name: pchar; o_out: PPointer): double; + cdecl; external av__codec; + +function av_get_q (obj: pointer; name: pchar; o_out: PPointer): TAVRational; + cdecl; external av__codec; + +function av_get_int (obj: pointer; name: pchar; o_out: PPointer): int64; + cdecl; external av__codec; + +function av_get_string (obj: pointer; name: pchar; o_out: PPOinter; buf: pchar; buf_len: integer): pchar; + cdecl; external av__codec; + +function av_next_option (obj: pointer; last: PAVOption): PAVOption; + cdecl; external av__codec; + +function av_opt_show (obj: pointer; av_log_obj: pointer): integer; + cdecl; external av__codec; + +procedure av_opt_set_defaults (s: pointer); + cdecl; external av__codec; + +implementation + +end. -- cgit v1.2.3 From 1c3dedbdd8522e63080133197af763d1995f8236 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Wed, 19 Sep 2007 23:34:09 +0000 Subject: tested ffmpeg in lazarus - linux.. working :) just need to make sure development packages are installed for ffmpeg. such as : libavcodec-dev & libavformat-dev git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@405 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/lib/ffmpeg/opt.pas | 210 ++++++++++++++++++++++--------------------- 1 file changed, 109 insertions(+), 101 deletions(-) (limited to 'Game/Code/lib/ffmpeg/opt.pas') diff --git a/Game/Code/lib/ffmpeg/opt.pas b/Game/Code/lib/ffmpeg/opt.pas index f78ef201..c8b72479 100644 --- a/Game/Code/lib/ffmpeg/opt.pas +++ b/Game/Code/lib/ffmpeg/opt.pas @@ -1,101 +1,109 @@ -(* - * AVOptions - * 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 -*) -unit opt; - -interface - -uses - windows, rational; - -type - TAVOptionType = ( - FF_OPT_TYPE_FLAGS, - FF_OPT_TYPE_INT, - FF_OPT_TYPE_INT64, - FF_OPT_TYPE_DOUBLE, - FF_OPT_TYPE_FLOAT, - FF_OPT_TYPE_STRING, - FF_OPT_TYPE_RATIONAL, - FF_OPT_TYPE_CONST = 128 - ); - -const - av__codec = 'avcodec-51.dll'; - - AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding - AV_OPT_FLAG_DECODING_PARAM = 2; ///< a generic parameter which can be set by the user for demuxing or decoding - AV_OPT_FLAG_METADATA = 4; ///< some data extracted or inserted into the file like title, comment, ... - AV_OPT_FLAG_AUDIO_PARAM = 8; - AV_OPT_FLAG_VIDEO_PARAM = 16; - AV_OPT_FLAG_SUBTITLE_PARAM = 32; - -type - PAVOption = ^TAVOption; - TAVOption = record - name: pchar; - help: pchar; - offset: integer; ///< offset to context structure where the parsed value should be stored - _type: TAVOptionType; - - default_val: double; - min: double; - max: double; - - flags: integer; -//FIXME think about enc-audio, ... style flags - _unit: pchar; - end; - - -function av_set_string (obj: pointer; name: pchar; val: pchar): PAVOption; - cdecl; external av__codec; - -function av_set_double (obj: pointer; name: pchar; n: double): PAVOption; - cdecl; external av__codec; - -function av_set_q (obj: pointer; name: pchar; n: TAVRational): PAVOption; - cdecl; external av__codec; - -function av_set_int (obj: pointer; name: pchar; n: int64): PAVOption; - cdecl; external av__codec; - -function av_get_double (obj: pointer; name: pchar; o_out: PPointer): double; - cdecl; external av__codec; - -function av_get_q (obj: pointer; name: pchar; o_out: PPointer): TAVRational; - cdecl; external av__codec; - -function av_get_int (obj: pointer; name: pchar; o_out: PPointer): int64; - cdecl; external av__codec; - -function av_get_string (obj: pointer; name: pchar; o_out: PPOinter; buf: pchar; buf_len: integer): pchar; - cdecl; external av__codec; - -function av_next_option (obj: pointer; last: PAVOption): PAVOption; - cdecl; external av__codec; - -function av_opt_show (obj: pointer; av_log_obj: pointer): integer; - cdecl; external av__codec; - -procedure av_opt_set_defaults (s: pointer); - cdecl; external av__codec; - -implementation - -end. +(* + * AVOptions + * 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 +*) +unit opt; + +interface + +uses + {$IFDEF win32} + windows, + {$ENDIF} + rational; + +type + TAVOptionType = ( + FF_OPT_TYPE_FLAGS, + FF_OPT_TYPE_INT, + FF_OPT_TYPE_INT64, + FF_OPT_TYPE_DOUBLE, + FF_OPT_TYPE_FLOAT, + FF_OPT_TYPE_STRING, + FF_OPT_TYPE_RATIONAL, + FF_OPT_TYPE_CONST = 128 + ); + +const + + {$IFDEF win32} + av__codec = 'avcodec-51.dll'; + {$ELSE} + av__codec = 'avcodec.so'; // .0d + {$ENDIF} + + AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding + AV_OPT_FLAG_DECODING_PARAM = 2; ///< a generic parameter which can be set by the user for demuxing or decoding + AV_OPT_FLAG_METADATA = 4; ///< some data extracted or inserted into the file like title, comment, ... + AV_OPT_FLAG_AUDIO_PARAM = 8; + AV_OPT_FLAG_VIDEO_PARAM = 16; + AV_OPT_FLAG_SUBTITLE_PARAM = 32; + +type + PAVOption = ^TAVOption; + TAVOption = record + name: pchar; + help: pchar; + offset: integer; ///< offset to context structure where the parsed value should be stored + _type: TAVOptionType; + + default_val: double; + min: double; + max: double; + + flags: integer; +//FIXME think about enc-audio, ... style flags + _unit: pchar; + end; + + +function av_set_string (obj: pointer; name: pchar; val: pchar): PAVOption; + cdecl; external av__codec; + +function av_set_double (obj: pointer; name: pchar; n: double): PAVOption; + cdecl; external av__codec; + +function av_set_q (obj: pointer; name: pchar; n: TAVRational): PAVOption; + cdecl; external av__codec; + +function av_set_int (obj: pointer; name: pchar; n: int64): PAVOption; + cdecl; external av__codec; + +function av_get_double (obj: pointer; name: pchar; o_out: PPointer): double; + cdecl; external av__codec; + +function av_get_q (obj: pointer; name: pchar; o_out: PPointer): TAVRational; + cdecl; external av__codec; + +function av_get_int (obj: pointer; name: pchar; o_out: PPointer): int64; + cdecl; external av__codec; + +function av_get_string (obj: pointer; name: pchar; o_out: PPOinter; buf: pchar; buf_len: integer): pchar; + cdecl; external av__codec; + +function av_next_option (obj: pointer; last: PAVOption): PAVOption; + cdecl; external av__codec; + +function av_opt_show (obj: pointer; av_log_obj: pointer): integer; + cdecl; external av__codec; + +procedure av_opt_set_defaults (s: pointer); + cdecl; external av__codec; + +implementation + +end. -- cgit v1.2.3 From 48676faa6c0da1eb77999512322896840ea13cb1 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Thu, 11 Oct 2007 08:03:12 +0000 Subject: major changes to FFMPEG Headers so they now support linux. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@500 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/lib/ffmpeg/opt.pas | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'Game/Code/lib/ffmpeg/opt.pas') diff --git a/Game/Code/lib/ffmpeg/opt.pas b/Game/Code/lib/ffmpeg/opt.pas index c8b72479..0acead1f 100644 --- a/Game/Code/lib/ffmpeg/opt.pas +++ b/Game/Code/lib/ffmpeg/opt.pas @@ -16,15 +16,19 @@ * 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 *) + unit opt; +{$MODE DELPHI} (* CAT *) +{$PACKENUM 4} (* every enum type variables uses 4 bytes, CAT *) +{$PACKRECORDS C} (* GCC compatible, Record Packing, CAT *) interface uses - {$IFDEF win32} - windows, - {$ENDIF} - rational; + rational; (* CAT *) type TAVOptionType = ( @@ -39,12 +43,9 @@ type ); const +(* version numbers are changed by The Creative CAT *) + av__codec = 'libavcodec.51'; - {$IFDEF win32} - av__codec = 'avcodec-51.dll'; - {$ELSE} - av__codec = 'avcodec.so'; // .0d - {$ENDIF} AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding AV_OPT_FLAG_DECODING_PARAM = 2; ///< a generic parameter which can be set by the user for demuxing or decoding -- cgit v1.2.3 From 0d997f8433e982584a0ab67a6d630d12f4314759 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Thu, 11 Oct 2007 10:50:01 +0000 Subject: fixes so codebase builds in delphi now, after major FFMpeg changse for linux. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@503 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/lib/ffmpeg/opt.pas | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Game/Code/lib/ffmpeg/opt.pas') diff --git a/Game/Code/lib/ffmpeg/opt.pas b/Game/Code/lib/ffmpeg/opt.pas index 0acead1f..e70d77ad 100644 --- a/Game/Code/lib/ffmpeg/opt.pas +++ b/Game/Code/lib/ffmpeg/opt.pas @@ -21,9 +21,11 @@ For Mac OS X, some modifications were made by The Creative CAT, denoted as CAT in the source codes *) unit opt; -{$MODE DELPHI} (* CAT *) -{$PACKENUM 4} (* every enum type variables uses 4 bytes, CAT *) -{$PACKRECORDS C} (* GCC compatible, Record Packing, CAT *) +{$IFDEF FPC} + {$MODE DELPHI} (* CAT *) + {$PACKENUM 4} (* every enum type variables uses 4 bytes, CAT *) + {$PACKRECORDS C} (* GCC compatible, Record Packing, CAT *) +{$ENDIF} interface @@ -43,8 +45,13 @@ type ); const -(* version numbers are changed by The Creative CAT *) - av__codec = 'libavcodec.51'; + +{$IFDEF win32} + av__codec = 'avcodec-51.dll'; +{$ELSE} + av__codec = 'avcodec.so'; // .0d + // av__codec = 'libavcodec.51'; +{$ENDIF} AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding -- 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/opt.pas | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'Game/Code/lib/ffmpeg/opt.pas') diff --git a/Game/Code/lib/ffmpeg/opt.pas b/Game/Code/lib/ffmpeg/opt.pas index e70d77ad..bd3f14fd 100644 --- a/Game/Code/lib/ffmpeg/opt.pas +++ b/Game/Code/lib/ffmpeg/opt.pas @@ -32,6 +32,8 @@ interface uses rational; (* CAT *) +{$I version.inc} + type TAVOptionType = ( FF_OPT_TYPE_FLAGS, @@ -45,15 +47,6 @@ type ); const - -{$IFDEF win32} - av__codec = 'avcodec-51.dll'; -{$ELSE} - av__codec = 'avcodec.so'; // .0d - // av__codec = 'libavcodec.51'; -{$ENDIF} - - AV_OPT_FLAG_ENCODING_PARAM = 1; ///< a generic parameter which can be set by the user for muxing or encoding AV_OPT_FLAG_DECODING_PARAM = 2; ///< a generic parameter which can be set by the user for demuxing or decoding AV_OPT_FLAG_METADATA = 4; ///< some data extracted or inserted into the file like title, comment, ... -- 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/opt.pas | 48 +++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 12 deletions(-) (limited to 'Game/Code/lib/ffmpeg/opt.pas') diff --git a/Game/Code/lib/ffmpeg/opt.pas b/Game/Code/lib/ffmpeg/opt.pas index bd3f14fd..971ce601 100644 --- a/Game/Code/lib/ffmpeg/opt.pas +++ b/Game/Code/lib/ffmpeg/opt.pas @@ -15,24 +15,30 @@ * 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 *) + *) + +(* 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 *) + +// Revision: 11250 unit opt; + {$IFDEF FPC} - {$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} interface uses - rational; (* CAT *) - -{$I version.inc} + rational, + UConfig; type TAVOptionType = ( @@ -43,6 +49,7 @@ type FF_OPT_TYPE_FLOAT, FF_OPT_TYPE_STRING, FF_OPT_TYPE_RATIONAL, + FF_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length FF_OPT_TYPE_CONST = 128 ); @@ -55,12 +62,20 @@ const AV_OPT_FLAG_SUBTITLE_PARAM = 32; type + (** + * AVOption. + *) PAVOption = ^TAVOption; TAVOption = record name: pchar; + + (** + * short English text help. + * @todo what about other languages + *) help: pchar; offset: integer; ///< offset to context structure where the parsed value should be stored - _type: TAVOptionType; + type_: TAVOptionType; default_val: double; min: double; @@ -68,9 +83,13 @@ type flags: integer; //FIXME think about enc-audio, ... style flags - _unit: pchar; + unit_: pchar; end; +{$IF LIBAVCODEC_VERSION >= 51039000} // 51.39.0 +function av_find_opt (obj: Pointer; {const} name: PChar; {const} unit_: PChar; mask: integer; flags: integer): {const} PAVOption; + cdecl; external av__codec; +{$IFEND} function av_set_string (obj: pointer; name: pchar; val: pchar): PAVOption; cdecl; external av__codec; @@ -105,6 +124,11 @@ function av_opt_show (obj: pointer; av_log_obj: pointer): integer; procedure av_opt_set_defaults (s: pointer); cdecl; external av__codec; +{$IF LIBAVCODEC_VERSION >= 51039000} // 51.39.0 +procedure av_opt_set_defaults2 (s: Pointer; mask: integer; flags: integer); + cdecl; external av__codec; +{$IFEND} + implementation end. -- 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/opt.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Game/Code/lib/ffmpeg/opt.pas') diff --git a/Game/Code/lib/ffmpeg/opt.pas b/Game/Code/lib/ffmpeg/opt.pas index 971ce601..6bde3e65 100644 --- a/Game/Code/lib/ffmpeg/opt.pas +++ b/Game/Code/lib/ffmpeg/opt.pas @@ -22,7 +22,9 @@ * For Mac OS X, some modifications were made by The Creative CAT, denoted as CAT * in the source codes *) -// Revision: 11250 +(* + * Revision: 11250, Mon Dec 17 17:41:24 2007 UTC + *) unit opt; -- cgit v1.2.3