Closed jdog816 closed 2 years ago
For example, were "tisvideobufferfilter" and "jpegenc" changed to something new when migrating from 0.1 to 1.0 ?
Sorry for multiple questions, but I'm getting:
GStreamer-CRITICAL **: 21:00:37.623: gst_buffer_get_sizes_range: assertion 'GST_IS_BUFFER (buffer)' failed
GStreamer-CRITICAL **: 21:00:37.790: gst_buffer_map_range: assertion 'GST_IS_BUFFER (buffer)' failed
Any ideas?
In tiscamera 1.0 these elements are no longer available. First of all I suggest to use GStreamer 1.0. I can not provide support for Gstreamer 0.10 anymore Also I suggest to use the current tiscamera 1.0. Your pipeline is that:
const gchar* Pipeline = "tcambin name=camera "
"! video/x-raw,format=BGRxwidth=640,height=480,framerate=15/1 "
"! videocrop top=0 left=80 right=80 bottom=0 "
"! videoconvert "
"! jpegenc name=jpegencoder quality="INITIALJPEGQUALITY " "
"! appsink name=jpegframe ";
We only need to configure the auto functions ROI by tcambin properties. As soon as I have access to camera and Linux computer, I will have a look.
Now I would like to add the properties. In tcam-capture you can set the properties, if the pipeline is in READY state, just before PLAYING. That is new.
// Get tcambin from the pipeline and set it in state READY:
GstElement* source = gst_bin_get_by_name(GST_BIN(pipeline), "camera");
gst_element_set_state(pipeline, GST_STATE_READY);
gst_element_get_state(pipeline, NULL, NULL, 4000000000ll);
// Set the Auto Functions ROI properties now. With error handler.
tcam_property_provider_set_tcam_boolean(TCAM_PROPERTY_PROVIDER(source), "AutoFunctionsROIEnable", true, &err);
if (err)
{
printf("Error while retrieving AutoFunctionsROIEnable: %s\n", err->message);
g_error_free(err);
return 1;
}
tcam_property_provider_set_tcam_enumeration(TCAM_PROPERTY_PROVIDER(source), "AutoFunctionsROIPreset", "Custom Rectangle", &err);
if (err)
{
printf("Error while retrieving AutoFunctionsROIPreset: %s\n", err->message);
g_error_free(err);
return 1;
}
tcam_property_provider_set_tcam_integer(TCAM_PROPERTY_PROVIDER(source), "AutoFunctionsROILeft", 80, &err);
if (err)
{
printf("Error while retrieving AutoFunctionsROILeft: %s\n", err->message);
g_error_free(err);
return 1;
}
tcam_property_provider_set_tcam_integer(TCAM_PROPERTY_PROVIDER(source), "AutoFunctionsROIWidth", 560, &err);
if (err)
{
printf("Error while retrieving AutoFunctionsROIWidth: %s\n", err->message);
g_error_free(err);
return 1;
}
tcam_property_provider_set_tcam_integer(TCAM_PROPERTY_PROVIDER(source), "AutoFunctionsROITop", 0, &err);
if (err)
{
printf("Error while retrieving AutoFunctionsROITop: %s\n", err->message);
g_error_free(err);
return 1;
}
tcam_property_provider_set_tcam_integer(TCAM_PROPERTY_PROVIDER(source), "AutoFunctionsROIHeight", 400, &err);
if (err)
{
printf("Error while retrieving AutoFunctionsROIHeight: %s\n", err->message);
g_error_free(err);
return 1;
}
//Start the pipeline
gst_element_set_state(pipeline, GST_STATE_PLAYING);
gst_element_get_state(pipeline, NULL, NULL, 4000000000ll);
printf("Press enter to stop the stream.\n");
getchar();
/* cleanup, reset state */
gst_element_set_state(pipeline, GST_STATE_NULL);
gst_element_get_state(pipeline, NULL, NULL, 4000000000ll);
gst_object_unref(source);
I hope, I got the Auto Functions ROI coordinates correct according to your ROI.
Stefan
Solved some of the problems by following this document, but getting an error that's not explained here: https://github.com/Xilinx/gstreamer/blob/master/docs/random/porting-to-1.0.txt I opened a separate issue for it, so I'll close this one.
I'm trying to run a custom script based on tiscamera, using a DFM 22BUC03-ML camera in Ubuntu 18. The script is saving images to a folder, but they are coming out grey and I'm getting these errors:
I believe this is the relevant portion of the script:
Would it just be a matter of commenting out some of those lines, or editing them with the 1.0 plugin names?