aboutsummaryrefslogtreecommitdiffstats
path: root/VideoPreview/src/base
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-24 15:05:08 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-24 15:05:08 +0000
commit29ad1858a3f603e3929eba36fb19583d4e9591bf (patch)
treecf87a5301671488dfcfb707fc4249d5468cc31cf /VideoPreview/src/base
parent4dc8f0ba4f47191fdaefad5c6d42b255d0bbc435 (diff)
downloadusdx-29ad1858a3f603e3929eba36fb19583d4e9591bf.tar.gz
usdx-29ad1858a3f603e3929eba36fb19583d4e9591bf.tar.xz
usdx-29ad1858a3f603e3929eba36fb19583d4e9591bf.zip
changed video interface and added dummy methods to UVisualizer, UVideo and UMedia_dummy
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2412 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'VideoPreview/src/base')
-rw-r--r--VideoPreview/src/base/UMusic.pas75
1 files changed, 72 insertions, 3 deletions
diff --git a/VideoPreview/src/base/UMusic.pas b/VideoPreview/src/base/UMusic.pas
index 7f2b3e30..1c6b3a85 100644
--- a/VideoPreview/src/base/UMusic.pas
+++ b/VideoPreview/src/base/UMusic.pas
@@ -43,6 +43,27 @@ uses
type
TNoteType = (ntFreestyle, ntNormal, ntGolden);
+ {**
+ * acoStretch: Stretch to screen width and height
+ * - ignores aspect
+ * + no borders
+ * + no image data loss
+ * acoCrop: Stretch to screen width or height, crop the other dimension
+ * + keeps aspect
+ * + no borders
+ * - frame borders are cropped (image data loss)
+ * acoLetterBox: Stretch to screen width, add bars at or crop top and bottom
+ * + keeps aspect
+ * - borders at top and bottom
+ * o top/bottom is cropped if width < height (unusual)
+ *}
+ TAspectCorrection = (acoStretch, acoCrop, acoLetterBox);
+
+ TRectCoords = record
+ Left, Right: double;
+ Upper, Lower: double;
+ end;
+
const
// ScoreFactor defines how a notehit of a specified notetype is
// measured in comparison to the other types
@@ -334,9 +355,49 @@ type
procedure SetPosition(Time: real);
function GetPosition: real;
- procedure GetFrame(Time: Extended);
- procedure DrawGL(Screen: integer);
+ procedure SetScreen(Screen: integer);
+ function GetScreen(): integer;
+
+ procedure SetScreenPosition(X, Y: double; Z: double = 0.0);
+ procedure GetScreenPosition(var X, Y, Z: double);
+
+ procedure SetWidth(Width: double);
+ function GetWidth(): double;
+
+ procedure SetHeight(Height: double);
+ function GetHeight(): double;
+
+ {**
+ * Sub-image of the video frame to draw.
+ * This can be used for zooming or similar purposes.
+ *}
+ procedure SetFrameRange(Range: TRectCoords);
+ function GetFrameRange(): TRectCoords;
+
+ function GetFrameAspect(): real;
+
+ procedure SetAspectCorrection(AspectCorrection: TAspectCorrection);
+ function GetAspectCorrection(): TAspectCorrection;
+
+
+ procedure SetAlpha(Alpha: double);
+ function GetAlpha(): double;
+
+ procedure SetReflectionSpacing(Spacing: double);
+ function GetReflectionSpacing(): double;
+ procedure GetFrame(Time: Extended);
+ procedure Draw();
+ procedure DrawReflection();
+
+
+ property Screen: integer read GetScreen;
+ property Width: double read GetWidth write SetWidth;
+ property Height: double read GetHeight write SetWidth;
+ property Alpha: double read GetAlpha write SetAlpha;
+ property ReflectionSpacing: double read GetReflectionSpacing write SetReflectionSpacing;
+ property FrameAspect: real read GetFrameAspect;
+ property AspectCorrection: TAspectCorrection read GetAspectCorrection;
property Loop: boolean read GetLoop write SetLoop;
property Position: real read GetPosition write SetPosition;
end;
@@ -414,7 +475,15 @@ type
(*
IVideoDecoder = Interface( IGenericDecoder )
['{2F184B2B-FE69-44D5-9031-0A2462391DCA}']
- function Open(const Filename: IPath): TVideoDecodeStream;
+ function Open(const Filename: IPath): TVideoDecodeStream;
+
+ procedure SetPosition(Time: real);
+ function GetPosition: real;
+
+ procedure UpdateTexture(Texture: glUint);
+
+ property Loop: boolean read GetLoop write SetLoop;
+ property Position: real read GetPosition write SetPosition;
end;
*)