Error working with appsink and appsrc

Dwight Kulkarni dwight at realtime-7.com
Thu Sep 9 19:46:56 UTC 2021


Hi all,

I am trying to setup RTSP server with master pipeline using appsrc and
appsink.

I) In media_configure callback I setup the generator pipeline:

string pipeline = "v4l2src device=/dev/video1 ! video/x-raw, width=1920,
height=1080, framerate=15/1 ! queue ! vpuenc_h264 ! appsink name=h264vid
max-buffers=100 drop=true";

2) The RTSP pipeline is as follows:
pipeline_config = "appsrc name=h264videosrc ! queue ! rtph264pay name=pay0
pt=96";

3) I have set the caps and need_data callback:
  ctx->vid_appsrc = appsrc =
      gst_bin_get_by_name_recurse_up (GST_BIN (element), "h264videosrc");
  ctx->vid_appsink = appsink =
      gst_bin_get_by_name (GST_BIN (ctx->generator_pipe), "h264vid");
  g_object_set (G_OBJECT (appsrc), "caps", caps, NULL);
  g_object_set (G_OBJECT (appsink), "caps", caps, NULL);
 g_signal_connect (appsrc, "need-data", (GCallback) need_data, ctx);

4) In need_data callback I copy the data like so:
GstSample *sample;
sample = gst_app_sink_pull_sample (GST_APP_SINK (ctx->vid_appsink));
GstBuffer *buffer = gst_sample_get_buffer (sample);
GstSegment *seg = gst_sample_get_segment (sample);
g_signal_emit_by_name (appsrc, "push-buffer", buffer, &ret);


Based on the information I have, there is data in the need_data sample,
however VlcClient after authentication throws error.

Any help would be appreciated !

-- 
Sincerely,

Dwight Kulkarni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210909/fc96dc28/attachment.htm>


More information about the gstreamer-devel mailing list