Streaming Gstreamer无RTP

Streaming Gstreamer无RTP,streaming,gstreamer,rtp,Streaming,Gstreamer,Rtp,我尝试使用最新的gstreamerlibs1.8.0编译静态二进制文件。我想得到输入RTSP流并将其放入文件中。管道是: rtspsrc location=rtsp://X.X.X.X/ protocols=GST_RTSP_LOWER_TRANS_TCP ! queue ! rtph264depay ! h264parse ! flvmux name=\"mux\" streamable=\"true\" ! fakesink 运行已编译的二进制文件会导致错误: rtpbasedepayl

我尝试使用最新的gstreamerlibs1.8.0编译静态二进制文件。我想得到输入RTSP流并将其放入文件中。管道是:

rtspsrc location=rtsp://X.X.X.X/ protocols=GST_RTSP_LOWER_TRANS_TCP ! queue ! rtph264depay ! h264parse ! flvmux  name=\"mux\" streamable=\"true\" ! fakesink
运行已编译的二进制文件会导致错误:

rtpbasedepayload gstrtpbasedepayload.c:484:gst\u rtp\u base\u depayload\u handle\u buffer:[00m 错误:未协商RTP格式

完整输出:


由于源代码是带有SDP数据的RTSP-我不需要手动设置上限。有趣的是,使用Gstreamer 0.10运行此管道工作正常。

由我自己修复。如果不直接在管道中使用,Gstreamer不会抱怨缺少插件。插件udp和rtpmanager的静态注册解决了问题。

修复我自己。如果不直接在管道中使用,Gstreamer不会抱怨缺少插件。插件udp和rtpmanager的静态注册解决了问题。

有趣-使用共享模块可以工作。错误仅在静态链接时显示。有趣-使用共享模块可以工作。错误仅在静态链接时显示。
int main(int argc, char *argv[]) {
  GstElement *pipeline;
  GstBus *bus;
  GstStateChangeReturn ret;
  GMainLoop *main_loop;
  CustomData data;

  /* Initialize GStreamer */
  gst_init (&argc, &argv);
   registerGstStaticPlugins();

  /* Initialize our data structure */
  memset (&data, 0, sizeof (data));

  /* Build the pipeline */

  pipeline = gst_parse_launch ("rtspsrc location=rtsp://X.X.X.X/ protocols=GST_RTSP_LOWER_TRANS_TCP ! queue ! rtph264depay ! h264parse ! flvmux  name=\"mux\" streamable=\"true\" ! fakesink", NULL);

  bus = gst_element_get_bus (pipeline);

  /* Start playing */
  ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
  if (ret == GST_STATE_CHANGE_FAILURE) {
    g_printerr ("Unable to set the pipeline to the playing state.\n");
    gst_object_unref (pipeline);
    return -1;
  } else if (ret == GST_STATE_CHANGE_NO_PREROLL) {
    data.is_live = TRUE;
  }

  main_loop = g_main_loop_new (NULL, FALSE);
  data.loop = main_loop;
  data.pipeline = pipeline;

  gst_bus_add_signal_watch (bus);
  g_signal_connect (bus, "message", G_CALLBACK (cb_message), &data);

  g_main_loop_run (main_loop);

  /* Free resources */
  g_main_loop_unref (main_loop);
  gst_object_unref (bus);
  gst_element_set_state (pipeline, GST_STATE_NULL);
  gst_object_unref (pipeline);
  return 0;
}