本文整理汇总了C++中GST_ELEMENT_CLASS函数的典型用法代码示例。如果您正苦于以下问题:C++ GST_ELEMENT_CLASS函数的具体用法?C++ GST_ELEMENT_CLASS怎么用?C++ GST_ELEMENT_CLASS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GST_ELEMENT_CLASS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mpegts_base_class_init
static void
mpegts_base_class_init (MpegTSBaseClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *element_class;
element_class = GST_ELEMENT_CLASS (klass);
element_class->change_state = mpegts_base_change_state;
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_template));
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->dispose = mpegts_base_dispose;
gobject_class->finalize = mpegts_base_finalize;
gobject_class->set_property = mpegts_base_set_property;
gobject_class->get_property = mpegts_base_get_property;
g_object_class_install_property (gobject_class, PROP_PARSE_PRIVATE_SECTIONS,
g_param_spec_boolean ("parse-private-sections", "Parse private sections",
"Parse private sections", FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
示例2: gst_omx_mpeg2_video_dec_class_init
static void
gst_omx_mpeg2_video_dec_class_init (GstOMXMPEG2VideoDecClass * klass)
{
GstOMXVideoDecClass *videodec_class = GST_OMX_VIDEO_DEC_CLASS (klass);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
videodec_class->is_format_change =
GST_DEBUG_FUNCPTR (gst_omx_mpeg2_video_dec_is_format_change);
videodec_class->set_format =
GST_DEBUG_FUNCPTR (gst_omx_mpeg2_video_dec_set_format);
videodec_class->cdata.default_sink_template_caps = "video/mpeg, "
"mpegversion=(int) [1, 2], "
"systemstream=(boolean) false, "
"parsed=(boolean) true, " "width=(int) [1,MAX], " "height=(int) [1,MAX]";
gst_element_class_set_static_metadata (element_class,
"OpenMAX MPEG2 Video Decoder",
"Codec/Decoder/Video",
"Decode MPEG2 video streams",
"Sebastian Dröge <[email protected]>");
gst_omx_set_default_role (&videodec_class->cdata, "video_decoder.mpeg2");
}
示例3: gst_amc_audio_dec_base_init
static void
gst_amc_audio_dec_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstAmcAudioDecClass *amcaudiodec_class = GST_AMC_AUDIO_DEC_CLASS (g_class);
const GstAmcCodecInfo *codec_info;
GstPadTemplate *templ;
GstCaps *sink_caps, *src_caps;
gchar *longname;
codec_info =
g_type_get_qdata (G_TYPE_FROM_CLASS (g_class), gst_amc_codec_info_quark);
/* This happens for the base class and abstract subclasses */
if (!codec_info)
return;
amcaudiodec_class->codec_info = codec_info;
gst_amc_codec_info_to_caps (codec_info, &sink_caps, &src_caps);
/* Add pad templates */
templ =
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, sink_caps);
gst_element_class_add_pad_template (element_class, templ);
gst_caps_unref (sink_caps);
templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, src_caps);
gst_element_class_add_pad_template (element_class, templ);
gst_caps_unref (src_caps);
longname = g_strdup_printf ("Android MediaCodec %s", codec_info->name);
gst_element_class_set_metadata (element_class,
codec_info->name,
"Codec/Decoder/Audio",
longname, "Sebastian Dröge <[email protected]>");
g_free (longname);
}
示例4: gst_rsvg_dec_class_init
static void
gst_rsvg_dec_class_init (GstRsvgDecClass * klass)
{
GstVideoDecoderClass *video_decoder_class = GST_VIDEO_DECODER_CLASS (klass);
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
GST_DEBUG_CATEGORY_INIT (rsvgdec_debug, "rsvgdec", 0, "RSVG decoder");
gst_element_class_set_static_metadata (element_class,
"SVG image decoder", "Codec/Decoder/Image",
"Uses librsvg to decode SVG images",
"Sebastian Dröge <[email protected]>");
gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_add_static_pad_template (element_class, &src_factory);
gobject_class->finalize = gst_rsvg_dec_finalize;
video_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_rsvg_dec_stop);
video_decoder_class->set_format = GST_DEBUG_FUNCPTR (gst_rsvg_dec_set_format);
video_decoder_class->parse = GST_DEBUG_FUNCPTR (gst_rsvg_dec_parse);
video_decoder_class->handle_frame =
GST_DEBUG_FUNCPTR (gst_rsvg_dec_handle_frame);
}
示例5: gst_wrapper_camera_bin_src_class_init
static void
gst_wrapper_camera_bin_src_class_init (GstWrapperCameraBinSrcClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseCameraBinSrcClass *gstbasecamerasrc_class;
gobject_class = G_OBJECT_CLASS (klass);
gstelement_class = GST_ELEMENT_CLASS (klass);
gstbasecamerasrc_class = GST_BASE_CAMERA_SRC_CLASS (klass);
gobject_class->dispose = gst_wrapper_camera_bin_src_dispose;
gobject_class->finalize =
(GObjectFinalizeFunc) gst_wrapper_camera_bin_src_finalize;
gobject_class->set_property = gst_wrapper_camera_bin_src_set_property;
gobject_class->get_property = gst_wrapper_camera_bin_src_get_property;
/* g_object_class_install_property .... */
g_object_class_install_property (gobject_class, PROP_VIDEO_SRC,
g_param_spec_object ("video-src", "Video source",
"The video source element to be used",
GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gstelement_class->change_state = gst_wrapper_camera_bin_src_change_state;
gstbasecamerasrc_class->construct_pipeline =
gst_wrapper_camera_bin_src_construct_pipeline;
gstbasecamerasrc_class->set_zoom = gst_wrapper_camera_bin_src_set_zoom;
gstbasecamerasrc_class->set_mode = gst_wrapper_camera_bin_src_set_mode;
gstbasecamerasrc_class->get_allowed_input_caps =
gst_wrapper_camera_bin_src_get_allowed_input_caps;
gstbasecamerasrc_class->start_capture =
gst_wrapper_camera_bin_src_start_capture;
gstbasecamerasrc_class->stop_capture =
gst_wrapper_camera_bin_src_stop_capture;
}
示例6: gst_rtp_opus_depay_class_init
static void
gst_rtp_opus_depay_class_init (GstRTPOpusDepayClass * klass)
{
GstRTPBaseDepayloadClass *gstbasertpdepayload_class;
GstElementClass *element_class;
element_class = GST_ELEMENT_CLASS (klass);
gstbasertpdepayload_class = (GstRTPBaseDepayloadClass *) klass;
gst_element_class_add_static_pad_template (element_class,
&gst_rtp_opus_depay_src_template);
gst_element_class_add_static_pad_template (element_class,
&gst_rtp_opus_depay_sink_template);
gst_element_class_set_static_metadata (element_class,
"RTP Opus packet depayloader", "Codec/Depayloader/Network/RTP",
"Extracts Opus audio from RTP packets",
"Danilo Cesar Lemes de Paula <[email protected]>");
gstbasertpdepayload_class->process = gst_rtp_opus_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_opus_depay_setcaps;
GST_DEBUG_CATEGORY_INIT (rtpopusdepay_debug, "rtpopusdepay", 0,
"Opus RTP Depayloader");
}
示例7: gst_tiaudenc1_change_state
/******************************************************************************
* gst_tiaudenc1_change_state
* Manage state changes for the audio stream. The gStreamer documentation
* states that state changes must be handled in this manner:
* 1) Handle ramp-up states
* 2) Pass state change to base class
* 3) Handle ramp-down states
******************************************************************************/
static GstStateChangeReturn gst_tiaudenc1_change_state(GstElement *element,
GstStateChange transition)
{
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
GstTIAudenc1 *audenc1 = GST_TIAUDENC1(element);
GST_LOG("begin change_state (%d)\n", transition);
/* Handle ramp-up state changes */
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
break;
default:
break;
}
/* Pass state changes to base class */
ret = GST_ELEMENT_CLASS(parent_class)->change_state(element, transition);
if (ret == GST_STATE_CHANGE_FAILURE)
return ret;
/* Handle ramp-down state changes */
switch (transition) {
case GST_STATE_CHANGE_READY_TO_NULL:
/* Shut down any running audio encoder */
if (!gst_tiaudenc1_exit_audio(audenc1)) {
return GST_STATE_CHANGE_FAILURE;
}
break;
default:
break;
}
GST_LOG("end change_state\n");
return ret;
}
示例8: hls_progress_buffer_init
/**
* hls_progress_buffer_init()
*
* Initializer. Automatically declared in the GST_BOILERPLATE macro above. Should be
* only called by GStreamer.
*/
static void hls_progress_buffer_init(HLSProgressBuffer *element, HLSProgressBufferClass *element_klass)
{
GstElementClass *klass = GST_ELEMENT_CLASS (element_klass);
int i = 0;
element->sinkpad = gst_pad_new_from_template (gst_element_class_get_pad_template (klass, "sink"), "sink");
gst_pad_set_chain_function(element->sinkpad, hls_progress_buffer_chain);
gst_pad_set_event_function(element->sinkpad, hls_progress_buffer_sink_event);
gst_element_add_pad (GST_ELEMENT (element), element->sinkpad);
element->srcpad = gst_pad_new_from_template (gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS(element), "src"), "src");
gst_pad_set_activatepush_function(element->srcpad, hls_progress_buffer_activatepush_src);
gst_pad_set_event_function(element->srcpad, hls_progress_buffer_src_event);
gst_element_add_pad (GST_ELEMENT (element), element->srcpad);
element->lock = g_mutex_new();
element->add_cond = g_cond_new();
element->del_cond = g_cond_new();
for (i = 0; i < NUM_OF_CACHED_SEGMENTS; i++)
{
element->cache[i] = create_cache();
element->cache_size[i] = 0;
element->cache_write_ready[i] = TRUE;
}
element->cache_write_index = -1;
element->cache_read_index = 0;
element->send_new_segment = TRUE;
element->is_flushing = FALSE;
element->is_eos = FALSE;
element->srcresult = GST_FLOW_OK;
}
示例9: gst_amrmux_change_state
static GstStateChangeReturn
gst_amrmux_change_state (GstElement * element, GstStateChange transition)
{
GstStateChangeReturn ret;
GstAmrMux *amrmux = GST_AMRMUX (element);
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
if (G_UNLIKELY (ret == GST_STATE_CHANGE_FAILURE))
return ret;
switch (transition) {
case GST_STATE_CHANGE_READY_TO_NULL:
{
amrmux->writeheader = TRUE;
break;
}
default:
break;
}
return ret;
}
示例10: gst_sdlvideosink_base_init
static void
gst_sdlvideosink_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstCaps *capslist;
gint i;
guint32 formats[] = {
GST_MAKE_FOURCC ('I', '4', '2', '0'),
GST_MAKE_FOURCC ('Y', 'V', '1', '2'),
GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'),
GST_MAKE_FOURCC ('Y', 'V', 'Y', 'U'),
GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y')
};
/* make a list of all available caps */
capslist = gst_caps_new_empty ();
for (i = 0; i < G_N_ELEMENTS (formats); i++) {
gst_caps_append_structure (capslist,
gst_structure_new ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, formats[i],
"width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1, NULL));
}
sink_template = gst_pad_template_new ("sink",
GST_PAD_SINK, GST_PAD_ALWAYS, capslist);
gst_element_class_add_pad_template (element_class, sink_template);
gst_object_unref (sink_template);
gst_element_class_set_details_simple (element_class, "SDL video sink",
"Sink/Video", "An SDL-based videosink",
"Ronald Bultje <[email protected]>, "
"Edgard Lima <[email protected]>, "
"Jan Schmidt <[email protected]>");
}
示例11: gst_egueb_demux_change_state
static GstStateChangeReturn
gst_egueb_demux_change_state (GstElement * element, GstStateChange transition)
{
GstEguebDemux *thiz;
GstStateChangeReturn ret;
thiz = GST_EGUEB_DEMUX (element);
switch (transition) {
default:
break;
}
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
if (ret == GST_STATE_CHANGE_FAILURE)
return ret;
switch (transition) {
default:
break;
}
return ret;
}
示例12: gst_a2dp_sink_change_state
static GstStateChangeReturn gst_a2dp_sink_change_state(GstElement *element,
GstStateChange transition)
{
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
GstA2dpSink *self = GST_A2DP_SINK(element);
switch (transition) {
case GST_STATE_CHANGE_READY_TO_PAUSED:
self->taglist = gst_tag_list_new();
gst_a2dp_sink_init_fakesink(self);
break;
case GST_STATE_CHANGE_NULL_TO_READY:
self->sink_is_in_bin = FALSE;
self->sink = GST_AVDTP_SINK(gst_element_factory_make(
"avdtpsink", "avdtpsink"));
if (self->sink == NULL) {
GST_WARNING_OBJECT(self, "failed to create avdtpsink");
return GST_STATE_CHANGE_FAILURE;
}
if (self->device != NULL)
gst_avdtp_sink_set_device(self->sink,
self->device);
g_object_set(G_OBJECT(self->sink), "auto-connect",
self->autoconnect, NULL);
ret = gst_element_set_state(GST_ELEMENT(self->sink),
GST_STATE_READY);
break;
default:
break;
}
if (ret == GST_STATE_CHANGE_FAILURE)
return ret;
ret = GST_ELEMENT_CLASS(parent_class)->change_state(element,
transition);
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
if (self->taglist) {
gst_tag_list_free(self->taglist);
self->taglist = NULL;
}
if (self->newseg_event != NULL) {
gst_event_unref(self->newseg_event);
self->newseg_event = NULL;
}
gst_a2dp_sink_remove_fakesink(self);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
if (self->sink_is_in_bin) {
if (!gst_bin_remove(GST_BIN(self),
GST_ELEMENT(self->sink)))
GST_WARNING_OBJECT(self, "Failed to remove "
"avdtpsink from bin");
} else if (self->sink != NULL) {
gst_element_set_state(GST_ELEMENT(self->sink),
GST_STATE_NULL);
g_object_unref(G_OBJECT(self->sink));
}
self->sink = NULL;
gst_a2dp_sink_remove_dynamic_elements(self);
break;
default:
break;
}
return ret;
}
示例13: gst_tee_class_init
static void
gst_tee_class_init (GstTeeClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
gobject_class = G_OBJECT_CLASS (klass);
gstelement_class = GST_ELEMENT_CLASS (klass);
gobject_class->finalize = gst_tee_finalize;
gobject_class->set_property = gst_tee_set_property;
gobject_class->get_property = gst_tee_get_property;
gobject_class->dispose = gst_tee_dispose;
g_object_class_install_property (gobject_class, PROP_NUM_SRC_PADS,
g_param_spec_int ("num-src-pads", "Num Src Pads",
"The number of source pads", 0, G_MAXINT, DEFAULT_PROP_NUM_SRC_PADS,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_HAS_CHAIN,
g_param_spec_boolean ("has-chain", "Has Chain",
"If the element can operate in push mode", DEFAULT_PROP_HAS_CHAIN,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SILENT,
g_param_spec_boolean ("silent", "Silent",
"Don't produce last_message events", DEFAULT_PROP_SILENT,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
pspec_last_message = g_param_spec_string ("last-message", "Last Message",
"The message describing current status", DEFAULT_PROP_LAST_MESSAGE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (gobject_class, PROP_LAST_MESSAGE,
pspec_last_message);
g_object_class_install_property (gobject_class, PROP_PULL_MODE,
g_param_spec_enum ("pull-mode", "Pull mode",
"Behavior of tee in pull mode", GST_TYPE_TEE_PULL_MODE,
DEFAULT_PULL_MODE,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
pspec_alloc_pad = g_param_spec_object ("alloc-pad", "Allocation Src Pad",
"The pad ALLOCATION queries will be proxied to (unused)", GST_TYPE_PAD,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (gobject_class, PROP_ALLOC_PAD,
pspec_alloc_pad);
/**
* GstTee:allow-not-linked
*
* This property makes sink pad return GST_FLOW_OK even if there are no
* source pads or any of them is linked.
*
* This is useful to avoid errors when you have a dynamic pipeline and during
* a reconnection you can have all the pads unlinked or removed.
*
* Since: 1.6
*/
g_object_class_install_property (gobject_class, PROP_ALLOW_NOT_LINKED,
g_param_spec_boolean ("allow-not-linked", "Allow not linked",
"Return GTS_FLOW_OK even if there are not source pads or all are "
"unlinked", DEFAULT_PROP_ALLOW_NOT_LINKED,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_static_metadata (gstelement_class,
"Tee pipe fitting",
"Generic",
"1-to-N pipe fitting",
"Erik Walthinsen <[email protected]>, " "Wim Taymans <[email protected]>");
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&tee_src_template));
gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_tee_request_new_pad);
gstelement_class->release_pad = GST_DEBUG_FUNCPTR (gst_tee_release_pad);
}
示例14: gst_cd_paranoia_src_class_init
static void
gst_cd_paranoia_src_class_init (GstCdParanoiaSrcClass * klass)
{
GstAudioCdSrcClass *audiocdsrc_class = GST_AUDIO_CD_SRC_CLASS (klass);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = gst_cd_paranoia_src_set_property;
gobject_class->get_property = gst_cd_paranoia_src_get_property;
gobject_class->finalize = gst_cd_paranoia_src_finalize;
gst_element_class_set_static_metadata (element_class,
"CD Audio (cdda) Source, Paranoia IV", "Source/File",
"Read audio from CD in paranoid mode",
"Erik Walthinsen <[email protected]>, Wim Taymans <[email protected]>");
audiocdsrc_class->open = gst_cd_paranoia_src_open;
audiocdsrc_class->close = gst_cd_paranoia_src_close;
audiocdsrc_class->read_sector = gst_cd_paranoia_src_read_sector;
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_GENERIC_DEVICE,
g_param_spec_string ("generic-device", "Generic device",
"Use specified generic scsi device", DEFAULT_GENERIC_DEVICE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_READ_SPEED,
g_param_spec_int ("read-speed", "Read speed",
"Read from device at specified speed (-1 and 0 = full speed)",
-1, G_MAXINT, DEFAULT_READ_SPEED,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PARANOIA_MODE,
g_param_spec_flags ("paranoia-mode", "Paranoia mode",
"Type of checking to perform", GST_TYPE_CD_PARANOIA_MODE,
DEFAULT_PARANOIA_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SEARCH_OVERLAP,
g_param_spec_int ("search-overlap", "Search overlap",
"Force minimum overlap search during verification to n sectors", -1,
75, DEFAULT_SEARCH_OVERLAP,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstCdParanoiaSrc:cache-size:
*
* Set CD cache size to n sectors (-1 = auto)
*/
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CACHE_SIZE,
g_param_spec_int ("cache-size", "Cache size",
"Set CD cache size to n sectors (-1 = auto)", -1,
G_MAXINT, DEFAULT_CACHE_SIZE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* FIXME: we don't really want signals for this, but messages on the bus,
* but then we can't check any longer whether anyone is interested in them */
/**
* GstCdParanoiaSrc::transport-error:
* @cdparanoia: The CdParanoia instance
* @sector: The sector number at which the error was encountered.
*
* This signal is emitted whenever an error occurs while reading.
* CdParanoia will attempt to recover the data.
*/
cdpsrc_signals[TRANSPORT_ERROR] =
g_signal_new ("transport-error", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstCdParanoiaSrcClass, transport_error),
NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
/**
* GstCdParanoiaSrc::uncorrected-error:
* @cdparanoia: The CdParanoia instance
* @sector: The sector number at which the error was encountered.
*
* This signal is emitted whenever an uncorrectable error occurs while
* reading. The data could not be read.
*/
cdpsrc_signals[UNCORRECTED_ERROR] =
g_signal_new ("uncorrected-error", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstCdParanoiaSrcClass, uncorrected_error),
NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
}
示例15: gst_theora_enc_class_init
static void
gst_theora_enc_class_init (GstTheoraEncClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
gobject_class->set_property = theora_enc_set_property;
gobject_class->get_property = theora_enc_get_property;
gobject_class->finalize = theora_enc_finalize;
g_object_class_install_property (gobject_class, ARG_CENTER,
g_param_spec_boolean ("center", "Center",
"Center image when sizes not multiple of 16", THEORA_DEF_CENTER,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_BORDER,
g_param_spec_enum ("border", "Border",
"Border color to add when sizes not multiple of 16",
GST_TYPE_BORDER_MODE, THEORA_DEF_BORDER,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* general encoding stream options */
g_object_class_install_property (gobject_class, ARG_BITRATE,
g_param_spec_int ("bitrate", "Bitrate", "Compressed video bitrate (kbps)",
0, (1 << 24) - 1, THEORA_DEF_BITRATE,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_QUALITY,
g_param_spec_int ("quality", "Quality", "Video quality", 0, 63,
THEORA_DEF_QUALITY,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_QUICK,
g_param_spec_boolean ("quick", "Quick", "Quick encoding",
THEORA_DEF_QUICK,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_KEYFRAME_AUTO,
g_param_spec_boolean ("keyframe-auto", "Keyframe Auto",
"Automatic keyframe detection", THEORA_DEF_KEYFRAME_AUTO,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_KEYFRAME_FREQ,
g_param_spec_int ("keyframe-freq", "Keyframe frequency",
"Keyframe frequency", 1, 32768, THEORA_DEF_KEYFRAME_FREQ,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_KEYFRAME_FREQ_FORCE,
g_param_spec_int ("keyframe-force", "Keyframe force",
"Force keyframe every N frames", 1, 32768,
THEORA_DEF_KEYFRAME_FREQ_FORCE,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_KEYFRAME_THRESHOLD,
g_param_spec_int ("keyframe-threshold", "Keyframe threshold",
"Keyframe threshold", 0, 32768, THEORA_DEF_KEYFRAME_THRESHOLD,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_KEYFRAME_MINDISTANCE,
g_param_spec_int ("keyframe-mindistance", "Keyframe mindistance",
"Keyframe mindistance", 1, 32768, THEORA_DEF_KEYFRAME_MINDISTANCE,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_NOISE_SENSITIVITY,
g_param_spec_int ("noise-sensitivity", "Noise sensitivity",
"Noise sensitivity", 0, 32768, THEORA_DEF_NOISE_SENSITIVITY,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_SHARPNESS,
g_param_spec_int ("sharpness", "Sharpness", "Sharpness", 0, 2,
THEORA_DEF_SHARPNESS,
(GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gstelement_class->change_state = theora_enc_change_state;
GST_DEBUG_CATEGORY_INIT (theoraenc_debug, "theoraenc", 0, "Theora encoder");
use_old_granulepos = (theora_version_number () <= 0x00030200);
}