-
Notifications
You must be signed in to change notification settings - Fork 2
All features #5
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
Open
ivancmz
wants to merge
12
commits into
ZoidTechnology:master
Choose a base branch
from
ivancmz:all_features
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
All features #5
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Create panelplayer_api.c/.h with C library interface - Add C# wrapper class with P/Invoke bindings - Include example C# application demonstrating usage - Update makefile to build shared library - Add gitignore entries for C# build artifacts - Add doxygen style comments to panelplayer_api header file - Add README.md to the csharp example
This commit introduces a unified decoder interface that supports multiple image formats (WebP, JPEG, PNG, BMP, and GIF) in addition to the existing WebP support. The implementation provides a consistent API regardless of the underlying image format, enabling PanelPlayer to handle a wider variety of media sources. Changes: - Add decoder.h: Define generic decoder interface with format-agnostic API - Add decoder.c: Implement automatic format detection and decoding for WebP, JPEG, PNG, BMP and GIF formats - Update main.c: Replace direct WebP API calls with new decoder abstraction - Update makefile: Add linker flags for libjpeg, libpng, and libgif - Update readme.md: Document required dependencies and supported formats The decoder automatically detects the image format based on file headers and handles both static images (JPEG, PNG) and animations (WebP, GIF) through a unified interface. This maintains backward compatibility while extending format support. Dependencies: - libwebp-dev (existing) - libjpeg-dev (new) - libpng-dev (new) - libgif-dev (new)
# Conflicts: # .gitignore # makefile Merge csharp_api and filetypes_support Combines multi-format decoder support (WebP, JPEG, PNG, GIF, BMP) from filetype-support branch with C# API wrapper from csharp_api branch. Changes: - Resolved merge conflicts in .gitignore and makefile - Updated panelplayer_api.c to use new decoder abstraction - Renamed panelplayer_play_webp_file() to panelplayer_play_file() - Updated C# wrapper to support all image formats - Added comprehensive Doxygen documentation to decoder.h - Updated example code and documentation for multi-format support The C API and C# wrapper now support: - WebP (animated and static) - JPEG (static) - PNG (static) - GIF (animated) - BMP (static, 24/32-bit uncompressed)
Implements vertical duplication functionality in the C API library to match the -d flag available in the main executable. This allows programmatic control of duplicate mode through the API. Changes: - Add panelplayer_set_duplicate() function to C API - Add duplicate field to panelplayer_state structure - Implement row duplication in both panelplayer_play_file() and panelplayer_play_frame_bgr() - Add comprehensive Doxygen documentation for new function - Add SetDuplicate() method to C# wrapper - Update C# example documentation Use case: Driving two identical displays stacked vertically where the image height is half the total display height (e.g., 240x80 image on 240x160 display).
…_api.c Created new core module (core.c/core.h) with shared functionality: - Time management functions (core_get_time, core_await) - Frame processing (core_process_frame) - Hardware communication (core_send_frame) - Extension management (core_load_extension, core_unload_extension) - Shared constants (CORE_MIX_MAXIMUM, CORE_UPDATE_DELAY) Benefits: - Eliminated ~150 lines of duplicated code - Centralized common logic in a single location - Improved maintainability and testability - main.c now focused on CLI parsing - panelplayer_api.c now focused on API surface
…pport Refactored C# example to follow better organization practices: - Split monolithic PanelPlayerExample.cs into separate files: - PanelPlayerNative.cs: P/Invoke declarations - PanelPlayer.cs: Managed wrapper class - Program.cs: Main entry point with argument parsing Added full command-line argument support matching native PanelPlayer: - All options supported: -p, -w, -h, -b, -m, -r, -e, -d, -v - Multiple source file support - Parameter validation with helpful error messages - Verbose mode for debugging - Help text similar to native version Changed from single-target (net9.0) to multi-target (net8.0;net9.0) to support broader range of .NET installations. - Updated TargetFramework to TargetFrameworks with both net8.0 and net9.0 - Updated README to reflect .NET 8.0 compatibility - Build now produces binaries for both runtimes This allows the example to run on systems with .NET 8.0 LTS or .NET 9.0. Updated README with comprehensive usage examples and new project structure.
Moved the common playback loop from main.c and panelplayer_api.c into a shared function in core.c to eliminate code duplication. Changes: - Added core_play_decoded_file() function to core.c/core.h - Consolidates frame decoding, processing, and timing logic - Both main.c and panelplayer_api.c now use the shared function - Eliminated ~30 lines of duplicated playback loop code - Maintains separation: main.c handles CLI/loader, API handles library interface Benefits: - Single source of truth for playback timing logic - Easier to maintain and test - Consistent behavior between CLI and API - main.c retains its advanced features (loader, shuffle, verbose) - panelplayer_api.c remains simple and clean
Implemented standard installation system following Linux/Unix conventions. Changes to makefile: - Added installation directory variables (PREFIX, BINDIR, LIBDIR, INCLUDEDIR) - Implemented 'make install' target to install system-wide - Implemented 'make uninstall' target to remove installation - Support for DESTDIR for package building - Support for custom PREFIX for alternative install locations Installation installs: - Executable: /usr/local/bin/panelplayer - Library: /usr/local/lib/libpanelplayer.so - Header: /usr/local/include/panelplayer/panelplayer_api.h Updated README.md with: - Installation instructions - Usage after installation - Custom prefix examples - Library usage examples Benefits: - Makes panelplayer available system-wide - Follows standard Linux conventions - Easier for users to integrate the library - Enables package creation (deb, rpm, etc) - Professional deployment workflow
Transformed README from basic documentation to comprehensive project guide. Improvements: - Better structure with clear sections - Visual hierarchy with emojis and formatting - Practical examples for common use cases - Code snippets for library integration - Step-by-step extension development Makes the project more accessible and attractive for: - New users (Quick Start) - Developers (API documentation) - Contributors (Architecture, Extensions) - System integrators (Installation, Troubleshooting)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes my previous pull requests and several improvements:
Comprehensively improve README with professional documentation
Transformed README from basic documentation to comprehensive project guide.
Improvements:
Makes the project more accessible and attractive for:
Implemented standard installation system following Linux/Unix conventions.
Changes to makefile:
Installation installs:
Updated README.md with:
Improve C# example with better structure and command-line argument support
Refactored C# example to follow better organization practices:
Added full command-line argument support matching native PanelPlayer:
Changed from single-target (net9.0) to multi-target (net8.0;net9.0) to support broader range of .NET installations.
This allows the example to run on systems with .NET 8.0 LTS or .NET 9.0.
Refactor code to eliminate duplication between main.c and panelplayer_api.c
Created new core module (core.c/core.h) with shared functionality:
Implements duplication functionality (-d parameter)
For driving two identical displays (same image on both displays)