@girs/gstcuda-1.0 4.1.0 → 4.3.0

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/README.md CHANGED
@@ -5,25 +5,25 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gstcuda-1.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GstCuda-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.1.0.
8
+ GJS TypeScript type definitions for GstCuda-1.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.3.0.
9
9
 
10
10
  ## Install
11
11
 
12
- To use this type definitions, install them with NPM:
12
+ Install the type definitions with npm:
13
13
  ```bash
14
14
  npm install @girs/gstcuda-1.0
15
15
  ```
16
16
 
17
17
  ## Usage
18
18
 
19
- You can import this package into your project like this:
19
+ Import it like any other module:
20
20
  ```ts
21
21
  import GstCuda from '@girs/gstcuda-1.0';
22
22
  ```
23
23
 
24
24
  ### Ambient Modules
25
25
 
26
- You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
26
+ [Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
27
27
  For this you need to include `@girs/gstcuda-1.0` or `@girs/gstcuda-1.0/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/gstcuda-1.0'
42
42
  }
43
43
  ```
44
44
 
45
- Now you can import the ambient module with TypeScript support:
45
+ The ambient module now resolves with types:
46
46
 
47
47
  ```ts
48
48
  import GstCuda from 'gi://GstCuda?version=1.0';
@@ -50,7 +50,7 @@ import GstCuda from 'gi://GstCuda?version=1.0';
50
50
 
51
51
  ### Global import
52
52
 
53
- You can also import the module with Typescript support using the global `imports.gi` object of GJS.
53
+ GJS's global `imports.gi` works too, with types.
54
54
  For this you need to include `@girs/gstcuda-1.0` or `@girs/gstcuda-1.0/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/gstcuda-1.0'
69
69
  }
70
70
  ```
71
71
 
72
- Now you have also type support for this, too:
72
+ That form carries types as well:
73
73
 
74
74
  ```ts
75
75
  const GstCuda = imports.gi.GstCuda;
@@ -77,7 +77,7 @@ const GstCuda = imports.gi.GstCuda;
77
77
 
78
78
  ### Bundle
79
79
 
80
- Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
80
+ Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
81
81
 
82
82
  ## Other packages
83
83
 
package/gstcuda-1.0.d.ts CHANGED
@@ -643,6 +643,13 @@ export namespace GstCuda {
643
643
  emit(signal: string, ...args: any[]): void;
644
644
 
645
645
  // Static methods
646
+ /**
647
+ * Finds the DXGI adapter LUID corresponding to the given CUDA device.
648
+ * This is useful for matching CUDA devices with Direct3D adapters on Windows.
649
+ * @param cuda_device a CUDA device index
650
+ */
651
+ static find_dxgi_adapter_luid(cuda_device: CudaGst.device): number;
652
+
646
653
  /**
647
654
  * Pops the current CUDA context from CPU thread
648
655
  * @param cuda_ctx
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@girs/gstcuda-1.0",
3
- "version": "4.1.0",
4
- "libraryVersion": "1.0.0",
5
- "description": "GJS TypeScript type definitions for GstCuda-1.0, generated from library version 1.0.0",
3
+ "version": "4.3.0",
4
+ "description": "GJS TypeScript type definitions for GstCuda-1.0",
6
5
  "type": "module",
7
6
  "module": "gstcuda-1.0.js",
8
7
  "main": "gstcuda-1.0.js",
@@ -32,15 +31,15 @@
32
31
  "test": "tsc --project tsconfig.json"
33
32
  },
34
33
  "dependencies": {
35
- "@girs/gjs": "^4.1.0",
36
- "@girs/gstvideo-1.0": "^4.1.0",
37
- "@girs/gstbase-1.0": "^4.1.0",
38
- "@girs/gst-1.0": "^4.1.0",
39
- "@girs/gobject-2.0": "^4.1.0",
40
- "@girs/glib-2.0": "^4.1.0",
41
- "@girs/gmodule-2.0": "^4.1.0",
42
- "@girs/gstgl-1.0": "^4.1.0",
43
- "@girs/cudagst-1.0": "^4.1.0" },
34
+ "@girs/gjs": "^4.3.0",
35
+ "@girs/gstvideo-1.0": "^4.3.0",
36
+ "@girs/gstbase-1.0": "^4.3.0",
37
+ "@girs/gst-1.0": "^4.3.0",
38
+ "@girs/gobject-2.0": "^4.3.0",
39
+ "@girs/glib-2.0": "^4.3.0",
40
+ "@girs/gmodule-2.0": "^4.3.0",
41
+ "@girs/gstgl-1.0": "^4.3.0",
42
+ "@girs/cudagst-1.0": "^4.3.0" },
44
43
  "devDependencies": {
45
44
  "typescript": "*"
46
45
  },