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

C++ GST_EVENT_TYPE_NAME函数代码示例

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

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



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

示例1: opus_dec_src_event

static gboolean
opus_dec_src_event (GstPad * pad, GstEvent * event)
{
  gboolean res = FALSE;
  GstOpusDec *dec = GST_OPUS_DEC (gst_pad_get_parent (pad));

  GST_LOG_OBJECT (dec, "handling %s event", GST_EVENT_TYPE_NAME (event));

  switch (GST_EVENT_TYPE (event)) {
    case GST_EVENT_SEEK:{
      GstFormat format, tformat;
      gdouble rate;
      GstEvent *real_seek;
      GstSeekFlags flags;
      GstSeekType cur_type, stop_type;
      gint64 cur, stop;
      gint64 tcur, tstop;

      gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur,
          &stop_type, &stop);

      /* we have to ask our peer to seek to time here as we know
       * nothing about how to generate a granulepos from the src
       * formats or anything.
       *
       * First bring the requested format to time
       */
      tformat = GST_FORMAT_TIME;
      if (!(res = opus_dec_convert (pad, format, cur, &tformat, &tcur)))
        break;
      if (!(res = opus_dec_convert (pad, format, stop, &tformat, &tstop)))
        break;

      /* then seek with time on the peer */
      real_seek = gst_event_new_seek (rate, GST_FORMAT_TIME,
          flags, cur_type, tcur, stop_type, tstop);

      GST_LOG_OBJECT (dec, "seek to %" GST_TIME_FORMAT, GST_TIME_ARGS (tcur));

      res = gst_pad_push_event (dec->sinkpad, real_seek);
      gst_event_unref (event);
      break;
    }
    default:
      res = gst_pad_event_default (pad, event);
      break;
  }

  gst_object_unref (dec);
  return res;
}
开发者ID:LCW523,项目名称:gst-plugins-bad,代码行数:51,代码来源:gstopusdec.c


示例2: gst_gnome_vfs_sink_handle_event

static gboolean
gst_gnome_vfs_sink_handle_event (GstBaseSink * basesink, GstEvent * event)
{
    GstGnomeVFSSink *sink;
    gboolean ret = TRUE;

    sink = GST_GNOME_VFS_SINK (basesink);

    GST_DEBUG_OBJECT (sink, "processing %s event", GST_EVENT_TYPE_NAME (event));

    switch (GST_EVENT_TYPE (event)) {
    case GST_EVENT_NEWSEGMENT: {
        GnomeVFSResult res;
        GstFormat format;
        gint64 offset;

        gst_event_parse_new_segment (event, NULL, NULL, &format, &offset,
                                     NULL, NULL);

        if (format != GST_FORMAT_BYTES) {
            GST_WARNING_OBJECT (sink, "ignored NEWSEGMENT event in %s format",
                                gst_format_get_name (format));
            break;
        }

        GST_LOG_OBJECT (sink, "seeking to offset %" G_GINT64_FORMAT, offset);
        res = gnome_vfs_seek (sink->handle, GNOME_VFS_SEEK_START, offset);

        if (res != GNOME_VFS_OK) {
            GST_ERROR_OBJECT (sink, "Failed to seek to offset %"
                              G_GINT64_FORMAT ": %s", offset, gnome_vfs_result_to_string (res));
            ret = FALSE;
        } else {
            sink->current_pos = offset;
        }

        break;
    }

    case GST_EVENT_FLUSH_START:
    case GST_EVENT_EOS: {
        /* No need to flush with GnomeVfs */
        break;
    }
    default:
        break;
    }

    return ret;
}
开发者ID:prajnashi,项目名称:gst-plugins-base,代码行数:50,代码来源:gstgnomevfssink.c


示例3: gst_android_video_source_event

/* Event */
static gboolean gst_android_video_source_event(GstBaseSrc * p_gstbasesrc, GstEvent * p_event)
{
    gboolean res = TRUE;

    GA_LOGTRACE("ENTER %s --xx--> thread(%ld)", __FUNCTION__, pthread_self());

    const char* event_name_str = GST_EVENT_TYPE_NAME(p_event);
    GA_LOGVERB("%s: Received event: %s", __FUNCTION__, event_name_str);

    // Currently doing nothing here...

    GA_LOGTRACE("EXIT %s", __FUNCTION__);
    return res;
}
开发者ID:EricssonResearch,项目名称:openwebrtc-gst-plugins,代码行数:15,代码来源:gst_android_video_source.c


示例4: gst_shout2send_event

static gboolean
gst_shout2send_event (GstBaseSink * sink, GstEvent * event)
{
  GstShout2send *shout2send;
  gboolean ret = TRUE;

  shout2send = GST_SHOUT2SEND (sink);

  GST_LOG_OBJECT (shout2send, "got %s event", GST_EVENT_TYPE_NAME (event));

  switch (GST_EVENT_TYPE (event)) {
    case GST_EVENT_TAG:{
      /* vorbis audio doesnt need metadata setting on the icecast level, only mp3 */
      if (shout2send->tags && shout2send->audio_format == SHOUT_FORMAT_MP3) {
        GstTagList *list;

        gst_event_parse_tag (event, &list);
        GST_DEBUG_OBJECT (shout2send, "tags=%" GST_PTR_FORMAT, list);
        gst_tag_list_insert (shout2send->tags,
            list,
            gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (shout2send)));
        /* lets get the artist and song tags */
        gst_tag_list_foreach ((GstTagList *) list,
            set_shout_metadata, shout2send);
        if (shout2send->songmetadata && shout2send->connected) {
          shout_metadata_t *pmetadata;

          GST_DEBUG_OBJECT (shout2send, "metadata now: %s",
              shout2send->songmetadata);

          pmetadata = shout_metadata_new ();
          shout_metadata_add (pmetadata, "song", shout2send->songmetadata);
          shout_set_metadata (shout2send->conn, pmetadata);
          shout_metadata_free (pmetadata);
        }
      }
      break;
    }
    default:{
      GST_LOG_OBJECT (shout2send, "let base class handle event");
      if (GST_BASE_SINK_CLASS (parent_class)->event) {
        event = gst_event_ref (event);
        ret = GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
      }
      break;
    }
  }

  return ret;
}
开发者ID:lubing521,项目名称:gst-embedded-builder,代码行数:50,代码来源:gstshout2.c


示例5: forward_sticky_events

static gboolean
forward_sticky_events (GstPad * pad, GstEvent ** event, gpointer user_data)
{
  GstPad *srcpad = GST_PAD_CAST (user_data);
  GstFlowReturn ret;

  ret = gst_pad_store_sticky_event (srcpad, *event);
  if (ret != GST_FLOW_OK) {
    GST_DEBUG_OBJECT (srcpad, "storing sticky event %p (%s) failed: %s", *event,
        GST_EVENT_TYPE_NAME (*event), gst_flow_get_name (ret));
  }

  return TRUE;
}
开发者ID:freedesktop-unofficial-mirror,项目名称:gstreamer__gstreamer,代码行数:14,代码来源:gsttee.c


示例6: gst_base_video_encoder_sink_event

static gboolean
gst_base_video_encoder_sink_event (GstPad * pad, GstEvent * event)
{
  GstBaseVideoEncoder *enc;
  GstBaseVideoEncoderClass *klass;
  gboolean handled = FALSE;
  gboolean ret = TRUE;

  enc = GST_BASE_VIDEO_ENCODER (gst_pad_get_parent (pad));
  klass = GST_BASE_VIDEO_ENCODER_GET_CLASS (enc);

  GST_DEBUG_OBJECT (enc, "received event %d, %s", GST_EVENT_TYPE (event),
      GST_EVENT_TYPE_NAME (event));

  if (klass->event)
    handled = klass->event (enc, event);

  if (!handled)
    handled = gst_base_video_encoder_sink_eventfunc (enc, event);

  if (!handled) {
    /* Forward non-serialized events and EOS/FLUSH_STOP immediately.
     * For EOS this is required because no buffer or serialized event
     * will come after EOS and nothing could trigger another
     * _finish_frame() call.   *
     * If the subclass handles sending of EOS manually it can return
     * _DROPPED from ::finish() and all other subclasses should have
     * decoded/flushed all remaining data before this
     *
     * For FLUSH_STOP this is required because it is expected
     * to be forwarded immediately and no buffers are queued anyway.
     */
    if (!GST_EVENT_IS_SERIALIZED (event)
        || GST_EVENT_TYPE (event) == GST_EVENT_EOS
        || GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_STOP) {
      ret = gst_pad_push_event (enc->base_video_codec.srcpad, event);
    } else {
      GST_BASE_VIDEO_CODEC_STREAM_LOCK (enc);
      enc->current_frame_events =
          g_list_prepend (enc->current_frame_events, event);
      GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (enc);
    }
  }

  GST_DEBUG_OBJECT (enc, "event handled");

  gst_object_unref (enc);
  return ret;
}
开发者ID:madmac2501,项目名称:gst-srtp,代码行数:49,代码来源:gstbasevideoencoder.c


