Commit graph

148 commits

Author SHA1 Message Date
Tim-Philipp Müller
7d22da9510 aggregator: make padding larger
Esp. the class structures, can't have enough
spare space for virtual functions.
2014-12-28 01:13:33 +00:00
Sebastian Dröge
b9312fe9a2 videoaggregator: Use the src query implementation of aggregator as the default case 2014-12-22 22:12:02 +01:00
Sebastian Dröge
5c9472f78c videoaggregator: Don't try to map NULL buffers 2014-12-18 22:04:38 +01:00
Sebastian Dröge
ccd24a3577 videoaggregator: Make sure to always update the pad's videoinfo together with buffers
Otherwise the videoinfo and the buffer content can go out of sync.
2014-12-18 22:03:04 +01:00
Sebastian Dröge
6f0eb92d72 aggregator: Add function to allow subclasses to set their own latency
For audiomixer this is one blocksize, for videoaggregator this should
be the duration of one output frame.
2014-12-17 19:51:32 +01:00
Sebastian Dröge
26d1a22e90 aggregator: Add a timeout parameter to ::aggregate()
When this is TRUE, we really have to produce output. This happens
in live mixing mode when we have to output something for the current
time, no matter if we have enough input or not.
2014-12-17 18:41:41 +01:00
Matthew Waters
e354149436 aggregator: make the src pad task drive the pipeline for live pipelines
This removes the uses of GAsyncQueue and replaces it with explicit
GMutex, GCond and wakeup count which is used for the non-live case.

For live pipelines, the aggregator waits on the clock until either
data arrives on all sink pads or the expected output buffer time
arrives plus the timeout/latency at which time, the subclass
produces a buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=741146
2014-12-16 16:58:57 +01:00
Matthew Waters
8fe8510d80 videoaggregator: always try to use newer buffers
instead of dropping them for being too old.  This ensures that
the newest buffer is always used for rendering
2014-12-16 16:49:49 +01:00
Thibault Saunier
e8fda3a28a videoaggregator: Hide some more fields from the API
+ Add some documentation
2014-12-12 11:49:42 +01:00
Sebastian Dröge
6354e0235a videoaggregator: Failure to map a video frame is not just a warning 2014-11-28 10:22:44 +01:00
Sebastian Dröge
0b73de023c videoaggregator: Minor cleanup 2014-11-27 21:23:36 +01:00
Sebastian Dröge
fdc87a52f2 videoaggregator: Copy over more fields from the relevant video-info
gst_video_info_set_format() will reset the complete video-info, but
we want to keep values like the PAR, colorimetry and chroma site.
Otherwise we risk setting different values on the srcpad caps than
what is actually inside the buffers.
2014-11-27 20:34:25 +01:00
Sebastian Dröge
4233ba4ca4 videoaggregator: Directly use the converters video-info instead of recalculating it 2014-11-27 20:25:29 +01:00
Sebastian Dröge
00880b5830 videoaggregator: Do source pad negotiation only from the aggregated function
Otherwise we might negotiate from the sinkpad streaming threads at
the same time as on the srcpad streaming thread, and then all kinds
of crazy bugs happen that don't make any sense at all.
2014-11-27 19:54:10 +01:00
Thibault Saunier
ec45cbda22 videoconvert: Hide all conversion related fields
And do not delay the setting of the conversion_info

https://bugzilla.gnome.org/show_bug.cgi?id=740768
2014-11-27 19:10:58 +01:00
Thibault Saunier
8cc214fdb8 videoaggregator: Expose vmethods to set converters and prepare/clean frames
This gives more flexibility to the subclasses and permits to remove the
GstVideoAggregatorClass->disable_frame_conversion ugly API.

WARNING: This breaks the API as it removes the disable_frame_conversion
field

