Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Minor Bug Fixes #406

Merged
merged 17 commits into from
Jun 19, 2024
Merged

Core: Minor Bug Fixes #406

merged 17 commits into from
Jun 19, 2024

Commits on Jun 8, 2024

  1. ⚡️ WebGear_RTC: Improved connection handling

    - ⚡️ Only close peer connections that are not already in the "closed" state.
    - 🎨 Logged the ICE connection state change only when it's not in the "failed" state, reducing unnecessary logging.
    abhiTronix committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    6a40e8d View commit details
    Browse the repository at this point in the history
  2. 👷 CI: Improved WebGear RTC tests

    - 👷 Added a pytest fixture `event_loop_policy` to set the WindowsSelectorEventLoopPolicy on Windows platforms.
    - ⚡️Replace the use of `async_asgi_testclient` with `httpx.AsyncClient` and `httpx.ASGITransport` for testing the ASGI application.
    - 🥅 Update the test cases to use the `httpx.AsyncClient` correctly:
       - Use the `content` parameter instead of `data` when sending POST requests with JSON payloads.
       - Use the `post` method instead of `get` when sending WebRTC offers, as `get` do not support `content` parameter.
    - 🔥 Remove the `pytest.mark.skipif` conditions related to Python version 3.11 and above, as the compatibility issues have been addressed.
    - 🗑️ Add the `pytest.mark.asyncio(scope="module")` marker to the test functions to ensure proper handling of asynchronous tests.
    abhiTronix committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    8667e5e View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2024

  1. ⚡️ StreamGear: Updated support of Stream Copy in Single Source mode. (F…

    …ixes #396)
    
    - ♻️ Ignore the stream copy parameter if Real-time Frames Mode or Custom Streams are enabled, and log appropriate warnings.
    - ⚡️Updated the handling of the `-acodec` parameter:
         - Use the default `aac` codec for Custom Streams.
         - Use stream copy (`-acodec copy`) for the input video's audio stream if Custom Streams are not enabled.
    - ♻️ Refactor the handling of the `-livestream` parameter to ensure it is only enabled for the Real-time Frames Mode.
    - ♻️ Refactor the video and audio bitrate assignment to skip the assignment when stream copy is enabled.
    - 🔊 Updated log message for `-clear_prev_assets` parameter.
    - ✏️ Fix a typo in comments.
    
    Docs:
    - 📝 Add a new tip box explaining the benefits of using stream copy (`-vcodec copy`) in the Single Source Mode for faster transcoding of HLS/DASH streams.
    - 💬 Highlight the limitations of stream copy, such as incompatibility with Real-time Frames Mode and Custom Streams, which require re-encoding of frames.
    - 💬 Clarify that the audio stream copy (`-acodec copy`) is automatically applied when using the input video's audio stream.
    - 🎨 Fixed various issues like typos, formatting errors, code highlighting issues, and grammar inconsistencies.
    abhiTronix committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    49cc04f View commit details
    Browse the repository at this point in the history
  2. ♻️ Core: Refactored colorspace handling in videocapture gears.

    - ⚡️ Instead of raising an exception, log a warning message and discard the invalid colorspace value.
    - 🎨 Consolidate the colorspace logging statement to a single line using a ternary operation.
    
    CamGear API
    - 🔥 Remove the check for GStreamer support, as it is not being used currently (marked as a TODO).
    - 🔊 Improve the readability of the livestream warning log.
    
    Maintenance
    - 🎨 Applied short-circuiting to simplify code across various APIs.
    - 🎨 Remove unnecessary parentheses and unnecessary type checks.
    - 🔧 Removed unused imports
    abhiTronix committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    2af68cf View commit details
    Browse the repository at this point in the history
  3. ⚡️ WriterGear: Improve error handling in execute_ffmpeg_cmd method

    - 🎨 Instead of raising a generic `ValueError` exception, the method now raises a `ValueError` with a more descriptive error message when encountering a `BrokenPipeError` or `IOError`.
    - 🥅 The error handling has been updated to follow the recommendations of PEP 409 - Suppressing exception context. This ensures that the original exception context is preserved when re-raising the `ValueError`.
    - ⚡️ If logging is enabled (`self.__logging` is True), the `ValueError` is raised with the suppressed context (`from None`), effectively discarding the original exception context.
    - ⚡️ If logging is disabled, the `ValueError` is raised with the original exception context (`from e`), where `e` is the original `OSError` or `IOError` exception.
    abhiTronix committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    fb76a2d View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. 🩹 NetGear: Updated parameters and documentation (Fixes #390)

    - 🥅 Added a warning message in the `NetGear` class to log potential issues when `flag=1` (NOBLOCK) is set, which may cause NetGear to not terminate gracefully.
    - 🔊 Included an informational log message indicating that the `track` option will be ignored when `copy=True` is defined.
    - 📝 Changed the default value of the `copy` option from `False` to `True` across various documentation files for NetGear.
    
    👷 CI: Updated unit tests to reflect the new default value for the `copy` option.
    
    ✏️ Docs: Fixed few typos.
    abhiTronix committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    7412229 View commit details
    Browse the repository at this point in the history
  2. 🚑️ StreamGear: Moved handle streaming format to beginning to fix 'S…

    …treamGear' object has no attribute '_StreamGear__format' bug.
    abhiTronix committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    645231c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e4142ac View commit details
    Browse the repository at this point in the history
  4. 🚑️ CI: Fixed simplejpeg and opencv not compatible with `numpy==2.…

    …x.x` versions.
    
    - 📌 Pinned `numpy<2.0.0` in all CI envs.
    - ⏪️ Reverted testing simplejpeg import
    abhiTronix committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    626b64a View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. Configuration menu
    Copy the full SHA
    1742977 View commit details
    Browse the repository at this point in the history
  2. ⚡️ Core: Improved exception handling for module imports.

    - ⚡️ Updated `import_dependency_safe` in `helper.py`:
      - 🥅 Added specific handling for `ModuleNotFoundError`.
      - 🧑‍💻 Included original exception in `ImportError` for better error tracing.
      - 🔊 Enhanced logging to include exception traceback when error is set to "log".
    
    - ⚡️ Enhanced `import_core_dependency` in `__init__.py`:
      - 🥅 Added specific handling for `ModuleNotFoundError`.
      - 🧑‍💻 Included original exception in `ImportError` for better error tracing.
    abhiTronix committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    3e1e10a View commit details
    Browse the repository at this point in the history
  3. 👷 CI: Added tests for import_dependency_safe function

    .
    - ⚡️ Included various test cases to validate different scenarios and error handling in `import_dependency_safe`.
    - ☔ Ensured coverage for `raise`, `log`, `silent`, and unknown error types.
    abhiTronix committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    8b765b9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cb769d3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9f4a1e3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f263960 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1a77e5b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0d9071e View commit details
    Browse the repository at this point in the history