Commit graph

169 commits

Author SHA1 Message Date
Wim Taymans
ddce68a5c2 video: More video helper library improvements
Make a new GstVideoFormatinfo structure that contains the specific information
related to a format such as the number of planes, components, subsampling,
pixel stride etc. The result is that we are now able to introduce the concept of
components again in the API.
Use tables to specify the formats and its properties.
Use macros to get information about the video format description.
Move code to set strides, offsets and size into one function.
Remove methods that are not handled with the structures.
Add methods to retrieve pointers and strides to the components in the video.
2011-07-04 16:01:14 +02:00
Wim Taymans
6d9e76f2de video: remove intermediate Plane structure
Remove the GstVideoPlane structure and move the fields directly into the
GstVideoInfo structure. This makes things a little easier to read and also makes
it more likely that we can pass the stride array to external libraries.
2011-06-20 11:25:58 +02:00
Wim Taymans
d93129d8da -base: port to GstVideoFrame API 2011-06-17 15:41:31 +02:00
Wim Taymans
d06f599193 -base: port elements to new video caps 2011-06-16 12:52:13 +02:00
Wim Taymans
0ac9bb7d99 Merge branch 'master' into 0.11
Conflicts:
	tests/examples/audio/Makefile.am
	tests/examples/v4l/Makefile.am
2011-06-10 12:14:57 +02:00
Tim-Philipp Müller
c692191c33 GST_PLUGINS_BASE_LIBS is not defined in -base. 2011-06-08 12:21:43 +01:00
Wim Taymans
2940249a84 -base: use caps event
Remove uses of setcaps function and use the caps event.
2011-06-07 11:55:36 +02:00
Sebastian Dröge
bf08ca7020 Merge branch 'master' into 0.11 2011-05-26 13:54:09 +02:00
Lane Brooks
5488877090 textoverlay: added 'outline-color' parameter to control whether text gets a shadow 2011-05-26 11:05:43 +02:00
Lane Brooks
c8a3f63909 textoverlay: added 'shadow' option to control whether text gets a shadow 2011-05-26 11:03:23 +02:00
Jindrich Makovicka
2ba4a56d74 textrender: Correctly negotiate with downstream instead of just using random caps
Fixes bug #638897.
2011-05-26 10:48:05 +02:00
Jindrich Makovicka
c186d400e5 textrender: Add bound checks to not write outside the image area 2011-05-26 10:43:51 +02:00
Jindrich Makovicka
fe533c9995 textrender: Prevent double unref of caps if the caps can't be set on the srcpad 2011-05-26 10:42:46 +02:00
Sebastian Dröge
884213b8b8 base: Update for SEGMENT event parse API changes 2011-05-18 17:23:18 +02:00
Sebastian Dröge
c255019b90 ext: Update for caps/pad template related API changes 2011-05-17 13:06:01 +02:00
Sebastian Dröge
318ed07598 Revert "-base_port to new query API"
This reverts commit c9f4e0676b.
2011-05-17 11:25:31 +02:00
Sebastian Dröge
362a025a6b textoverlay: Update for negotiation related API changes 2011-05-16 15:35:41 +02:00
Wim Taymans
94dfe80f71 -base: port to new SEGMENT API 2011-05-16 13:48:11 +02:00
Wim Taymans
c9f4e0676b -base_port to new query API 2011-05-10 18:39:07 +02:00
Wim Taymans
816f4e791d segment: fix for new core API
Fix for gst_*_segment_full rename.
2011-05-09 18:16:46 +02:00
Wim Taymans
ec57868488 -base: don't use buffer caps
Port to newest 0.11 core API, remove GST_PAD_CAPS and GST_BUFFER_CAPS.
2011-05-09 13:05:12 +02:00
Wim Taymans
86a4771f8e remove buffer_alloc 2011-04-29 13:28:17 +02:00
Sebastian Dröge
353186aec8 ext: Use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-19 14:22:42 +02:00
Sebastian Dröge
0759ce8533 Merge branch 'master' into 0.11 2011-04-18 13:23:32 +02:00
Sebastian Dröge
1312605eac textoverlay: Always hold the class-global pango mutex when using pango API 2011-04-17 14:17:53 +02:00
Sebastian Dröge
d2ce491153 {time,clock}overlay: Hold the class-global pango mutex when changing the pango context 2011-04-17 14:17:52 +02:00
Sebastian Dröge
72b142bfdf {clock,time}overlay: Only set the global pango context options once in class_init
Instead of doing it over and over again when instantiating a new instance.
2011-04-17 14:17:52 +02:00
Sebastian Dröge
9ee7398fae pango: Create a new pango context for every subclass
timeoverlay/clockoverlay are setting some global options
on the context that shouldn't be used for the generic textoverlay.
2011-04-17 14:17:52 +02:00
Sebastian Dröge
92d10cbb8c pango: Create a new base class for all the elements
This prevents the ugly hack where the text_sink pad template
was only added for textoverlay but not for the subclasses.

Also makes this work with the core change that made
subclasses inherit the templates of their parent class.
2011-04-16 15:56:55 +02:00
Wim Taymans
0f3fdf18e0 fix compilation after merge 2011-04-04 11:44:15 +02:00
Wim Taymans
da1c863711 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/tag/gstvorbistag.c
2011-04-04 11:31:33 +02:00
Josep Torra
fbc60fc6f4 textoverlay: fix comparison is always false due to limited range of data type
Perform calculation in a temp var with enough room as there's guarantee that
ret will be able to hold the result for example in _blit_AYUV.
2011-04-01 15:47:03 +02:00
Sebastian Dröge
026776ca23 textoverlay: Add support for xBGR and RGBx
Now all RGB variants are supported.
2011-04-01 10:39:31 +02:00
Lane Brooks
200ee96338 textoverlay: Added support for ARGB and other RGB alpha variants 2011-04-01 10:36:36 +02:00
Lane Brooks
e2150b11ff textoverlay: converted AYUV to use 'A OVER B' alpha compositing
'A OVER B' compositing is explained at
http://en.wikipedia.org/wiki/Alpha_compositing.

Previously, overlaying text on a transparent background image left the
text overlay also transparent. This pipeline shows such an example:

gst-launch videotestsrc pattern=white ! video/x-raw-yuv,format=\(fourcc\)AYUV ! alpha alpha=0.0 ! textoverlay text=Testing auto-resize=False font-desc=60px ! videomixer ! ffmpegcolorspace ! autovideosink

With this patch, text is composited "OVER" the background image and
thus is visible regardless of the alpha of the background image. The
overlay in the above pipeline works after applying this patch.
2011-04-01 10:35:08 +02:00
Wim Taymans
e1869fa267 Merge branch 'master' into 0.11-fdo 2011-03-28 20:13:59 +02:00
Wim Taymans
f379a5dacb plugins: more porting to new memory API 2011-03-27 18:30:24 +02:00
Mart Raudsepp
093a91eec8 textoverlay: Clean up alignment docs a bit and remove horiz top alignment enum 2011-03-16 15:03:51 +00:00
Stefan Kost
9ac74c59db textoverlay: use a class wide mutex to work around pango reentrance issues
Pango is not reentrant. Use a class wide mutex to protect pange use in
gst_text_overlay_render_pangocairo(). This works reliable in contrast to the
hack in my previous commit.

Fixes Bug #412678
2011-03-14 11:17:10 +02:00
Stefan Kost
3294ecda7d Revert "textoverlay: add a hack to init the pango engine"
This reverts commit fee3266056.
2011-03-14 11:17:10 +02:00
Stefan Kost
1d73ea887d textoverlay: drop trailing whitespaces 2011-03-14 10:43:42 +02:00
Stefan Kost
fee3266056 textoverlay: add a hack to init the pango engine
Layout a single char to pre-create all resources.
2011-03-14 10:43:42 +02:00
Lane Brooks
876bf233fb textoverlay: Add support for vertical center alignment
Fixes bug #639159.
2011-01-24 19:39:59 +01:00
Tim-Philipp Müller
b6ae695174 textoverlay: make text property controllable too
Because we can, and because it's the most interesting one
to control really, after xpos/ypos.
2011-01-06 23:08:34 +00:00
Lane Brooks
e674178331 textoverlay: make some properties controllable
https://bugzilla.gnome.org/show_bug.cgi?id=638859
2011-01-06 23:02:23 +00:00
Vincent Penquerc'h
270bac8158 timeoverlay: add missing break
https://bugzilla.gnome.org/show_bug.cgi?id=637377
2010-12-16 11:41:02 +01:00
Sebastian Dröge
ca24ece36b textoverlay: Add support for AYUV 2010-09-01 17:52:31 +02:00
Rob Clark
54f4aa28c2 textoverlay: fix Cb/Cr inversion for colored text overlays
In case of odd values for xpos or ypos, the division by two in CbCr
plane would result in an off-by-one error, which in the case of NV12,
NV21, or UYVY would cause inversion of blue and red colors.  (And
would be not so easily noticed for I420 as it would just cause the
chroma to be offset slightly from the luma.)

This patch also fixes a silly typo from the earlier patch which
added NV12 support that broke UYVY support.
2010-08-30 22:53:26 +02:00
Sebastian Dröge
faebf174fb textoverlay: Support NV21 too and minor cleanups 2010-08-24 10:12:53 +02:00
Chris Shoemaker
6bd90dc0cc clockoverlay: only rerender text if time string has changed
The textoverlay element will rerender the text string whenever
overlay sets the 'need_render' flag to TRUE.  Previously, we
lazily set the flag to TRUE every time the time string was requested.
Now, we save a copy of the previously given string, and only set
'need_render' to TRUE if the string has changed.

In my tests with a 30fps video stream, and a time string including
a seconds field, this change reduced the CPU usage of the clockoverlay
element from 60% to 5%.

Fixes bug #627780.
2010-08-24 09:29:33 +02:00