g_message("save to file");
    50                 GstElement * caps = gst_element_factory_make("capsfilter", "filter");
    51                 GstCaps * c = gst_caps_new_simple("video/x-h264",
    52                         "stream-format", G_TYPE_STRING, "byte-stream",
    53                         NULL);
    54                 g_object_set(caps, "caps", c, NULL);
    55                 
    56                 GstElement * filesink = gst_element_factory_make("filesink", "filesink");
    57                 g_object_set(filesink, "location", "/opt/test.h264", NULL);
    58                 gst_bin_add_many(GST_BIN(pipeline()), caps, filesink, NULL);
    59                 gboolean ok = gst_element_link_many(video_tee, caps, filesink, NULL);
    60                 g_warn_if_fail(ok);

 

相关文章:

  • 2021-11-17
  • 2021-07-21
  • 2021-10-01
  • 2021-09-03
  • 2022-12-23
猜你喜欢
  • 2021-05-30
  • 2022-12-23
  • 2021-12-20
  • 2021-07-03
相关资源
相似解决方案