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

[RSDK-9935] - Iframe only decode #90

Merged

Conversation

nicksanford
Copy link
Collaborator

@nicksanford nicksanford commented Feb 7, 2025

Ticket

Changes:

  1. Add optional i_frame_only_decode config option. false by default. If true only iframes will be decoded. Works both with lazy_decode: true and lazy_decode: false
  2. Cache last returned image and the metadata of that image. Return cached response if the latest frame hasn't changed since the last camera.Image call. Bust cache when latest frame changes.
  3. Warn if i_frame_only_decode config option is enabled on any codecs other than h264 and h265

Manual Tests:

- h264, i_frame_only_decode: false, lazy_decode: false, rtp_passthrough: true
- h264, i_frame_only_decode: false, lazy_decode: false, rtp_passthrough: false
- h264, i_frame_only_decode: false, lazy_decode: true, rtp_passthrough: true
- h264, i_frame_only_decode: false, lazy_decode: true, rtp_passthrough: false
- h264, i_frame_only_decode: true, lazy_decode: false, rtp_passthrough: true
- h264, i_frame_only_decode: true, lazy_decode: false, rtp_passthrough: false
- h264, i_frame_only_decode: true, lazy_decode: true, rtp_passthrough: true
- h264, i_frame_only_decode: true, lazy_decode: true, rtp_passthrough: false
- h265, i_frame_only_decode: false, lazy_decode: false
- h265, i_frame_only_decode: false, lazy_decode: true
- h265, i_frame_only_decode: true, lazy_decode: false
- h265, i_frame_only_decode: true, lazy_decode: true

rtsp.go Outdated Show resolved Hide resolved
rtsp.go Outdated Show resolved Hide resolved
rtsp.go Outdated Show resolved Hide resolved
@nicksanford nicksanford marked this pull request as ready for review February 10, 2025 22:40
@nicksanford nicksanford requested a review from randhid February 10, 2025 22:40
Copy link
Collaborator

@randhid randhid left a comment

Choose a reason for hiding this comment

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

Few nits

rtsp.go Outdated Show resolved Hide resolved
rtsp.go Outdated Show resolved Hide resolved
rtsp.go Outdated Show resolved Hide resolved
rtsp.go Outdated Show resolved Hide resolved
nicksanford and others added 4 commits February 11, 2025 09:02
Co-authored-by: randhid <[email protected]>
Co-authored-by: randhid <[email protected]>
Co-authored-by: randhid <[email protected]>
Co-authored-by: randhid <[email protected]>
@nicksanford nicksanford merged commit b6d15ab into viam-modules:main Feb 11, 2025
18 checks passed
hexbabe pushed a commit to hexbabe/sean-viamrtsp that referenced this pull request Feb 14, 2025
* wip

* wip

* wip

* wip

* add warnings

* wip

* wip

* wip

* wip

* wip

* Update rtsp.go

Co-authored-by: randhid <[email protected]>

* Update rtsp.go

Co-authored-by: randhid <[email protected]>

* Update rtsp.go

Co-authored-by: randhid <[email protected]>

* Update rtsp.go

Co-authored-by: randhid <[email protected]>

---------

Co-authored-by: randhid <[email protected]>
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