Nicolas Dufresne
48f877ea91
basetextoverlay: Ensure meta coordinate are in stream scale
...
The GstVideoOverlayComposition meta coordinates should always be
in stream scale, regardless of the window size downstream. This
way the sink can always scale the composition if the window size
have changed after a buffer (with his meta) was rendered before.
https://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-22 13:24:04 -04:00
Nicolas Dufresne
db81a73dba
basetextoverlay: Reorder and cleanup class attribute
...
Also add a minimum amount of comment so we can understand what
is doing what.
https://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-22 13:24:04 -04:00
Nicolas Dufresne
a2e4ccc38b
basetextoverlay: Fix upstream composition handling
...
We need to update the render when upstream composition changes
or if it was removed.
http://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 16:26:39 -04:00
Nicolas Dufresne
d10959fd36
basetextoverlay: Clear reconfigure flags before negotation
...
This avoids negotiating twice. Current the _setcaps() patch does
not clear the initial reconfigure flags, which lead to systematic
double renegotiation.
http://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 16:26:33 -04:00
Nicolas Dufresne
2308014963
basetestoverlay: Always query window dimension
...
Remove the optimization to skip allocation query so we can
always have the latest window size information. Also, correctly
deal with the case where there is no window size information.
http://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 16:26:19 -04:00
Nicolas Dufresne
a64a343077
basetextoverlay: Send caps before doing allocation query
...
This is currently a limitation of BaseTransform base class. Which means
pretty much every filters out there.
http://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 15:11:06 -04:00
Lubosz Sarnecki
d1808a5dbf
basetextoverlay: Log GstVideoOverlayComposition negotiation
...
https://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 15:09:22 -04:00
Lubosz Sarnecki
91a615fa89
basetextoverlay: Receive window size event and adjust rendering
...
* cache window size event and update handle ratio
* init width with 1, don't use 0
* don't update overlay when receiving same window size
* receive window size from allocation query
https://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 15:09:22 -04:00
Lubosz Sarnecki
f128666834
basetestoverlay: Pass down meta buffers from upstream that supports GstVideoOverlayComposition
...
This makes pipelines with multiple textoverlay elements possible.
The meta data is collected from the upstream textoverlay element,
merged into a new GstVideoOverlayComposition and passed down downstream.
https://bugzilla.gnome.org/show_bug.cgi?id=751157
2015-07-20 15:09:22 -04:00
Tim-Philipp Müller
6020b0cf2b
Update mailing list address from sourceforge to freedesktop
2015-07-16 17:17:16 +01:00
Nicolas Dufresne
91f2f1874c
basetextoverlay: Fix bug with unused upstream_has_meta
...
The intention was to skip the allocation query if upstream has decided
to use the overlay meta feature in the caps. We can safely assume that
upstream have done that query already before making this decision. This
is an optimization since doing allocation queries is relatively
expensive.
CID #1308943
2015-07-02 10:47:45 -04:00
Nicolas Dufresne
828f0291bf
Revert "basetextoverlay: remove dead code"
...
This reverts commit e863e5f8a9
.
2015-07-02 10:27:39 -04:00
Luis de Bethencourt
e863e5f8a9
basetextoverlay: remove dead code
...
upstream_has_meta is set to FALSE and never changed. The two checks for if
upstream_has_meta will never go to the true branch. Removing the boolean
and the true branches of these checks.
CID #1308943
2015-07-02 14:58:38 +01:00
Lazar Claudiu
f5906122fb
basetextoverlay: add "draw-shadow" and "draw-outline" properties
...
https://bugzilla.gnome.org/show_bug.cgi?id=749823
2015-06-14 17:56:29 +01:00
Nicolas Dufresne
7e47aaf1b9
basetextoverlay: Rewrite negotiation method
...
This cleanup the negotiation function by properly splitting the probe
and the decisions. This allow handling correctly pipeline where upstream
caps have special memory type. An example pipeline is:
gltestsrc ! textoverlay text=bla ! fakesink
The upstream caps will be memory:GLMemory, which isn't supported by the
blitter.
https://bugzilla.gnome.org/show_bug.cgi?id=749243
2015-06-12 19:58:39 -04:00
Claudiu Florin Lazar
af7a311c1c
basetextoverlay: make deltax and deltay properties controllable
...
This will be more useful once we have absolute direct
control bindings.
https://bugzilla.gnome.org/show_bug.cgi?id=749824
2015-05-26 09:24:16 +01:00
Tim-Philipp Müller
ec5c93f169
docs: update element example pipelines
...
- gst-launch -> gst-launch-1.0
- use autoaudiosink and audiovideosink more often
- review pipeline examples and descriptions
2015-05-10 11:38:19 +01:00
Guillaume Desmottes
e9a6cafa13
basetextoverlay: fix buffer leak in chain function
...
If we don't consume the buffer by passing its reference to
overlay->text_buffer then we need to unref it.
Fix a leak with validate.file.playback.fast_forward.test5_mkv
when running inside Valgrind.
https://bugzilla.gnome.org/show_bug.cgi?id=747602
2015-04-10 10:12:19 +01:00
Vincent Penquerc'h
b247001aa9
textoverlay: fix disappearing text with high deltax
...
When deltax is large enough to cause the text to push past the
width of the frame, it would disappear due to a bug in setting
the layout width.
While there, fix a log printing an incorrect width to set.
https://bugzilla.gnome.org/show_bug.cgi?id=739689
2015-04-03 16:14:23 +01:00
Nicolas Dufresne
ace35b78ee
textoverlay: Re-render if video size changed
...
https://bugzilla.gnome.org/show_bug.cgi?id=745554
2015-03-03 16:38:33 -05:00
Sebastian Dröge
46251a7bef
pango: Add license/copyright header to header file
2014-12-15 10:35:35 +01:00
Tim-Philipp Müller
6306cce41e
timeoverlay: add "time-line" property
...
So we can also show running time or stream time, not just the
buffer time stamps.
2014-11-25 14:52:47 +00:00
Tim-Philipp Müller
46e727ebde
Revert "basetextoverlay: Fix segfault when overlay outside the frame"
...
This is not correct. overlay->silent is a property and we
should not just flip the property forever because one text
we render is outside of the frame. The next one might not
be, the positioning properties can be changed after all.
The lower layers should handle clipping, and now do.
This reverts commit 1cc311156c
.
https://bugzilla.gnome.org/show_bug.cgi?id=738984
https://bugzilla.gnome.org/show_bug.cgi?id=739281
2014-11-17 09:49:54 +00:00
Tim-Philipp Müller
a003423bc3
Revert "basetextoverlay: segfault when xpos >= video size"
...
This is not right, even if it might avoid a crash. We don't
want to just set xpos/ypos to 0 in those cases. Clipping
should be done properly, see bug #739281 for that.
This reverts commit 900d0267d5
.
https://bugzilla.gnome.org/show_bug.cgi?id=738984
https://bugzilla.gnome.org/show_bug.cgi?id=739281
2014-11-17 09:48:42 +00:00
Vineeth T M
900d0267d5
basetextoverlay: segfault when xpos >= video size
...
When the xpos is given as greater than or equal to the video size,
we get a segfault, due to improper condition.
Hence adding proper conditions.
https://bugzilla.gnome.org/show_bug.cgi?id=738984
2014-10-27 10:29:15 +00:00
Thibault Saunier
0eea730523
basetextoverlay: Make GstBaseTextOverlay::font-desc readable
2014-10-23 11:32:47 +02:00
Luis de Bethencourt
1cc311156c
basetextoverlay: Fix segfault when overlay outside the frame
...
When the textoverlay is set outside the video frame by deltax or deltay the
calculation segfaults, but it is also unnecessary since it doesn't need to be
displayed. So we should clip the text.
https://bugzilla.gnome.org/show_bug.cgi?id=738242
2014-10-11 19:06:03 +01:00
Thiago Santos
3ecb8bea22
basetextoverlay: Do not fail the negotiation if query fails
...
The allocation query failure doesn't mean that the negotiation
has failed as the element can allocate buffers itself.
Instead, only fail if the pads are flushing and the allocation
query failed.
https://bugzilla.gnome.org/show_bug.cgi?id=735844
2014-09-18 12:40:17 -03:00
Arnaud Vrac
f47c2442fe
basetextoverlay: get framerate from previously parsed video info
2014-09-05 11:09:30 +03:00
Arnaud Vrac
267a8c24af
basetextoverlay: do not ask for a bufferpool when checking for composition meta
2014-09-05 11:08:59 +03:00
Arnaud Vrac
76ce112994
basetextoverlay: schedule reconfigure on source pad when negotiation fails
...
The source pad might be flushing while negotiating, resulting in
set_caps or the ALLOCATION query failing. In this case set the
reconfigure flag on the source pad so that negotiation is retried on the
next buffer.
2014-09-05 11:08:49 +03:00
Arnaud Vrac
ef5823cc9b
basetextoverlay: just forward the seek event to sink pads like other events
...
https://bugzilla.gnome.org/show_bug.cgi?id=735844
2014-09-05 11:08:04 +03:00
Nicola Murino
501a295fa1
basetextoverlay: remove unneeded cairo transparence setting
...
he code here:
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/pango/gstbasetextoverlay.c#n1554
should make transparent the box that contains the text, I think this code is
not correct, it should be:
if (overlay->want_shading) {
double alpha = overlay->shading_value / 255.0;
cairo_paint_with_alpha (cr, alpha);
}
however I think this code could be removed, we already do a shaded background,
why shade the box behind the text with cairo too? only one shading is needed so
we must shade with cairo or with methods like these:
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/pango/gstbasetextoverlay.c#n1642
not both
https://bugzilla.gnome.org/show_bug.cgi?id=736028
2014-09-04 14:13:55 +03:00
Nicola Murino
ad16f15ee4
basetextoverlay: Make shading_value a property
...
https://bugzilla.gnome.org/show_bug.cgi?id=735879
2014-09-04 11:17:55 +03:00
Thiago Santos
a65b307349
basetextoverlay: properly fallback to non-overlay caps
...
When downstream claims to accept the overlay meta but fails to
provide it in the allocation query, properly fallback to setting
a new caps without the overlay meta as that is not going to be used.
Only do this if the original caps doesn't have the overlay already,
otherwise there isn't much that can be done.
https://bugzilla.gnome.org/show_bug.cgi?id=735800
2014-09-01 15:23:09 -03:00
Sebastian Dröge
e783a366cb
textoverlay: Don't hold any mutexes while calling negotiate
...
It's not done in any other code calling negotiate and will cause deadlocks
as it is sending events and queries in the pipeline.
Specifically this pipeline was deadlocking:
gst-launch-1.0 videotestsrc ! textoverlay ! textoverlay ! fakesink
2014-09-01 12:28:24 +03:00
Tim-Philipp Müller
5fc94da399
textoverlay: remove code that can't be reached
...
If this code could ever be reached, it would leak
memory (CID 1231978), but gst_caps_get_features()
never returns NULL, so that can't happen.
2014-08-29 19:18:55 +01:00
Thiago Santos
6bf3356967
basetextoverlay: fix caps negotiation filter
2014-08-13 11:22:52 -03:00
Thiago Santos
a080c0ebbf
basetextoverlay: rework caps negotiation
...
Make textoverlay negotiate caps more correctly.
1) Check what caps we received in the video-sink
2) If it already has the overlay meta -> use it directly
3) If it doesn't, textoverlay try adding the overlay meta and using it,
if downstream doesn't support it, just use what is received in the
video-sink
4) Check if the allocation query also supports the meta to enable
really using it
Before it wasn't really doing renegotiation of any kind, just
re-checking if it should use the overlay meta or not
Also had to update the caps in the test as memory:SystemMemory seems
to be required when you use a caps feature otherwise intersection/subset
checks will fail.
https://bugzilla.gnome.org/show_bug.cgi?id=733916
2014-08-11 11:40:44 -03:00
Thiago Santos
c20e044ef0
basetextoverlay: always intersect with the filter caps
...
Avoids returning values that upstream can't produce
https://bugzilla.gnome.org/show_bug.cgi?id=733916
2014-08-11 10:30:58 -03:00
Thibault Saunier
7f9aac386f
pango: Do not try to add a feature to a caps features ANY
...
It does not makes sense and asserts
2014-05-11 00:12:30 +02:00
Sebastian Dröge
3e2a693ca9
pango: Make static caps actually static to fix a memory leak
2014-04-15 13:57:08 +02:00
Josep Torra
40c2d3c088
textrender: push segment event after caps event
...
Fixes warning "Sticky event misordering, got 'segment' before 'caps'".
2014-04-11 10:43:39 +02:00
Adrien Schwartzentruber
a9d98c57a4
pango: demote debug WARNING to LOG for variable framerate video input
...
No need why we need to warn about that, it's perfectly allowed.
https://bugzilla.gnome.org/show_bug.cgi?id=725837
2014-03-06 17:51:11 +00:00
Matthieu Bouron
ed8e7d4275
pango: basetextoverlay: handle video/x-raw(ANY) if downstream supports the GstVideoOverlayCompositionMeta API
...
https://bugzilla.gnome.org/show_bug.cgi?id=721953
2014-03-05 20:38:53 +01:00
Thiago Santos
ec7724c095
basetextoverlay: use correct segment for text
...
video time uses the 'segment' and the text time should use
the 'text_segment'.
If different segments are used for video and text it would
lead to out of sync video/subtitles.
2014-02-07 02:14:52 -03:00
Tim-Philipp Müller
448c006b02
textoverlay: don't leak GAP events
2014-01-10 11:17:04 +00:00
Tim-Philipp Müller
b1ff48c1a1
docs: remove old 0.10 Since markers
...
They're just confusing.
2013-11-16 16:10:07 +00:00
Edward Hervey
9dd0e6cccc
ext/gst: Ensure default query/event handlers are used
...
And in some cases, just remove our implementation that does nothing
2013-07-26 16:08:35 +02:00
Tim-Philipp Müller
f9befdecfe
textrender: actually fixate output caps when fixating output caps
2013-05-02 23:41:02 +01:00
Sebastian Dröge
948a4a3632
gst: Add better support for static plugins
2013-04-15 15:52:58 +02:00
Tim-Philipp Müller
8e4934820f
pango: use new GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS define
...
https://bugzilla.gnome.org/show_bug.cgi?id=665751
2013-02-19 12:54:40 +00:00
Jan Schmidt
fb102419c7
pango: 3rd time's the charm. Fix attribute list handling.
...
Really really fix attribute list handling by taking a
copy of the original attributes that pango_attr_list_filter
can mutate, but keep the original around intact to restore
later.
2013-02-08 00:05:24 +11:00
Jan Schmidt
bc42d382e2
pango: Don't modify the original attributes list.
...
Take a copy of the original attributes list instead of just
a ref, since pango_attr_list_filter can remove elements from it.
2013-02-07 23:45:26 +11:00
Jan Schmidt
2528baf2c2
pango: Remove extra pango_attr_list_copy() from basetextoverlay
...
Fixes a per-buffer memory leak of the attribute list.
2013-02-07 23:06:57 +11:00
Tim-Philipp Müller
76c0cca765
textoverlay: minor clean-up
...
Remove some macros that aren't needed any more.
2012-12-22 21:19:51 +00:00
Tim-Philipp Müller
df8e7f14a8
textoverlay: support shaded background for A420 format
...
https://bugzilla.gnome.org/show_bug.cgi?id=687817
2012-12-22 21:18:11 +00:00
Tim-Philipp Müller
ba255fbac6
textoverlay: implement background shading for IYU1
...
https://bugzilla.gnome.org/show_bug.cgi?id=687817
2012-11-07 13:59:53 +00:00
Tim-Philipp Müller
bd578c1dd4
textoverlay: also draw shaded backgrounds for RGB and BGR
...
https://bugzilla.gnome.org/show_bug.cgi?id=687817
2012-11-07 13:25:13 +00:00
Tim-Philipp Müller
caad241432
textoverlay: we can do YVU9 as well
2012-11-07 11:36:42 +00:00
Tim-Philipp Müller
16350b7d66
textoverlay: don't advertise 10-16-bit formats we can't blend text onto yet
...
We can't blend stuff on top of video formats that unpack into
ARGB64 or AYUV64 yet, so don't advertise them in our template caps.
2012-11-07 11:32:50 +00:00
Tim-Philipp Müller
e3bb068392
textoverlay: fix up names of old gray formats
...
Y800 -> GRAY8, Y16 -> GRAY16_{LE,BE}
2012-11-07 09:46:50 +00:00
Tim-Philipp Müller
74343165e1
textoverlay: draw shaded background for some more video formats
...
https://bugzilla.gnome.org/show_bug.cgi?id=687817
2012-11-07 09:41:13 +00:00
Tim-Philipp Müller
bedbfd0091
textoverlay: clamp shaded background box coordinates in one place
2012-11-07 09:41:13 +00:00
Tim-Philipp Müller
4aace8e0eb
textoverlay: move background shading into separate function
2012-11-07 09:41:13 +00:00
Tim-Philipp Müller
a53f0f382e
textoverlay: don't abort if we don't know how to paint shaded background for a format
...
It's not a very nice thing to do.
https://bugzilla.gnome.org/show_bug.cgi?id=687666
2012-11-06 23:44:01 +00:00
Sreerenj Balachandran
6cbcca0bc5
textoverlay: forward allocation queries on video sink pad instead of discarding them
...
This allows the upstream elements to use the allocation parameters
or pools from the downstream elements like videosink.
https://bugzilla.gnome.org/show_bug.cgi?id=687459
2012-11-05 13:27:56 +00:00
Tim-Philipp Müller
5f59b4f7ee
Fix FSF address
...
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Tim-Philipp Müller
3138c4e696
pango: avoid unnecessary pango attribute list copy
...
We just want to keep it alive, not modify it, so a
simple ref should be enough.
https://bugzilla.gnome.org/show_bug.cgi?id=686841
2012-10-25 17:16:58 +01:00
Jihyun Cho
2e0174e13c
pango: delete foreground color in shadow text
...
This makes colored text have gray drop shadows
instead of colored ones, which looks much better.
https://bugzilla.gnome.org/show_bug.cgi?id=686841
2012-10-25 17:16:58 +01:00
Sebastian Dröge
3c1041d5eb
Revert "gst: Add better support for static plugins"
...
This reverts commit d2d79e3bc2
,
which was accidentially pushed.
2012-10-24 13:26:26 +02:00
Sebastian Dröge
d2d79e3bc2
gst: Add better support for static plugins
2012-10-24 12:10:44 +02:00
Sebastian Dröge
c4fb8d1e69
basetextoverlay: Correctly handle empty text buffers
2012-09-27 12:41:28 +02:00
Sebastian Dröge
b19944d1e4
gst: Update for link/unlink function API change
2012-09-17 13:24:52 +02:00
Mark Nauwelaerts
36e78af5bf
pango: add missing break
2012-09-05 15:14:05 +02:00
Mark Nauwelaerts
b3545604c0
pango: handle GAP event to update text position
2012-09-05 12:02:32 +02:00
Tim-Philipp Müller
7c2e7b1a4f
text/plain + text/x-pango-markup -> text/x-raw
2012-09-02 02:45:41 +01:00
Mark Nauwelaerts
8db0cc4350
pango: adjust to modified video overlay composition API
2012-08-30 12:12:39 +02:00
Tim-Philipp Müller
96faac2891
pango: fix bad unref and crashes with multiple text overlays
...
gst_element_class_get_pad_template() does not return a ref,
so we mustn't unref the template returned. Fixes crashes
when switching back and forth between different types of
subtitle streams.
2012-08-21 22:51:38 +01:00
Mark Nauwelaerts
3ecad525b7
pango: adjust to modified video overlay composition API
2012-07-17 18:08:11 +02:00
Tim-Philipp Müller
a654ba5b85
pango: remove deprecated valign and halign properties
...
Replaced by valignment and halignment (enum-based now rather than strings).
2012-07-06 12:34:46 +01:00
Wim Taymans
177fd005ab
update for query api changes
2012-07-06 11:23:48 +02:00
Mark Nauwelaerts
4761e6d6ab
pango: query downstream for video overlay composition meta support
2012-07-03 14:35:25 +02:00
Mark Nauwelaerts
aa6295744b
pango: adjust to modified overlay composition API
2012-07-03 14:35:25 +02:00
Tim-Philipp Müller
1396f804be
pango: only map video buffer memory if actually needed
...
No need to map the video buffer if we're just going to attach
the meta; but if we map, we should do so in READWRITE mode.
2012-07-02 19:23:47 +01:00
Tim-Philipp Müller
52056653be
pango: pass pre-multiplied alpha to overlay composition directly
...
We now support pre-multiplied alpha in the overlay composition API,
and can avoid multiple conversions if the the overlay also supports
pre-multiplied alpha. We should probably also have mapped the
buffer as READWRITE when unpremultiplying.
2012-07-02 19:23:04 +01:00
Tim-Philipp Müller
c09512ee99
pango: remove support for video/x-surface again which is 0.10 stuff
...
This needs to be done and can be done differently/properly in 0.11.
2012-06-28 23:15:34 +01:00
Mark Nauwelaerts
0325a3bdae
pango: use ported GstVideoOverlayComposition functionality
...
Based on commits by Thibault Saunier <thibault.saunier@collabora.co.uk>
2012-06-28 18:16:25 +02:00
Sebastian Dröge
233622437f
elements: Use gst_pad_set_caps() instead of manual event fiddling
2012-06-08 15:51:06 +02:00
Andre Moreira Magalhaes (andrunko)
bac5fd4c6a
textoverlay: Use an external lock
...
Conflicts:
ext/pango/gsttextoverlay.c
ext/pango/gsttextoverlay.h
2012-05-29 11:53:08 +02:00
Tim-Philipp Müller
3c6a3ad629
Use new gst_element_class_set_static_metadata()
2012-04-10 00:45:16 +01:00
Sebastian Dröge
ad42b16375
gst: Update for GST_PLUGIN_DEFINE() API change
2012-04-05 15:11:05 +02:00
Sebastian Dröge
65307dd132
gst: Update versioning
2012-04-04 14:55:15 +02:00
Mark Nauwelaerts
68300bde0b
pango: plug rare buffer leak
2012-04-03 18:31:27 +02:00
Wim Taymans
897e8730e8
testoverlay: fix object and caps leak
2012-03-27 15:44:14 +02:00
Wim Taymans
25137962ad
fix for caps API changes
2012-03-11 19:04:41 +01:00
Tim-Philipp Müller
0b17c3747a
pango: re-port pangocairo deprecation and compiler warning fixes from 0.10
...
Wasn't applied because that code is in the new private base class.
2012-03-08 20:54:49 +00:00
Tim-Philipp Müller
29c266ccff
Merge remote-tracking branch 'origin/master' into 0.11
...
Conflicts:
common
docs/libs/gst-plugins-base-libs.types
ext/pango/gsttextoverlay.c
ext/vorbis/gstvorbisdec.c
gst/playback/gstplaysink.c
gst/playback/gstplaysinkconvertbin.c
sys/ximage/ximagesink.c
sys/xvimage/xvimagesink.c
2012-03-08 20:31:34 +00:00
Sebastian Dröge
93e7bb6759
pango: Fix 'implicit conversion from enumeration type 'GstTextOverlayLineAlign' to different enumeration type 'PangoAlignment'' compiler warning
2012-03-06 13:11:16 +01:00
Oleksij Rempel (Alexey Fisher)
0c2f2a64c5
pango: don't use deprecated pango_cairo_font_map_create_context()
...
https://bugzilla.gnome.org/show_bug.cgi?id=671300
2012-03-04 18:32:32 +00:00