示例7: gst_span_plc_event_sink

static gboolean
gst_span_plc_event_sink (GstPad * pad, GstEvent * event)
{
  gboolean ret = FALSE;
  GstSpanPlc *plc = GST_SPAN_PLC (gst_pad_get_parent (pad));

  GST_DEBUG_OBJECT (plc, "received event %s", GST_EVENT_TYPE_NAME (event));

  switch (GST_EVENT_TYPE (event)) {
    case GST_EVENT_NEWSEGMENT:
    {
      GstFormat format;
      gdouble rate;
      gint64 start, stop, time;
      gboolean update;

      gst_event_parse_new_segment (event, &update, &rate, &format, &start,
          &stop, &time);

      if (format != GST_FORMAT_TIME)
        goto newseg_wrong_format;

      if (update) {
        /* time progressed without data, see if we can fill the gap with
         * some concealment data */
        if (plc->last_stop < start)
          gst_span_plc_send_fillin (plc, start - plc->last_stop);
      }
      plc->last_stop = start;
      break;
    }
    case GST_EVENT_FLUSH_START:
      gst_span_plc_flush (plc, TRUE);
      break;
    default:
      break;
  }
  ret = gst_pad_push_event (plc->srcpad, event);

  gst_object_unref (plc);

  return ret;
newseg_wrong_format:
  {
    GST_DEBUG_OBJECT (plc, "received non TIME newsegment");
    gst_object_unref (plc);
    return FALSE;
  }
}
开发者ID:drothlis,项目名称:gst-plugins-bad,代码行数:49,代码来源:gstspanplc.c


示例8: gst_jp2k_decimator_event

static gboolean
gst_jp2k_decimator_event (GstPad * pad, GstEvent * event)
{
  GstJP2kDecimator *self = GST_JP2K_DECIMATOR (gst_pad_get_parent (pad));
  GstPad *otherpad;
  gboolean ret;

  GST_LOG_OBJECT (pad, "Got %s event", GST_EVENT_TYPE_NAME (event));

  otherpad = (pad == self->srcpad) ? self->sinkpad : self->srcpad;
  ret = gst_pad_push_event (otherpad, event);

  gst_object_unref (self);
  return ret;
}
开发者ID:ChinnaSuhas,项目名称:ossbuild,代码行数:15,代码来源:gstjp2kdecimator.c


示例9: gst_type_find_element_send_cached_events

