#include <gst/rtsp/gstrtspurl.h>
#include "rtsp-media.h"
+#include "rtsp-auth.h"
#ifndef __GST_RTSP_MEDIA_FACTORY_H__
#define __GST_RTSP_MEDIA_FACTORY_H__
typedef struct _GstRTSPMediaFactory GstRTSPMediaFactory;
typedef struct _GstRTSPMediaFactoryClass GstRTSPMediaFactoryClass;
+#define GST_RTSP_MEDIA_FACTORY_GET_LOCK(f) (GST_RTSP_MEDIA_FACTORY_CAST(f)->lock)
+#define GST_RTSP_MEDIA_FACTORY_LOCK(f) (g_mutex_lock(GST_RTSP_MEDIA_FACTORY_GET_LOCK(f)))
+#define GST_RTSP_MEDIA_FACTORY_UNLOCK(f) (g_mutex_unlock(GST_RTSP_MEDIA_FACTORY_GET_LOCK(f)))
+
/**
* GstRTSPMediaFactory:
* @lock: mutex protecting the datastructure.
GMutex *lock;
gchar *launch;
gboolean shared;
+ gboolean eos_shutdown;
+ GstRTSPAuth *auth;
+ guint buffer_size;
GMutex *medias_lock;
GHashTable *medias;
* pay%d to create the streams.
* @configure: configure the media created with @construct. The default
* implementation will configure the 'shared' property of the media.
- * @handle_message: Handle a bus message for @media created from @factory.
+ * @create_pipeline: create a new pipeline or re-use an existing one and
+ * add the #GstRTSPMedia's element created by @construct to the pipeline.
*
* The #GstRTSPMediaFactory class structure.
*/
struct _GstRTSPMediaFactoryClass {
GObjectClass parent_class;
- gchar * (*gen_key) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url);
+ gchar * (*gen_key) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url);
- GstElement * (*get_element) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url);
- GstRTSPMedia * (*construct) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url);
- void (*configure) (GstRTSPMediaFactory *factory, GstRTSPMedia *media);
+ GstElement * (*get_element) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url);
+ GstRTSPMedia * (*construct) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url);
+ void (*configure) (GstRTSPMediaFactory *factory, GstRTSPMedia *media);
+ GstElement * (*create_pipeline) (GstRTSPMediaFactory *factory, GstRTSPMedia *media);
- void (*handle_message) (GstRTSPMediaFactory *factory, GstRTSPMedia *media,
- GstMessage *message);
+ /* signals */
+ void (*media_constructed)(GstRTSPMediaFactory *factory, GstRTSPMedia *media);
};
GType gst_rtsp_media_factory_get_type (void);
gboolean shared);
gboolean gst_rtsp_media_factory_is_shared (GstRTSPMediaFactory *factory);
+void gst_rtsp_media_factory_set_eos_shutdown (GstRTSPMediaFactory *factory,
+ gboolean eos_shutdown);
+gboolean gst_rtsp_media_factory_is_eos_shutdown (GstRTSPMediaFactory *factory);
+
+void gst_rtsp_media_factory_set_auth (GstRTSPMediaFactory *factory, GstRTSPAuth *auth);
+GstRTSPAuth * gst_rtsp_media_factory_get_auth (GstRTSPMediaFactory *factory);
+
+void gst_rtsp_media_factory_set_buffer_size (GstRTSPMediaFactory * factory, guint size);
+guint gst_rtsp_media_factory_get_buffer_size (GstRTSPMediaFactory * factory);
+
+
/* creating the media from the factory and a url */
GstRTSPMedia * gst_rtsp_media_factory_construct (GstRTSPMediaFactory *factory,
const GstRTSPUrl *url);
+void gst_rtsp_media_factory_collect_streams (GstRTSPMediaFactory *factory,
+ const GstRTSPUrl *url,
+ GstRTSPMedia *media);
+
G_END_DECLS
#endif /* __GST_RTSP_MEDIA_FACTORY_H__ */