GStreamer.探测rtph265pay后永不调用 [英] GStreamer. Probe after rtph265pay never called

查看:403
本文介绍了GStreamer.探测rtph265pay后永不调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有rtsp服务器,我想扩展rtp缓冲区头.为此,我向rtph265pay的src添加了探针,但从未调用过.我的管道:

i have rtsp server and i want to extend rtp buffer header. For this purpose i added probe to src of rtph265pay, but it never called. My pipeline:

( appsrc name=vsrc ! nvvidconv ! video/x-raw(memory:NVMM),format=NV12 !
omxh265enc MeasureEncoderLatency=true bitrate=20000000 control-rate=2 !
rtph265pay name=pay0 pt=96 ) 

我在其中附加探针的代码:

Code where i attach probe:

static GstPadProbeReturn test_probe (GstPad *pad, GstPadProbeInfo *info,
gpointer user_data)
{
    cout << "i'm here";
}



 void mediaConfigure (GstRTSPMediaFactory* factory, GstRTSPMedia* media,
gpointer user_data)
{
        GstElement *element, *rtph265pay; GstPad *pad;
        element = gst_rtsp_media_get_element (media);
        rtph265pay = gst_bin_get_by_name_recurse_up (GST_BIN (element), "pay0");
        pad = gst_element_get_static_pad (rtph265pay, "src");
        gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER,
        (GstPadProbeCallback) test_probe, NULL, NULL);
        gst_object_unref (pad);
}

如果我设置"sink"而不是"src",则探针可以工作,但是我需要"src"来更改rtp缓冲区标头... 这是怎么了

If i set "sink" instead of "src", probe works, but i need "src" to change rtp buffer header... What is wrong here?

推荐答案

可能是因为rtph265pay的src键盘未链接到任何其他键盘-意味着rtph265pay是管道的结尾-元素未将任何缓冲区传递给它的src垫?
尝试在rtph265pay之后附加一个假钞.

Maybe because the rtph265pay's src pad isn't linked to any other pad - meaning rtph265pay is the end of the pipeline - the element doesn't pass any buffers to its src pad?
Try and attach a fakesink after the rtph265pay.

这篇关于GStreamer.探测rtph265pay后永不调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