API:
  + GstVideoAggregatorClass->find_best_format
  + GstVideoAggregatorPadClass->set_format
  + GstVideoAggregatorPadClass->prepare_frame
  + GstVideoAggregatorPadClass->clean_frame

  - GstVideoAggregatorClass->disable_frame_conversion

https://bugzilla.gnome.org/show_bug.cgi?id=740768
2014-11-27 19:10:58 +01:00
Thibault Saunier
a806b40135 videoaggregator: Let a full renegotiation happen after removing the last pad
With the current code, we will end up setting the preferred downstream
format as the srcpad format, and it might not be accepted by the next
sinkpad to be added. We should instead let the next sinkpad reconfigure
everything.
2014-11-27 19:10:58 +01:00
Sebastian Dröge
fc593bd2ca videoaggregator: Also sync pad properties to the controller if conversion is disabled 2014-11-26 13:06:21 +01:00
Sebastian Dröge
f2364cb398 videoaggregator: Don't output 0-duration buffers at the segment end
https://bugzilla.gnome.org/show_bug.cgi?id=740376
2014-11-19 17:06:52 +01:00
Matthew Waters
0ec9bf6140 videoaggregator: fix up QoS handling for live sources
Only attempt adaptive drop when we are not live

https://bugzilla.gnome.org/show_bug.cgi?id=739996
2014-11-17 22:39:07 +11:00
Sebastian Dröge
22825010c3 videoaggregator: Swap source/destination parameters of gst_video_converter_frame() 2014-11-03 16:13:23 +01:00
Luis de Bethencourt
2bf4a94179 videoaggregator: remove storage of never used values
These two values are stored just before the function returns and they go out of
scope.
2014-10-30 14:52:13 +00:00
Matthew Waters
165cdd20a7 videoaggregator: fixate the parts of the caps we don't know how to deal with
fixes glvideomixer with video/x-raw,width=foo i.e. no format field.
2014-10-21 02:53:02 +11:00
Matthew Waters
8bf2acba1d videoaggregator: operate on caps rather than video info
Otherwise the CapsFeatures will be lost along with the possibility
of multiple output types and formats.

https://bugzilla.gnome.org/show_bug.cgi?id=738129
2014-10-21 01:14:36 +11:00
Matthew Waters
b30f8985d5 aggregator: add latency query handling 2014-10-09 23:52:11 +11:00
Matthew Waters
9aa89185ed videoaggregator: support unresponsive pads
Render unresponsive pads with the last video frame received.
2014-10-09 23:52:11 +11:00
Matthew Waters
1e84482f36 videoaggregator: remove the use of the queued buffer on sink pads
That data is now held by the aggregator class
2014-10-09 23:52:11 +11:00
Thibault Saunier
138e63fd52 videoaggregator: Do not wrongly set the aggregator.segment
The aggregator.segment is not to be initialized by the subclasses but
by the aggregator itself. Moreover, initializing it on start would make
us loose the information coming from the initial seek.
2014-10-06 18:57:28 +02:00
Thibault Saunier
47aea18826 videoaggregator: Make sure not to unref a NULL pointer 2014-10-06 18:57:28 +02:00
Sebastian Dröge
9e122f6442 videoaggregator: Unmap and free GstVideoFrames as needed after conversion and errors 2014-10-06 10:11:47 +03:00
Thibault Saunier
d2f4d20d85 videoaggregator: Do not to release VIDEO_AGGREGATOR_LOCK while setting format info
We should be able to always keep the VIDEO_AGGREGATOR_LOCK while
negotiating caps, this patch introduce that change.

That also implies that we do not need the SETCAPS_LOCK anymore because
now VIDEO_AGGREGATOR_LOCK guarantees that setcaps is not called from
several threads and the gst_aggregator_set_caps method is now
protected.