static void
gst_type_find_element_send_cached_events (GstTypeFindElement * typefind)
{
  GList *l;

  for (l = typefind->cached_events; l != NULL; l = l->next) {
    GstEvent *event = GST_EVENT (l->data);

    GST_DEBUG_OBJECT (typefind, "sending cached %s event",
        GST_EVENT_TYPE_NAME (event));
    gst_pad_push_event (typefind->src, event);
  }
  g_list_free (typefind->cached_events);
  typefind->cached_events = NULL;
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:15,代码来源:gsttypefindelement.c


示例10: forward_event_func

static gboolean
forward_event_func (GstPad * pad, GValue * ret, EventData * data)
{
  GstEvent *event = data->event;

  gst_event_ref (event);
  GST_LOG_OBJECT (pad, "About to send event %s", GST_EVENT_TYPE_NAME (event));
  if (!gst_pad_push_event (pad, event)) {
    GST_WARNING_OBJECT (pad, "Sending event  %p (%s) failed.",
        event, GST_EVENT_TYPE_NAME (event));
    /* quick hack to unflush the pads, ideally we need a way to just unflush
     * this single collect pad */
    if (data->flush)
      gst_pad_send_event (pad, gst_event_new_flush_stop ());
  } else {
    g_value_set_boolean (ret, TRUE);
    GST_LOG_OBJECT (pad, "Sent event  %p (%s).",
        event, GST_EVENT_TYPE_NAME (event));
  }
  gst_object_unref (pad);

  /* continue on other pads, even if one failed */
  return TRUE;
}
开发者ID:matsu,项目名称:gst-plugins-base,代码行数:24,代码来源:gstadder.c


示例11: gst_adder_sink_event

static gboolean
gst_adder_sink_event (GstPad * pad, GstEvent * event)
{
    GstAdder *adder;
    gboolean ret = TRUE;

    adder = GST_ADDER (gst_pad_get_parent (pad));

    GST_DEBUG ("Got %s event on pad %s:%s", GST_EVENT_TYPE_NAME (event),
               GST_DEBUG_PAD_NAME (pad));

    switch (GST_EVENT_TYPE (event)) {
    case GST_EVENT_FLUSH_STOP:
        /* we received a flush-stop. The collect_event function will push the
         * event past our element. We simply forward all flush-stop events, even
         * when no flush-stop was pending, this is required because collectpads
         * does not provide an API to handle-but-not-forward the flush-stop.
         * We unset the pending flush-stop flag so that we don't send anymore
         * flush-stop from the collect function later.
         */
        GST_OBJECT_LOCK (adder->collect);
        adder->segment_pending = TRUE;
        adder->flush_stop_pending = FALSE;
        /* Clear pending tags */
        if (adder->pending_events) {
            g_list_foreach (adder->pending_events, (GFunc) gst_event_unref, NULL);
            g_list_free (adder->pending_events);
            adder->pending_events = NULL;
        }
        GST_OBJECT_UNLOCK (adder->collect);
        break;
    case GST_EVENT_TAG:
        GST_OBJECT_LOCK (adder->collect);
        /* collect tags here so we can push them out when we collect data */
        adder->pending_events = g_list_append (adder->pending_events, event);
        GST_OBJECT_UNLOCK (adder->collect);
        goto beach;
    default:
        break;
    }

    /* now GstCollectPads can take care of the rest, e.g. EOS */
    ret = adder->collect_event (pad, event);

beach:
    gst_object_unref (adder);
    return ret;
}
开发者ID:spunktsch,项目名称:svtplayer,代码行数:48,代码来源:gstadder.c


示例12: do_push_event_pre

static void
do_push_event_pre (GstStatsTracer * self, guint64 ts, GstPad * pad,
    GstEvent * ev)
{
  GstElement *elem = get_real_pad_parent (pad);
  GstElementStats *elem_stats = get_element_stats (self, elem);
  GstPadStats *pad_stats = get_pad_stats (self, pad);

  elem_stats->last_ts = ts;
  gst_tracer_log_trace (gst_structure_new ("event",
          "thread-id", G_TYPE_UINT, GPOINTER_TO_UINT (g_thread_self ()),
          "ts", G_TYPE_UINT64, ts,
          "pad-ix", G_TYPE_UINT, pad_stats->index,
          "elem-ix", G_TYPE_UINT, elem_stats->index,
          "name", G_TYPE_STRING, GST_EVENT_TYPE_NAME (ev), NULL));
}
开发者ID:carlo0815,项目名称:gstreamer1.7.1,代码行数:16,代码来源:gststats.c


示例13: gst_rrparser_sink_event

static gboolean gst_rrparser_sink_event(GstPad *pad, GstEvent *event)
{
    GstRRParser * rrparser =(GstRRParser *) gst_pad_get_parent(pad);
	gboolean ret = FALSE;

    GST_DEBUG("pad \"%s\" received:  %s\n", GST_PAD_NAME(pad),
        GST_EVENT_TYPE_NAME(event));

    switch (GST_EVENT_TYPE(event)) {
		case GST_EVENT_EOS:
			ret = gst_pad_push_event(rrparser->src_pad, event);
			break;
		default:
			ret = gst_pad_push_event(rrparser->src_pad, event);
    }
    return ret;
}
开发者ID:jhautbois,项目名称:gst-openmax-dm81xx,代码行数:17,代码来源:gstomx_rrparser.c


示例14: handle_event

static gboolean
handle_event (GstBaseSink *gst_base,
              GstEvent *event)
{
    GstOmxBaseSink *self;
    GOmxCore *gomx;
    GOmxPort *in_port;

    self = GST_OMX_BASE_SINK (gst_base);
    gomx = self->gomx;
    in_port = self->in_port;

    GST_LOG_OBJECT (self, "begin");

    GST_DEBUG_OBJECT (self, "event: %s", GST_EVENT_TYPE_NAME (event));

    switch (GST_EVENT_TYPE (event))
    {
        case GST_EVENT_EOS:
            /* Close the inpurt port. */
            g_omx_core_set_done (gomx);
            break;

        case GST_EVENT_FLUSH_START:
            /* unlock loops */
            g_omx_port_pause (in_port);

            /* flush all buffers */
            OMX_SendCommand (gomx->omx_handle, OMX_CommandFlush, OMX_ALL, NULL);
            break;

        case GST_EVENT_FLUSH_STOP:
            g_sem_down (gomx->flush_sem);

            g_omx_port_resume (in_port);
            break;

        default:
            break;
    }

    GST_LOG_OBJECT (self, "end");

    return TRUE;
}
开发者ID:lhzhang,项目名称:gst-openmax-devel,代码行数:45,代码来源:gstomx_base_sink.c


示例15: gst_fluid_dec_sink_event

static gboolean
gst_fluid_dec_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
  gboolean res;
  GstFluidDec *fluiddec = GST_FLUID_DEC (parent);

  GST_DEBUG_OBJECT (pad, "%s event received", GST_EVENT_TYPE_NAME (event));

  switch (GST_EVENT_TYPE (event)) {
    case GST_EVENT_CAPS:
    {
      GstCaps *caps;

      caps = gst_caps_new_simple ("audio/x-raw",
          "format", G_TYPE_STRING, GST_AUDIO_NE (F32),
          "rate", G_TYPE_INT, FLUID_DEC_RATE,
          "channels", G_TYPE_INT, 2,
          "layout", G_TYPE_STRING, "interleaved", NULL);

      fluid_synth_set_sample_rate (fluiddec->synth, FLUID_DEC_RATE);

      res = gst_pad_push_event (fluiddec->srcpad, gst_event_new_caps (caps));
      gst_caps_unref (caps);
      break;
    }
    case GST_EVENT_SEGMENT:
      gst_event_copy_segment (event, &fluiddec->segment);
      GST_DEBUG_OBJECT (fluiddec, "configured segment %" GST_SEGMENT_FORMAT,
          &fluiddec->segment);
      res = gst_pad_event_default (pad, parent, event);
      break;
    case GST_EVENT_FLUSH_STOP:
      gst_fluid_dec_reset (fluiddec);
      res = gst_pad_event_default (pad, parent, event);
      break;
    case GST_EVENT_EOS:
      /* FIXME, push last samples */
      res = gst_pad_event_default (pad, parent, event);
      break;
    default:
      res = gst_pad_event_default (pad, parent, event);
      break;
  }
  return res;
}
开发者ID:Lachann,项目名称:gst-plugins-bad,代码行数:45,代码来源:gstfluiddec.c


