22 #define DBG_TIME_PERIOD_PRINTS 10
29 "yarp.carrier.gstreamer.GstDecoder",
62 dec_data->sem_pointer_stream->wait();
111 size_t img_size = width * height * 3;
131 "On %d times: NewSampleFunc is long %.6f sec and sleeps %.6f sec",
152 m_pointer_mutex =
_m;
163 pipeline_string +=
" ! videoconvert ! video/x-raw,format=RGB ! appsink name = myappsink ";
169 if (m_pipeline ==
nullptr)
225 m_semaphore_reading_from_gst.
wait();
231 m_semaphore_reading_from_stream.
post();
const yarp::os::LogComponent & GSTREAMER_DECODER()
GstFlowReturn new_sample_func(GstAppSink *appsink, gpointer user_data)
yarp::sig::ImageOf< yarp::sig::PixelRgb > * getLastFrame()
bool init(std::string pipeline_string)
GstYarpDecoder(std::mutex *m, yarp::os::Semaphore *s, GstYarpDecoder_cfgParamters &config)
A mini-server for performing network communication in the background.
static LogCallback printCallback()
Get current print callback.
static LogType minimumPrintLevel()
Get current minimum print level.
A class for thread synchronization and mutual exclusion.
void wait()
Decrement the counter, even if we must wait to do that.
void post()
Increment the counter.
#define yCInfo(component,...)
#define yCError(component,...)
#define yCTrace(component,...)
#define yCWarning(component,...)
#define yCDebug(component,...)
#define YARP_LOG_COMPONENT(name,...)
double now()
Return the current time in seconds, relative to an arbitrary starting point.
An interface to the operating system, including Port based communication.
yarp::os::Semaphore * sem_pointer_stream
yarp::sig::ImageOf< yarp::sig::PixelRgb > * img_pointer
yarp::os::Semaphore * sem_pointer_gst
std::mutex * mutex_pointer