• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GST_BASE_TRANSFORM_CLASS函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GST_BASE_TRANSFORM_CLASS函数的典型用法代码示例。如果您正苦于以下问题:C++ GST_BASE_TRANSFORM_CLASS函数的具体用法?C++ GST_BASE_TRANSFORM_CLASS怎么用?C++ GST_BASE_TRANSFORM_CLASS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GST_BASE_TRANSFORM_CLASS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: gst_gl_filter_query

static gboolean
gst_gl_filter_query (GstBaseTransform * trans, GstPadDirection direction,
    GstQuery * query)
{
  GstGLFilter *filter;
  gboolean res;

  filter = GST_GL_FILTER (trans);

  switch (GST_QUERY_TYPE (query)) {
    case GST_QUERY_CONTEXT:
    {
      res = gst_gl_handle_context_query ((GstElement *) filter, query,
          &filter->display);
      break;
    }
    default:
      res =
          GST_BASE_TRANSFORM_CLASS (parent_class)->query (trans, direction,
          query);
      break;
  }

  return res;
}
开发者ID:mapmapteam,项目名称:gst-plugins-gl,代码行数:25,代码来源:gstglfilter.c


示例2: gst_gl_deinterlace_class_init

static void
gst_gl_deinterlace_class_init (GstGLDeinterlaceClass * klass)
{
  GObjectClass *gobject_class;
  GstElementClass *element_class;

  gobject_class = (GObjectClass *) klass;
  element_class = GST_ELEMENT_CLASS (klass);

  gobject_class->set_property = gst_gl_deinterlace_set_property;
  gobject_class->get_property = gst_gl_deinterlace_get_property;

  gst_element_class_set_metadata (element_class,
      "OpenGL deinterlacing filter", "Deinterlace",
      "Deinterlacing based on fragment shaders",
      "Julien Isorce <[email protected]>");

  GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_deinterlace_reset;

  GST_GL_FILTER_CLASS (klass)->filter = gst_gl_deinterlace_filter;
  GST_GL_FILTER_CLASS (klass)->filter_texture =
      gst_gl_deinterlace_filter_texture;
  GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_shader;

  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api = GST_GL_API_OPENGL;
}
开发者ID:Distrotech,项目名称:gst-plugins-bad,代码行数:26,代码来源:gstgldeinterlace.c


示例3: gst_timestampoverlay_class_init

static void
gst_timestampoverlay_class_init (GstTimeStampOverlayClass * klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
  GstBaseTransformClass *base_transform_class = GST_BASE_TRANSFORM_CLASS (klass);
  GstVideoFilterClass *video_filter_class = GST_VIDEO_FILTER_CLASS (klass);

  /* Setting up pads and setting metadata should be moved to
     base_class_init if you intend to subclass this class. */
  gst_element_class_add_pad_template (gstelement_class,
      gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
        gst_caps_from_string (VIDEO_SRC_CAPS)));
  gst_element_class_add_pad_template (gstelement_class,
      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
        gst_caps_from_string (VIDEO_SINK_CAPS)));

  gst_element_class_set_static_metadata (gstelement_class,
      "Timestampoverlay", "Generic", "Draws the various timestamps on the "
      "video so they can be read off the video afterwards",
      "William Manley <[email protected]>");

  gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_timestampoverlay_dispose);
  gstelement_class->set_clock = GST_DEBUG_FUNCPTR (gst_timestampoverlay_set_clock);
  base_transform_class->src_event = GST_DEBUG_FUNCPTR (gst_timestampoverlay_src_event);
  video_filter_class->transform_frame_ip = GST_DEBUG_FUNCPTR (gst_timestampoverlay_transform_frame_ip);
}
开发者ID:stb-tester,项目名称:latency-clock,代码行数:27,代码来源:gsttimestampoverlay.c


示例4: gst_rsvg_overlay_class_init

