index 035dccc749ecd327404c65fe4d7603bcdbfaed44..28eaa8aa62c449367ea44f5cb24328c093650d61 100644 (file)
--- a/include/gst-controller.h
+++ b/include/gst-controller.h
*
* @brief Defines the structures and function prototypes.
*/
+
+#ifndef __GST_CONTROLLER_H__
+#define __GST_CONTROLLER_H__
#include <gtk/gtk.h>
#include <gst/gst.h>
-#define NANOSEC 1e9
-#define SS 0
-#define MM 1
-#define HH 2
-#define TIMEOUT 4000000000
+
/**
* @brief Defines the callback function pointer types
*
typedef void (*EOSFunc) (gpointer data);
typedef void (*ErrorFunc) (gpointer data);
+
/******************************************************************************
Structure Definitions
* @return TRUE if success, FALSE otherwise.
*/
gboolean DualDecode_playMedia (Pipeline *pipePtr, gchar *filename, gint64 position);
+
/**
* @brief Sets the pipeline to PAUSED state
* @param pipePtr Pointer to Pipeline structure
* @return Pipeline *pipe if success
NULL if failure
*/
+Pipeline * DualDecode_createPipeline ();
+/**
+ * @brief Seek media position in the pipeline
+ * @param pipePtr Pointer to Pipeline structure
+ * @param position Position to be seeked
+ * @return TRUE if success, FALSE otherwise
+*/
gboolean DualDecode_seekMedia(Pipeline *pipePtr, gint64 position);
-Pipeline * DualDecode_createPipeline ();
/**
* @brief destroy a Pipeline structure
*/
GstState DualDecode_getMediaState (Pipeline *pipePtr);
-gboolean DualDecode_getMediaPosition (Pipeline *pipePtr, gdouble *seekScaleValue,
+/**
+ * @brief Get media position in the pipeline
+ * @param pipePtr Pointer to Pipeline structure
+ * @param seekScaleValue Value of the seek scale bar
+ * @param timeLabelText Text to be displayed on the label.
+ * @return TRUE if success, FALSE otherwise
+*/
+gboolean DualDecode_getMediaPosition (Pipeline *pipePtr,
+ gdouble *seekScaleValue,
gchar **timeLabelText);
-
-gboolean DualDecode_singleToDual (Pipeline **pipes,GstElement * otherWindowSink,
+/**
+ * @brief Switch decode mode from single to dual
+ * @param pipes Pointer to an array consisting of both the pipelines
+ * @param otherWindowSink Video sink of the other window
+ * @param thisWindow Index of the window where switch button is clicked
+ * @param otherWindow Index of the other window
+ * @param filename File to be played
+ * @return TRUE if success, FALSE otherwise
+*/
+gboolean DualDecode_singleToDual (Pipeline **pipes,
+ GstElement * otherWindowSink,
gint thisWindow, gint otherWindow,
gchar *filename);
-
-gboolean DualDecode_dualToSingle (Pipeline **pipes,GstElement * otherWindowSink,
+/**
+ * @brief Switch decode mode from dual to single
+ * @param pipes Pointer to an array consisting of both the pipelines
+ * @param otherWindowSink Video sink of the other window
+ * @param thisWindow Index of the window where switch button is clicked
+ * @param otherWindow Index of the other window
+ * @return TRUE if success, FALSE otherwise
+*/
+gboolean DualDecode_dualToSingle (Pipeline **pipes,
+ GstElement * otherWindowSink,
gint thisWindow, gint otherWindow);
+/**
+ * @brief Set video sinks of the pipeline
+ * @return TRUE if success, FALSE otherwise
+ * @param pipePtr Pointer to Pipeline structure
+ * @param sink0 First sink of the pipeline
+ * @param sink1 Second sink of the pipeline
+*/
+void DualDecode_setPipelineSink (Pipeline *pipePtr, GstElement *sink0,
+ GstElement *sink1);
+
+
+
+/******************************************************************************
+
+ Macros
+
+ *****************************************************************************/
+#define NANOSEC 1e9
+#define SS 0
+#define MM 1
+#define HH 2
+#define TIMEOUT 4000000000
-void DualDecode_setPipelineSink (Pipeline *pipePtr, GstElement *sink0, GstElement *sink1);
+#endif /*__GST_CONTROLLER_H__*/