Skip to content

Conversation

@DmongeN
Copy link

@DmongeN DmongeN commented Aug 28, 2025

Support action signals with one or more arguments.

Support adding name and description to HTTP PUT and POST requests in the request body as application/json type

@DmongeN DmongeN requested a review from lleon95 August 28, 2025 15:08

if (ret_sig != 0) {
ret = GSTD_BAD_VALUE;
/* The return value is not required */
Copy link
Contributor

Choose a reason for hiding this comment

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

You should document this. That the actions ignore the return values

Comment on lines -314 to -316
if (query != NULL) {
name = g_hash_table_lookup (query, "name");
description_pipe = g_hash_table_lookup (query, "description");
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you evaluated if this breaks something? It seems that everything is now encapsulated into a JSON. I wonder if this is going to break something on the HTTP side. Have you checked the examples?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I evaluated the examples using Postman and curl, with the current HTTP structure and using a JSON. For example:

curl --location 'http://127.0.0.1:3000/pipelines' --header 'Content-Type: application/json' --data '{"name": "p1", "description": "videotestsrc name=vts ! identity name=id ! autovideosink"}'

curl --location --request POST 'http://127.0.0.1:3000/pipelines?name=p0&description=videotestsrc%20name%3Dvts%20!%20identity%20name%3Did%20!%20autovideosink'

@DmongeN DmongeN force-pushed the feature/add-support-for-actions-with-arguments branch from 4c72c41 to 0084c4b Compare November 28, 2025 22:00
Comment on lines +279 to +280
for (guint i = 0; i <= query.n_params; i++)
g_value_unset (&args[i]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Braces

Comment on lines +395 to +398
if (!json_parser_load_from_data (parser,
msg->request_body->data,
msg->request_body->length,
&err)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation is incorrect. You should use gst-indent

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.

3 participants