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

Add: Gstreamer plugin for ST30TX #1027

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sakoram
Copy link
Collaborator

@Sakoram Sakoram commented Dec 20, 2024

example launch command:

gst-launch-1.0 filesrc location=/home/gta/mkasiew/audio-samp/f1_s16le_48000.pcm blocksize=70000 !
rawaudioparse format=pcm sample-rate=48000 pcm-format=s16le num-channels=1 !
mtlst30tx tx-queues=4 tx-udp-port=20000tx-payload-type=111 dev-ip="192.168.96.3" tx-ip="192.168.96.2" dev-port="0000:4b:11.0"

Signed-off-by: Kasiewicz, Marek <[email protected]>
@Sakoram Sakoram force-pushed the gsteamer-plugin-st30tx branch from 4fc6166 to 9e27a15 Compare December 21, 2024 15:58
#include <gst/audio/audio.h>
#include <gst/gst.h>
#include <mtl/mtl_api.h>
// #include <mtl/st_pipeline_api.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we should left those raisins in

#endif

#define GST_TYPE_MTL_ST30TX (gst_mtlst30tx_get_type())
G_DECLARE_FINAL_TYPE(GstMtlSt30Tx, gst_mtlst30tx, GST, MTL_ST30TX, GstAudioSink)
Copy link
Collaborator

Choose a reason for hiding this comment

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

didn't we agree to use the gstmtl_tx_st30p_tx convention from now on?
Why is it together?

return FALSE;
}
switch (sampling) {
case 44100:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This works definetly
but im wondering if using an enum with supported values wouldn't be better

i saw the documentation of different plugins and usually they are using enums and i see value in having a central registry of supported formats for now

If we ever do a gstreamer page we can point to a structure like
supported formats

https://gstreamer.freedesktop.org/documentation/rawparse/[rawaudioparse](https://gstreamer.freedesktop.org/documentation/rawparse/rawaudioparse.html?gi-language=c#GstRawAudioParseFormat).html?gi-language=c#GstRawAudioParseFormat

I'm open to suggestions but it think its worth it IMO

return GST_FLOW_ERROR;
}

/* This could be done with GstAdapter */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes i was implementing similar mechanism in st20p

But it has a similar issue as this one it's pretty complicated and error-prone IMO
Can we cut back on complexity with the gstAdapter?

} StTxSessionPortArgs;

struct _GstMtlSt30Tx {
GstAudioSink element;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you using the child ?
I'm deleting it from the st20 probably good idea to kick it from here too

There were some advantages in the bins but honestly this in st20p is a leftover from a lil bit too ambitious of a design

Comment on lines +108 to +114
/* TODO add support for gpu direct */
#ifdef MTL_GPU_DIRECT_ENABLED
gboolean gpu_direct_enabled;
gint gpu_driver_index;
gint gpu_device_index;
gboolean* gpu_context;
#endif /* MTL_GPU_DIRECT_ENABLED */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/* TODO add support for gpu direct */
#ifdef MTL_GPU_DIRECT_ENABLED
gboolean gpu_direct_enabled;
gint gpu_driver_index;
gint gpu_device_index;
gboolean* gpu_context;
#endif /* MTL_GPU_DIRECT_ENABLED */

The gpu direct is only avalible for st20p ?

@DawidWesierski4
Copy link
Collaborator

Another thing in another commit i am making the "central" files could be worthwhile to first go with that commit then just kick all the parsing you do here to common ?


ops_tx.port.num_port = 1;

ops_tx.framebuff_size = st30_calculate_framebuff_size(
Copy link
Collaborator

Choose a reason for hiding this comment

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

no check if everything went smoothly here ?

@DawidWesierski4
Copy link
Collaborator

Also please use a good commit message

Just a tad bit of a word about how this works mby?

What does it introduce to the code base ?

the launch command passed to the "To test" or "to launch" with clear description
how to check if this work mby ?

why so skimpy ;-;

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