示例16: gst_vr_compositor_src_event

static gboolean
gst_vr_compositor_src_event (GstBaseTransform * trans, GstEvent * event)
{
  GstVRCompositor *self = GST_VR_COMPOSITOR (trans);
  GST_DEBUG_OBJECT (trans, "handling %s event", GST_EVENT_TYPE_NAME (event));

  switch (GST_EVENT_TYPE (event)) {
    case GST_EVENT_NAVIGATION:
      event =
          GST_EVENT (gst_mini_object_make_writable (GST_MINI_OBJECT (event)));
      gst_3d_scene_send_eos_on_esc (GST_ELEMENT (self), event);
      gst_3d_scene_navigation_event (self->scene, event);
      break;
    default:
      break;
  }
  return GST_BASE_TRANSFORM_CLASS (parent_class)->src_event (trans, event);
}
开发者ID:lubosz,项目名称:gst-plugins-vr,代码行数:18,代码来源:gstvrcompositor.c


示例17: gst_deinterlace2_src_event

static gboolean
gst_deinterlace2_src_event (GstPad * pad, GstEvent * event)
{
  GstDeinterlace2 *self = GST_DEINTERLACE2 (gst_pad_get_parent (pad));
  gboolean res;

  GST_DEBUG_OBJECT (pad, "received %s event", GST_EVENT_TYPE_NAME (event));

  switch (GST_EVENT_TYPE (event)) {
    default:
      res = gst_pad_event_default (pad, event);
      break;
  }

  gst_object_unref (self);

  return res;
}
开发者ID:prajnashi,项目名称:gst-plugins-bad,代码行数:18,代码来源:gstdeinterlace2.c


