Error working with appsink and appsrc

Anton Pryima zingfrid at gmail.com
Fri Sep 10 15:32:57 UTC 2021


Hello Dwight.

1. I do not see a rtspsink in your  #2 pipeline.
2. Try to add rtpjitterbuffer into your #2 pipeline
3. Did you check locally? Do you see your stream from appsrc? Try to dump
to file (if the display is not present).
4. Post an error you've got on the receiver end.

Best regards,
Anton.

On Thu, Sep 9, 2021 at 10:47 PM Dwight Kulkarni via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> wrote:

> 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/20210910/f9661e05/attachment.htm>


More information about the gstreamer-devel mailing list