@predy-js/render-interface 0.3.3-beta.10 → 0.3.3-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/statistic.js +1 -1
- package/dist/types/native/VideoDecoder.d.ts +2 -11
- package/package.json +1 -1
- package/types/native/VideoDecoder.ts +2 -12
package/dist/statistic.js
CHANGED
@@ -1,13 +1,4 @@
|
|
1
1
|
import type { VideoFrameFormat } from '@predy-js/specification';
|
2
|
-
/**
|
3
|
-
* video原始数据的切片,原始数据不暴露到js,只能通过decoder解析
|
4
|
-
* 只暴露当前的切片时间和是否是keyframe
|
5
|
-
*/
|
6
|
-
export interface PredyVideoDecoderFrame {
|
7
|
-
time: number;
|
8
|
-
key?: boolean;
|
9
|
-
idx: number;
|
10
|
-
}
|
11
2
|
export interface PredyVideoDecoderFrameData {
|
12
3
|
width: number;
|
13
4
|
height: number;
|
@@ -30,7 +21,7 @@ export interface PredyVideoDecoderMetadata {
|
|
30
21
|
width: number;
|
31
22
|
height: number;
|
32
23
|
duration: number;
|
33
|
-
|
24
|
+
frameCount: number;
|
34
25
|
format: VideoFrameFormat;
|
35
26
|
frameBufferSize: number;
|
36
27
|
}
|
@@ -65,7 +56,7 @@ export interface PredyVideoDecoder {
|
|
65
56
|
*/
|
66
57
|
loadVideo(url: string, callback: PredyVideoDecoderLoadedCallback): void;
|
67
58
|
/**
|
68
|
-
*
|
59
|
+
* 解析视频的下一帧,获得图像数据。如果调用的时候正在解析,callback直接返回error
|
69
60
|
* @param frameIndex frame的index
|
70
61
|
* @param data 图像数据buffer,数据将被写入到此Buffer中,如果buffer尺寸不对,解析会失败
|
71
62
|
* @param callback 图像数据回调
|
package/package.json
CHANGED
@@ -1,15 +1,5 @@
|
|
1
1
|
import type { VideoFrameFormat } from '@predy-js/specification';
|
2
2
|
|
3
|
-
/**
|
4
|
-
* video原始数据的切片,原始数据不暴露到js,只能通过decoder解析
|
5
|
-
* 只暴露当前的切片时间和是否是keyframe
|
6
|
-
*/
|
7
|
-
export interface PredyVideoDecoderFrame {
|
8
|
-
time: number,
|
9
|
-
key?: boolean,
|
10
|
-
idx: number,
|
11
|
-
}
|
12
|
-
|
13
3
|
export interface PredyVideoDecoderFrameData {
|
14
4
|
width: number,
|
15
5
|
height: number,
|
@@ -34,7 +24,7 @@ export interface PredyVideoDecoderMetadata {
|
|
34
24
|
width: number,
|
35
25
|
height: number,
|
36
26
|
duration: number,
|
37
|
-
|
27
|
+
frameCount: number,
|
38
28
|
format: VideoFrameFormat,
|
39
29
|
frameBufferSize: number, // 每帧的buffer大小
|
40
30
|
}
|
@@ -75,7 +65,7 @@ export interface PredyVideoDecoder {
|
|
75
65
|
loadVideo(url: string, callback: PredyVideoDecoderLoadedCallback): void,
|
76
66
|
|
77
67
|
/**
|
78
|
-
*
|
68
|
+
* 解析视频的下一帧,获得图像数据。如果调用的时候正在解析,callback直接返回error
|
79
69
|
* @param frameIndex frame的index
|
80
70
|
* @param data 图像数据buffer,数据将被写入到此Buffer中,如果buffer尺寸不对,解析会失败
|
81
71
|
* @param callback 图像数据回调
|