*/
#include <gst/gst.h>
-#include <gst/rtsp/gstrtsprange.h>
-#include <gst/rtsp/gstrtspurl.h>
+#include <gst/rtsp/rtsp.h>
#include <gst/net/gstnet.h>
#ifndef __GST_RTSP_MEDIA_H__
* @GST_RTSP_SUSPEND_MODE_RESET: The media is set to NULL when suspended
*
* The suspend mode of the media pipeline. A media pipeline is suspended right
- * after creating the SDP and when the client preforms a PAUSED request.
+ * after creating the SDP and when the client performs a PAUSED request.
*/
typedef enum {
GST_RTSP_SUSPEND_MODE_NONE = 0,
GST_RTSP_SUSPEND_MODE_RESET = 2
} GstRTSPSuspendMode;
+/**
+ * GstRTSPTransportMode:
+ * @GST_RTSP_TRANSPORT_MODE_PLAY: Transport supports PLAY mode
+ * @GST_RTSP_TRANSPORT_MODE_RECORD: Transport supports RECORD mode
+ *
+ * The supported modes of the media.
+ */
+typedef enum {
+ GST_RTSP_TRANSPORT_MODE_PLAY = 1,
+ GST_RTSP_TRANSPORT_MODE_RECORD = 2,
+} GstRTSPTransportMode;
+
+#define GST_TYPE_RTSP_TRANSPORT_MODE (gst_rtsp_transport_mode_get_type())
+GType gst_rtsp_transport_mode_get_type (void);
+
#define GST_TYPE_RTSP_SUSPEND_MODE (gst_rtsp_suspend_mode_get_type())
GType gst_rtsp_suspend_mode_get_type (void);
#include "rtsp-thread-pool.h"
#include "rtsp-permissions.h"
#include "rtsp-address-pool.h"
+#include "rtsp-sdp.h"
/**
* GstRTSPMedia:
/**
* GstRTSPMediaClass:
* @handle_message: handle a message
+ * @prepare: the default implementation adds all elements and sets the
+ * pipeline's state to GST_STATE_PAUSED (or GST_STATE_PLAYING
+ * in case of NO_PREROLL elements).
* @unprepare: the default implementation sets the pipeline's state
* to GST_STATE_NULL and removes all elements.
+ * @suspend: the default implementation sets the pipeline's state to
+ * GST_STATE_NULL GST_STATE_PAUSED depending on the selected
+ * suspend mode.
+ * @unsuspend: the default implementation reverts the suspend operation.
+ * The pipeline will be prerolled again if it's state was
+ * set to GST_STATE_NULL in suspend.
* @convert_range: convert a range to the given unit
- * @query_position: query the current posision in the pipeline
+ * @query_position: query the current position in the pipeline
* @query_stop: query when playback will stop
*
* The RTSP media class
/* vmethods */
gboolean (*handle_message) (GstRTSPMedia *media, GstMessage *message);
+ gboolean (*prepare) (GstRTSPMedia *media, GstRTSPThread *thread);
gboolean (*unprepare) (GstRTSPMedia *media);
+ gboolean (*suspend) (GstRTSPMedia *media);
+ gboolean (*unsuspend) (GstRTSPMedia *media);
gboolean (*convert_range) (GstRTSPMedia *media, GstRTSPTimeRange *range,
GstRTSPRangeUnit unit);
gboolean (*query_position) (GstRTSPMedia *media, gint64 *position);
gboolean (*query_stop) (GstRTSPMedia *media, gint64 *stop);
GstElement * (*create_rtpbin) (GstRTSPMedia *media);
gboolean (*setup_rtpbin) (GstRTSPMedia *media, GstElement *rtpbin);
+ gboolean (*setup_sdp) (GstRTSPMedia *media, GstSDPMessage *sdp, GstSDPInfo *info);
/* signals */
void (*new_stream) (GstRTSPMedia *media, GstRTSPStream * stream);
void (*prepared) (GstRTSPMedia *media);
void (*unprepared) (GstRTSPMedia *media);
+ void (*target_state) (GstRTSPMedia *media, GstState state);
void (*new_state) (GstRTSPMedia *media, GstState state);
+ gboolean (*handle_sdp) (GstRTSPMedia *media, GstSDPMessage *sdp);
+
/*< private >*/
- gpointer _gst_reserved[GST_PADDING_LARGE];
+ gpointer _gst_reserved[GST_PADDING_LARGE-1];
};
GType gst_rtsp_media_get_type (void);
void gst_rtsp_media_set_shared (GstRTSPMedia *media, gboolean shared);
gboolean gst_rtsp_media_is_shared (GstRTSPMedia *media);
+void gst_rtsp_media_set_transport_mode (GstRTSPMedia *media, GstRTSPTransportMode mode);
+GstRTSPTransportMode gst_rtsp_media_get_transport_mode (GstRTSPMedia *media);
+
void gst_rtsp_media_set_reusable (GstRTSPMedia *media, gboolean reusable);
gboolean gst_rtsp_media_is_reusable (GstRTSPMedia *media);
+void gst_rtsp_media_set_profiles (GstRTSPMedia *media, GstRTSPProfile profiles);
+GstRTSPProfile gst_rtsp_media_get_profiles (GstRTSPMedia *media);
+
void gst_rtsp_media_set_protocols (GstRTSPMedia *media, GstRTSPLowerTrans protocols);
GstRTSPLowerTrans gst_rtsp_media_get_protocols (GstRTSPMedia *media);
void gst_rtsp_media_set_buffer_size (GstRTSPMedia *media, guint size);
guint gst_rtsp_media_get_buffer_size (GstRTSPMedia *media);
+void gst_rtsp_media_set_retransmission_time (GstRTSPMedia *media, GstClockTime time);
+GstClockTime gst_rtsp_media_get_retransmission_time (GstRTSPMedia *media);
+
+void gst_rtsp_media_set_latency (GstRTSPMedia *media, guint latency);
+guint gst_rtsp_media_get_latency (GstRTSPMedia *media);
+
void gst_rtsp_media_use_time_provider (GstRTSPMedia *media, gboolean time_provider);
gboolean gst_rtsp_media_is_time_provider (GstRTSPMedia *media);
GstNetTimeProvider * gst_rtsp_media_get_time_provider (GstRTSPMedia *media,
gboolean gst_rtsp_media_suspend (GstRTSPMedia *media);
gboolean gst_rtsp_media_unsuspend (GstRTSPMedia *media);
+gboolean gst_rtsp_media_setup_sdp (GstRTSPMedia * media, GstSDPMessage * sdp,
+ GstSDPInfo * info);
+
+gboolean gst_rtsp_media_handle_sdp (GstRTSPMedia * media, GstSDPMessage * sdp);
+
+
/* creating streams */
void gst_rtsp_media_collect_streams (GstRTSPMedia *media);
GstRTSPStream * gst_rtsp_media_create_stream (GstRTSPMedia *media,