Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gst-plugins-base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
George Kiagiadakis
gst-plugins-base
Commits
db0a2f51
Commit
db0a2f51
authored
Jun 15, 2011
by
Wim Taymans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
videoconvert: renamed from colorspace
parent
b94f9793
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
301 additions
and
363 deletions
+301
-363
configure.ac
configure.ac
+2
-2
gst/videoconvert/Makefile.am
gst/videoconvert/Makefile.am
+35
-0
gst/videoconvert/gstvideoconvert.c
gst/videoconvert/gstvideoconvert.c
+64
-62
gst/videoconvert/gstvideoconvert.h
gst/videoconvert/gstvideoconvert.h
+16
-15
gst/videoconvert/gstvideoconvertorc-dist.c
gst/videoconvert/gstvideoconvertorc-dist.c
+0
-0
gst/videoconvert/gstvideoconvertorc-dist.h
gst/videoconvert/gstvideoconvertorc-dist.h
+0
-0
gst/videoconvert/gstvideoconvertorc.orc
gst/videoconvert/gstvideoconvertorc.orc
+0
-0
gst/videoconvert/videoconvert.c
gst/videoconvert/videoconvert.c
+164
-264
gst/videoconvert/videoconvert.h
gst/videoconvert/videoconvert.h
+20
-20
gst/videoconvert/videoconvert.vcproj
gst/videoconvert/videoconvert.vcproj
+0
-0
No files found.
configure.ac
View file @
db0a2f51
...
...
@@ -426,7 +426,7 @@ AG_GST_CHECK_PLUGIN(audiorate)
AG_GST_CHECK_PLUGIN(audiotestsrc)
AG_GST_CHECK_PLUGIN(encoding)
AG_GST_CHECK_PLUGIN(ffmpegcolorspace)
AG_GST_CHECK_PLUGIN(
colorspace
)
AG_GST_CHECK_PLUGIN(
videoconvert
)
AG_GST_CHECK_PLUGIN(gdp)
AG_GST_CHECK_PLUGIN(playback)
AG_GST_CHECK_PLUGIN(audioresample)
...
...
@@ -863,7 +863,7 @@ gst/audioconvert/Makefile
gst/audiorate/Makefile
gst/audiotestsrc/Makefile
gst/encoding/Makefile
gst/
colorspace
/Makefile
gst/
videoconvert
/Makefile
gst/ffmpegcolorspace/Makefile
gst/gdp/Makefile
gst/playback/Makefile
...
...
gst/
colorspace
/Makefile.am
→
gst/
videoconvert
/Makefile.am
View file @
db0a2f51
plugin_LTLIBRARIES
=
libgst
colorspace
.la
plugin_LTLIBRARIES
=
libgst
videoconvert
.la
ORC_SOURCE
=
gst
colorspace
orc
ORC_SOURCE
=
gst
videoconvert
orc
include
$(top_srcdir)/common/orc.mak
libgst
colorspace_la_SOURCES
=
gstcolorspace.c colorspace
.c
nodist_libgst
colorspace
_la_SOURCES
=
$(ORC_NODIST_SOURCES)
libgst
colorspace
_la_CFLAGS
=
\
libgst
videoconvert_la_SOURCES
=
gstvideoconvert.c videoconvert
.c
nodist_libgst
videoconvert
_la_SOURCES
=
$(ORC_NODIST_SOURCES)
libgst
videoconvert
_la_CFLAGS
=
\
$(GST_PLUGINS_BASE_CFLAGS)
\
$(GST_CFLAGS)
\
$(ORC_CFLAGS)
libgst
colorspace
_la_LIBADD
=
\
libgst
videoconvert
_la_LIBADD
=
\
$(GST_PLUGINS_BASE_LIBS)
-lgstvideo-
$(GST_MAJORMINOR)
\
$(GST_BASE_LIBS)
\
$(GST_LIBS)
\
$(ORC_LIBS)
libgst
colorspace
_la_LDFLAGS
=
$(GST_PLUGIN_LDFLAGS)
libgst
colorspace
_la_LIBTOOLFLAGS
=
--tag
=
disable-static
libgst
videoconvert
_la_LDFLAGS
=
$(GST_PLUGIN_LDFLAGS)
libgst
videoconvert
_la_LIBTOOLFLAGS
=
--tag
=
disable-static
noinst_HEADERS
=
gst
colorspace.h colorspace
.h
noinst_HEADERS
=
gst
videoconvert.h videoconvert
.h
Android.mk
:
Makefile.am $(BUILT_SOURCES)
androgenizer
\
-:PROJECT libgst
colorspace -:SHARED libgstcolorspace
\
-:PROJECT libgst
videoconvert -:SHARED libgstvideoconvert
\
-:TAGS eng debug
\
-:REL_TOP
$(top_srcdir)
-:ABS_TOP
$(abs_top_srcdir)
\
-:SOURCES
$(libgst
colorspace
_la_SOURCES)
\
$(nodist_libgst
colorspace
_la_SOURCES)
\
-:CFLAGS
$(DEFS)
$(DEFAULT_INCLUDES)
$(libgst
colorspace
_la_CFLAGS)
\
-:LDFLAGS
$(libgst
colorspace
_la_LDFLAGS)
\
$(libgst
colorspace
_la_LIBADD)
\
-:SOURCES
$(libgst
videoconvert
_la_SOURCES)
\
$(nodist_libgst
videoconvert
_la_SOURCES)
\
-:CFLAGS
$(DEFS)
$(DEFAULT_INCLUDES)
$(libgst
videoconvert
_la_CFLAGS)
\
-:LDFLAGS
$(libgst
videoconvert
_la_LDFLAGS)
\
$(libgst
videoconvert
_la_LIBADD)
\
-ldl
\
-:PASSTHROUGH LOCAL_ARM_MODE:
=
arm
\
LOCAL_MODULE_PATH:
=
'$
$(TARGET_OUT)
/lib/gstreamer-0.10'
\
...
...
gst/
colorspace/gstcolorspace
.c
→
gst/
videoconvert/gstvideoconvert
.c
View file @
db0a2f51
...
...
@@ -21,14 +21,14 @@
*/
/**
* SECTION:element-
colorspace
* SECTION:element-
videoconvert
*
* Convert video frames between a great variety of
colorspace
formats.
* Convert video frames between a great variety of
videoconvert
formats.
*
* <refsect2>
* <title>Example launch line</title>
* |[
* gst-launch -v videotestsrc ! video/x-raw-yuv,format=\(fourcc\)YUY2 !
colorspace
! ximagesink
* gst-launch -v videotestsrc ! video/x-raw-yuv,format=\(fourcc\)YUY2 !
videoconvert
! ximagesink
* ]|
* </refsect2>
*/
...
...
@@ -37,14 +37,14 @@
# include "config.h"
#endif
#include "gst
colorspace
.h"
#include "gst
videoconvert
.h"
#include <gst/video/video.h>
#include <string.h>
GST_DEBUG_CATEGORY
(
colorspace
_debug
);
#define GST_CAT_DEFAULT
colorspace
_debug
GST_DEBUG_CATEGORY
(
colorspace
_performance
);
GST_DEBUG_CATEGORY
(
videoconvert
_debug
);
#define GST_CAT_DEFAULT
videoconvert
_debug
GST_DEBUG_CATEGORY
(
videoconvert
_performance
);
enum
{
...
...
@@ -77,32 +77,32 @@ enum
GST_VIDEO_CAPS_r210";" \
GST_VIDEO_CAPS_ARGB_64
static
GstStaticPadTemplate
gst_
csp
_src_template
=
static
GstStaticPadTemplate
gst_
video_convert
_src_template
=
GST_STATIC_PAD_TEMPLATE
(
"src"
,
GST_PAD_SRC
,
GST_PAD_ALWAYS
,
GST_STATIC_CAPS
(
CSP_VIDEO_CAPS
)
);
static
GstStaticPadTemplate
gst_
csp
_sink_template
=
static
GstStaticPadTemplate
gst_
video_convert
_sink_template
=
GST_STATIC_PAD_TEMPLATE
(
"sink"
,
GST_PAD_SINK
,
GST_PAD_ALWAYS
,
GST_STATIC_CAPS
(
CSP_VIDEO_CAPS
)
);
GType
gst_
csp
_get_type
(
void
);
GType
gst_
video_convert
_get_type
(
void
);
static
void
gst_
csp
_set_property
(
GObject
*
object
,
static
void
gst_
video_convert
_set_property
(
GObject
*
object
,
guint
property_id
,
const
GValue
*
value
,
GParamSpec
*
pspec
);
static
void
gst_
csp
_get_property
(
GObject
*
object
,
static
void
gst_
video_convert
_get_property
(
GObject
*
object
,
guint
property_id
,
GValue
*
value
,
GParamSpec
*
pspec
);
static
gboolean
gst_
csp
_set_caps
(
GstBaseTransform
*
btrans
,
static
gboolean
gst_
video_convert
_set_caps
(
GstBaseTransform
*
btrans
,
GstCaps
*
incaps
,
GstCaps
*
outcaps
);
static
gboolean
gst_
csp
_get_unit_size
(
GstBaseTransform
*
btrans
,
static
gboolean
gst_
video_convert
_get_unit_size
(
GstBaseTransform
*
btrans
,
GstCaps
*
caps
,
gsize
*
size
);
static
GstFlowReturn
gst_
csp
_transform
(
GstBaseTransform
*
btrans
,
static
GstFlowReturn
gst_
video_convert
_transform
(
GstBaseTransform
*
btrans
,
GstBuffer
*
inbuf
,
GstBuffer
*
outbuf
);
static
GQuark
_QRAWRGB
;
/* "video/x-raw-rgb" */
...
...
@@ -130,7 +130,7 @@ dither_method_get_type (void)
/* copies the given caps */
static
GstCaps
*
gst_
csp
_caps_remove_format_info
(
GstCaps
*
caps
)
gst_
video_convert
_caps_remove_format_info
(
GstCaps
*
caps
)
{
GstStructure
*
yuvst
,
*
rgbst
,
*
grayst
;
gint
i
,
n
;
...
...
@@ -172,18 +172,18 @@ gst_csp_caps_remove_format_info (GstCaps * caps)
* However, we should prefer passthrough, so if passthrough is possible,
* put it first in the list. */
static
GstCaps
*
gst_
csp
_transform_caps
(
GstBaseTransform
*
btrans
,
gst_
video_convert
_transform_caps
(
GstBaseTransform
*
btrans
,
GstPadDirection
direction
,
GstCaps
*
caps
,
GstCaps
*
filter
)
{
GstCaps
*
template
;
GstCaps
*
tmp
,
*
tmp2
;
GstCaps
*
result
;
template
=
gst_static_pad_template_get_caps
(
&
gst_
csp
_src_template
);
template
=
gst_static_pad_template_get_caps
(
&
gst_
video_convert
_src_template
);
result
=
gst_caps_copy
(
caps
);
/* Get all possible caps that we can transform to */
tmp
=
gst_
csp
_caps_remove_format_info
(
caps
);
tmp
=
gst_
video_convert
_caps_remove_format_info
(
caps
);
if
(
filter
)
{
tmp2
=
gst_caps_intersect_full
(
filter
,
tmp
,
GST_CAPS_INTERSECT_FIRST
);
...
...
@@ -200,10 +200,10 @@ gst_csp_transform_caps (GstBaseTransform * btrans,
}
static
gboolean
gst_
csp
_set_caps
(
GstBaseTransform
*
btrans
,
GstCaps
*
incaps
,
gst_
video_convert
_set_caps
(
GstBaseTransform
*
btrans
,
GstCaps
*
incaps
,
GstCaps
*
outcaps
)
{
Gst
Csp
*
space
;
Gst
VideoConvert
*
space
;
GstVideoFormat
in_format
;
GstVideoFormat
out_format
;
gint
in_height
,
in_width
;
...
...
@@ -216,10 +216,10 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
gboolean
ret
;
ColorSpaceColorSpec
in_spec
,
out_spec
;
space
=
GST_
CSP
(
btrans
);
space
=
GST_
VIDEO_CONVERT_CAST
(
btrans
);
if
(
space
->
convert
)
{
colorspace
_convert_free
(
space
->
convert
);
videoconvert
_convert_free
(
space
->
convert
);
}
/* input caps */
...
...
@@ -303,10 +303,10 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
space
->
height
=
in_height
;
space
->
interlaced
=
in_interlaced
;
space
->
convert
=
colorspace
_convert_new
(
out_format
,
out_spec
,
in_format
,
space
->
convert
=
videoconvert
_convert_new
(
out_format
,
out_spec
,
in_format
,
in_spec
,
in_width
,
in_height
);
if
(
space
->
convert
)
{
colorspace
_convert_set_interlaced
(
space
->
convert
,
in_interlaced
);
videoconvert
_convert_set_interlaced
(
space
->
convert
,
in_interlaced
);
}
/* palette, only for from data */
if
(
space
->
from_format
==
GST_VIDEO_FORMAT_RGB8_PALETTED
&&
...
...
@@ -325,7 +325,7 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
}
data
=
gst_buffer_map
(
palette
,
NULL
,
NULL
,
GST_MAP_READ
);
colorspace
_convert_set_palette
(
space
->
convert
,
data
);
videoconvert
_convert_set_palette
(
space
->
convert
,
data
);
gst_buffer_unmap
(
palette
,
data
,
-
1
);
gst_buffer_unref
(
palette
);
...
...
@@ -333,7 +333,7 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
const
guint32
*
palette
;
GstBuffer
*
p_buf
;
palette
=
colorspace
_convert_get_palette
(
space
->
convert
);
palette
=
videoconvert
_convert_get_palette
(
space
->
convert
);
p_buf
=
gst_buffer_new_and_alloc
(
256
*
4
);
gst_buffer_fill
(
p_buf
,
0
,
palette
,
256
*
4
);
...
...
@@ -376,37 +376,37 @@ invalid_palette:
}
}
#define gst_
csp
_parent_class parent_class
G_DEFINE_TYPE
(
Gst
Csp
,
gst_csp
,
GST_TYPE_VIDEO_FILTER
);
#define gst_
video_convert
_parent_class parent_class
G_DEFINE_TYPE
(
Gst
VideoConvert
,
gst_video_convert
,
GST_TYPE_VIDEO_FILTER
);
static
void
gst_
csp
_finalize
(
GObject
*
obj
)
gst_
video_convert
_finalize
(
GObject
*
obj
)
{
Gst
Csp
*
space
=
GST_CSP
(
obj
);
Gst
VideoConvert
*
space
=
GST_VIDEO_CONVERT
(
obj
);
if
(
space
->
convert
)
{
colorspace
_convert_free
(
space
->
convert
);
videoconvert
_convert_free
(
space
->
convert
);
}
G_OBJECT_CLASS
(
parent_class
)
->
finalize
(
obj
);
}
static
void
gst_
csp_class_init
(
GstCsp
Class
*
klass
)
gst_
video_convert_class_init
(
GstVideoConvert
Class
*
klass
)
{
GObjectClass
*
gobject_class
=
(
GObjectClass
*
)
klass
;
GstElementClass
*
gstelement_class
=
(
GstElementClass
*
)
klass
;
GstBaseTransformClass
*
gstbasetransform_class
=
(
GstBaseTransformClass
*
)
klass
;
gobject_class
->
set_property
=
gst_
csp
_set_property
;
gobject_class
->
get_property
=
gst_
csp
_get_property
;
gobject_class
->
finalize
=
gst_
csp
_finalize
;
gobject_class
->
set_property
=
gst_
video_convert
_set_property
;
gobject_class
->
get_property
=
gst_
video_convert
_get_property
;
gobject_class
->
finalize
=
gst_
video_convert
_finalize
;
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_
csp
_src_template
));
gst_static_pad_template_get
(
&
gst_
video_convert
_src_template
));
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_
csp
_sink_template
));
gst_static_pad_template_get
(
&
gst_
video_convert
_sink_template
));
gst_element_class_set_details_simple
(
gstelement_class
,
" Colorspace converter"
,
"Filter/Converter/Video"
,
...
...
@@ -418,11 +418,13 @@ gst_csp_class_init (GstCspClass * klass)
_QALPHAMASK
=
g_quark_from_string
(
"alpha_mask"
);
gstbasetransform_class
->
transform_caps
=
GST_DEBUG_FUNCPTR
(
gst_csp_transform_caps
);
gstbasetransform_class
->
set_caps
=
GST_DEBUG_FUNCPTR
(
gst_csp_set_caps
);
GST_DEBUG_FUNCPTR
(
gst_video_convert_transform_caps
);
gstbasetransform_class
->
set_caps
=
GST_DEBUG_FUNCPTR
(
gst_video_convert_set_caps
);
gstbasetransform_class
->
get_unit_size
=
GST_DEBUG_FUNCPTR
(
gst_csp_get_unit_size
);
gstbasetransform_class
->
transform
=
GST_DEBUG_FUNCPTR
(
gst_csp_transform
);
GST_DEBUG_FUNCPTR
(
gst_video_convert_get_unit_size
);
gstbasetransform_class
->
transform
=
GST_DEBUG_FUNCPTR
(
gst_video_convert_transform
);
gstbasetransform_class
->
passthrough_on_same_caps
=
TRUE
;
...
...
@@ -433,20 +435,19 @@ gst_csp_class_init (GstCspClass * klass)
}
static
void
gst_
csp_init
(
GstCsp
*
space
)
gst_
video_convert_init
(
GstVideoConvert
*
space
)
{
space
->
from_format
=
GST_VIDEO_FORMAT_UNKNOWN
;
space
->
to_format
=
GST_VIDEO_FORMAT_UNKNOWN
;
}
void
gst_
csp
_set_property
(
GObject
*
object
,
guint
property_id
,
gst_
video_convert
_set_property
(
GObject
*
object
,
guint
property_id
,
const
GValue
*
value
,
GParamSpec
*
pspec
)
{
Gst
Csp
*
csp
;
Gst
VideoConvert
*
csp
;
g_return_if_fail
(
GST_IS_CSP
(
object
));
csp
=
GST_CSP
(
object
);
csp
=
GST_VIDEO_CONVERT
(
object
);
switch
(
property_id
)
{
case
PROP_DITHER
:
...
...
@@ -459,13 +460,12 @@ gst_csp_set_property (GObject * object, guint property_id,
}
void
gst_
csp
_get_property
(
GObject
*
object
,
guint
property_id
,
gst_
video_convert
_get_property
(
GObject
*
object
,
guint
property_id
,
GValue
*
value
,
GParamSpec
*
pspec
)
{
Gst
Csp
*
csp
;
Gst
VideoConvert
*
csp
;
g_return_if_fail
(
GST_IS_CSP
(
object
));
csp
=
GST_CSP
(
object
);
csp
=
GST_VIDEO_CONVERT
(
object
);
switch
(
property_id
)
{
case
PROP_DITHER
:
...
...
@@ -478,7 +478,8 @@ gst_csp_get_property (GObject * object, guint property_id,
}
static
gboolean
gst_csp_get_unit_size
(
GstBaseTransform
*
btrans
,
GstCaps
*
caps
,
gsize
*
size
)
gst_video_convert_get_unit_size
(
GstBaseTransform
*
btrans
,
GstCaps
*
caps
,
gsize
*
size
)
{
gboolean
ret
=
TRUE
;
GstVideoFormat
format
;
...
...
@@ -495,14 +496,14 @@ gst_csp_get_unit_size (GstBaseTransform * btrans, GstCaps * caps, gsize * size)
}
static
GstFlowReturn
gst_
csp
_transform
(
GstBaseTransform
*
btrans
,
GstBuffer
*
inbuf
,
gst_
video_convert
_transform
(
GstBaseTransform
*
btrans
,
GstBuffer
*
inbuf
,
GstBuffer
*
outbuf
)
{
Gst
Csp
*
space
;
Gst
VideoConvert
*
space
;
guint8
*
indata
,
*
outdata
;
gsize
insize
,
outsize
;
space
=
GST_
CSP
(
btrans
);
space
=
GST_
VIDEO_CONVERT_CAST
(
btrans
);
GST_DEBUG
(
"from %d -> to %d"
,
space
->
from_format
,
space
->
to_format
);
...
...
@@ -510,12 +511,12 @@ gst_csp_transform (GstBaseTransform * btrans, GstBuffer * inbuf,
space
->
to_format
==
GST_VIDEO_FORMAT_UNKNOWN
))
goto
unknown_format
;
colorspace
_convert_set_dither
(
space
->
convert
,
space
->
dither
);
videoconvert
_convert_set_dither
(
space
->
convert
,
space
->
dither
);
indata
=
gst_buffer_map
(
inbuf
,
&
insize
,
NULL
,
GST_MAP_READ
);
outdata
=
gst_buffer_map
(
outbuf
,
&
outsize
,
NULL
,
GST_MAP_WRITE
);
colorspace
_convert_convert
(
space
->
convert
,
outdata
,
indata
);
videoconvert
_convert_convert
(
space
->
convert
,
outdata
,
indata
);
gst_buffer_unmap
(
outbuf
,
outdata
,
outsize
);
gst_buffer_unmap
(
inbuf
,
indata
,
insize
);
...
...
@@ -545,14 +546,15 @@ not_supported:
static
gboolean
plugin_init
(
GstPlugin
*
plugin
)
{
GST_DEBUG_CATEGORY_INIT
(
colorspace_debug
,
"colorspace
"
,
0
,
GST_DEBUG_CATEGORY_INIT
(
videoconvert_debug
,
"videoconvert
"
,
0
,
"Colorspace Converter"
);
GST_DEBUG_CATEGORY_GET
(
colorspace
_performance
,
"GST_PERFORMANCE"
);
GST_DEBUG_CATEGORY_GET
(
videoconvert
_performance
,
"GST_PERFORMANCE"
);
return
gst_element_register
(
plugin
,
"
colorspace
"
,
GST_RANK_NONE
,
GST_TYPE_
CSP
);
return
gst_element_register
(
plugin
,
"
videoconvert
"
,
GST_RANK_NONE
,
GST_TYPE_
VIDEO_CONVERT
);
}
GST_PLUGIN_DEFINE
(
GST_VERSION_MAJOR
,
GST_VERSION_MINOR
,
"colorspace"
,
"Colorspace conversion"
,
plugin_init
,
VERSION
,
"LGPL"
,
""
,
""
)
"videoconvert"
,
"Colorspace conversion"
,
plugin_init
,
VERSION
,
"LGPL"
,
""
,
""
)
gst/
colorspace/gstcolorspace
.h
→
gst/
videoconvert/gstvideoconvert
.h
View file @
db0a2f51
...
...
@@ -19,31 +19,32 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_
COLORSPACE
_H__
#define __GST_
COLORSPACE
_H__
#ifndef __GST_
VIDEOCONVERT
_H__
#define __GST_
VIDEOCONVERT
_H__
#include <gst/gst.h>
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#include "
colorspace
.h"
#include "
videoconvert
.h"
G_BEGIN_DECLS
#define GST_TYPE_CSP (gst_csp_get_type())
#define GST_CSP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CSP,GstCsp))
#define GST_CSP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CSP,GstCspClass))
#define GST_IS_CSP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CSP))
#define GST_IS_CSP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CSP))
#define GST_TYPE_VIDEO_CONVERT (gst_video_convert_get_type())
#define GST_VIDEO_CONVERT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_CONVERT,GstVideoConvert))
#define GST_VIDEO_CONVERT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_CONVERT,GstVideoConvertClass))
#define GST_IS_VIDEO_CONVERT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_CONVERT))
#define GST_IS_VIDEO_CONVERT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_CONVERT))
#define GST_VIDEO_CONVERT_CAST(obj) ((GstVideoConvert *)(obj))
typedef
struct
_Gst
Csp
GstCsp
;
typedef
struct
_Gst
CspClass
GstCsp
Class
;
typedef
struct
_Gst
VideoConvert
GstVideoConvert
;
typedef
struct
_Gst
VideoConvertClass
GstVideoConvert
Class
;
/**
* Gst
Csp
:
* Gst
VideoConvert
:
*
* Opaque object data structure.
*/
struct
_Gst
Csp
{
struct
_Gst
VideoConvert
{
GstVideoFilter
element
;
gint
width
,
height
;
...
...
@@ -55,15 +56,15 @@ struct _GstCsp {
GstVideoFormat
to_format
;
ColorSpaceColorSpec
to_spec
;
Colorspace
Convert
*
convert
;
Video
Convert
*
convert
;
gboolean
dither
;
};
struct
_Gst
Csp
Class
struct
_Gst
VideoConvert
Class
{
GstVideoFilterClass
parent_class
;
};
G_END_DECLS
#endif
/* __GST_
COLORSPACE
_H__ */
#endif
/* __GST_
VIDEOCONVERT
_H__ */
gst/
colorspace/gstcolorspace
orc-dist.c
→
gst/
videoconvert/gstvideoconvert
orc-dist.c
View file @
db0a2f51
File moved
gst/
colorspace/gstcolorspace
orc-dist.h
→
gst/
videoconvert/gstvideoconvert
orc-dist.h
View file @
db0a2f51
File moved
gst/
colorspace/gstcolorspace
orc.orc
→
gst/
videoconvert/gstvideoconvert
orc.orc
View file @
db0a2f51
File moved
gst/
colorspace/colorspace
.c
→
gst/
videoconvert/videoconvert
.c
View file @
db0a2f51
This diff is collapsed.
Click to expand it.
gst/
colorspace/colorspace
.h
→
gst/
videoconvert/videoconvert
.h
View file @
db0a2f51
/*
Colorspace
conversion functions
/*
Video
conversion functions
* Copyright (C) 2010 David Schleef <ds@schleef.org>
*
* This library is free software; you can redistribute it and/or
...
...
@@ -24,8 +24,8 @@
G_BEGIN_DECLS
typedef
struct
_
ColorspaceConvert
Colorspace
Convert
;
typedef
struct
_
ColorspaceFrame
Colorspace
Component
;
typedef
struct
_
VideoConvert
Video
Convert
;
typedef
struct
_
VideoFrame
Video
Component
;
typedef
enum
{
COLOR_SPEC_NONE
=
0
,
...
...
@@ -41,12 +41,12 @@ typedef enum {
DITHER_HALFTONE
}
ColorSpaceDitherMethod
;
struct
_
Colorspace
Component
{
struct
_
Video
Component
{
int
offset
;
int
stride
;
};
struct
_
Colorspace
Convert
{
struct
_
Video
Convert
{
gint
width
,
height
;
gboolean
interlaced
;
gboolean
use_16bit
;
...
...
@@ -67,28 +67,28 @@ struct _ColorspaceConvert {
int
src_offset
[
4
];
int
src_stride
[
4
];
void
(
*
convert
)
(
Colorspace
Convert
*
convert
,
guint8
*
dest
,
const
guint8
*
src
);
void
(
*
getline
)
(
Colorspace
Convert
*
convert
,
guint8
*
dest
,
const
guint8
*
src
,
int
j
);
void
(
*
putline
)
(
Colorspace
Convert
*
convert
,
guint8
*
dest
,
const
guint8
*
src
,
int
j
);
void
(
*
matrix
)
(
Colorspace
Convert
*
convert
);
void
(
*
convert
)
(
Video
Convert
*
convert
,
guint8
*
dest
,
const
guint8
*
src
);
void
(
*
getline
)
(
Video
Convert
*
convert
,
guint8
*
dest
,
const
guint8
*
src
,
int
j
);
void
(
*
putline
)
(
Video
Convert
*
convert
,
guint8
*
dest
,
const
guint8
*
src
,
int
j
);
void
(
*
matrix
)
(
Video
Convert
*
convert
);
void
(
*
getline16
)
(
Colorspace
Convert
*
convert
,
guint16
*
dest
,
const
guint8
*
src
,
int
j
);
void
(
*
putline16
)
(
Colorspace
Convert
*
convert
,
guint8
*
dest
,
const
guint16
*
src
,
int
j
);
void
(
*
matrix16
)
(
Colorspace
Convert
*
convert
);
void
(
*
dither16
)
(
Colorspace
Convert
*
convert
,
int
j
);
void
(
*
getline16
)
(
Video
Convert
*
convert
,
guint16
*
dest
,
const
guint8
*
src
,
int
j
);
void
(
*
putline16
)
(
Video
Convert
*
convert
,
guint8
*
dest
,
const
guint16
*
src
,
int
j
);
void
(
*
matrix16
)
(
Video
Convert
*
convert
);
void
(
*
dither16
)
(
Video
Convert
*
convert
,
int
j
);
};
ColorspaceConvert
*
colorspace
_convert_new
(
GstVideoFormat
to_format
,
VideoConvert
*
videoconvert
_convert_new
(
GstVideoFormat
to_format
,
ColorSpaceColorSpec
from_spec
,
GstVideoFormat
from_format
,
ColorSpaceColorSpec
to_spec
,
int
width
,
int
height
);
void
colorspace_convert_set_dither
(
Colorspace
Convert
*
convert
,
int
type
);
void
colorspace_convert_set_interlaced
(
Colorspace
Convert
*
convert
,
void
videoconvert_convert_set_dither
(
Video
Convert
*
convert
,
int
type
);
void
videoconvert_convert_set_interlaced
(
Video
Convert
*
convert
,
gboolean
interlaced
);
void
colorspace_convert_set_palette
(
Colorspace
Convert
*
convert
,
void
videoconvert_convert_set_palette
(
Video
Convert
*
convert
,
const
guint32
*
palette
);
const
guint32
*
colorspace_convert_get_palette
(
Colorspace
Convert
*
convert
);
void
colorspace_convert_free
(
Colorspace
Convert
*
convert
);
void
colorspace_convert_convert
(
Colorspace
Convert
*
convert
,
const
guint32
*
videoconvert_convert_get_palette
(
Video
Convert
*
convert
);
void
videoconvert_convert_free
(
Video
Convert
*
convert
);
void
videoconvert_convert_convert
(
Video
Convert
*
convert
,
guint8
*
dest
,
const
guint8
*
src
);
...
...
gst/
colorspace/colorspace
.vcproj
→
gst/
videoconvert/videoconvert
.vcproj
View file @
db0a2f51
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment