GstPad *sinkpad = gst_element_get_static_pad (element,"sink");if(sinkpad)gst_pad_send_event(sinkpad, gst_event_new_eos ());else{ GstPad *srcpad = gst_element_get_static_pad (element,"src");gst_pad_send_event(srcpad, gst_event_new_flush_stop (FALSE)); } } 开发者ID:shakin,项...
发送event的函数为 gst_pad_send_event 和 gst_pad_push_event。有些event可以指定为sticky。 pad是element推拉数据的介质,可以通过gst_pad_push和gst_pad_pull_range进行GstBuffer的推拉。一般情况下编写代码都是以plugin为单位,而pad往往作为element的成员变量,因此gst_pad_push和gst_pad_pull_range的入参往往是 ...
ret = gst_pad_send_event (peer_pad, event);gst_object_unref(peer_pad); }returnret; } 開發者ID:spunktsch,項目名稱:svtplayer,代碼行數:64,代碼來源:gstnavseek.c 示例3: gst_insert_bin_block_pad_unlock ▲點讚 3▼ staticvoidgst_insert_bin_block_pad_unlock(GstInsertBin * self){structChan...
,gst_event_new_caps( fixed_caps )); }element2的处理则放在_init 注册的事件处理函数中:gst_pad_set_event_function(filter->sinkpad...gst_element_class_add_pad_template 注册了GstPadTemplate, 再在构造函数里面通过这些template创建pad的实例。但事情还没完, 我们看到我们注册的 ...
gst_element_request_pad_simple() 方法可用于根据 pad 模板的名称从元素获取 pad。 还可以请求与其他 pad template 兼容的 pad。 如果您想要将一个元件链接到多路复用器元素并且需要请求兼容的 pad,那么这个方法非常有用。 方法gst_element_get_known_pad() 可用于请求兼容的 pad ,如下一个示例所示。 它将从...
0:00:00.018145466 13696 0x2235800 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event 0:00:00.018152762 13696 0x2235800 INFO GST_EVENT gstpad.c:5602:gst_pad_send_event_unchecked:<queue0:src> Received event on flushing pad. Discarding Setting pipeline to PAUSE...
Method/Function: event_new_eos 导入包: girepository 每个示例代码都附有代码来源和完整的源代码,希望对您的程序开发有帮助。 示例1 def __onBufferProbe(self, pad, buffer): if (self.player != None and self.__isEndOfStream == False): caps = buffer.caps if (caps == None): print _("Stre...
static GstPadProbeReturn probe_on_fakesink_sink_pad (GstPad * pad, GstPadProbeInfo * info, gpointer u_data) { GstBuffer *buf = (GstBuffer *) info->data; GstMapInfo map_info = {0}; gboolean ok = gst_buffer_map(buf, &map_info, GST_MAP_READ); fail_unless(ok == TRUE); NvBufAud...
When the muxer receives a buffer from a new source, it sends a GST_NVEVENT_PAD_ADDED event. When a muxer sink pad is removed, the muxer sends a GST_NVEVENT_PAD_DELETED event. Both events contain the source ID of the source being added or removed (see sources/includes/gst-nvevent....
overflow:上游element对自己push gstbuffer过快,当前element可以通过push overflow类型的qos event 给上游,以控制 gstbuffer 流量。 underflow:上游element对自己push gstbuffer过慢,当前element可以通过push underflow类型的qos event 给上游,以要求更多的 gstbuffer 输入。