HwCodecDetect 0.1.5__tar.gz → 0.1.7__tar.gz

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.
Files changed (22) hide show
  1. {hwcodecdetect-0.1.5/src/HwCodecDetect.egg-info → hwcodecdetect-0.1.7}/PKG-INFO +1 -1
  2. hwcodecdetect-0.1.7/VERSION +1 -0
  3. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/src/HwCodecDetect/run_tests.py +16 -5
  4. hwcodecdetect-0.1.7/src/HwCodecDetect/version.py +1 -0
  5. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7/src/HwCodecDetect.egg-info}/PKG-INFO +1 -1
  6. hwcodecdetect-0.1.5/VERSION +0 -1
  7. hwcodecdetect-0.1.5/src/HwCodecDetect/version.py +0 -1
  8. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/LICENSE +0 -0
  9. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/MANIFEST.in +0 -0
  10. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/README.md +0 -0
  11. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/pyproject.toml +0 -0
  12. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/requirements.txt +0 -0
  13. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/setup.cfg +0 -0
  14. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/setup.py +0 -0
  15. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/src/HwCodecDetect/__init__.py +0 -0
  16. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/src/HwCodecDetect/install_ffmpeg_if_needed.py +0 -0
  17. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/src/HwCodecDetect.egg-info/SOURCES.txt +0 -0
  18. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/src/HwCodecDetect.egg-info/dependency_links.txt +0 -0
  19. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/src/HwCodecDetect.egg-info/entry_points.txt +0 -0
  20. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/src/HwCodecDetect.egg-info/requires.txt +0 -0
  21. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/src/HwCodecDetect.egg-info/top_level.txt +0 -0
  22. {hwcodecdetect-0.1.5 → hwcodecdetect-0.1.7}/src/HwCodecDetect.egg-info/zip-safe +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: HwCodecDetect
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: A cross-platform tool to automatically detect and test hardware video decoders/encoders using FFmpeg.
5
5
  Home-page: https://github.com/whyb/HwCodecDetect
6
6
  Author: whyb
@@ -0,0 +1 @@
1
+ 0.1.7
@@ -230,8 +230,8 @@ if available_memory > 0:
230
230
  # Estimate based on available memory (assume each ffmpeg's process needs 256MB)
231
231
  CONCURRENT_ENCODER_COUNT = max(1, available_memory_mb // 256)
232
232
  CONCURRENT_DECODER_COUNT = max(1, available_memory_mb // 256)
233
- CONCURRENT_ENCODER_COUNT = min(CONCURRENT_ENCODER_COUNT, 32)
234
- CONCURRENT_DECODER_COUNT = min(CONCURRENT_DECODER_COUNT, 32)
233
+ CONCURRENT_ENCODER_COUNT = min(CONCURRENT_ENCODER_COUNT, 8)
234
+ CONCURRENT_DECODER_COUNT = min(CONCURRENT_DECODER_COUNT, 8)
235
235
 
236
236
 
237
237
  def _run_ffmpeg_command(command, verbose):
@@ -295,6 +295,14 @@ def _run_encoder_test_single(test_data):
295
295
  success, stdout, stderr = _run_ffmpeg_command(command, verbose)
296
296
  status = "succeeded" if success else "failed"
297
297
 
298
+ # If encoding failed, clean up the output file so decoder tests don't try to use a corrupt file
299
+ if not success and os.path.exists(output_file):
300
+ try:
301
+ os.remove(output_file)
302
+ except OSError:
303
+ pass
304
+
305
+
298
306
  if verbose:
299
307
  info_str = f"codec: {codec}, encoder: {encoder}, resolution: {res_size}, status: {status}"
300
308
  command_str = " ".join(shlex.quote(arg) for arg in command)
@@ -354,9 +362,12 @@ def _run_decoder_test_single(test_data):
354
362
  found_file = False
355
363
  for filename in os.listdir(test_dir):
356
364
  if filename.startswith(f"{codec}_") and f"_{res_name}" in filename:
357
- test_file_path = os.path.join(test_dir, filename)
358
- found_file = True
359
- break
365
+ candidate_path = os.path.join(test_dir, filename)
366
+ # Ensure the file is valid (at least has some content)
367
+ if os.path.exists(candidate_path) and os.path.getsize(candidate_path) > 0:
368
+ test_file_path = candidate_path
369
+ found_file = True
370
+ break
360
371
 
361
372
  if not found_file:
362
373
  cpu_lib = ALL_CODECS[codec]["lib"]
@@ -0,0 +1 @@
1
+ __version__ = "0.1.7"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: HwCodecDetect
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: A cross-platform tool to automatically detect and test hardware video decoders/encoders using FFmpeg.
5
5
  Home-page: https://github.com/whyb/HwCodecDetect
6
6
  Author: whyb
@@ -1 +0,0 @@
1
- 0.1.5
@@ -1 +0,0 @@
1
- __version__ = "0.1.5"
File without changes
File without changes
File without changes
File without changes
File without changes