gst_pad_push_event (sel->srcpad, close_event);if(start_event) gst_pad_push_event (sel->srcpad, start_event);if(selpad->discont) { buf = gst_buffer_make_metadata_writable (buf); GST_DEBUG_OBJECT (pad,"Marking discont buffer %p", buf); GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLA...
gst_pad_push_event(element->sinkpad, gst_event_new_seek(element->sink_segment.rate, GST_FORMAT_BYTES, GST_SEEK_FLAG_NONE, GST_SEEK_TYPE_SET, start_position, GST_SEEK_TYPE_NONE,0));returnresult;#elseProgressBuffer *element = PROGRESS_BUFFER(GST_PAD_PARENT(pad));returngst_pad_pull_range(...
发送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的入参往往是 ...
比如 gst_buffer_make_writable 会直接暴力地把计数设置为1。再比如, gst_pad_push 会把引用计数减1,这需要格外注意一下。
到这里,可以看到,在PUSH模式下,_chain函数返回GST_FLOW_NOT_NEGOTIATED,gstreamer core就会自动为我们调用gst_pad_set_caps;但是在PULL模式下,虽然gst_pad_pull_range也会返回GST_FLOW_NOT_NEGOTIATED,但是gst_pad_set_caps并不会自动被调用,这是因为出于latency的考虑,gstramer不支持在pull thread中做set caps的动...
Gstreamer 将GstElement和GstPad中关于数据流处理的线程封装成GstTask,并提供gst_task_start(),gst_task_pause(),gst_task_stop()等接口,使数据流的处理更加方便。例如:GstPad通常会启动一个GstTask从另一个 pad 上拉数据或者推数据到另一个 pad。
return gst_pad_push_event (aggregator->srcpad, event); }static void gst_aggregator_push_eos (GstAggregator * self) {4 changes: 4 additions & 0 deletions 4 subprojects/gstreamer/libs/gst/base/gstaggregator.h Original file line numberDiff line numberDiff line change @@ -383,6 +383,10 ...
Before dataflow is possible on the pads, they need to be activated with gst_pad_set_active. gst_pad_query and gst_pad_peer_query can be used to query various properties of the pad and the stream. To send a GstEvent on a pad, use gst_pad_send_event and gst_pad_push_event. Some ...
c:2965:gst_base_src_loop:<v4l2src0> pausing after gst_pad_push() = error 0:00:02.816607205 2873 0x764d850 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> error: Internal data stream error. 0:00:02.816638495 2873 0x764d850 WARN basesrc gstbasesrc.c:3055:gst_base_src...
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...