/** @brief tensordec-plugin's TensorDecDef callback */
static gboolean
-_init (GstTensorDec * self)
+bb_init (GstTensorDec * self)
{
/** @todo check if we need to ensure plugin_data is not yet allocated */
bounding_boxes *bdata;
/** @brief tensordec-plugin's TensorDecDef callback */
static void
-_exit (GstTensorDec * self)
+bb_exit (GstTensorDec * self)
{
bounding_boxes *bdata = self->plugin_data;
/** @brief tensordec-plugin's TensorDecDef callback */
static gboolean
-_setOption (GstTensorDec * self, int opNum, const gchar * param)
+bb_setOption (GstTensorDec * self, int opNum, const gchar * param)
{
bounding_boxes *bdata = self->plugin_data;
* If there are third or more tensors, such tensors will be ignored.
*/
static GstCaps *
-_getOutputDim (GstTensorDec * self, const GstTensorsConfig * config)
+bb_getOutCaps (GstTensorDec * self, const GstTensorsConfig * config)
{
/** @todo this is compatible with "SSD" only. expand the capability! */
bounding_boxes *data = self->plugin_data;
/** @brief tensordec-plugin's TensorDecDef callback */
static gsize
-_getTransformSize (GstTensorDec * self, GstCaps * caps,
+bb_getTransformSize (GstTensorDec * self, GstCaps * caps,
gsize size, GstCaps * othercaps, GstPadDirection direction)
{
return 0;
/** @brief tensordec-plugin's TensorDecDef callback */
static GstFlowReturn
-_decode (GstTensorDec * self, const GstTensorMemory * input, GstBuffer * outbuf)
+bb_decode (GstTensorDec * self, const GstTensorMemory * input,
+ GstBuffer * outbuf)
{
bounding_boxes *bdata = self->plugin_data;
const gsize size = bdata->width * bdata->height * 4; /* RGBA */
static TensorDecDef boundingBox = {
.modename = "bounding_boxes",
.type = OUTPUT_VIDEO,
- .init = _init,
- .exit = _exit,
- .setOption = _setOption,
- .getOutputDim = _getOutputDim,
- .getTransformSize = _getTransformSize,
- .decode = _decode,
+ .init = bb_init,
+ .exit = bb_exit,
+ .setOption = bb_setOption,
+ .getOutCaps = bb_getOutCaps,
+ .getTransformSize = bb_getTransformSize,
+ .decode = bb_decode,
};
/** @brief Initialize this object for tensordec-plugin */
/** @brief tensordec-plugin's TensorDecDef callback */
static GstCaps *
-dv_getOutputDim (GstTensorDec * self, const GstTensorsConfig * config)
+dv_getOutCaps (GstTensorDec * self, const GstTensorsConfig * config)
{
/* Old gst_tensordec_video_caps_from_config () had this */
GstVideoFormat format;
.init = dv_init,
.exit = dv_exit,
.setOption = dv_setOption,
- .getOutputDim = dv_getOutputDim,
+ .getOutCaps = dv_getOutCaps,
.getTransformSize = dv_getTransformSize,
.decode = dv_decode,
};
/** @brief tensordec-plugin's TensorDecDef callback */
static gboolean
-_init (GstTensorDec * self)
+il_init (GstTensorDec * self)
{
/** @todo check if we need to ensure plugin_data is not yet allocated */
self->plugin_data = g_new0 (ImageLabelData, 1);
/** @brief tensordec-plugin's TensorDecDef callback */
static void
-_exit (GstTensorDec * self)
+il_exit (GstTensorDec * self)
{
ImageLabelData *data = self->plugin_data;
if (data->labels) {
/** @brief tensordec-plugin's TensorDecDef callback */
static gboolean
-_setOption (GstTensorDec * self, int opNum, const gchar * param)
+il_setOption (GstTensorDec * self, int opNum, const gchar * param)
{
ImageLabelData *data = self->plugin_data;
/** @brief tensordec-plugin's TensorDecDef callback */
static GstCaps *
-_getOutputDim (GstTensorDec * self, const GstTensorsConfig * config)
+il_getOutCaps (GstTensorDec * self, const GstTensorsConfig * config)
{
const uint32_t *dim;
int i;
/** @brief tensordec-plugin's TensorDecDef callback */
static gsize
-_getTransformSize (GstTensorDec * self, GstCaps * caps,
+il_getTransformSize (GstTensorDec * self, GstCaps * caps,
gsize size, GstCaps * othercaps, GstPadDirection direction)
{
return 0;
/** @brief tensordec-plugin's TensorDecDef callback */
static GstFlowReturn
-_decode (GstTensorDec * self, const GstTensorMemory * input, GstBuffer * outbuf)
+il_decode (GstTensorDec * self, const GstTensorMemory * input,
+ GstBuffer * outbuf)
{
ImageLabelData *data = self->plugin_data;
GstMapInfo out_info;
static TensorDecDef imageLabeling = {
.modename = "image_labeling",
.type = OUTPUT_TEXT,
- .init = _init,
- .exit = _exit,
- .setOption = _setOption,
- .getOutputDim = _getOutputDim,
- .getTransformSize = _getTransformSize,
- .decode = _decode,
+ .init = il_init,
+ .exit = il_exit,
+ .setOption = il_setOption,
+ .getOutCaps = il_getOutCaps,
+ .getTransformSize = il_getTransformSize,
+ .decode = il_decode,
};
/** @brief Initialize this object for tensordec-plugin */
if (self->mode == DECODE_MODE_PLUGIN) {
g_assert (self->decoder);
- return self->decoder->getOutputDim (self, config);
+ return self->decoder->getOutCaps (self, config);
}
GST_ERROR_OBJECT (self, "Decoder plugin not yet configured.");
/**< Object destruction for the decoder */
gboolean (*setOption) (GstTensorDec *self, int opNum, const gchar *param);
/**< Process with the given options. It can be called repeatedly */
- GstCaps *(*getOutputDim) (GstTensorDec *self, const GstTensorsConfig *config);
+ GstCaps *(*getOutCaps) (GstTensorDec *self, const GstTensorsConfig *config);
/**< The caller should unref the returned GstCaps
* Current implementation supports single-tensor only.
* @todo WIP: support multi-tensor for input!!!