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

[query] Set tensor query caps when state changes from PAUSED to PLAYING #4488

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

niley7464
Copy link
Contributor

@niley7464 niley7464 commented Jun 13, 2024

This patch makes to set tensor query caps, when state changes from PAUSED to PLAYING.
When the tensor_query_server is stopped, edge_handle is released.
So we need to set caps again when restarted.
If caps are not set, client connection is not possible after restart tensor_query_server.
This PR fixes nnstreamer/nnstreamer-android#35 (comment)

Self evaluation:

  1. Build test: [*]Passed [ ]Failed [ ]Skipped
  2. Run test: [*]Passed [ ]Failed [ ]Skipped

@@ -304,6 +304,7 @@ gst_tensor_query_serversrc_change_state (GstElement * element,
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
src->playing = FALSE;
gst_tensor_query_server_release_edge_handle (src->src_id);
src->configured = FALSE;
Copy link
Member

@myungjoo myungjoo Jun 14, 2024

Choose a reason for hiding this comment

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

Care to explain? (in the commit message?)

Copy link
Contributor Author

@niley7464 niley7464 Jun 14, 2024

Choose a reason for hiding this comment

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

Updated commit message.
It seems easier to understand to set caps again in change_state callback like serversink.
So the code has also been updated.
Thank you :)

Copy link
Member

@anyj0527 anyj0527 left a comment

Choose a reason for hiding this comment

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

LGTM✔

This patch makes to set tensor query caps, when state changes from PAUSED to PLAYING.
When the tensor_query_server is stopped, edge_handle is released.
So we need to set caps again when restarted.
If caps are not set, client connection is not possible after restart tensor_query_server.

Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
Copy link
Member

@wooksong wooksong left a comment

Choose a reason for hiding this comment

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

LGTM

@myungjoo myungjoo merged commit 754981d into nnstreamer:main Jun 17, 2024
15 checks passed
@niley7464 niley7464 deleted the query/caps branch June 17, 2024 05:52
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.

None yet

5 participants