index e1c86e2bd141a735d61c8dbd096cbd47df713f5f..b3d56aebd7ae18ae6548a26181051f7b88e2fe50 100644 (file)
--- a/include/gst-controller.h
+++ b/include/gst-controller.h
/**
- * @brief Defines the function pointer for error logging function of
- * a pipeline
+ * @brief Defines the callback function pointer types
*
*/
-typedef void (*LogFunc) (gpointer data, gchar * string, ...);
+typedef void (*LogFunc) (gpointer data, gchar * string, ...) G_GNUC_PRINTF(2,3);
+typedef void (*EOSFunc) (gpointer data);
+typedef void (*ErrorFunc) (gpointer data);
/******************************************************************************
typedef struct Pipeline {
/* GStreamer pipeline */
GstElement *pipe;
- /* Logging function */
- LogFunc func;
+
+ /* callback functions */
+ LogFunc logFunc;
+ EOSFunc eosFunc;
+ ErrorFunc errFunc;
+
/* Signal for a pipeline */
gulong busSignal;
} Pipeline;
* @param drawArea2 Display in window2
* @return TRUE if success, FALSE otherwise.
*/
-gboolean DualDecode_playMedia (Pipeline *pipePtr, gchar *filename, gint position,
+gboolean DualDecode_playMedia (Pipeline *pipePtr, gchar *filename, gint64 position,
GtkWidget *drawArea1, GtkWidget *drawArea2);
/**
Pipeline * DualDecode createPipeline ();
/**
- * @brief Sets the error logging function for the pipeline
- * @param pipePtr Pointer to Pipeline structure
- * @param func LogFunc pointer
- * @param data User supplied data
- * @return TRUE if success, FALSE otherwise
+ * @brief destroy a Pipeline structure
+ * @param pipePtr Pipeline structure
*/
-gboolean DualDecode_setLogFunction (Pipeline *pipePtr, LogFunc func, gpointer data);
-
-
-
-
+void DualDecode_destroyPipeline (Pipeline *pipePtr);