mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
gst: handle blocks and size allocation for encoded format
In case of encoded video we get n_planes as 0 from the video info so passing that as n_datas is failing during the buffer negotiation. Make sure to use an appropriate value based on whether we have raw video or not. Co-authored-by: Taruntej Kanakamalla <taruntej@asymptotic.io>
This commit is contained in:
parent
55f71520db
commit
ebe9381236
6 changed files with 65 additions and 15 deletions
|
|
@ -22,6 +22,12 @@ G_DECLARE_FINAL_TYPE (GstPipeWirePool, gst_pipewire_pool, GST, PIPEWIRE_POOL, Gs
|
|||
#define PIPEWIRE_POOL_MIN_BUFFERS 2u
|
||||
#define PIPEWIRE_POOL_MAX_BUFFERS 16u
|
||||
|
||||
/* Only available in GStreamer 1.22+ */
|
||||
#ifndef GST_VIDEO_FORMAT_INFO_IS_VALID_RAW
|
||||
#define GST_VIDEO_FORMAT_INFO_IS_VALID_RAW(info) \
|
||||
(info != NULL && (info)->format > GST_VIDEO_FORMAT_ENCODED)
|
||||
#endif
|
||||
|
||||
typedef struct _GstPipeWirePoolData GstPipeWirePoolData;
|
||||
struct _GstPipeWirePoolData {
|
||||
GstPipeWirePool *pool;
|
||||
|
|
@ -42,6 +48,7 @@ struct _GstPipeWirePool {
|
|||
guint n_buffers;
|
||||
|
||||
gboolean has_video;
|
||||
gboolean has_rawvideo;
|
||||
gboolean add_metavideo;
|
||||
GstAudioInfo audio_info;
|
||||
GstVideoInfo video_info;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue