2 * Copyright (C) 2008 Wim Taymans <wim.taymans at gmail.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 #include <gst/rtsp/gstrtspurl.h>
23 #ifndef __GST_RTSP_MEDIA_H__
24 #define __GST_RTSP_MEDIA_H__
28 #define GST_TYPE_RTSP_MEDIA (gst_rtsp_media_get_type ())
29 #define GST_IS_RTSP_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_RTSP_MEDIA))
30 #define GST_IS_RTSP_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_RTSP_MEDIA))
31 #define GST_RTSP_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTSP_MEDIA, GstRTSPMediaClass))
32 #define GST_RTSP_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_RTSP_MEDIA, GstRTSPMedia))
33 #define GST_RTSP_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_RTSP_MEDIA, GstRTSPMediaClass))
34 #define GST_RTSP_MEDIA_CAST(obj) ((GstRTSPMedia*)(obj))
35 #define GST_RTSP_MEDIA_CLASS_CAST(klass) ((GstRTSPMediaClass*)(klass))
37 typedef struct _GstRTSPMedia GstRTSPMedia;
38 typedef struct _GstRTSPMediaStream GstRTSPMediaStream;
39 typedef struct _GstRTSPMediaClass GstRTSPMediaClass;
44 * @idx: the stream index
45 * @element: the toplevel element
46 * @srcpad: the srcpad of the stream
47 * @payloader: the payloader of the formattt
48 * @caps_sig: the signal id for detecting caps
49 * @caps: the caps of the stream
51 * The definition of a media stream. The streams are identified by @id.
53 struct _GstRTSPMediaStream {
60 GstElement *payloader;
68 * The definition and logic for constructing the pipeline for a media. The media
69 * can contain multiple streams like audio and video.
71 struct _GstRTSPMedia {
81 struct _GstRTSPMediaClass {
82 GObjectClass parent_class;
85 GType gst_rtsp_media_get_type (void);
87 GstRTSPMedia * gst_rtsp_media_new (const gchar *name);
89 gboolean gst_rtsp_media_prepare (GstRTSPMedia *media, GstBin *bin);
91 guint gst_rtsp_media_n_streams (GstRTSPMedia *media);
92 GstRTSPMediaStream * gst_rtsp_media_get_stream (GstRTSPMedia *media, guint idx);
96 #endif /* __GST_RTSP_MEDIA_H__ */