static void
gst_rsvg_overlay_class_init (GstRsvgOverlayClass * klass)
{
  GObjectClass *gobject_class = (GObjectClass *) klass;
  GstBaseTransformClass *basetransform_class = GST_BASE_TRANSFORM_CLASS (klass);

  gobject_class->set_property = gst_rsvg_overlay_set_property;
  gobject_class->get_property = gst_rsvg_overlay_get_property;
  gobject_class->finalize = gst_rsvg_overlay_finalize;

  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DATA,
      g_param_spec_string ("data", "data", "SVG data.", "",
          G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FILENAME,
      g_param_spec_string ("location", "location", "SVG file location.", "",
          G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FIT_TO_FRAME,
      g_param_spec_boolean ("fit-to-frame", "fit to frame",
          "Fit the SVG to fill the whole frame.", TRUE,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_X,
      g_param_spec_int ("x", "x offset",
          "Specify an x offset.", -G_MAXINT, G_MAXINT, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_Y,
      g_param_spec_int ("y", "y offset",
          "Specify a y offset.", -G_MAXINT, G_MAXINT, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_X_RELATIVE,
      g_param_spec_float ("x-relative", "x relative offset",
          "Specify an x offset relative to the display size.", -G_MAXFLOAT,
          G_MAXFLOAT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_Y_RELATIVE,
      g_param_spec_float ("y-relative", "y relative offset",
          "Specify a y offset relative to the display size.", -G_MAXFLOAT,
          G_MAXFLOAT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_WIDTH,
      g_param_spec_int ("width", "width",
          "Specify a width in pixels.", -G_MAXINT, G_MAXINT, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_HEIGHT,
      g_param_spec_int ("height", "height",
          "Specify a height in pixels.", -G_MAXINT, G_MAXINT, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_WIDTH_RELATIVE,
      g_param_spec_float ("width-relative", "relative width",
          "Specify a width relative to the display size.", -G_MAXFLOAT,
          G_MAXFLOAT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_HEIGHT_RELATIVE,
      g_param_spec_float ("height-relative", "relative height",
          "Specify a height relative to the display size.", -G_MAXFLOAT,
          G_MAXFLOAT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  basetransform_class->set_caps = gst_rsvg_overlay_set_caps;
  basetransform_class->transform_ip = gst_rsvg_overlay_transform_ip;
  basetransform_class->stop = gst_rsvg_overlay_stop;
  basetransform_class->passthrough_on_same_caps = FALSE;
}
开发者ID:dylansong77,项目名称:gstreamer,代码行数:60,代码来源:gstrsvgoverlay.c


示例5: gst_caps_setter_class_init

static void
gst_caps_setter_class_init (GstCapsSetterClass * g_class)
{
  GObjectClass *gobject_class;
  GstBaseTransformClass *trans_class;

  gobject_class = G_OBJECT_CLASS (g_class);
  trans_class = GST_BASE_TRANSFORM_CLASS (g_class);

  GST_DEBUG_CATEGORY_INIT (caps_setter_debug, "capssetter", 0, "capssetter");

  gobject_class->set_property = gst_caps_setter_set_property;
  gobject_class->get_property = gst_caps_setter_get_property;

  gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_caps_setter_finalize);

  g_object_class_install_property (gobject_class, PROP_CAPS,
      g_param_spec_boxed ("caps", "Merge caps",
          "Merge these caps (thereby overwriting) in the stream",
          GST_TYPE_CAPS, G_PARAM_READWRITE));
  g_object_class_install_property (gobject_class, PROP_JOIN,
      g_param_spec_boolean ("join", "Join",
          "Match incoming caps' mime-type to mime-type of provided caps",
          DEFAULT_JOIN, G_PARAM_READWRITE));
  g_object_class_install_property (gobject_class, PROP_REPLACE,
      g_param_spec_boolean ("replace", "Replace",
          "Drop fields of incoming caps", DEFAULT_REPLACE, G_PARAM_READWRITE));

  trans_class->transform_size =
      GST_DEBUG_FUNCPTR (gst_caps_setter_transform_size);
  trans_class->transform_caps =
      GST_DEBUG_FUNCPTR (gst_caps_setter_transform_caps);
  /* dummy seems needed */
  trans_class->transform_ip = GST_DEBUG_FUNCPTR (gst_caps_setter_transform_ip);
}
开发者ID:bilboed,项目名称:gst-plugins-bad,代码行数:35,代码来源:gstcapssetter.c


示例6: gst_ffmpegscale_src_event

static gboolean
gst_ffmpegscale_src_event (GstBaseTransform * trans, GstEvent * event)
{
    GstFFMpegScale *scale;
    GstStructure *structure;
    gdouble pointer;
    gboolean res;

    scale = GST_FFMPEGSCALE (trans);

    switch (GST_EVENT_TYPE (event)) {
    case GST_EVENT_NAVIGATION:
        event = gst_event_make_writable (event);

        structure = gst_event_writable_structure (event);
        if (gst_structure_get_double (structure, "pointer_x", &pointer)) {
            gst_structure_set (structure,
                               "pointer_x", G_TYPE_DOUBLE,
                               pointer * scale->in_info.width / scale->out_info.width, NULL);
        }
        if (gst_structure_get_double (structure, "pointer_y", &pointer)) {
            gst_structure_set (structure,
                               "pointer_y", G_TYPE_DOUBLE,
                               pointer * scale->in_info.height / scale->out_info.height, NULL);
        }
        break;
    default:
        break;
    }

    res = GST_BASE_TRANSFORM_CLASS (parent_class)->src_event (trans, event);

    return res;
}
开发者ID:Kurento,项目名称:gst-libav,代码行数:34,代码来源:gstffmpegscale.c


示例7: webkit_media_playready_decrypt_class_init

static void webkit_media_playready_decrypt_class_init(WebKitMediaPlayReadyDecryptClass* klass)
{
    GObjectClass* gobjectClass = G_OBJECT_CLASS(klass);
    GstBaseTransformClass* baseTransformClass = GST_BASE_TRANSFORM_CLASS(klass);
    GstElementClass* elementClass = GST_ELEMENT_CLASS(klass);

    gobjectClass->dispose = webkit_media_playready_decrypt_dispose;
    gst_element_class_add_pad_template(elementClass, gst_static_pad_template_get(&sinkTemplate));
    gst_element_class_add_pad_template(elementClass, gst_static_pad_template_get(&srcTemplate));

    gst_element_class_set_static_metadata(elementClass,
        "Decrypt content encrypted using PlayReady Encryption",
        GST_ELEMENT_FACTORY_KLASS_DECRYPTOR,
        "Decrypts media that has been encrypted using PlayReady Encryption.",
        "Philippe Normand <[email protected]>");

    GST_DEBUG_CATEGORY_INIT(webkit_media_playready_decrypt_debug_category,
        "webkitplayready", 0, "PlayReady decryptor");

    elementClass->change_state = GST_DEBUG_FUNCPTR(webKitMediaPlayReadyDecryptChangeState);

    baseTransformClass->transform_ip = GST_DEBUG_FUNCPTR(webkitMediaPlayReadyDecryptTransformInPlace);
    baseTransformClass->transform_caps = GST_DEBUG_FUNCPTR(webkitMediaPlayReadyDecryptTransformCaps);
    baseTransformClass->sink_event = GST_DEBUG_FUNCPTR(webkitMediaPlayReadyDecryptSinkEventHandler);
    baseTransformClass->transform_ip_on_passthrough = FALSE;
}
开发者ID:goruklu,项目名称:WebKitForWayland,代码行数:26,代码来源:WebKitPlayReadyDecryptorGStreamer.cpp


示例8: gst_v4l2_transform_decide_allocation

static gboolean
gst_v4l2_transform_decide_allocation (GstBaseTransform * trans,
    GstQuery * query)
{
  GstV4l2Transform *self = GST_V4L2_TRANSFORM (trans);
  gboolean ret = FALSE;

  GST_DEBUG_OBJECT (self, "called");

  if (gst_v4l2_object_decide_allocation (self->v4l2capture, query)) {
    GstBufferPool *pool = GST_BUFFER_POOL (self->v4l2capture->pool);

    ret = GST_BASE_TRANSFORM_CLASS (parent_class)->decide_allocation (trans,
        query);

    if (!gst_buffer_pool_set_active (pool, TRUE))
      goto activate_failed;
  }

  return ret;

activate_failed:
  GST_ELEMENT_ERROR (self, RESOURCE, SETTINGS,
      ("failed to activate bufferpool"), ("failed to activate bufferpool"));
  return TRUE;
}
开发者ID:BigBrother-International,项目名称:gst-plugins-good,代码行数:26,代码来源:gstv4l2transform.c


示例9: gst_audio_amplify_class_init

static void
gst_audio_amplify_class_init (GstAudioAmplifyClass * klass)
{
  GObjectClass *gobject_class;

  gobject_class = (GObjectClass *) klass;
  gobject_class->set_property = gst_audio_amplify_set_property;
  gobject_class->get_property = gst_audio_amplify_get_property;

  g_object_class_install_property (gobject_class, PROP_AMPLIFICATION,
      g_param_spec_float ("amplification", "Amplification",
          "Factor of amplification", 0.0, G_MAXFLOAT,
          1.0, G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));

  /**
   * GstAudioAmplify:clipping-method
   *
   * Clipping method: clip mode set values higher than the maximum to the
   * maximum. The wrap-negative mode pushes those values back from the
   * opposite side, wrap-positive pushes them back from the same side.
   *
   **/
  g_object_class_install_property (gobject_class, PROP_CLIPPING_METHOD,
      g_param_spec_enum ("clipping-method", "Clipping method",
          "Selects how to handle values higher than the maximum",
          GST_TYPE_AUDIO_AMPLIFY_CLIPPING_METHOD, METHOD_CLIP,
          G_PARAM_READWRITE));

  GST_AUDIO_FILTER_CLASS (klass)->setup =
      GST_DEBUG_FUNCPTR (gst_audio_amplify_setup);
  GST_BASE_TRANSFORM_CLASS (klass)->transform_ip =
      GST_DEBUG_FUNCPTR (gst_audio_amplify_transform_ip);
}
开发者ID:prajnashi,项目名称:gst-plugins-good,代码行数:33,代码来源:audioamplify.c


示例10: gst_aubio_tempo_class_init

/* initialize the plugin's class */
static void
gst_aubio_tempo_class_init (GstAubioTempoClass * klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
  GstBaseTransformClass *trans_class = GST_BASE_TRANSFORM_CLASS (klass);
  //GstAudioFilterClass *filter_class = GST_AUDIO_FILTER_CLASS (klass);

  //trans_class->stop = GST_DEBUG_FUNCPTR (gst_aubio_tempo_stop);
  //trans_class->event = GST_DEBUG_FUNCPTR (gst_aubio_tempo_event);
  trans_class->transform_ip = GST_DEBUG_FUNCPTR (gst_aubio_tempo_transform_ip);
  trans_class->passthrough_on_same_caps = TRUE;

  gobject_class->finalize = gst_aubio_tempo_finalize;
  gobject_class->set_property = gst_aubio_tempo_set_property;
  gobject_class->get_property = gst_aubio_tempo_get_property;

  g_object_class_install_property (gobject_class, PROP_SILENT,
      g_param_spec_boolean ("silent", "Silent", "Produce verbose output",
          TRUE, G_PARAM_READWRITE));

  g_object_class_install_property (gobject_class, PROP_MESSAGE,
      g_param_spec_boolean ("message", "Message", "Emit gstreamer messages",
          TRUE, G_PARAM_READWRITE));

  GST_DEBUG_CATEGORY_INIT (aubiotempo_debug, "aubiotempo", 0,
          "Aubio tempo extraction");

}
开发者ID:Elleo,项目名称:gst-aubio,代码行数:29,代码来源:gstaubiotempo.c


示例11: gst_video_filter2_class_init

static void
gst_video_filter2_class_init (GstVideoFilter2Class * klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GstBaseTransformClass *base_transform_class =
      GST_BASE_TRANSFORM_CLASS (klass);

  gobject_class->set_property = gst_video_filter2_set_property;
  gobject_class->get_property = gst_video_filter2_get_property;
  gobject_class->dispose = gst_video_filter2_dispose;
  gobject_class->finalize = gst_video_filter2_finalize;
  base_transform_class->transform_caps =
      GST_DEBUG_FUNCPTR (gst_video_filter2_transform_caps);
  base_transform_class->get_unit_size =
      GST_DEBUG_FUNCPTR (gst_video_filter2_get_unit_size);
  base_transform_class->set_caps =
      GST_DEBUG_FUNCPTR (gst_video_filter2_set_caps);
  base_transform_class->start = GST_DEBUG_FUNCPTR (gst_video_filter2_start);
  base_transform_class->stop = GST_DEBUG_FUNCPTR (gst_video_filter2_stop);
  base_transform_class->transform =
      GST_DEBUG_FUNCPTR (gst_video_filter2_transform);
  base_transform_class->transform_ip =
      GST_DEBUG_FUNCPTR (gst_video_filter2_transform_ip);

}
开发者ID:ChinnaSuhas,项目名称:ossbuild,代码行数:25,代码来源:gstvideofilter2.c


示例12: gst_rgb2bayer_class_init

static void
gst_rgb2bayer_class_init (GstRGB2BayerClass * klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
  GstBaseTransformClass *base_transform_class =
      GST_BASE_TRANSFORM_CLASS (klass);

  gobject_class->finalize = gst_rgb2bayer_finalize;

  gst_element_class_add_pad_template (element_class,
      gst_static_pad_template_get (&gst_rgb2bayer_src_template));
  gst_element_class_add_pad_template (element_class,
      gst_static_pad_template_get (&gst_rgb2bayer_sink_template));

  gst_element_class_set_static_metadata (element_class,
      "RGB to Bayer converter",
      "Filter/Converter/Video",
      "Converts video/x-raw to video/x-bayer",
      "David Schleef <[email protected]>");

  base_transform_class->transform_caps =
      GST_DEBUG_FUNCPTR (gst_rgb2bayer_transform_caps);
  base_transform_class->get_unit_size =
      GST_DEBUG_FUNCPTR (gst_rgb2bayer_get_unit_size);
  base_transform_class->set_caps = GST_DEBUG_FUNCPTR (gst_rgb2bayer_set_caps);
  base_transform_class->transform = GST_DEBUG_FUNCPTR (gst_rgb2bayer_transform);

  GST_DEBUG_CATEGORY_INIT (gst_rgb2bayer_debug, "rgb2bayer", 0,
      "rgb2bayer element");
}
开发者ID:Distrotech,项目名称:gst-plugins-bad,代码行数:31,代码来源:gstrgb2bayer.c


示例13: gst_logoinsert_class_init

static void
gst_logoinsert_class_init (GstLogoinsertClass * klass)
{
  GObjectClass *gobject_class;
  GstBaseTransformClass *base_transform_class;

  gobject_class = G_OBJECT_CLASS (klass);
  base_transform_class = GST_BASE_TRANSFORM_CLASS (klass);

  gobject_class->set_property = gst_logoinsert_set_property;
  gobject_class->get_property = gst_logoinsert_get_property;
  gobject_class->dispose = gst_logoinsert_dispose;
  gobject_class->finalize = gst_logoinsert_finalize;

  g_object_class_install_property (gobject_class, ARG_LOCATION,
      g_param_spec_string ("location", "location",
          "location of PNG file to overlay", "",
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (gobject_class, ARG_DATA,
      gst_param_spec_mini_object ("data", "data",
          "Buffer containing PNG file to overlay", GST_TYPE_BUFFER,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  base_transform_class->set_caps = gst_logoinsert_set_caps;
  base_transform_class->transform_ip = gst_logoinsert_transform_ip;
}
开发者ID:dylansong77,项目名称:gstreamer,代码行数:26,代码来源:gstlogoinsert.c


示例14: gst_stereo_class_init

static void
gst_stereo_class_init (GstStereoClass * klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
  GstBaseTransformClass *trans_class = GST_BASE_TRANSFORM_CLASS (klass);
  GstAudioFilterClass *audiofilter_class = GST_AUDIO_FILTER_CLASS (klass);
  GstCaps *caps;

  gst_element_class_set_static_metadata (element_class, "Stereo effect",
      "Filter/Effect/Audio",
      "Muck with the stereo signal to enhance its 'stereo-ness'",
      "Erik Walthinsen <[email protected]>");

  caps = gst_caps_from_string (ALLOWED_CAPS);
  gst_audio_filter_class_add_pad_templates (audiofilter_class, caps);
  gst_caps_unref (caps);

  gobject_class->set_property = gst_stereo_set_property;
  gobject_class->get_property = gst_stereo_get_property;

  g_object_class_install_property (gobject_class, ARG_ACTIVE,
      g_param_spec_boolean ("active", "active", "active",
          TRUE,
          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_class, ARG_STEREO,
      g_param_spec_float ("stereo", "stereo", "stereo",
          0.0, 1.0, 0.1,
          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));

  trans_class->transform_ip = GST_DEBUG_FUNCPTR (gst_stereo_transform_ip);
}
开发者ID:Lachann,项目名称:gst-plugins-bad,代码行数:33,代码来源:gststereo.c


示例15: gst_cenc_decrypt_class_init

static void
gst_cenc_decrypt_class_init (GstCencDecryptClass * klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GstBaseTransformClass *base_transform_class =
      GST_BASE_TRANSFORM_CLASS (klass);
  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);

  gst_element_class_add_pad_template (element_class,
      gst_static_pad_template_get (&gst_cenc_decrypt_sink_template));
  gst_element_class_add_pad_template (element_class,
      gst_static_pad_template_get (&gst_cenc_decrypt_src_template));

  gst_element_class_set_static_metadata (element_class,
      "Decrypt content encrypted using ISOBMFF Common Encryption",
      GST_ELEMENT_FACTORY_KLASS_DECRYPTOR,
      "Decrypts media that has been encrypted using ISOBMFF Common Encryption.",
      "Alex Ashley <[email protected]>");

  GST_DEBUG_CATEGORY_INIT (gst_cenc_decrypt_debug_category,
      "cencdec", 0, "CENC decryptor");

  gobject_class->dispose = gst_cenc_decrypt_dispose;
  gobject_class->finalize = gst_cenc_decrypt_finalize;
  base_transform_class->start = GST_DEBUG_FUNCPTR (gst_cenc_decrypt_start);
  base_transform_class->stop = GST_DEBUG_FUNCPTR (gst_cenc_decrypt_stop);
  base_transform_class->transform_ip =
      GST_DEBUG_FUNCPTR (gst_cenc_decrypt_transform_ip);
  base_transform_class->transform_caps =
      GST_DEBUG_FUNCPTR (gst_cenc_decrypt_transform_caps);
  base_transform_class->sink_event =
      GST_DEBUG_FUNCPTR (gst_cenc_decrypt_sink_event_handler);
  base_transform_class->transform_ip_on_passthrough = FALSE;
}
开发者ID:asrashley,项目名称:gst-cencdec,代码行数:34,代码来源:gstcencdec.c


示例16: gst_capsfilter_sink_event

/* Queue the segment event if there was no caps event */
static gboolean
gst_capsfilter_sink_event (GstBaseTransform * trans, GstEvent * event)
{
  GstCapsFilter *filter = GST_CAPSFILTER (trans);

  if (GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_STOP) {
    GList *l;

    for (l = filter->pending_events; l;) {
      if (GST_EVENT_TYPE (l->data) == GST_EVENT_SEGMENT) {
        gst_event_unref (l->data);
        l = g_list_delete_link (l, l);
      } else {
        l = l->next;
      }
    }
  }

  if (!GST_EVENT_IS_STICKY (event) || GST_EVENT_TYPE (event) <= GST_EVENT_CAPS)
    goto done;

  /* If we get EOS before any buffers, just push all pending events */
  if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
    GList *l;

    for (l = g_list_last (filter->pending_events); l; l = l->prev) {
      GST_LOG_OBJECT (trans, "Forwarding %s event",
          GST_EVENT_TYPE_NAME (l->data));
      GST_BASE_TRANSFORM_CLASS (parent_class)->sink_event (trans, l->data);
    }
    g_list_free (filter->pending_events);
    filter->pending_events = NULL;
  } else if (!gst_pad_has_current_caps (trans->sinkpad)) {
    GST_LOG_OBJECT (trans, "Got %s event before caps, queueing",
        GST_EVENT_TYPE_NAME (event));

    filter->pending_events = g_list_prepend (filter->pending_events, event);

    return TRUE;
  }

done:

  GST_LOG_OBJECT (trans, "Forwarding %s event", GST_EVENT_TYPE_NAME (event));
  return GST_BASE_TRANSFORM_CLASS (parent_class)->sink_event (trans, event);
}
开发者ID:cablelabs,项目名称:gstreamer,代码行数:47,代码来源:gstcapsfilter.c


示例17: gst_frame_positionner_class_init

static void
gst_frame_positionner_class_init (GstFramePositionnerClass * klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GstBaseTransformClass *base_transform_class =
      GST_BASE_TRANSFORM_CLASS (klass);

  gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass),
      gst_static_pad_template_get (&gst_frame_positionner_src_template));
  gst_element_class_add_pad_template (GST_ELEMENT_CLASS (klass),
      gst_static_pad_template_get (&gst_frame_positionner_sink_template));

  gobject_class->set_property = gst_frame_positionner_set_property;
  gobject_class->get_property = gst_frame_positionner_get_property;
  base_transform_class->transform_ip =
      GST_DEBUG_FUNCPTR (gst_frame_positionner_transform_ip);

  /**
   * gstframepositionner:alpha:
   *
   * The desired alpha for the stream.
   */
  g_object_class_install_property (gobject_class, PROP_ALPHA,
      g_param_spec_double ("alpha", "alpha", "alpha of the stream",
          0.0, 1.0, 1.0, G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));

  /**
   * gstframepositionner:posx:
   *
   * The desired x position for the stream.
   */
  g_object_class_install_property (gobject_class, PROP_POSX,
      g_param_spec_int ("posx", "posx", "x position of the stream",
          G_MININT, G_MAXINT, 0, G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));

  /**
   * gstframepositionner:posy:
   *
   * The desired y position for the stream.
   */
  g_object_class_install_property (gobject_class, PROP_POSY,
      g_param_spec_int ("posy", "posy", "y position of the stream",
          G_MININT, G_MAXINT, 0, G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));

  /**
   * gstframepositionner:zorder:
   *
   * The desired z order for the stream.
   */
  g_object_class_install_property (gobject_class, PROP_ZORDER,
      g_param_spec_uint ("zorder", "zorder", "z order of the stream",
          0, 10000, 0, G_PARAM_READWRITE));

  gst_element_class_set_static_metadata (GST_ELEMENT_CLASS (klass),
      "frame positionner", "Metadata",
      "This element provides with tagging facilities",
      "[email protected]");
}
开发者ID:dark-al,项目名称:gst-editing-services-old,代码行数:58,代码来源:gstframepositionner.c


示例18: gst_tcambiteater_class_init

static void gst_tcambiteater_class_init (GstTcamBitEaterClass* klass)
{
    GObjectClass* gobject_class;
    GstElementClass* gstelement_class;

    gobject_class = (GObjectClass*) klass;
    gstelement_class = (GstElementClass*) klass;

    gobject_class->set_property = gst_tcambiteater_set_property;
    gobject_class->get_property = gst_tcambiteater_get_property;
    gobject_class->finalize = gst_tcambiteater_finalize;


    gst_element_class_set_static_metadata(gstelement_class,
                                          "Bit depth reduction module",
                                          "Filter/Converter/Video",
                                          "Converts 64bit rgb to 32 bit",
                                          "The Imaging Source <[email protected]>");


#define	SRC_CAPS                                                        \
    GST_VIDEO_CAPS_MAKE("{ BGRx }")


    gst_element_class_add_pad_template(gstelement_class,
                                       gst_pad_template_new("src", GST_PAD_SRC, GST_PAD_ALWAYS,
                                                            gst_caps_from_string(SRC_CAPS)));

    GstCaps* caps = gst_caps_from_string("video/x-raw,format=(string)RGBx64," \
                                         "width=(int)[1,MAX],height=(int)[1,MAX],framerate=(fraction)[0/1,MAX];");

    gst_element_class_add_pad_template(gstelement_class,
                                       gst_pad_template_new("sink",
                                                            GST_PAD_SINK, GST_PAD_ALWAYS,
                                                            caps));

    GST_BASE_TRANSFORM_CLASS(klass)->transform_caps = GST_DEBUG_FUNCPTR(gst_tcambiteater_transform_caps);
    GST_BASE_TRANSFORM_CLASS(klass)->get_unit_size = GST_DEBUG_FUNCPTR(gst_tcambiteater_get_unit_size);
    GST_BASE_TRANSFORM_CLASS(klass)->set_caps = GST_DEBUG_FUNCPTR(gst_tcambiteater_set_caps);
    GST_BASE_TRANSFORM_CLASS(klass)->transform = GST_DEBUG_FUNCPTR(gst_tcambiteater_transform);

    GST_DEBUG_CATEGORY_INIT(gst_tcambiteater_debug_category,
                            "tcambiteater", 0,
                            "tcambiteater element");
}
开发者ID:TheImagingSource,项目名称:tiscamera,代码行数:45,代码来源:gsttcambiteater.cpp


示例19: gst_gl_filter_class_init

static void
gst_gl_filter_class_init (GstGLFilterClass * klass)
{
  GObjectClass *gobject_class;

  gobject_class = (GObjectClass *) klass;
  gobject_class->set_property = gst_gl_filter_set_property;
  gobject_class->get_property = gst_gl_filter_get_property;

  GST_BASE_TRANSFORM_CLASS (klass)->transform_caps =
      gst_gl_filter_transform_caps;
  GST_BASE_TRANSFORM_CLASS (klass)->transform = gst_gl_filter_transform;
  GST_BASE_TRANSFORM_CLASS (klass)->start = gst_gl_filter_start;
  GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_filter_stop;
  GST_BASE_TRANSFORM_CLASS (klass)->set_caps = gst_gl_filter_set_caps;
  GST_BASE_TRANSFORM_CLASS (klass)->get_unit_size = gst_gl_filter_get_unit_size;
  GST_BASE_TRANSFORM_CLASS (klass)->prepare_output_buffer =
      gst_gl_filter_prepare_output_buffer;

  klass->set_caps = NULL;
  klass->filter = NULL;
  klass->display_init_cb = NULL;
  klass->display_reset_cb = NULL;
  klass->onInitFBO = NULL;
  klass->onStart = NULL;
  klass->onStop = NULL;
  klass->onReset = NULL;
}
开发者ID:zsx,项目名称:ossbuild,代码行数:28,代码来源:gstglfilter.c


示例20: gst_skor_sink_class_init

static void
gst_skor_sink_class_init (GstSkorSinkClass * klass)
{
  GObjectClass *gobject_class;
  GstElementClass *gstelement_class;
  GstBaseTransformClass *trans_class;
  GstVideoFilterClass *vfilter_class;

  gobject_class = (GObjectClass *) klass;
  gstelement_class = (GstElementClass *) klass;
  trans_class = GST_BASE_TRANSFORM_CLASS (klass);
  vfilter_class = GST_VIDEO_FILTER_CLASS (klass);

  gobject_class->set_property = gst_skor_sink_set_property;
  gobject_class->get_property = gst_skor_sink_get_property;
  gobject_class->finalize = gst_skor_sink_finalize;

  g_object_class_install_property (gobject_class, PROP_MESSAGE,
      g_param_spec_boolean ("message", "message",
          "Post a barcode message for each detected code",
          DEFAULT_MESSAGE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_class, PROP_ATTACH_FRAME,
      g_param_spec_boolean ("attach-frame", "Attach frame",
          "Attach a frame dump to each barcode message",
          DEFAULT_ATTACH_FRAME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_class, PROP_CACHE,
      g_param_spec_boolean ("cache", "cache",
          "Enable or disable the inter-image result cache",
          DEFAULT_CACHE,
          G_PARAM_READWRITE | GST_PARAM_MUTABLE_READY |
          G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_class, PROP_DATA_CONSUMER,
      g_param_spec_pointer ("dataconsumer", "Data Consumer",
          "Function pointer of type void (*)(const char *) that will be invoked for every decoded datum",
          G_PARAM_WRITABLE | GST_PARAM_MUTABLE_READY | G_PARAM_STATIC_STRINGS));

  gst_element_class_set_details_simple(gstelement_class,
    "SkorSink",
    "Filter/Analyzer/Video",
    "Detect bar codes in the video streams",
    "Phil <[email protected]>");

  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&gst_skor_sink_src_template));
  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&gst_skor_sink_sink_template));

  trans_class->start = GST_DEBUG_FUNCPTR (gst_skor_sink_start);
  trans_class->stop = GST_DEBUG_FUNCPTR (gst_skor_sink_stop);
  trans_class->transform_ip_on_passthrough = FALSE;

  vfilter_class->transform_frame_ip =
      GST_DEBUG_FUNCPTR (gst_skor_sink_transform_frame_ip);  
}
开发者ID:sbfcangialosi,项目名称:skor,代码行数:57,代码来源:gstskorsink.c



注:本文中的GST_BASE_TRANSFORM_CLASS函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GST_BIN函数代码示例发布时间:2022-05-30
下一篇:
C++ GST_BASE_TRANSFORM函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap