2010-07-01 15:03:55 +00:00
|
|
|
/* GStreamer Editing Services
|
|
|
|
* Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
|
|
|
|
* 2010 Nokia Corporation
|
|
|
|
*
|
|
|
|
* 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
|
2012-11-04 00:25:20 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2010-07-01 15:03:55 +00:00
|
|
|
*/
|
|
|
|
|
2012-04-25 21:09:19 +00:00
|
|
|
/**
|
|
|
|
* SECTION:ges-enums
|
2017-03-08 21:13:48 +00:00
|
|
|
* @title: GES Enumerations
|
2012-04-25 21:09:19 +00:00
|
|
|
* @short_description: Various enums for the Gstreamer Editing Services
|
|
|
|
*/
|
2018-09-24 14:41:24 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
2012-04-25 21:09:19 +00:00
|
|
|
|
2010-07-01 15:03:55 +00:00
|
|
|
#include "ges-enums.h"
|
2012-11-27 16:52:20 +00:00
|
|
|
#include "ges-internal.h"
|
|
|
|
#include "ges-asset.h"
|
|
|
|
#include "ges-meta-container.h"
|
2013-01-25 18:16:21 +00:00
|
|
|
#include "ges-transition-clip.h"
|
2010-07-01 15:24:49 +00:00
|
|
|
|
|
|
|
#define C_ENUM(v) ((guint) v)
|
2012-12-20 23:21:51 +00:00
|
|
|
|
|
|
|
static const GFlagsValue track_types_values[] = {
|
|
|
|
{C_ENUM (GES_TRACK_TYPE_UNKNOWN), "GES_TRACK_TYPE_UNKNOWN", "unknown"},
|
|
|
|
{C_ENUM (GES_TRACK_TYPE_AUDIO), "GES_TRACK_TYPE_AUDIO", "audio"},
|
|
|
|
{C_ENUM (GES_TRACK_TYPE_VIDEO), "GES_TRACK_TYPE_VIDEO", "video"},
|
|
|
|
{C_ENUM (GES_TRACK_TYPE_TEXT), "GES_TRACK_TYPE_TEXT", "text"},
|
|
|
|
{C_ENUM (GES_TRACK_TYPE_CUSTOM), "GES_TRACK_TYPE_CUSTOM", "custom"},
|
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2010-07-01 15:24:49 +00:00
|
|
|
static void
|
|
|
|
register_ges_track_type_select_result (GType * id)
|
|
|
|
{
|
2012-12-20 23:21:51 +00:00
|
|
|
*id = g_flags_register_static ("GESTrackType", track_types_values);
|
|
|
|
}
|
|
|
|
|
|
|
|
const gchar *
|
|
|
|
ges_track_type_name (GESTrackType type)
|
|
|
|
{
|
|
|
|
guint i;
|
|
|
|
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (track_types_values); i++) {
|
|
|
|
if (type == track_types_values[i].value)
|
|
|
|
return track_types_values[i].value_nick;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "Unknown (mixed?) ";
|
2010-07-01 15:24:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GType
|
|
|
|
ges_track_type_get_type (void)
|
|
|
|
{
|
|
|
|
static GType id;
|
|
|
|
static GOnce once = G_ONCE_INIT;
|
|
|
|
|
|
|
|
g_once (&once, (GThreadFunc) register_ges_track_type_select_result, &id);
|
|
|
|
return id;
|
|
|
|
}
|
2010-07-01 16:50:30 +00:00
|
|
|
|
2011-04-25 23:12:38 +00:00
|
|
|
static void
|
|
|
|
register_ges_pipeline_flags (GType * id)
|
|
|
|
{
|
|
|
|
static const GFlagsValue values[] = {
|
2014-02-17 11:34:04 +00:00
|
|
|
{C_ENUM (GES_PIPELINE_MODE_PREVIEW_AUDIO),
|
|
|
|
"GES_PIPELINE_MODE_PREVIEW_AUDIO",
|
2012-04-24 00:52:45 +00:00
|
|
|
"audio_preview"},
|
2014-02-17 11:34:04 +00:00
|
|
|
{C_ENUM (GES_PIPELINE_MODE_PREVIEW_VIDEO),
|
|
|
|
"GES_PIPELINE_MODE_PREVIEW_VIDEO",
|
2012-04-24 00:52:45 +00:00
|
|
|
"video_preview"},
|
2014-02-17 11:34:04 +00:00
|
|
|
{C_ENUM (GES_PIPELINE_MODE_PREVIEW), "GES_PIPELINE_MODE_PREVIEW",
|
|
|
|
"full_preview"},
|
|
|
|
{C_ENUM (GES_PIPELINE_MODE_RENDER), "GES_PIPELINE_MODE_RENDER", "render"},
|
|
|
|
{C_ENUM (GES_PIPELINE_MODE_SMART_RENDER), "GES_PIPELINE_MODE_SMART_RENDER",
|
2012-04-24 00:52:45 +00:00
|
|
|
"smart_render"},
|
2011-04-25 23:12:38 +00:00
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
*id = g_flags_register_static ("GESPipelineFlags", values);
|
|
|
|
}
|
|
|
|
|
|
|
|
GType
|
|
|
|
ges_pipeline_flags_get_type (void)
|
|
|
|
{
|
|
|
|
static GType id;
|
|
|
|
static GOnce once = G_ONCE_INIT;
|
|
|
|
|
|
|
|
g_once (&once, (GThreadFunc) register_ges_pipeline_flags, &id);
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
2012-04-24 00:52:45 +00:00
|
|
|
static void
|
|
|
|
register_ges_edit_mode (GType * id)
|
|
|
|
{
|
|
|
|
static const GEnumValue edit_mode[] = {
|
|
|
|
{C_ENUM (GES_EDIT_MODE_NORMAL), "GES_EDIT_MODE_NORMAL",
|
|
|
|
"edit_normal"},
|
|
|
|
|
2020-02-28 20:50:05 +00:00
|
|
|
{C_ENUM (GES_EDIT_MODE_NORMAL), "GES_EDIT_MODE_NORMAL",
|
|
|
|
"normal"},
|
|
|
|
|
2012-04-24 00:52:45 +00:00
|
|
|
{C_ENUM (GES_EDIT_MODE_RIPPLE), "GES_EDIT_MODE_RIPPLE",
|
|
|
|
"edit_ripple"},
|
|
|
|
|
2020-02-28 20:50:05 +00:00
|
|
|
{C_ENUM (GES_EDIT_MODE_RIPPLE), "GES_EDIT_MODE_RIPPLE",
|
|
|
|
"ripple"},
|
|
|
|
|
2012-04-24 00:52:45 +00:00
|
|
|
{C_ENUM (GES_EDIT_MODE_ROLL), "GES_EDIT_MODE_ROLL",
|
|
|
|
"edit_roll"},
|
|
|
|
|
2020-02-28 20:50:05 +00:00
|
|
|
{C_ENUM (GES_EDIT_MODE_ROLL), "GES_EDIT_MODE_ROLL",
|
|
|
|
"roll"},
|
|
|
|
|
2012-04-24 00:52:45 +00:00
|
|
|
{C_ENUM (GES_EDIT_MODE_TRIM), "GES_EDIT_MODE_TRIM",
|
|
|
|
"edit_trim"},
|
|
|
|
|
2020-02-28 20:50:05 +00:00
|
|
|
{C_ENUM (GES_EDIT_MODE_TRIM), "GES_EDIT_MODE_TRIM",
|
|
|
|
"trim"},
|
|
|
|
|
2012-04-24 00:52:45 +00:00
|
|
|
{C_ENUM (GES_EDIT_MODE_SLIDE), "GES_EDIT_MODE_SLIDE",
|
|
|
|
"edit_slide"},
|
|
|
|
|
2020-02-28 20:50:05 +00:00
|
|
|
{C_ENUM (GES_EDIT_MODE_SLIDE), "GES_EDIT_MODE_SLIDE",
|
|
|
|
"slide"},
|
|
|
|
|
2012-04-24 00:52:45 +00:00
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
*id = g_enum_register_static ("GESEditMode", edit_mode);
|
|
|
|
}
|
|
|
|
|
2020-04-27 12:58:38 +00:00
|
|
|
const gchar *
|
|
|
|
ges_edit_mode_name (GESEditMode mode)
|
|
|
|
{
|
|
|
|
switch (mode) {
|
|
|
|
case GES_EDIT_MODE_NORMAL:
|
|
|
|
return "normal";
|
|
|
|
case GES_EDIT_MODE_RIPPLE:
|
|
|
|
return "ripple";
|
|
|
|
case GES_EDIT_MODE_ROLL:
|
|
|
|
return "roll";
|
|
|
|
case GES_EDIT_MODE_TRIM:
|
|
|
|
return "trim";
|
|
|
|
case GES_EDIT_MODE_SLIDE:
|
|
|
|
return "slide";
|
|
|
|
default:
|
|
|
|
return "unknown";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-24 00:52:45 +00:00
|
|
|
GType
|
|
|
|
ges_edit_mode_get_type (void)
|
|
|
|
{
|
|
|
|
static GType id;
|
|
|
|
static GOnce once = G_ONCE_INIT;
|
|
|
|
|
|
|
|
g_once (&once, (GThreadFunc) register_ges_edit_mode, &id);
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
register_ges_edge (GType * id)
|
|
|
|
{
|
|
|
|
static const GEnumValue edges[] = {
|
|
|
|
{C_ENUM (GES_EDGE_START), "GES_EDGE_START", "edge_start"},
|
2020-02-28 20:50:05 +00:00
|
|
|
{C_ENUM (GES_EDGE_START), "GES_EDGE_START", "start"},
|
2012-04-24 00:52:45 +00:00
|
|
|
{C_ENUM (GES_EDGE_END), "GES_EDGE_END", "edge_end"},
|
2020-02-28 20:50:05 +00:00
|
|
|
{C_ENUM (GES_EDGE_END), "GES_EDGE_END", "end"},
|
2012-04-24 00:52:45 +00:00
|
|
|
{C_ENUM (GES_EDGE_NONE), "GES_EDGE_NONE", "edge_none"},
|
2020-02-28 20:50:05 +00:00
|
|
|
{C_ENUM (GES_EDGE_NONE), "GES_EDGE_NONE", "none"},
|
2012-04-24 00:52:45 +00:00
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
*id = g_enum_register_static ("GESEdge", edges);
|
|
|
|
}
|
|
|
|
|
2020-06-19 15:13:24 +00:00
|
|
|
/**
|
|
|
|
* ges_edge_name:
|
|
|
|
* @edge: The #GESEdge to get the name of
|
|
|
|
*
|
|
|
|
* Returns: A human friendly name for @edge
|
|
|
|
*
|
|
|
|
* Since: 1.16
|
|
|
|
*/
|
2019-02-28 16:56:50 +00:00
|
|
|
const gchar *
|
|
|
|
ges_edge_name (GESEdge edge)
|
|
|
|
{
|
|
|
|
switch (edge) {
|
|
|
|
case GES_EDGE_START:
|
|
|
|
return "start";
|
|
|
|
case GES_EDGE_END:
|
|
|
|
return "end";
|
|
|
|
default:
|
|
|
|
return "none";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-24 00:52:45 +00:00
|
|
|
GType
|
|
|
|
ges_edge_get_type (void)
|
|
|
|
{
|
|
|
|
static GType id;
|
|
|
|
static GOnce once = G_ONCE_INIT;
|
|
|
|
|
|
|
|
g_once (&once, (GThreadFunc) register_ges_edge, &id);
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
2010-07-08 13:54:46 +00:00
|
|
|
static GEnumValue transition_types[] = {
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE",
|
|
|
|
"none"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR",
|
|
|
|
"bar-wipe-lr"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB",
|
|
|
|
"bar-wipe-tb"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL",
|
|
|
|
"box-wipe-tl"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR",
|
|
|
|
"box-wipe-tr"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR",
|
|
|
|
"box-wipe-br"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL",
|
|
|
|
"box-wipe-bl"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI",
|
|
|
|
"four-box-wipe-ci"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO",
|
|
|
|
"four-box-wipe-co"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V",
|
|
|
|
"barndoor-v"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H",
|
|
|
|
"barndoor-h"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC",
|
|
|
|
"box-wipe-tc"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC",
|
|
|
|
"box-wipe-rc"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC",
|
|
|
|
"box-wipe-bc"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC",
|
|
|
|
"box-wipe-lc"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL",
|
|
|
|
"diagonal-tl"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR",
|
|
|
|
"diagonal-tr"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V",
|
|
|
|
"bowtie-v"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H",
|
|
|
|
"bowtie-h"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL",
|
|
|
|
"barndoor-dbl"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL",
|
|
|
|
"barndoor-dtl"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD",
|
|
|
|
"misc-diagonal-dbd"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD",
|
|
|
|
"misc-diagonal-dd"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D",
|
|
|
|
"vee-d"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L",
|
|
|
|
"vee-l"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U",
|
|
|
|
"vee-u"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R",
|
|
|
|
"vee-r"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D",
|
|
|
|
"barnvee-d"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L",
|
|
|
|
"barnvee-l"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U",
|
|
|
|
"barnvee-u"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R",
|
|
|
|
"barnvee-r"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT",
|
|
|
|
"iris-rect"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12",
|
|
|
|
"clock-cw12"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3",
|
|
|
|
"clock-cw3"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6",
|
|
|
|
"clock-cw6"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9",
|
|
|
|
"clock-cw9"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV",
|
|
|
|
"pinwheel-tbv"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH",
|
|
|
|
"pinwheel-tbh"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB",
|
|
|
|
"pinwheel-fb"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT",
|
|
|
|
"fan-ct"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR",
|
|
|
|
"fan-cr"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV",
|
|
|
|
"doublefan-fov"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH",
|
|
|
|
"doublefan-foh"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT",
|
|
|
|
"singlesweep-cwt"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR",
|
|
|
|
"singlesweep-cwr"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB",
|
|
|
|
"singlesweep-cwb"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL",
|
|
|
|
"singlesweep-cwl"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV",
|
|
|
|
"doublesweep-pv"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD",
|
|
|
|
"doublesweep-pd"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV",
|
|
|
|
"doublesweep-ov"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH",
|
|
|
|
"doublesweep-oh"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T",
|
|
|
|
"fan-t"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R",
|
|
|
|
"fan-r"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B",
|
|
|
|
"fan-b"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L",
|
|
|
|
"fan-l"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV",
|
|
|
|
"doublefan-fiv"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH",
|
|
|
|
"doublefan-fih"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL",
|
|
|
|
"singlesweep-cwtl"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL",
|
|
|
|
"singlesweep-cwbl"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR",
|
|
|
|
"singlesweep-cwbr"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR",
|
|
|
|
"singlesweep-cwtr"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL",
|
|
|
|
"doublesweep-pdtl"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL",
|
|
|
|
"doublesweep-pdbl"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T",
|
|
|
|
"saloondoor-t"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L",
|
|
|
|
"saloondoor-l"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B",
|
|
|
|
"saloondoor-b"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R",
|
|
|
|
"saloondoor-r"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R",
|
|
|
|
"windshield-r"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U",
|
|
|
|
"windshield-u"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V",
|
|
|
|
"windshield-v"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H",
|
|
|
|
"windshield-h"},
|
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE",
|
|
|
|
"crossfade"},
|
2022-05-06 09:17:14 +00:00
|
|
|
{GES_VIDEO_STANDARD_TRANSITION_TYPE_FADE_IN,
|
|
|
|
"GES_VIDEO_STANDARD_TRANSITION_TYPE_FADE_IN",
|
|
|
|
"fade-in"},
|
2010-07-01 16:50:30 +00:00
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2012-11-27 16:52:20 +00:00
|
|
|
void
|
|
|
|
_init_standard_transition_assets (void)
|
|
|
|
{
|
|
|
|
guint i;
|
|
|
|
|
|
|
|
for (i = 1; i < G_N_ELEMENTS (transition_types) - 1; i++) {
|
2013-01-25 18:16:21 +00:00
|
|
|
GESAsset *asset = ges_asset_request (GES_TYPE_TRANSITION_CLIP,
|
2012-11-27 16:52:20 +00:00
|
|
|
transition_types[i].value_nick, NULL);
|
|
|
|
|
|
|
|
ges_meta_container_register_meta_string (GES_META_CONTAINER (asset),
|
|
|
|
GES_META_READABLE, GES_META_DESCRIPTION,
|
|
|
|
transition_types[i].value_name);
|
2019-01-12 12:59:20 +00:00
|
|
|
|
|
|
|
gst_object_unref (asset);
|
2012-11-27 16:52:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2010-07-01 16:50:30 +00:00
|
|
|
GType
|
2010-12-09 16:09:11 +00:00
|
|
|
ges_video_standard_transition_type_get_type (void)
|
2010-07-01 16:50:30 +00:00
|
|
|
{
|
|
|
|
static GType the_type = 0;
|
|
|
|
static gsize once = 0;
|
|
|
|
|
|
|
|
if (g_once_init_enter (&once)) {
|
|
|
|
g_assert (!once);
|
|
|
|
|
2011-01-06 11:06:24 +00:00
|
|
|
the_type = g_enum_register_static ("GESVideoStandardTransitionType",
|
2010-07-01 16:50:30 +00:00
|
|
|
transition_types);
|
|
|
|
g_once_init_leave (&once, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
return the_type;
|
|
|
|
}
|
2010-07-02 10:12:30 +00:00
|
|
|
|
|
|
|
GType
|
|
|
|
ges_text_valign_get_type (void)
|
|
|
|
{
|
|
|
|
static GType text_overlay_valign_type = 0;
|
|
|
|
static gsize initialized = 0;
|
|
|
|
static const GEnumValue text_overlay_valign[] = {
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_TEXT_VALIGN_BASELINE, "GES_TEXT_VALIGN_BASELINE", "baseline"},
|
|
|
|
{GES_TEXT_VALIGN_BOTTOM, "GES_TEXT_VALIGN_BOTTOM", "bottom"},
|
|
|
|
{GES_TEXT_VALIGN_TOP, "GES_TEXT_VALIGN_TOP", "top"},
|
2016-03-11 16:31:15 +00:00
|
|
|
{GES_TEXT_VALIGN_POSITION, "GES_TEXT_VALIGN_POSITION", "position"},
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_TEXT_VALIGN_CENTER, "GES_TEXT_VALIGN_CENTER", "center"},
|
2016-07-28 21:23:31 +00:00
|
|
|
{GES_TEXT_VALIGN_ABSOLUTE, "GES_TEXT_VALIGN_ABSOLUTE", "absolute"},
|
2010-07-02 10:12:30 +00:00
|
|
|
{0, NULL, NULL},
|
|
|
|
};
|
|
|
|
|
|
|
|
if (g_once_init_enter (&initialized)) {
|
|
|
|
text_overlay_valign_type =
|
2010-07-02 10:57:38 +00:00
|
|
|
g_enum_register_static ("GESTextVAlign", text_overlay_valign);
|
2010-07-02 10:12:30 +00:00
|
|
|
g_once_init_leave (&initialized, 1);
|
|
|
|
}
|
|
|
|
return text_overlay_valign_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
GType
|
|
|
|
ges_text_halign_get_type (void)
|
|
|
|
{
|
|
|
|
static GType text_overlay_halign_type = 0;
|
|
|
|
static gsize initialized = 0;
|
|
|
|
static const GEnumValue text_overlay_halign[] = {
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_TEXT_HALIGN_LEFT, "GES_TEXT_HALIGN_LEFT", "left"},
|
|
|
|
{GES_TEXT_HALIGN_CENTER, "GES_TEXT_HALIGN_CENTER", "center"},
|
|
|
|
{GES_TEXT_HALIGN_RIGHT, "GES_TEXT_HALIGN_RIGHT", "right"},
|
2016-03-11 16:31:15 +00:00
|
|
|
{GES_TEXT_HALIGN_POSITION, "GES_TEXT_HALIGN_POSITION", "position"},
|
2016-04-01 08:09:39 +00:00
|
|
|
{GES_TEXT_HALIGN_ABSOLUTE, "GES_TEXT_HALIGN_ABSOLUTE", "absolute"},
|
2010-07-02 10:12:30 +00:00
|
|
|
{0, NULL, NULL},
|
|
|
|
};
|
|
|
|
|
|
|
|
if (g_once_init_enter (&initialized)) {
|
|
|
|
text_overlay_halign_type =
|
2010-07-02 10:57:38 +00:00
|
|
|
g_enum_register_static ("GESTextHAlign", text_overlay_halign);
|
2010-07-02 10:12:30 +00:00
|
|
|
g_once_init_leave (&initialized, 1);
|
|
|
|
}
|
|
|
|
return text_overlay_halign_type;
|
|
|
|
}
|
2010-07-02 10:47:31 +00:00
|
|
|
|
|
|
|
/* table more-or-less copied from gstvideotestsrc.c */
|
2010-07-08 14:35:43 +00:00
|
|
|
static GEnumValue vpattern_enum_values[] = {
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_SMPTE, "GES_VIDEO_TEST_PATTERN_SMPTE", "smpte"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_SNOW, "GES_VIDEO_TEST_PATTERN_SNOW", "snow"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_BLACK, "GES_VIDEO_TEST_PATTERN_BLACK", "black"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_WHITE, "GES_VIDEO_TEST_PATTERN_WHITE", "white"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_RED, "GES_VIDEO_TEST_PATTERN_RED", "red"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_GREEN, "GES_VIDEO_TEST_PATTERN_GREEN", "green"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_BLUE, "GES_VIDEO_TEST_PATTERN_BLUE", "blue"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_CHECKERS1,
|
|
|
|
"GES_VIDEO_TEST_PATTERN_CHECKERS1", "checkers-1"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_CHECKERS2,
|
|
|
|
"GES_VIDEO_TEST_PATTERN_CHECKERS2", "checkers-2"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_CHECKERS4,
|
|
|
|
"GES_VIDEO_TEST_PATTERN_CHECKERS4", "checkers-4"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_CHECKERS8,
|
|
|
|
"GES_VIDEO_TEST_PATTERN_CHECKERS8", "checkers-8"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_CIRCULAR,
|
|
|
|
"GES_VIDEO_TEST_PATTERN_CIRCULAR", "circular"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_BLINK, "GES_VIDEO_TEST_PATTERN_BLINK", "blink"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_SMPTE75, "GES_VIDEO_TEST_PATTERN_SMPTE75", "smpte75"}
|
2010-07-02 10:47:31 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_ZONE_PLATE, "GES_VIDEO_TEST_ZONE_PLATE", "zone-plate"}
|
2012-08-16 10:20:44 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_GAMUT, "GES_VIDEO_TEST_GAMUT", "gamut"}
|
2012-08-16 10:20:44 +00:00
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_CHROMA_ZONE_PLATE, "GES_VIDEO_TEST_CHROMA_ZONE_PLATE",
|
2012-08-16 10:20:44 +00:00
|
|
|
"chroma-zone-plate"}
|
|
|
|
,
|
2014-05-24 17:16:12 +00:00
|
|
|
{GES_VIDEO_TEST_PATTERN_SOLID, "GES_VIDEO_TEST_PATTERN_SOLID", "solid-color"}
|
2012-08-16 10:20:44 +00:00
|
|
|
,
|
2010-07-02 10:47:31 +00:00
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
GType
|
|
|
|
ges_video_test_pattern_get_type (void)
|
|
|
|
{
|
|
|
|
|
|
|
|
static gsize once = 0;
|
|
|
|
static GType theType = 0;
|
|
|
|
|
|
|
|
if (g_once_init_enter (&once)) {
|
2010-07-02 10:57:38 +00:00
|
|
|
theType = g_enum_register_static ("GESVideoTestPattern",
|
2010-07-02 10:47:31 +00:00
|
|
|
vpattern_enum_values);
|
|
|
|
g_once_init_leave (&once, 1);
|
|
|
|
};
|
|
|
|
|
|
|
|
return theType;
|
|
|
|
}
|
2012-12-17 18:23:39 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
register_ges_meta_flag (GType * id)
|
|
|
|
{
|
|
|
|
static const GFlagsValue values[] = {
|
|
|
|
{C_ENUM (GES_META_READABLE), "GES_META_READABLE", "readable"},
|
|
|
|
{C_ENUM (GES_META_WRITABLE), "GES_META_WRITABLE", "writable"},
|
|
|
|
{C_ENUM (GES_META_READ_WRITE), "GES_META_READ_WRITE", "readwrite"},
|
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
*id = g_flags_register_static ("GESMetaFlag", values);
|
|
|
|
}
|
|
|
|
|
|
|
|
GType
|
|
|
|
ges_meta_flag_get_type (void)
|
|
|
|
{
|
|
|
|
static GType id;
|
|
|
|
static GOnce once = G_ONCE_INIT;
|
|
|
|
|
|
|
|
g_once (&once, (GThreadFunc) register_ges_meta_flag, &id);
|
|
|
|
return id;
|
|
|
|
}
|
2021-06-20 21:51:02 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
register_ges_marker_flags (GType * id)
|
|
|
|
{
|
|
|
|
static const GFlagsValue values[] = {
|
|
|
|
{C_ENUM (GES_MARKER_FLAG_NONE), "GES_MARKER_FLAG_NONE", "none"},
|
|
|
|
{C_ENUM (GES_MARKER_FLAG_SNAPPABLE), "GES_MARKER_FLAG_SNAPPABLE",
|
|
|
|
"snappable"},
|
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
*id = g_flags_register_static ("GESMarkerFlags", values);
|
|
|
|
}
|
|
|
|
|
|
|
|
GType
|
|
|
|
ges_marker_flags_get_type (void)
|
|
|
|
{
|
|
|
|
static GType id;
|
|
|
|
static GOnce once = G_ONCE_INIT;
|
|
|
|
|
|
|
|
g_once (&once, (GThreadFunc) register_ges_marker_flags, &id);
|
|
|
|
return id;
|
|
|
|
}
|