Commit 8b7c3ac2 authored by Wim Taymans's avatar Wim Taymans

A plugin to add an alpha channel to I420 video. Can optionally do chroma keying.

Original commit message from CVS:
* configure.ac:
* gst/alpha/Makefile.am:
* gst/alpha/gstalpha.c: (gst_alpha_method_get_type),
(gst_alpha_get_type), (gst_alpha_base_init),
(gst_alpha_class_init), (gst_alpha_init), (gst_alpha_set_property),
(gst_alpha_get_property), (gst_alpha_sink_link), (gst_alpha_add),
(gst_alpha_chroma_key), (gst_alpha_chain),
(gst_alpha_change_state), (plugin_init):
A plugin to add an alpha channel to I420 video. Can optionally do
chroma keying.
* gst/multipart/Makefile.am:
* gst/multipart/multipart.c: (plugin_init):
* gst/multipart/multipartdemux.c: (gst_multipart_demux_base_init),
(gst_multipart_demux_class_init), (gst_multipart_demux_init),
(gst_multipart_demux_finalize), (gst_multipart_demux_handle_event),
(gst_multipart_find_pad_by_mime), (gst_multipart_demux_chain),
(gst_multipart_demux_change_state),
(gst_multipart_demux_plugin_init):
* gst/multipart/multipartmux.c: (gst_multipart_mux_get_type),
(gst_multipart_mux_base_init), (gst_multipart_mux_class_init),
(gst_multipart_mux_get_sink_event_masks), (gst_multipart_mux_init),
(gst_multipart_mux_sinkconnect), (gst_multipart_mux_pad_link),
(gst_multipart_mux_pad_unlink),
(gst_multipart_mux_request_new_pad),
(gst_multipart_mux_handle_src_event),
(gst_multipart_mux_next_buffer), (gst_multipart_mux_compare_pads),
(gst_multipart_mux_queue_pads), (gst_multipart_mux_loop),
(gst_multipart_mux_get_property), (gst_multipart_mux_set_property),
(gst_multipart_mux_change_state), (gst_multipart_mux_plugin_init):
A Multipart demuxer/muxer. Not sure if it violates specs. Used to
send multipart jpeg images to a browser.
* gst/videobox/Makefile.am:
* gst/videobox/README:
* gst/videobox/gstvideobox.c: (gst_video_box_fill_get_type),
(gst_video_box_get_type), (gst_video_box_base_init),
(gst_video_box_class_init), (gst_video_box_init),
(gst_video_box_set_property), (gst_video_box_get_property),
(gst_video_box_sink_link), (gst_video_box_i420),
(gst_video_box_ayuv), (gst_video_box_chain),
(gst_video_box_change_state), (plugin_init):
Crops or adds borders around an image. can do alpha channel
borders as well.
* gst/videomixer/Makefile.am:
* gst/videomixer/README:
* gst/videomixer/videomixer.c: (gst_videomixer_pad_get_type),
(gst_videomixer_pad_base_init), (gst_videomixer_pad_class_init),
(gst_videomixer_pad_get_sink_event_masks),
(gst_videomixer_pad_get_property),
(gst_videomixer_pad_set_property),
(gst_videomixer_pad_sinkconnect), (gst_videomixer_pad_link),
(gst_videomixer_pad_unlink), (gst_videomixer_pad_init),
(gst_video_mixer_background_get_type), (gst_videomixer_get_type),
(gst_videomixer_base_init), (gst_videomixer_class_init),
(gst_videomixer_init), (gst_videomixer_request_new_pad),
(gst_videomixer_handle_src_event),
(gst_videomixer_blend_ayuv_i420), (gst_videomixer_fill_checker),
(gst_videomixer_fill_color), (gst_videomixer_fill_queues),
(gst_videomixer_blend_buffers), (gst_videomixer_update_queues),
(gst_videomixer_loop), (gst_videomixer_get_property),
(gst_videomixer_set_property), (gst_videomixer_change_state),
(plugin_init):
Generic video mixer plugin, can handle multiple inputs all with
different framerates and video sizes. Is fully alpha channel
aware.
parent 3837845a
2004-05-28 Wim Taymans <wim@fluendo.com>
* configure.ac:
* gst/alpha/Makefile.am:
* gst/alpha/gstalpha.c: (gst_alpha_method_get_type),
(gst_alpha_get_type), (gst_alpha_base_init),
(gst_alpha_class_init), (gst_alpha_init), (gst_alpha_set_property),
(gst_alpha_get_property), (gst_alpha_sink_link), (gst_alpha_add),
(gst_alpha_chroma_key), (gst_alpha_chain),
(gst_alpha_change_state), (plugin_init):
A plugin to add an alpha channel to I420 video. Can optionally do
chroma keying.
* gst/multipart/Makefile.am:
* gst/multipart/multipart.c: (plugin_init):
* gst/multipart/multipartdemux.c: (gst_multipart_demux_base_init),
(gst_multipart_demux_class_init), (gst_multipart_demux_init),
(gst_multipart_demux_finalize), (gst_multipart_demux_handle_event),
(gst_multipart_find_pad_by_mime), (gst_multipart_demux_chain),
(gst_multipart_demux_change_state),
(gst_multipart_demux_plugin_init):
* gst/multipart/multipartmux.c: (gst_multipart_mux_get_type),
(gst_multipart_mux_base_init), (gst_multipart_mux_class_init),
(gst_multipart_mux_get_sink_event_masks), (gst_multipart_mux_init),
(gst_multipart_mux_sinkconnect), (gst_multipart_mux_pad_link),
(gst_multipart_mux_pad_unlink),
(gst_multipart_mux_request_new_pad),
(gst_multipart_mux_handle_src_event),
(gst_multipart_mux_next_buffer), (gst_multipart_mux_compare_pads),
(gst_multipart_mux_queue_pads), (gst_multipart_mux_loop),
(gst_multipart_mux_get_property), (gst_multipart_mux_set_property),
(gst_multipart_mux_change_state), (gst_multipart_mux_plugin_init):
A Multipart demuxer/muxer. Not sure if it violates specs. Used to
send multipart jpeg images to a browser.
* gst/videobox/Makefile.am:
* gst/videobox/README:
* gst/videobox/gstvideobox.c: (gst_video_box_fill_get_type),
(gst_video_box_get_type), (gst_video_box_base_init),
(gst_video_box_class_init), (gst_video_box_init),
(gst_video_box_set_property), (gst_video_box_get_property),
(gst_video_box_sink_link), (gst_video_box_i420),
(gst_video_box_ayuv), (gst_video_box_chain),
(gst_video_box_change_state), (plugin_init):
Crops or adds borders around an image. can do alpha channel
borders as well.
* gst/videomixer/Makefile.am:
* gst/videomixer/README:
* gst/videomixer/videomixer.c: (gst_videomixer_pad_get_type),
(gst_videomixer_pad_base_init), (gst_videomixer_pad_class_init),
(gst_videomixer_pad_get_sink_event_masks),
(gst_videomixer_pad_get_property),
(gst_videomixer_pad_set_property),
(gst_videomixer_pad_sinkconnect), (gst_videomixer_pad_link),
(gst_videomixer_pad_unlink), (gst_videomixer_pad_init),
(gst_video_mixer_background_get_type), (gst_videomixer_get_type),
(gst_videomixer_base_init), (gst_videomixer_class_init),
(gst_videomixer_init), (gst_videomixer_request_new_pad),
(gst_videomixer_handle_src_event),
(gst_videomixer_blend_ayuv_i420), (gst_videomixer_fill_checker),
(gst_videomixer_fill_color), (gst_videomixer_fill_queues),
(gst_videomixer_blend_buffers), (gst_videomixer_update_queues),
(gst_videomixer_loop), (gst_videomixer_get_property),
(gst_videomixer_set_property), (gst_videomixer_change_state),
(plugin_init):
Generic video mixer plugin, can handle multiple inputs all with
different framerates and video sizes. Is fully alpha channel
aware.
2004-05-27 Ronald Bultje <rbultje@ronald.bitfreak.net>
* ext/alsa/gstalsamixer.c: (gst_alsa_mixer_build_list):
......
......@@ -336,6 +336,7 @@ dnl these are all the gst plug-ins, compilable without additional libs
GST_PLUGINS_ALL="\
ac3parse \
adder \
alpha \
asfdemux \
audioconvert \
audioscale \
......@@ -366,6 +367,7 @@ GST_PLUGINS_ALL="\
mpegaudioparse \
mpegstream \
monoscope \
multipart \
overlay \
passthrough \
playondemand \
......@@ -387,10 +389,12 @@ GST_PLUGINS_ALL="\
typefind \
udp \
vbidec \
videobox \
videocrop \
videodrop \
videoflip \
videofilter \
videomixer \
videoscale \
videotestsrc \
volenv \
......@@ -1742,6 +1746,7 @@ gst-plugins.spec
gst/Makefile
gst/ac3parse/Makefile
gst/adder/Makefile
gst/alpha/Makefile
gst/audioconvert/Makefile
gst/audioscale/Makefile
gst/auparse/Makefile
......@@ -1774,6 +1779,7 @@ gst/mpegstream/Makefile
gst/modplug/Makefile
gst/modplug/libmodplug/Makefile
gst/monoscope/Makefile
gst/multipart/Makefile
gst/overlay/Makefile
gst/passthrough/Makefile
gst/playondemand/Makefile
......@@ -1795,10 +1801,12 @@ gst/tcp/Makefile
gst/typefind/Makefile
gst/udp/Makefile
gst/vbidec/Makefile
gst/videobox/Makefile
gst/videocrop/Makefile
gst/videodrop/Makefile
gst/videofilter/Makefile
gst/videoflip/Makefile
gst/videomixer/Makefile
gst/videoscale/Makefile
gst/videotestsrc/Makefile
gst/volenv/Makefile
......
plugin_LTLIBRARIES = libgstalpha.la
libgstalpha_la_SOURCES = gstalpha.c
libgstalpha_la_CFLAGS = $(GST_CFLAGS)
libgstalpha_la_LIBADD =
libgstalpha_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS =
This diff is collapsed.
plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
plugin_LTLIBRARIES = libmultipart.la
libmultipart_la_SOURCES = multipart.c multipartdemux.c multipartmux.c
libmultipart_la_CFLAGS = $(GST_CFLAGS)
libmultipart_la_LIBADD =
libmultipart_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h>
extern gboolean gst_multipart_demux_plugin_init (GstPlugin * plugin);
extern gboolean gst_multipart_mux_plugin_init (GstPlugin * plugin);
GST_DEBUG_CATEGORY (vorbisdec_debug);
static gboolean
plugin_init (GstPlugin * plugin)
{
gst_multipart_demux_plugin_init (plugin);
gst_multipart_mux_plugin_init (plugin);
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"multipart",
"multipart stream manipulation",
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
This diff is collapsed.
This diff is collapsed.
plugin_LTLIBRARIES = libgstvideobox.la
libgstvideobox_la_SOURCES = gstvideobox.c
libgstvideobox_la_CFLAGS = $(GST_CFLAGS)
libgstvideobox_la_LIBADD =
libgstvideobox_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS =
Videobox
--------
This plugin crops or enlarges the image. It takes 4 values as input, a
top, bottom, left and right offset. Positive values will crop that much
pixels from the respective border of the image, negative values will add
that much pixels. When pixels are added, you can specify their color.
Some predefined colors are usable with an enum property.
The plugin is alpha channel aware and will try to negotiate with a format
that supports alpha channels first. When alpha channel is active two
other properties, alpha and border_alpha can be used to set the alpha
values of the inner picture and the border respectively. an alpha value of
0.0 means total transparency, 1.0 is opaque.
The videobox plugin has many uses such as doing a mosaic of pictures,
letterboxing video, cutting out pieces of video, picture in picture, etc..
TODO
- add enum to specify common aspect ratios/sizes and add borders/crop
This diff is collapsed.
plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
plugin_LTLIBRARIES = libvideomixer.la
libvideomixer_la_SOURCES = videomixer.c
libvideomixer_la_CFLAGS = $(GST_CFLAGS)
libvideomixer_la_LIBADD =
libvideomixer_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
Video Mixer
-----------
A generice video mixer, it blends the ayuv buffers from all pads onto
a new buffer. The new buffer has by default a checkerboard pattern but
its color can be changed with a property.
The mixer can mix streams with different framerates and video sizes. It
uses the duration value of the buffer to schedule the rendering of the
buffers. For streams with a different resoltion than the final output
resolution one can specify the position of the top left corner where this
image should be placed with the pad properties xpos and ypos.
The overall alpha value of a stream can also be specified with a pad
property.
By default, the streams are blended in the order that the pads were
requested from the element. This can be overridden by changing the
zorder pad property of the stream, a stream with lower zorder gets
drawn first.
TODO
----
- really implement zorder
- take I420 yuv as well
- output AYUV if possible.
- implement different blend modes, some code is already done
- use filter caps on srcpad to decide on the final output size
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment