You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: c/include/nnstreamer-tizen-internal.h
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,17 @@
19
19
extern"C" {
20
20
#endif/* __cplusplus */
21
21
22
+
/**
23
+
* @brief Callback for tensor data stream of machine-learning API.
24
+
* @details Note that the buffer may be deallocated after the return and this is synchronously called. Thus, if you need the data afterwards, copy the data to another buffer and return fast. Do not spend too much time in the callback.
25
+
* @since_tizen 10.0
26
+
* @remarks The @a data can be used only in the callback. To use outside, make a copy.
27
+
* @param[in] data The handle of the tensor data (a single frame. tensor/tensors). You can get the information of given tensor data frame using ml_tensors_data_get_info().
28
+
* @param[in,out] user_data User application's private data.
29
+
* @return @c 0 on success. Otherwise a negative error value.
* @brief Constructs the pipeline (GStreamer + NNStreamer).
24
35
* @details This function is to construct the pipeline without checking the permission in platform internally. See ml_pipeline_construct() for the details.
@@ -38,7 +49,9 @@ typedef struct {
38
49
char*custom_option; /**< Custom option string for neural network framework. */
39
50
char*fw_name; /**< The explicit framework name given by user */
40
51
intinvoke_dynamic; /**< True for supporting invoke with flexible output. */
41
-
intinvoke_async; /**< The sub-plugin must support asynchronous output to use this option. If set to TRUE, the sub-plugin can generate multiple outputs asynchronously per single input. Otherwise, only synchronous single-output is expected and async callback/handle are ignored. */
52
+
intinvoke_async; /**< The sub-plugin must support asynchronous output to use this option. If set to TRUE, the sub-plugin can generate multiple outputs asynchronously per single input. Otherwise, only synchronous single-output is expected and async callback is ignored. */
53
+
ml_tensors_data_cbinvoke_async_cb; /**< Callback function to be called when the sub-plugin generates an output asynchronously. This is only available when invoke_async is set to TRUE. */
54
+
void*invoke_async_pdata; /**< Private data to be passed to async callback. */
("Cannot handle tensor data stream. The callback function returns error '%d'.",
623
+
ret);
624
+
}
625
+
626
+
done:
627
+
if (_info) {
628
+
ml_tensors_info_destroy (_info);
629
+
}
630
+
631
+
if (_data) {
632
+
ml_tensors_data_destroy (_data);
633
+
}
634
+
635
+
ML_SINGLE_HANDLE_UNLOCK (single_h);
636
+
return (ret==ML_ERROR_NONE) ? 0 : -1;
637
+
}
638
+
571
639
/**
572
640
* @brief Sets the information (tensor dimension, type, name and so on) of required input data for the given model, and get updated output data information.
573
641
* @details Note that a model/framework may not support setting such information.
@@ -922,6 +990,10 @@ _ml_single_open_custom_validate_arguments (ml_single_h * single,
0 commit comments