making cmake work for target machine to compile'

This commit is contained in:
talksik
2023-07-25 14:49:04 -07:00
parent 567e1a7a9c
commit 9fcee60896
3 changed files with 10 additions and 4 deletions
+5 -3
View File
@@ -68,9 +68,11 @@ int LocalCapture::on_new_sample(GstElement *sink, gpointer data) {
/* Retrieve the buffer */
g_signal_emit_by_name(sink, "pull-sample", &sample);
if (sample) {
/* The only thing we do in this example is print a * to indicate a received
* buffer */
g_print("*");
GstBuffer *buffer = gst_sample_get_buffer(sample);
GstMapInfo map;
gst_buffer_map(buffer, &map, GST_MAP_READ);
std::cout << "received " << map.size << " bytes" << std::endl;
gst_sample_unref(sample);
return GST_FLOW_OK;
}
+2 -1
View File
@@ -13,9 +13,10 @@ MyWindow::MyWindow() {
set_title("flowy");
m_localCapture = new LocalCapture();
Gtk::Picture picture;
// todo: show frames here
//GtkWidget *area;
// GtkWidget *area;
// g_object_get(m_localCapture->gtksink, "widget", &area, NULL);
// Gtk::Widget *widget = Glib::wrap(area);
// set_child(*widget);