Wim Taymans
6373827a40
videoconvert: use a table for format conversion
...
Use a table with format conversion values so that we can also use
flags for the formats.
2025-05-05 12:10:02 +02:00
Wim Taymans
86dd937857
videoconvert: move event emission at end of functions
...
Make a function to emit all pending events and trigger it at the end of
operations that can change params.
2025-05-05 11:54:18 +02:00
Wim Taymans
77e6471a04
videoconvert: free codec resources
...
Free encoder and decoder resource properly when we renegotiate.
2025-05-05 11:20:15 +02:00
Wim Taymans
4dd98b4ff8
videoconvert: Use converter direction from properties
2025-05-05 11:19:15 +02:00
Wim Taymans
df52086c47
videoconvert: always restore old change_mask
2025-05-05 11:17:23 +02:00
Wim Taymans
1cca24c585
videoconvert: consume input buffer in all cases
...
Return the input buffer when we get some error so that the other side
can send new data.
2025-04-24 10:58:04 +02:00
Wim Taymans
774f9cbb80
videconvert: fix compilation on 32 bits
2025-04-02 10:15:37 +02:00
Wim Taymans
bf952a6e4b
videoconvert: improve setup of DSP mode
...
Parse and use DSP formats.
Redo the conversion setup when the formats changed. We usually do this
when starting the node but the formats can change while running as well.
2025-04-01 16:35:32 +02:00
Wim Taymans
5c5075f4d6
videoconvert-ffmpeg: copy complete passthrough buffer data
...
We also need to copy the data type, flags and sizes.
2025-03-28 16:10:42 +01:00
Wim Taymans
b23161d772
videoconvert: always put frame size on Format param
...
We can now set the 0x0 frame size as the default as a wildcard.
2025-03-28 16:09:36 +01:00
Wim Taymans
5f4c0cdd1e
improve debug and error reporting a little
2025-03-28 16:08:57 +01:00
Wim Taymans
ae1bbc93d8
videoconvert: return error on invalid formats
2025-03-28 16:08:19 +01:00
Wim Taymans
328718f958
audioconvert: add support for buffer data mmap
...
When there is no data and the buffer is mmapable, try to mmap it. Unmap
again when clearing the buffers.
Use the mmaped data pointer of the buffer when processing.
2025-03-27 15:37:19 +01:00
Wim Taymans
9ceb4310f8
videoconvert: unmap buffer memory as well
...
Set a flag when we mmaped the buffer memory so that we can unmap it
again when clearing the buffers.
2025-03-27 15:21:12 +01:00
Wim Taymans
479ba33685
videoconvert-ffmpeg: support transcoding
...
When the input and output is an encoded format but the dimensions are
different, do a decode, scale and encode.
2025-03-26 17:52:26 +01:00
Wim Taymans
f8dcf32c8d
videoconvert-ffmpeg: fix passthrough mode
...
Keep the passthrough flag up to date when we unset a port format or when
it changes.
We should only fill in the buffer data/fd when the ALLOC flag is set.
We should only take the passthrough input buffer as output when we are
in passthrough mode.
Copy the header metadata.
2025-03-26 17:52:26 +01:00
Wim Taymans
241ec04d88
videoconvert: support planar formats
...
Keep track of the per-place strides and sizes and use that to fill the
output buffer.
2025-03-26 12:29:26 +01:00
Wim Taymans
636e123fdd
videoconvert-ffmpeg: set better size suggestion
...
Use a better suggestion for the buffer size.
2025-03-26 09:54:12 +01:00
Wim Taymans
1515e46d50
ffmeg: fix default number of buffers
...
Make the MAX buffers different from the min and make sure the default
value is between min and max.
2025-03-25 16:19:50 +01:00
Wim Taymans
367e756ebe
videoconvert-ffmpeg: remove debug
2025-03-24 11:45:29 +01:00
Wim Taymans
4e0545aa04
videoconvert: get the correct strides
...
Use ffmpeg to get the right stride for the negotiated format instead of
using a wrong hardcoded value.
2025-03-20 10:57:26 +01:00
Wim Taymans
84bd4b7ea9
spa: use static inline for interfaces instead of macro
...
It gives better typechecking and a path to make a library of functions.
2024-11-26 11:35:49 +01:00
Wim Taymans
c0fcc9b83f
videoconvert: add more ffmpeg format mappings
2024-11-05 10:40:14 +01:00
Wim Taymans
2cbcdbc579
videoconvert: add an ffmpeg based video converter
...
To activate:
PIPEWIRE_PROPS='{ video.adapt.converter = video.convert.ffmpeg }' build/src/examples/video-play
This makes it possible to start firefox with mjpg capture and then
video-play and it will decode the mjpeg transparently. Works for other
incompatible video formats as well, as long as they can be mmapped.
Ideally this should use something GPU accelerated and this is what the
vulkan converter will do.
2024-09-06 12:27:02 +02:00