Browse Source

* Some corrections

Michael Van Canneyt 2 months ago
parent
commit
a885f80a69
1 changed files with 12 additions and 4 deletions
  1. 12 4
      packages/rtl/src/webcodecs.pas

+ 12 - 4
packages/rtl/src/webcodecs.pas

@@ -167,7 +167,9 @@ Type
     FbyteLength : NativeInt; external name 'byteLength';
     FbyteLength : NativeInt; external name 'byteLength';
   Public
   Public
     constructor new(init : TJSEncodedAudioChunkInit);
     constructor new(init : TJSEncodedAudioChunkInit);
-    function copyTo(destination : TJSArrayBuffer) : NativeInt;
+    procedure copyTo(destination : TJSArrayBuffer);
+    procedure copyTo(destination : TJSDataView);
+    procedure copyTo(destination : TJSTypedArray);
 
 
     Property type_ : String Read Ftype_;
     Property type_ : String Read Ftype_;
     Property timestamp : NativeInt Read Ftimestamp;
     Property timestamp : NativeInt Read Ftimestamp;
@@ -196,7 +198,13 @@ Type
   Public
   Public
     constructor new(init : TJSAudioDataInit);
     constructor new(init : TJSAudioDataInit);
     Function allocationSize(options : TJSAudioDataAllocationOptions) : NativeInt;
     Function allocationSize(options : TJSAudioDataAllocationOptions) : NativeInt;
-    Function copyTo(destination : TJSArrayBuffer; options : TJSAudioDataCopyOptions) : NativeInt;
+    procedure copyTo(destination : TJSArrayBuffer; options : TJSAudioDataCopyOptions);
+    procedure copyTo(destination : TJSDataView; options : TJSAudioDataCopyOptions);
+    procedure copyTo(destination : TJSTypedArray; options : TJSAudioDataCopyOptions);
+    procedure copyTo(destination : TJSArrayBuffer);
+    procedure copyTo(destination : TJSDataView);
+    procedure copyTo(destination : TJSTypedArray);
+
     Procedure close;
     Procedure close;
 
 
     Property format : String Read Fformat;
     Property format : String Read Fformat;
@@ -479,7 +487,7 @@ Type
     procedure close;
     procedure close;
     procedure configure(aConfig :TJSVideoEncoderConfiguration);
     procedure configure(aConfig :TJSVideoEncoderConfiguration);
     procedure encode(Frame : TJSVideoFrame; aOptions : TJSVideoEncodeOptions);
     procedure encode(Frame : TJSVideoFrame; aOptions : TJSVideoEncodeOptions);
-    procedure flush;
+    function flush : TJSPromise;
     procedure reset;
     procedure reset;
     property encodeQueueSize : NativeInt Read FencodeQueueSize;
     property encodeQueueSize : NativeInt Read FencodeQueueSize;
     property State : string read FState;
     property State : string read FState;
@@ -518,7 +526,7 @@ Type
     procedure close;
     procedure close;
     procedure configure(aConfig :TJSVideoDecoderConfiguration);
     procedure configure(aConfig :TJSVideoDecoderConfiguration);
     procedure decode(Frame : TJSEncodedVideoChunk);
     procedure decode(Frame : TJSEncodedVideoChunk);
-    procedure flush;
+    function flush : TJSPromise;
     procedure reset;
     procedure reset;
     property decodeQueueSize : NativeInt Read FdecodeQueueSize;
     property decodeQueueSize : NativeInt Read FdecodeQueueSize;
     property State : string read FState;
     property State : string read FState;