]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/dual-decode.git/blobdiff - include/gst-controller.h
GST-Controller.h modified
[glsdk/dual-decode.git] / include / gst-controller.h
index e1c86e2bd141a735d61c8dbd096cbd47df713f5f..b3d56aebd7ae18ae6548a26181051f7b88e2fe50 100644 (file)
 
        
 /**
- *    @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);
 
 /******************************************************************************
 
@@ -63,8 +64,12 @@ typedef void (*LogFunc) (gpointer data, gchar * string, ...);
 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;
@@ -84,7 +89,7 @@ typedef struct 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);
 
 /**
@@ -117,14 +122,7 @@ gboolean DualDecode_stopMedia (Pipeline *pipePtr);
 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);