... | ... | @@ -7,18 +7,20 @@ av.open(..., hwaccel=True or 'auto') # automatically set up what it can. |
|
|
av.open(..., hwaccel='CUDA') # use cuda with default options
|
|
|
av.open(..., hwaccel='/dev/gpu0') # use whatever device type with the given device
|
|
|
av.open(..., hwaccel=dict(type='CUDA', device='/dev/gpu0', ...)) # more options
|
|
|
av.open(..., hwaccel=('CUDA', '/dev/gpu0')) # shortcut for type and driver
|
|
|
```
|
|
|
|
|
|
If there are no options to pass, consider using a tuple to pass the device:
|
|
|
There are a few options:
|
|
|
- `vaapi`: `connection_type`, `kernel_driver`, and `driver`;
|
|
|
- `qsv`: `child_device` (and maybe forwards `kernel_driver` and `driver` to `vaapi`??);
|
|
|
- `d3d11va`: `debug`.
|
|
|
|
|
|
```
|
|
|
av.open(..., hwaccel=('CUDA', '/dev/gpu0'))
|
|
|
```
|
|
|
|
|
|
## TODO
|
|
|
- [x] `av.hwdevice.HWDeviceType` enum
|
|
|
- [x] `av.codec.hwconfig.HWConfig`
|
|
|
- [x] `av.codec.Codec.hardware_configs` tuple of `HWConfig`
|
|
|
- [ ] Determine that there are even options to bother passing; it doesn't look like it.
|
|
|
- [√] Determine that there are even options to bother passing.
|
|
|
- [ ] What is `AVHWAccel` and can we use it?
|
|
|
- [ ] Design the `av.open` interface.
|
|
|
- [ ] Implement it. |