Gstreamer C/C++ program that creates a pipeline
Floyd Brown
flobro30101 at gmail.com
Thu Aug 26 19:22:59 UTC 2021
I have a program that works. It receives a video stream to a vpudec (from
rtsp), and then we pull a frame off using "glfilterbin" and "glbox". The
problem is that it keeps the aspect ratio (300x168 from 4K) but it seems
the powers-at-be would like it simply scaled to 300x300, so no aspect ratio.
Snippet:
...
GstElement *filter_ele = add_element("glfilterbin");
GstElement *box_ele = gst_element_factory_make("glbox", NULL);
g_object_set(filter_ele, "filter", box_ele, NULL);
gst_element_link(dec_ele, filter_ele);
appsink_ele_ = add_element("appsink");
g_object_set(appsink_ele_, "emit-signals", TRUE, NULL);
g_signal_connect(appsink_ele_, "new-sample", G_CALLBACK(on_sample_handler),
this);
target_width_ = w;
target_height_ = h;
std::ostringstream oss;
oss << "video/x-raw, format=RGB, width=" << w << ", height=" << h;
GstCaps *caps = gst_caps_from_string(oss.str().c_str());
g_object_set(appsink_ele_, "caps", caps, NULL);
gst_caps_unref(caps);
gst_element_link(filter_ele, appsink_ele_);
...
Is there a replacement for glfilterbin and/or glbox that can just scale the
video to 300x300?
Thanks
Floyd Brown
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210826/09940ec6/attachment.htm>
More information about the gstreamer-devel
mailing list