[Decoder] Add comments on decoder plugin APIs
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 6 Nov 2018 12:04:31 +0000 (21:04 +0900)
committerMyungJoo Ham <myungjoo.ham@gmail.com>
Thu, 8 Nov 2018 11:35:52 +0000 (20:35 +0900)
Fill in more doxygen entries and make the header more readable.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
gst/tensor_decoder/tensordec.h

index 0287ec1..1b2e801 100644 (file)
@@ -135,18 +135,43 @@ typedef enum
 } GstDecMode;
 
 /**
+ * @brief Output type for each mode
+ */
+static const GstDecMediaType dec_output_type[] = {
+  OUTPUT_VIDEO,
+  OUTPUT_TEXT,
+  OUTPUT_VIDEO,
+  OUTPUT_UNKNOWN,
+};
+
+/**
+ * @brief Get Type function required for gst elements
+ */
+GType gst_tensordec_get_type (void);
+
+
+/*********************************************************
+ * The followings are decoder-subplugin APIs             *
+ *********************************************************/
+/**
  * @brief Decoder definitions for different semantics of tensors
+ *        This allows developers to create their own decoders.
  */
 struct _TensorDecDef
 {
   gchar *modename;
+      /**< Unique decoder name. GST users choose decoders with mode="modename". */
   GstDecMediaType type;
+      /**< Output media type. VIDEO/AUDIO/TEXT are supported */
   gboolean (*init) (GstTensorDec *self);
+      /**< Object initialization for the decoder */
   void (*exit) (GstTensorDec *self);
+      /**< 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 GstTensorConfig *config);
       /**< The caller should unref the returned GstCaps
+        * Current implementation supports single-tensor only.
         * @todo WIP: support multi-tensor for input!!!
         */
   GstFlowReturn (*decode) (GstTensorDec *self, const GstTensorMemory *input,
@@ -156,26 +181,13 @@ struct _TensorDecDef
         * @todo WIP: support multi-tensor for input!!!
         */
   gsize (*getTransformSize) (GstTensorDec *self, GstCaps *caps, gsize size, GstCaps *othercaps, GstPadDirection direction);
+      /**< EXPERIMENTAL! @todo We are not ready to use this. This should be NULL or return 0 */
 };
 
 extern gboolean tensordec_probe (TensorDecDef *decoder);
 extern void tensordec_exit (const gchar *name);
 extern TensorDecDef *tensordec_find (const gchar *name);
 
-/**
- * @brief Output type for each mode
- */
-static const GstDecMediaType dec_output_type[] = {
-  OUTPUT_VIDEO,
-  OUTPUT_TEXT,
-  OUTPUT_VIDEO,
-  OUTPUT_UNKNOWN,
-};
-
-/**
- * @brief Get Type function required for gst elements
- */
-GType gst_tensordec_get_type (void);
 
 G_END_DECLS
 #endif /* __GST_TENSORDEC_H__ */