Skip to content

Implement element availability feature#11

Merged
repugraf merged 3 commits intomainfrom
feat/element-availability
Nov 10, 2025
Merged

Implement element availability feature#11
repugraf merged 3 commits intomainfrom
feat/element-availability

Conversation

@repugraf
Copy link
Copy Markdown
Owner

No description provided.

@repugraf repugraf requested a review from Copilot November 10, 2025 10:28
@repugraf repugraf self-assigned this Nov 10, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a static method elementExists to the Pipeline class, enabling developers to check for GStreamer element availability before using them in pipelines. This is useful for feature detection, graceful degradation, and selecting alternative encoders/decoders based on system capabilities.

Key Changes:

  • Added Pipeline.elementExists(elementName: string): boolean static method to check GStreamer element availability
  • Refactored GStreamer initialization to be reusable across instance and static methods
  • Added comprehensive test coverage for various element types and edge cases

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/ts/index.ts Added PipelineConstructor interface with elementExists method signature
src/cpp/pipeline.hpp Added static ElementExists method declaration and GStreamer initialization helpers
src/cpp/pipeline.cpp Implemented ElementExists with proper memory management and error handling
src/ts/element-exists.test.ts Added comprehensive test suite covering common elements, edge cases, and error conditions
examples/element-exists.mjs Added example demonstrating practical usage for encoder selection
README.md Added documentation section with usage examples and API reference update

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ts/element-exists.test.ts Outdated
repugraf and others added 2 commits November 10, 2025 12:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@repugraf repugraf merged commit 0997c8d into main Nov 10, 2025
7 of 8 checks passed
@repugraf repugraf deleted the feat/element-availability branch November 10, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants