本文整理汇总了C++中GST_ELEMENT_CLASS函数 的典型用法代码示例。如果您正苦于以下问题:C++ GST_ELEMENT_CLASS函数的具体用法?C++ GST_ELEMENT_CLASS怎么用?C++ GST_ELEMENT_CLASS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GST_ELEMENT_CLASS函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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));
}
开发者ID:ego5710, 项目名称:gst-plugins-bad, 代码行数:24, 代码来源:mpegtsbase.c
示例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");
}
开发者ID:caps-liu, 项目名称:gst-omx-1.0.0, 代码行数:24, 代码来源:gstomxmpeg2videodec.c
示例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);
}
开发者ID:ndufresne, 项目名称:gst-plugins-bad, 代码行数:36, 代码来源:gstamcaudiodec.c
示例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);
}
开发者ID:MaZderMind, 项目名称:gst-plugins-bad, 代码行数:24, 代码来源:gstrsvgdec.c
示例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;
}
开发者ID:Tonyton, 项目名称:gstreamer-ducati, 代码行数:36, 代码来源:gstwrappercamerabinsrc.c
示例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");
}
开发者ID:ConfusedReality, 项目名称:pkg_multimedia_gst-plugins-good, 代码行数:24, 代码来源:gstrtpopusdepay.c
示例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;
}
开发者ID:xieran1988, 项目名称:parents, 代码行数:44, 代码来源:gsttiaudenc1.c
示例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;
}
开发者ID:166MMX, 项目名称:openjdk.java.net-openjfx-8u40-rt, 代码行数:42, 代码来源:hlsprogressbuffer.c
示例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;
}
开发者ID:kuailexs, 项目名称:symbiandump-mw1, 代码行数:24, 代码来源:gstamrmux.c
示例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]>");
}
开发者ID:wang-zhao, 项目名称:gstreamer-win, 代码行数:36, 代码来源:sdlvideosink.c
示例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;
}
开发者ID:turran, 项目名称:gst-egueb, 代码行数:24, 代码来源:gst_egueb_demux.c
示例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;
}
开发者ID:Mcjesus15, 项目名称:Zio_Other, 代码行数:77, 代码来源:gsta2dpsink.c
示例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);
}
开发者ID:freedesktop-unofficial-mirror, 项目名称:gstreamer__gstreamer, 代码行数:73, 代码来源:gsttee.c
示例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);
}
开发者ID:ConfusedReality, 项目名称:pkg_multimedia_gst-plugins-base, 代码行数:78, 代码来源:gstcdparanoiasrc.c
示例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);
}
开发者ID:prajnashi, 项目名称:gst-plugins-base, 代码行数:67, 代码来源:theoraenc.c
示例16: gst_hls_sink2_class_init
static void
gst_hls_sink2_class_init (GstHlsSink2Class * klass)
{
GObjectClass *gobject_class;
GstElementClass *element_class;
GstBinClass *bin_class;
gobject_class = (GObjectClass *) klass;
element_class = GST_ELEMENT_CLASS (klass);
bin_class = GST_BIN_CLASS (klass);
gst_element_class_add_static_pad_template (element_class, &video_template);
gst_element_class_add_static_pad_template (element_class, &audio_template);
gst_element_class_set_static_metadata (element_class,
"HTTP Live Streaming sink", "Sink", "HTTP Live Streaming sink",
"Alessandro Decina <[email protected]>, "
"Sebastian Dröge <[email protected]>");
element_class->change_state = GST_DEBUG_FUNCPTR (gst_hls_sink2_change_state);
element_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_hls_sink2_request_new_pad);
element_class->release_pad = GST_DEBUG_FUNCPTR (gst_hls_sink2_release_pad);
bin_class->handle_message = gst_hls_sink2_handle_message;
gobject_class->dispose = gst_hls_sink2_dispose;
gobject_class->finalize = gst_hls_sink2_finalize;
gobject_class->set_property = gst_hls_sink2_set_property;
gobject_class->get_property = gst_hls_sink2_get_property;
g_object_class_install_property (gobject_class, PROP_LOCATION,
g_param_spec_string ("location", "File Location",
"Location of the file to write", DEFAULT_LOCATION,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PLAYLIST_LOCATION,
g_param_spec_string ("playlist-location", "Playlist Location",
"Location of the playlist to write", DEFAULT_PLAYLIST_LOCATION,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PLAYLIST_ROOT,
g_param_spec_string ("playlist-root", "Playlist Root",
"Location of the playlist to write", DEFAULT_PLAYLIST_ROOT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_MAX_FILES,
g_param_spec_uint ("max-files", "Max files",
"Maximum number of files to keep on disk. Once the maximum is reached,"
"old files start to be deleted to make room for new ones.",
0, G_MAXUINT, DEFAULT_MAX_FILES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TARGET_DURATION,
g_param_spec_uint ("target-duration", "Target duration",
"The target duration in seconds of a segment/file. "
"(0 - disabled, useful for management of segment duration by the "
"streaming server)",
0, G_MAXUINT, DEFAULT_TARGET_DURATION,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PLAYLIST_LENGTH,
g_param_spec_uint ("playlist-length", "Playlist length",
"Length of HLS playlist. To allow players to conform to section 6.3.3 "
"of the HLS specification, this should be at least 3. If set to 0, "
"the playlist will be infinite.",
0, G_MAXUINT, DEFAULT_PLAYLIST_LENGTH,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
开发者ID:MaZderMind, 项目名称:gst-plugins-bad, 代码行数:64, 代码来源:gsthlssink2.c
示例17: gst_glimage_sink_change_state
static GstStateChangeReturn
gst_glimage_sink_change_state (GstElement * element, GstStateChange transition)
{
GstGLImageSink *glimage_sink;
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
GST_DEBUG ("change state");
glimage_sink = GST_GLIMAGE_SINK (element);
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
g_atomic_int_set (&glimage_sink->to_quit, 0);
if (!glimage_sink->display) {
GstGLWindow *window;
GError *error = NULL;
if (!gst_gl_ensure_display (glimage_sink, &glimage_sink->display))
return GST_STATE_CHANGE_FAILURE;
glimage_sink->context = gst_gl_context_new (glimage_sink->display);
window = gst_gl_context_get_window (glimage_sink->context);
if (!glimage_sink->window_id && !glimage_sink->new_window_id)
gst_video_overlay_prepare_window_handle (GST_VIDEO_OVERLAY
(glimage_sink));
if (glimage_sink->window_id != glimage_sink->new_window_id) {
glimage_sink->window_id = glimage_sink->new_window_id;
gst_gl_window_set_window_handle (window, glimage_sink->window_id);
}
if (!gst_gl_context_create (glimage_sink->context,
glimage_sink->other_context, &error)) {
GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND, ("%s",
error->message), (NULL));
if (glimage_sink->display) {
gst_object_unref (glimage_sink->display);
glimage_sink->display = NULL;
}
gst_object_unref (glimage_sink->context);
gst_object_unref (window);
return GST_STATE_CHANGE_FAILURE;
}
/* setup callbacks */
gst_gl_window_set_resize_callback (window,
GST_GL_WINDOW_RESIZE_CB (gst_glimage_sink_on_resize),
gst_object_ref (glimage_sink), (GDestroyNotify) gst_object_unref);
gst_gl_window_set_draw_callback (window,
GST_GL_WINDOW_CB (gst_glimage_sink_on_draw),
gst_object_ref (glimage_sink), (GDestroyNotify) gst_object_unref);
gst_gl_window_set_close_callback (window,
GST_GL_WINDOW_CB (gst_glimage_sink_on_close),
gst_object_ref (glimage_sink), (GDestroyNotify) gst_object_unref);
gst_object_unref (window);
}
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;
default:
break;
}
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
if (ret == GST_STATE_CHANGE_FAILURE)
return ret;
switch (transition) {
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
{
/* mark the redisplay_texture as unavailable (=0)
* to avoid drawing
*/
GST_GLIMAGE_SINK_LOCK (glimage_sink);
glimage_sink->redisplay_texture = 0;
GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
if (glimage_sink->upload) {
gst_object_unref (glimage_sink->upload);
glimage_sink->upload = NULL;
}
glimage_sink->window_id = 0;
//but do not reset glimage_sink->new_window_id
if (glimage_sink->pool) {
gst_buffer_pool_set_active (glimage_sink->pool, FALSE);
gst_object_unref (glimage_sink->pool);
glimage_sink->pool = NULL;
}
GST_VIDEO_SINK_WIDTH (glimage_sink) = 1;
//.........这里部分代码省略.........
开发者ID:freedesktop-unofficial-mirror, 项目名称:gstreamer__attic__gst-plugins-gl, 代码行数:101, 代码来源:gstglimagesink.c
示例18: gst_msdkvpp_class_init
static void
gst_msdkvpp_class_init (GstMsdkVPPClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *element_class;
GstBaseTransformClass *trans_class;
GParamSpec *obj_properties[PROP_N] = { NULL, };
gobject_class = G_OBJECT_CLASS (klass);
element_class = GST_ELEMENT_CLASS (klass);
trans_class = GST_BASE_TRANSFORM_CLASS (klass);
gobject_class->set_property = gst_msdkvpp_set_property;
gobject_class->get_property = gst_msdkvpp_get_property;
gobject_class->finalize = gst_msdkvpp_finalize;
element_class->set_context = gst_msdkvpp_set_context;
gst_element_class_add_static_pad_template (element_class,
&gst_msdkvpp_src_factory);
gst_element_class_add_static_pad_template (element_class,
&gst_msdkvpp_sink_factory);
gst_element_class_set_static_metadata (element_class,
"MSDK Video Postprocessor",
"Filter/Converter/Video;Filter/Converter/Video/Scaler;"
"Filter/Effect/Video;Filter/Effect/Video/Deinterlace",
"A MediaSDK Video Postprocessing Filter",
"Sreerenj Balachandrn <[email protected]>");
trans_class->start = GST_DEBUG_FUNCPTR (gst_msdkvpp_start);
trans_class->stop = GST_DEBUG_FUNCPTR (gst_msdkvpp_stop);
trans_class->transform_caps = GST_DEBUG_FUNCPTR (gst_msdkvpp_transform_caps);
trans_class->fixate_caps = GST_DEBUG_FUNCPTR (gst_msdkvpp_fixate_caps);
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_msdkvpp_set_caps);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_msdkvpp_transform);
trans_class->propose_allocation =
GST_DEBUG_FUNCPTR (gst_msdkvpp_propose_allocation);
trans_class->decide_allocation =
GST_DEBUG_FUNCPTR (gst_msdkvpp_decide_allocation);
trans_class->prepare_output_buffer =
GST_DEBUG_FUNCPTR (gst_msdkvpp_prepare_output_buffer);
obj_properties[PROP_HARDWARE] =
g_param_spec_boolean ("hardware", "Hardware", "Enable hardware VPP",
PROP_HARDWARE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_ASYNC_DEPTH] =
g_param_spec_uint ("async-depth", "Async Depth",
"Depth of asynchronous pipeline",
1, 1, PROP_ASYNC_DEPTH_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_DENOISE] =
g_param_spec_uint ("denoise", "Denoising factor",
"Denoising Factor",
0, 100, PROP_DENOISE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_ROTATION] =
g_param_spec_enum ("rotation", "Rotation",
"Rotation Angle", gst_msdkvpp_rotation_get_type (),
PROP_ROTATION_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_DEINTERLACE_MODE] =
g_param_spec_enum ("deinterlace-mode", "Deinterlace Mode",
"Deinterlace mode to use", gst_msdkvpp_deinterlace_mode_get_type (),
PROP_DEINTERLACE_MODE_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_DEINTERLACE_METHOD] =
g_param_spec_enum ("deinterlace-method", "Deinterlace Method",
"Deinterlace method to use", gst_msdkvpp_deinterlace_method_get_type (),
PROP_DEINTERLACE_METHOD_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_HUE] =
g_param_spec_float ("hue", "Hue",
"The hue of the video",
-180, 180, PROP_HUE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_SATURATION] =
g_param_spec_float ("saturation", "Saturation",
"The Saturation of the video",
0, 10, PROP_SATURATION_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_BRIGHTNESS] =
g_param_spec_float ("brightness", "Brightness",
"The Brightness of the video",
-100, 100, PROP_BRIGHTNESS_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_CONTRAST] =
g_param_spec_float ("contrast", "Contrast",
"The Contrast of the video",
0, 10, PROP_CONTRAST_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_DETAIL] =
g_param_spec_uint ("detail", "Detail",
"The factor of detail/edge enhancement filter algorithm",
//.........这里部分代码省略.........
开发者ID:thiblahute, 项目名称:gst-plugins-bad, 代码行数:101, 代码来源:gstmsdkvpp.c
示例19: gst_curl_smtp_sink_class_init
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:19188| 2023-10-27
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9988| 2022-11-06
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8325| 2022-11-06
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8695| 2022-11-06
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8639| 2022-11-06
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9657| 2022-11-06
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8624| 2022-11-06
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:7998| 2022-11-06
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8654| 2022-11-06
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7535| 2022-11-06
请发表评论