-
Notifications
You must be signed in to change notification settings - Fork 56
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Kasiewicz, Marek <[email protected]>
4fc6166
to
9e27a15
Compare
#include <gst/audio/audio.h> | ||
#include <gst/gst.h> | ||
#include <mtl/mtl_api.h> | ||
// #include <mtl/st_pipeline_api.h> |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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
I'm open to suggestions but it think its worth it IMO
return GST_FLOW_ERROR; | ||
} | ||
|
||
/* This could be done with GstAdapter */ |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
/* 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 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* 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 ?
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( |
There was a problem hiding this comment.
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 ?
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 why so skimpy ;-; |
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"