2008-10-09 12:29:12 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2008 Wim Taymans <wim.taymans at gmail.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-04 00:14:25 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2008-10-09 12:29:12 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2015-05-20 14:05:47 +00:00
|
|
|
#include <gst/rtsp/rtsp.h>
|
2013-04-09 20:35:28 +00:00
|
|
|
#include <gst/net/gstnet.h>
|
2008-10-09 12:29:12 +00:00
|
|
|
|
|
|
|
#ifndef __GST_RTSP_MEDIA_H__
|
|
|
|
#define __GST_RTSP_MEDIA_H__
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
#include "rtsp-server-prelude.h"
|
|
|
|
|
2008-10-09 12:29:12 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2009-01-22 16:58:19 +00:00
|
|
|
/* types for the media */
|
|
|
|
#define GST_TYPE_RTSP_MEDIA (gst_rtsp_media_get_type ())
|
|
|
|
#define GST_IS_RTSP_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_RTSP_MEDIA))
|
|
|
|
#define GST_IS_RTSP_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_RTSP_MEDIA))
|
|
|
|
#define GST_RTSP_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTSP_MEDIA, GstRTSPMediaClass))
|
|
|
|
#define GST_RTSP_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_RTSP_MEDIA, GstRTSPMedia))
|
|
|
|
#define GST_RTSP_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_RTSP_MEDIA, GstRTSPMediaClass))
|
|
|
|
#define GST_RTSP_MEDIA_CAST(obj) ((GstRTSPMedia*)(obj))
|
|
|
|
#define GST_RTSP_MEDIA_CLASS_CAST(klass) ((GstRTSPMediaClass*)(klass))
|
2008-10-09 12:29:12 +00:00
|
|
|
|
2009-01-22 16:58:19 +00:00
|
|
|
typedef struct _GstRTSPMedia GstRTSPMedia;
|
|
|
|
typedef struct _GstRTSPMediaClass GstRTSPMediaClass;
|
2012-11-29 10:11:05 +00:00
|
|
|
typedef struct _GstRTSPMediaPrivate GstRTSPMediaPrivate;
|
2008-10-09 12:29:12 +00:00
|
|
|
|
2010-03-05 16:51:26 +00:00
|
|
|
/**
|
|
|
|
* GstRTSPMediaStatus:
|
|
|
|
* @GST_RTSP_MEDIA_STATUS_UNPREPARED: media pipeline not prerolled
|
2012-10-25 19:29:58 +00:00
|
|
|
* @GST_RTSP_MEDIA_STATUS_UNPREPARING: media pipeline is busy doing a clean
|
|
|
|
* shutdown.
|
2010-03-05 16:51:26 +00:00
|
|
|
* @GST_RTSP_MEDIA_STATUS_PREPARING: media pipeline is prerolling
|
|
|
|
* @GST_RTSP_MEDIA_STATUS_PREPARED: media pipeline is prerolled
|
2013-11-28 13:10:19 +00:00
|
|
|
* @GST_RTSP_MEDIA_STATUS_SUSPENDED: media is suspended
|
2010-03-05 16:51:26 +00:00
|
|
|
* @GST_RTSP_MEDIA_STATUS_ERROR: media pipeline is in error
|
|
|
|
*
|
|
|
|
* The state of the media pipeline.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
2012-10-25 19:29:58 +00:00
|
|
|
GST_RTSP_MEDIA_STATUS_UNPREPARED = 0,
|
|
|
|
GST_RTSP_MEDIA_STATUS_UNPREPARING = 1,
|
|
|
|
GST_RTSP_MEDIA_STATUS_PREPARING = 2,
|
|
|
|
GST_RTSP_MEDIA_STATUS_PREPARED = 3,
|
2013-11-28 13:10:19 +00:00
|
|
|
GST_RTSP_MEDIA_STATUS_SUSPENDED = 4,
|
|
|
|
GST_RTSP_MEDIA_STATUS_ERROR = 5
|
2010-03-05 16:51:26 +00:00
|
|
|
} GstRTSPMediaStatus;
|
|
|
|
|
2013-11-28 13:10:19 +00:00
|
|
|
/**
|
|
|
|
* GstRTSPSuspendMode:
|
|
|
|
* @GST_RTSP_SUSPEND_MODE_NONE: Media is not suspended
|
|
|
|
* @GST_RTSP_SUSPEND_MODE_PAUSE: Media is PAUSED in suspend
|
|
|
|
* @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
|
2014-07-16 11:39:42 +00:00
|
|
|
* after creating the SDP and when the client performs a PAUSED request.
|
2013-11-28 13:10:19 +00:00
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_RTSP_SUSPEND_MODE_NONE = 0,
|
|
|
|
GST_RTSP_SUSPEND_MODE_PAUSE = 1,
|
|
|
|
GST_RTSP_SUSPEND_MODE_RESET = 2
|
|
|
|
} GstRTSPSuspendMode;
|
|
|
|
|
2015-01-28 17:54:01 +00:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
|
2015-12-30 16:39:05 +00:00
|
|
|
/**
|
|
|
|
* GstRTSPPublishClockMode:
|
|
|
|
* @GST_RTSP_PUBLISH_CLOCK_MODE_NONE: Publish nothing
|
|
|
|
* @GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK: Publish the clock but not the offset
|
|
|
|
* @GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET: Publish the clock and offset
|
|
|
|
*
|
|
|
|
* Whether the clock and possibly RTP/clock offset should be published according to RFC7273.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_RTSP_PUBLISH_CLOCK_MODE_NONE,
|
|
|
|
GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK,
|
|
|
|
GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET
|
|
|
|
} GstRTSPPublishClockMode;
|
|
|
|
|
2015-01-28 17:54:01 +00:00
|
|
|
#define GST_TYPE_RTSP_TRANSPORT_MODE (gst_rtsp_transport_mode_get_type())
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-01-28 17:54:01 +00:00
|
|
|
GType gst_rtsp_transport_mode_get_type (void);
|
|
|
|
|
2013-11-28 13:10:19 +00:00
|
|
|
#define GST_TYPE_RTSP_SUSPEND_MODE (gst_rtsp_suspend_mode_get_type())
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-11-28 13:10:19 +00:00
|
|
|
GType gst_rtsp_suspend_mode_get_type (void);
|
|
|
|
|
2015-12-30 16:39:05 +00:00
|
|
|
#define GST_TYPE_RTSP_PUBLISH_CLOCK_MODE (gst_rtsp_publish_clock_mode_get_type())
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-12-30 16:39:05 +00:00
|
|
|
GType gst_rtsp_publish_clock_mode_get_type (void);
|
|
|
|
|
2013-11-28 13:10:19 +00:00
|
|
|
#include "rtsp-stream.h"
|
|
|
|
#include "rtsp-thread-pool.h"
|
|
|
|
#include "rtsp-permissions.h"
|
|
|
|
#include "rtsp-address-pool.h"
|
2013-12-18 15:37:27 +00:00
|
|
|
#include "rtsp-sdp.h"
|
2013-11-28 13:10:19 +00:00
|
|
|
|
2009-01-20 18:43:47 +00:00
|
|
|
/**
|
2009-01-22 16:58:19 +00:00
|
|
|
* GstRTSPMedia:
|
2009-01-20 18:43:47 +00:00
|
|
|
*
|
2009-01-22 17:35:17 +00:00
|
|
|
* A class that contains the GStreamer element along with a list of
|
2012-10-25 19:29:58 +00:00
|
|
|
* #GstRTSPStream objects that can produce data.
|
2009-01-22 17:35:17 +00:00
|
|
|
*
|
|
|
|
* This object is usually created from a #GstRTSPMediaFactory.
|
2009-01-20 18:43:47 +00:00
|
|
|
*/
|
2009-01-22 16:58:19 +00:00
|
|
|
struct _GstRTSPMedia {
|
2010-03-05 16:51:26 +00:00
|
|
|
GObject parent;
|
2008-10-09 12:29:12 +00:00
|
|
|
|
2013-07-11 10:18:26 +00:00
|
|
|
/*< private >*/
|
2012-11-29 10:11:05 +00:00
|
|
|
GstRTSPMediaPrivate *priv;
|
2013-12-12 00:36:07 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
2008-10-09 12:29:12 +00:00
|
|
|
};
|
|
|
|
|
2009-02-13 15:39:36 +00:00
|
|
|
/**
|
|
|
|
* GstRTSPMediaClass:
|
|
|
|
* @handle_message: handle a message
|
2014-04-09 14:44:21 +00:00
|
|
|
* @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).
|
2009-06-12 16:05:30 +00:00
|
|
|
* @unprepare: the default implementation sets the pipeline's state
|
2012-10-26 10:33:21 +00:00
|
|
|
* to GST_STATE_NULL and removes all elements.
|
2014-05-14 07:31:31 +00:00
|
|
|
* @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.
|
2013-07-11 10:24:33 +00:00
|
|
|
* @convert_range: convert a range to the given unit
|
2014-07-16 11:39:42 +00:00
|
|
|
* @query_position: query the current position in the pipeline
|
2013-07-11 10:24:33 +00:00
|
|
|
* @query_stop: query when playback will stop
|
2009-02-13 15:39:36 +00:00
|
|
|
*
|
|
|
|
* The RTSP media class
|
|
|
|
*/
|
2009-01-22 16:58:19 +00:00
|
|
|
struct _GstRTSPMediaClass {
|
2008-10-09 12:29:12 +00:00
|
|
|
GObjectClass parent_class;
|
2009-02-13 15:39:36 +00:00
|
|
|
|
2009-04-03 20:45:57 +00:00
|
|
|
/* vmethods */
|
2012-10-25 19:29:58 +00:00
|
|
|
gboolean (*handle_message) (GstRTSPMedia *media, GstMessage *message);
|
2014-04-09 14:44:21 +00:00
|
|
|
gboolean (*prepare) (GstRTSPMedia *media, GstRTSPThread *thread);
|
2012-10-25 19:29:58 +00:00
|
|
|
gboolean (*unprepare) (GstRTSPMedia *media);
|
2014-05-14 07:31:31 +00:00
|
|
|
gboolean (*suspend) (GstRTSPMedia *media);
|
|
|
|
gboolean (*unsuspend) (GstRTSPMedia *media);
|
2013-06-05 13:49:45 +00:00
|
|
|
gboolean (*convert_range) (GstRTSPMedia *media, GstRTSPTimeRange *range,
|
|
|
|
GstRTSPRangeUnit unit);
|
2013-06-10 21:32:40 +00:00
|
|
|
gboolean (*query_position) (GstRTSPMedia *media, gint64 *position);
|
|
|
|
gboolean (*query_stop) (GstRTSPMedia *media, gint64 *stop);
|
2013-12-03 19:54:42 +00:00
|
|
|
GstElement * (*create_rtpbin) (GstRTSPMedia *media);
|
2013-06-11 23:10:01 +00:00
|
|
|
gboolean (*setup_rtpbin) (GstRTSPMedia *media, GstElement *rtpbin);
|
2013-12-18 15:37:27 +00:00
|
|
|
gboolean (*setup_sdp) (GstRTSPMedia *media, GstSDPMessage *sdp, GstSDPInfo *info);
|
2009-04-03 20:45:57 +00:00
|
|
|
|
|
|
|
/* signals */
|
2013-04-22 15:34:37 +00:00
|
|
|
void (*new_stream) (GstRTSPMedia *media, GstRTSPStream * stream);
|
|
|
|
void (*removed_stream) (GstRTSPMedia *media, GstRTSPStream * stream);
|
2012-11-15 14:41:42 +00:00
|
|
|
|
2013-04-22 15:34:37 +00:00
|
|
|
void (*prepared) (GstRTSPMedia *media);
|
|
|
|
void (*unprepared) (GstRTSPMedia *media);
|
2010-12-28 17:34:10 +00:00
|
|
|
|
2014-01-21 11:01:25 +00:00
|
|
|
void (*target_state) (GstRTSPMedia *media, GstState state);
|
2013-04-22 15:34:37 +00:00
|
|
|
void (*new_state) (GstRTSPMedia *media, GstState state);
|
2013-12-12 00:36:07 +00:00
|
|
|
|
2015-01-09 11:40:47 +00:00
|
|
|
gboolean (*handle_sdp) (GstRTSPMedia *media, GstSDPMessage *sdp);
|
|
|
|
|
2013-12-12 00:36:07 +00:00
|
|
|
/*< private >*/
|
2015-01-09 11:40:47 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING_LARGE-1];
|
2008-10-09 12:29:12 +00:00
|
|
|
};
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2009-01-22 16:58:19 +00:00
|
|
|
GType gst_rtsp_media_get_type (void);
|
2008-10-09 12:29:12 +00:00
|
|
|
|
2009-01-29 12:31:27 +00:00
|
|
|
/* creating the media */
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2012-11-29 10:11:05 +00:00
|
|
|
GstRTSPMedia * gst_rtsp_media_new (GstElement *element);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-06-24 21:56:57 +00:00
|
|
|
GstElement * gst_rtsp_media_get_element (GstRTSPMedia *media);
|
2012-11-29 10:11:05 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2012-11-29 10:11:05 +00:00
|
|
|
void gst_rtsp_media_take_pipeline (GstRTSPMedia *media, GstPipeline *pipeline);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2012-11-29 10:11:05 +00:00
|
|
|
GstRTSPMediaStatus gst_rtsp_media_get_status (GstRTSPMedia *media);
|
2009-01-29 12:31:27 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-07-09 12:33:43 +00:00
|
|
|
void gst_rtsp_media_set_permissions (GstRTSPMedia *media,
|
|
|
|
GstRTSPPermissions *permissions);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-07-09 12:33:43 +00:00
|
|
|
GstRTSPPermissions * gst_rtsp_media_get_permissions (GstRTSPMedia *media);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2009-01-29 16:20:27 +00:00
|
|
|
void gst_rtsp_media_set_shared (GstRTSPMedia *media, gboolean shared);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2009-01-29 16:20:27 +00:00
|
|
|
gboolean gst_rtsp_media_is_shared (GstRTSPMedia *media);
|
2008-10-09 12:29:12 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-12-09 16:24:24 +00:00
|
|
|
void gst_rtsp_media_set_stop_on_disconnect (GstRTSPMedia *media, gboolean stop_on_disconnect);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-12-09 16:24:24 +00:00
|
|
|
gboolean gst_rtsp_media_is_stop_on_disconnect (GstRTSPMedia *media);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-01-28 17:54:01 +00:00
|
|
|
void gst_rtsp_media_set_transport_mode (GstRTSPMedia *media, GstRTSPTransportMode mode);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-01-28 17:54:01 +00:00
|
|
|
GstRTSPTransportMode gst_rtsp_media_get_transport_mode (GstRTSPMedia *media);
|
2015-01-09 11:40:47 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2009-04-03 20:22:30 +00:00
|
|
|
void gst_rtsp_media_set_reusable (GstRTSPMedia *media, gboolean reusable);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2009-04-03 20:22:30 +00:00
|
|
|
gboolean gst_rtsp_media_is_reusable (GstRTSPMedia *media);
|
2010-03-19 14:15:29 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2014-01-07 11:21:09 +00:00
|
|
|
void gst_rtsp_media_set_profiles (GstRTSPMedia *media, GstRTSPProfile profiles);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2014-01-07 11:21:09 +00:00
|
|
|
GstRTSPProfile gst_rtsp_media_get_profiles (GstRTSPMedia *media);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2010-03-19 14:15:29 +00:00
|
|
|
void gst_rtsp_media_set_protocols (GstRTSPMedia *media, GstRTSPLowerTrans protocols);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2010-03-19 14:15:29 +00:00
|
|
|
GstRTSPLowerTrans gst_rtsp_media_get_protocols (GstRTSPMedia *media);
|
2010-08-20 16:17:08 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2010-08-20 16:17:08 +00:00
|
|
|
void gst_rtsp_media_set_eos_shutdown (GstRTSPMedia *media, gboolean eos_shutdown);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2010-08-20 16:17:08 +00:00
|
|
|
gboolean gst_rtsp_media_is_eos_shutdown (GstRTSPMedia *media);
|
2009-04-03 20:22:30 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2012-11-14 16:23:59 +00:00
|
|
|
void gst_rtsp_media_set_address_pool (GstRTSPMedia *media, GstRTSPAddressPool *pool);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2012-11-14 16:23:59 +00:00
|
|
|
GstRTSPAddressPool * gst_rtsp_media_get_address_pool (GstRTSPMedia *media);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2016-03-02 17:42:13 +00:00
|
|
|
void gst_rtsp_media_set_multicast_iface (GstRTSPMedia *media, const gchar *multicast_iface);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2016-03-02 17:42:13 +00:00
|
|
|
gchar * gst_rtsp_media_get_multicast_iface (GstRTSPMedia *media);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2011-01-31 16:28:22 +00:00
|
|
|
void gst_rtsp_media_set_buffer_size (GstRTSPMedia *media, guint size);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2011-01-31 16:28:22 +00:00
|
|
|
guint gst_rtsp_media_get_buffer_size (GstRTSPMedia *media);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2014-11-26 14:12:36 +00:00
|
|
|
void gst_rtsp_media_set_retransmission_time (GstRTSPMedia *media, GstClockTime time);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2014-11-26 14:12:36 +00:00
|
|
|
GstClockTime gst_rtsp_media_get_retransmission_time (GstRTSPMedia *media);
|
|
|
|
|
2018-03-29 20:49:26 +00:00
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
void gst_rtsp_media_set_do_retransmission (GstRTSPMedia * media,
|
|
|
|
gboolean do_retransmission);
|
|
|
|
|
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
gboolean gst_rtsp_media_get_do_retransmission (GstRTSPMedia * media);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-01-19 12:20:39 +00:00
|
|
|
void gst_rtsp_media_set_latency (GstRTSPMedia *media, guint latency);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-01-19 12:20:39 +00:00
|
|
|
guint gst_rtsp_media_get_latency (GstRTSPMedia *media);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-04-09 20:35:28 +00:00
|
|
|
void gst_rtsp_media_use_time_provider (GstRTSPMedia *media, gboolean time_provider);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-04-09 20:35:28 +00:00
|
|
|
gboolean gst_rtsp_media_is_time_provider (GstRTSPMedia *media);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-04-09 20:35:28 +00:00
|
|
|
GstNetTimeProvider * gst_rtsp_media_get_time_provider (GstRTSPMedia *media,
|
|
|
|
const gchar *address, guint16 port);
|
2011-08-16 11:25:16 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-12-30 14:31:13 +00:00
|
|
|
void gst_rtsp_media_set_clock (GstRTSPMedia *media, GstClock * clock);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-12-30 16:39:05 +00:00
|
|
|
void gst_rtsp_media_set_publish_clock_mode (GstRTSPMedia * media, GstRTSPPublishClockMode mode);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-12-30 16:39:05 +00:00
|
|
|
GstRTSPPublishClockMode gst_rtsp_media_get_publish_clock_mode (GstRTSPMedia * media);
|
|
|
|
|
2018-07-24 07:35:46 +00:00
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
gboolean gst_rtsp_media_set_max_mcast_ttl (GstRTSPMedia *media, guint ttl);
|
|
|
|
|
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
guint gst_rtsp_media_get_max_mcast_ttl (GstRTSPMedia *media);
|
|
|
|
|
2018-09-06 14:17:33 +00:00
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
void gst_rtsp_media_set_bind_mcast_address (GstRTSPMedia *media, gboolean bind_mcast_addr);
|
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
gboolean gst_rtsp_media_is_bind_mcast_address (GstRTSPMedia *media);
|
|
|
|
|
2015-03-03 13:42:07 +00:00
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
void gst_rtsp_media_set_dscp_qos (GstRTSPMedia * media, gint dscp_qos);
|
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
gint gst_rtsp_media_get_dscp_qos (GstRTSPMedia * media);
|
|
|
|
|
2009-01-29 12:31:27 +00:00
|
|
|
/* prepare the media for playback */
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-07-10 15:08:14 +00:00
|
|
|
gboolean gst_rtsp_media_prepare (GstRTSPMedia *media, GstRTSPThread *thread);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2009-04-03 20:22:30 +00:00
|
|
|
gboolean gst_rtsp_media_unprepare (GstRTSPMedia *media);
|
2009-01-29 12:31:27 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-11-28 13:10:19 +00:00
|
|
|
void gst_rtsp_media_set_suspend_mode (GstRTSPMedia *media, GstRTSPSuspendMode mode);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-11-28 13:10:19 +00:00
|
|
|
GstRTSPSuspendMode gst_rtsp_media_get_suspend_mode (GstRTSPMedia *media);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-11-28 13:10:19 +00:00
|
|
|
gboolean gst_rtsp_media_suspend (GstRTSPMedia *media);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-11-28 13:10:19 +00:00
|
|
|
gboolean gst_rtsp_media_unsuspend (GstRTSPMedia *media);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-12-18 15:37:27 +00:00
|
|
|
gboolean gst_rtsp_media_setup_sdp (GstRTSPMedia * media, GstSDPMessage * sdp,
|
|
|
|
GstSDPInfo * info);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2015-01-09 11:40:47 +00:00
|
|
|
gboolean gst_rtsp_media_handle_sdp (GstRTSPMedia * media, GstSDPMessage * sdp);
|
|
|
|
|
2012-10-25 19:29:58 +00:00
|
|
|
/* creating streams */
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2012-10-25 19:29:58 +00:00
|
|
|
void gst_rtsp_media_collect_streams (GstRTSPMedia *media);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2012-10-25 19:29:58 +00:00
|
|
|
GstRTSPStream * gst_rtsp_media_create_stream (GstRTSPMedia *media,
|
|
|
|
GstElement *payloader,
|
2015-08-31 12:47:45 +00:00
|
|
|
GstPad *pad);
|
2012-10-25 19:29:58 +00:00
|
|
|
|
2009-01-29 16:20:27 +00:00
|
|
|
/* dealing with the media */
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2019-10-16 13:20:54 +00:00
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
void gst_rtsp_media_lock (GstRTSPMedia *media);
|
|
|
|
|
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
void gst_rtsp_media_unlock (GstRTSPMedia *media);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-04-09 20:35:28 +00:00
|
|
|
GstClock * gst_rtsp_media_get_clock (GstRTSPMedia *media);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-04-12 10:34:38 +00:00
|
|
|
GstClockTime gst_rtsp_media_get_base_time (GstRTSPMedia *media);
|
2013-04-09 20:35:28 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2009-01-29 16:20:27 +00:00
|
|
|
guint gst_rtsp_media_n_streams (GstRTSPMedia *media);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2012-10-25 19:29:58 +00:00
|
|
|
GstRTSPStream * gst_rtsp_media_get_stream (GstRTSPMedia *media, guint idx);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-07-03 13:14:39 +00:00
|
|
|
GstRTSPStream * gst_rtsp_media_find_stream (GstRTSPMedia *media, const gchar * control);
|
2009-01-29 16:20:27 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2009-03-12 19:32:14 +00:00
|
|
|
gboolean gst_rtsp_media_seek (GstRTSPMedia *media, GstRTSPTimeRange *range);
|
2017-11-26 12:47:08 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2017-04-22 12:26:07 +00:00
|
|
|
gboolean gst_rtsp_media_seek_full (GstRTSPMedia *media,
|
|
|
|
GstRTSPTimeRange *range,
|
|
|
|
GstSeekFlags flags);
|
|
|
|
|
2018-09-27 17:09:01 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2019-04-04 22:48:07 +00:00
|
|
|
gboolean gst_rtsp_media_seek_trickmode (GstRTSPMedia *media,
|
|
|
|
GstRTSPTimeRange *range,
|
|
|
|
GstSeekFlags flags,
|
|
|
|
gdouble rate,
|
|
|
|
GstClockTime trickmode_interval);
|
2018-09-27 17:09:01 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2017-04-22 12:26:07 +00:00
|
|
|
GstClockTimeDiff gst_rtsp_media_seekable (GstRTSPMedia *media);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-02-22 19:17:29 +00:00
|
|
|
gchar * gst_rtsp_media_get_range_string (GstRTSPMedia *media,
|
|
|
|
gboolean play,
|
|
|
|
GstRTSPRangeUnit unit);
|
2009-03-12 19:32:14 +00:00
|
|
|
|
2018-09-27 17:09:01 +00:00
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
gboolean gst_rtsp_media_get_rates (GstRTSPMedia * media,
|
|
|
|
gdouble * rate,
|
|
|
|
gdouble * applied_rate);
|
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2012-10-25 19:29:58 +00:00
|
|
|
gboolean gst_rtsp_media_set_state (GstRTSPMedia *media, GstState state,
|
|
|
|
GPtrArray *transports);
|
2017-05-18 09:35:18 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2013-07-02 22:55:28 +00:00
|
|
|
void gst_rtsp_media_set_pipeline_state (GstRTSPMedia * media,
|
|
|
|
GstState state);
|
2009-06-13 12:38:20 +00:00
|
|
|
|
2018-03-13 13:30:41 +00:00
|
|
|
GST_RTSP_SERVER_API
|
2017-10-17 08:44:33 +00:00
|
|
|
gboolean gst_rtsp_media_complete_pipeline (GstRTSPMedia * media, GPtrArray * transports);
|
|
|
|
|
2018-10-12 06:53:04 +00:00
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
gboolean gst_rtsp_media_is_receive_only (GstRTSPMedia * media);
|
|
|
|
|
2019-08-21 12:57:25 +00:00
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
gboolean gst_rtsp_media_has_completed_sender (GstRTSPMedia * media);
|
|
|
|
|
2019-04-04 22:48:07 +00:00
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
void gst_rtsp_media_set_rate_control (GstRTSPMedia * media, gboolean enabled);
|
|
|
|
|
|
|
|
GST_RTSP_SERVER_API
|
|
|
|
gboolean gst_rtsp_media_get_rate_control (GstRTSPMedia * media);
|
|
|
|
|
2015-11-10 19:17:18 +00:00
|
|
|
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
|
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstRTSPMedia, gst_object_unref)
|
|
|
|
#endif
|
|
|
|
|
2008-10-09 12:29:12 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_RTSP_MEDIA_H__ */
|