https://bugzilla.gnome.org/show_bug.cgi?id=735042
2014-10-03 13:18:05 +02:00
Sebastian Dröge
6daef6a2f8 videoaggregator: Also copy over the chroma siting and colorimetry when deciding on a conversion 2014-10-01 17:22:59 +03:00
Sebastian Dröge
f4451b764f videoaggregator: Revert the last commit and handle resolutions differences properly
This is about converting the format, not about converting any widths and
heights. Subclasses are expected to handler different resolutions themselves,
like the videomixers already do properly.
2014-10-01 17:18:05 +03:00
Sebastian Dröge
30f6b63c3d videoaggregator: GstVideoConverter currently can't rescale and will assert
Leads to ugly assertions instead of properly erroring out:
CRITICAL **: gst_video_converter_new: assertion 'in_info->width == out_info->width' failed
2014-10-01 17:11:16 +03:00
Matthew Waters
62a430ad21 videoaggregator: don't create converters when the subclass doesn't want them
fixes a critical with glvideomixer after
35bd1969f9

CRITICAL **: gst_video_converter_new: assertion 'in_info->width == out_info->width' failed
2014-09-28 16:58:42 +10:00
Wim Taymans
e4dd599a55 video: use video lib conversion code instead of copy 2014-09-24 16:55:49 +02:00
Matthew Waters
4b1bf9b52a videoaggregator: push the caps event as soon as we receive it
Along with the required mandatory dependent events.

Some elements need to perform an allocation query inside
::negotiated_caps().  Without the caps event being sent prior,
downstream elements will be unable to answer and will return
an error.

https://bugzilla.gnome.org/show_bug.cgi?id=732662
2014-08-11 23:36:27 +10:00
Sebastian Rasmussen
bc15905c45 videoaggregator: Unref allowed caps after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734522
2014-08-10 11:55:09 +01:00
Thibault Saunier
4e60b291f8 videoaggregator: Fix some more the locking logic in update_src_caps
We need the GST_OBJECT_LOCK only to iterate the sinkpads, nothing else.

https://bugzilla.gnome.org/show_bug.cgi?id=732750
2014-07-06 23:36:10 +02:00
Tim-Philipp Müller
27ad5ef8d6 videoaggregator: fix broken locking in update_src_caps function
We would unlock an already-unlocked mutex that we never re-locked.

https://bugzilla.gnome.org/show_bug.cgi?id=732750
2014-07-06 22:16:48 +01:00
Vincent Penquerc'h
771ed7e429 videoaggregator: reset QoS on segment event
https://bugzilla.gnome.org/show_bug.cgi?id=732540
2014-07-01 16:35:42 +01:00
Sebastian Dröge
97cf5acb20 badvideo: Rename videoconvert functions to prevent conflicts with static linking
https://bugzilla.gnome.org/show_bug.cgi?id=728443
2014-06-28 17:03:19 +02:00
Matthew Waters
b1c00adfd7 videoaggregator: fix a refcount error when keeping the buffer
We take a ref on the pad's buffer at the beginning so we need to
unref when we are done in all cases.
2014-06-27 00:14:03 +10:00
Matthew Waters
fe79c90fc1 videoaggregator: don't clobber already heap allocated video frame
CID # 1223440
2014-06-23 22:40:23 +10:00
Matthew Waters
5ae625a333 videoaggregator: fix up the parent chaining for dispose and finalize 2014-06-23 22:36:23 +10:00
Thibault Saunier
6be7e91e4a libs:video: Properly declare APIs as UNSTABLE 2014-06-21 17:02:50 +02:00
Thibault Saunier
9e0c81cb62 libs: videoaggregato: Do not import videoconvert.h in gstvideoaggregatorpad.h
+ Add a Private structure to the GstVideoAggregatorPad
+ Add some padding
2014-06-20 22:14:25 +02:00
Mathieu Duponchelle
a7289ae606 videoaggregator: Create a new GstVideoAggregator baseclass
This base class has been added to a newly created libgstbadvideo library

Co-Authored by: Thibault Saunier <tsaunier@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=731918
2014-06-20 19:53:33 +02:00