示例18: gst_dasf_sink_event

static gboolean
gst_dasf_sink_event (GstBaseSink *bsink, GstEvent *event)
{
	GST_INFO ("%s", GST_EVENT_TYPE_NAME (event));

	switch (GST_EVENT_TYPE (event))
	{
	case GST_EVENT_EOS:
		gst_element_send_event (GST_ELEMENT (bsink),
				gst_goo_event_new_reverse_eos() );
		break;
	default:
		break;
	}

	/* we don't want to bypass GstBaseSink's handling of the event: */
	return TRUE;
}
开发者ID:mrchapp,项目名称:gst-goo,代码行数:18,代码来源:gstdasfsink.c


示例19: gst_deinterleave_sink_event

static gboolean
gst_deinterleave_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
  GstDeinterleave *self = GST_DEINTERLEAVE (parent);
  gboolean ret;

  GST_DEBUG ("Got %s event on pad %s:%s", GST_EVENT_TYPE_NAME (event),
      GST_DEBUG_PAD_NAME (pad));

  /* Send FLUSH_STOP, FLUSH_START and EOS immediately, no matter if
   * we have src pads already or not. Queue all other events and
   * push them after we have src pads
   */
  switch (GST_EVENT_TYPE (event)) {
    case GST_EVENT_FLUSH_STOP:
    case GST_EVENT_FLUSH_START:
    case GST_EVENT_EOS:
      ret = gst_pad_event_default (pad, parent, event);
      break;
    case GST_EVENT_CAPS:
    {
      GstCaps *caps;

      gst_event_parse_caps (event, &caps);
      ret = gst_deinterleave_sink_setcaps (self, caps);
      gst_event_unref (event);
      break;
    }

    default:
      if (!self->srcpads && !GST_EVENT_IS_STICKY (event)) {
        /* Sticky events are copied when creating a new pad */
        GST_OBJECT_LOCK (self);
        self->pending_events = g_list_append (self->pending_events, event);
        GST_OBJECT_UNLOCK (self);
        ret = TRUE;
      } else {
        ret = gst_pad_event_default (pad, parent, event);
      }
      break;
  }

  return ret;
}
开发者ID:PeterXu,项目名称:gst-mobile,代码行数:44,代码来源:deinterleave.c


示例20: gst_tensor_aggregator_sink_event

/**
 * @brief This function handles sink events.
 */
static gboolean
gst_tensor_aggregator_sink_event (GstPad * pad, GstObject * parent,
    GstEvent * event)
{
  GstTensorAggregator *self;

  self = GST_TENSOR_AGGREGATOR (parent);

  GST_DEBUG_OBJECT (self, "Received %s event: %" GST_PTR_FORMAT,
      GST_EVENT_TYPE_NAME (event), event);

  switch (GST_EVENT_TYPE (event)) {
    case GST_EVENT_CAPS:
    {
      GstCaps *in_caps;
      GstCaps *out_caps;

      gst_event_parse_caps (event, &in_caps);
      silent_debug_caps (in_caps, "in-caps");

      if (gst_tensor_aggregator_parse_caps (self, in_caps)) {
        out_caps = gst_tensor_caps_from_config (&self->out_config);
        silent_debug_caps (out_caps, "out-caps");

        gst_pad_set_caps (self->srcpad, out_caps);

        gst_event_unref (event);
        event = gst_event_new_caps (out_caps);

        gst_caps_unref (out_caps);
        return gst_pad_push_event (self->srcpad, event);
      }
      break;
    }
    case GST_EVENT_FLUSH_STOP:
      gst_tensor_aggregator_reset (self);
      break;
    default:
      break;
  }

  return gst_pad_event_default (pad, parent, event);
}
开发者ID:myungjoo,项目名称:nnstreamer,代码行数:46,代码来源:tensor_aggregator.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GST_GHOST_PAD函数代码示例发布时间:2022-05-30
下一篇:
C++ GST_EVENT_TYPE函数代码示例发布时间: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