Set the streaming device index for input/output. Sets the device index to the specified value, or scans for the default device if -1 (0xFFFFFFFF) is given. Args: device: The device index to set. Returns: Device index actually set.
(self, device)
| 134 | return self.mode |
| 135 | |
| 136 | def _setDevice(self, device): |
| 137 | """ |
| 138 | Set the streaming device index for input/output. |
| 139 | |
| 140 | Sets the device index to the specified value, or |
| 141 | scans for the default device if -1 (0xFFFFFFFF) is given. |
| 142 | |
| 143 | Args: |
| 144 | device: The device index to set. |
| 145 | Returns: |
| 146 | Device index actually set. |
| 147 | """ |
| 148 | logger.debug(f"_setDevice: device={device}") |
| 149 | |
| 150 | if (device == 4294967295): # -1 as unsigned 32-bit |
| 151 | # Set device index to point to default device for the selected mode |
| 152 | self.device = self._scan_video_devices() |
| 153 | else: |
| 154 | # Set device index to the specified value |
| 155 | self.device = device |
| 156 | |
| 157 | logger.info(f"_setDevice: streaming device set to {self.device}") |
| 158 | |
| 159 | return self.device |
| 160 | |
| 161 | def _setFilename(self, base_dir, filename): |
| 162 | """ |
no test coverage detected