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

PlaybackStreamReader sample #102

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alafleur-genetec
Copy link
Member

No description provided.

- Prompt user to press any key to exit after execution.
- Updated camera GUID from placeholder to specific value.
- Corrected logon success check to handle failure case.
- Introduced `CancellationTokenSource` for stream reading cancellation.
- Added `Console.CancelKeyPress` event handler for Ctrl+C.
- Updated `RunSample` to use cancellation token for streams.
- Added try-catch for `OperationCanceledException` with message.
- Removed redundant `else` block for logon failure.
- Updated `ReadStream` to accept and use `CancellationToken`.
- Changed seek time in `ReadStream` to five minutes ago.
- Printed frame information in `ReadStream` more compactly.
- Made `GetMediaTypeName` use more readable media type names.
- Replaced `Console.WriteLine` with `Console.Write` to avoid extra newline
- Added `Console.ReadKey(true)` to wait for key press before exit
- Added comments to constants for better context
- Introduced event handlers for connection status feedback
- Simplified `Console.CancelKeyPress` event handler
- Split `RunSample` into `ReadVideoStream`, `ReadAudioStream`, and `ReadMetadataStream`
- Added exception handling for `OperationCanceledException`
- Enhanced `ReadStream` method with detailed output
- Improved console output formatting for alignment
- Removed redundant comments and streamlined code
@alafleur-genetec alafleur-genetec self-assigned this Jan 5, 2025
@alafleur-genetec alafleur-genetec changed the title Playback stream reader sample PlaybackStreamReader sample Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant