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.
20 #include "rtsp-media-factory.h"
22 G_DEFINE_TYPE (GstRTSPMediaFactory, gst_rtsp_media_factory, G_TYPE_OBJECT);
24 static void gst_rtsp_media_factory_finalize (GObject * obj);
26 static GstRTSPMedia * create_media (GstRTSPMediaFactory *factory, const gchar *url);
29 gst_rtsp_media_factory_class_init (GstRTSPMediaFactoryClass * klass)
31 GObjectClass *gobject_class;
33 gobject_class = G_OBJECT_CLASS (klass);
35 gobject_class->finalize = gst_rtsp_media_factory_finalize;
37 klass->create_media = create_media;
41 gst_rtsp_media_factory_init (GstRTSPMediaFactory * factory)
46 gst_rtsp_media_factory_finalize (GObject * obj)
48 G_OBJECT_CLASS (gst_rtsp_media_factory_parent_class)->finalize (obj);
52 gst_rtsp_media_factory_new (void)
54 GstRTSPMediaFactory *result;
56 result = g_object_new (GST_TYPE_RTSP_MEDIA_FACTORY, NULL);
62 create_media (GstRTSPMediaFactory *factory, const gchar *url)
66 result = gst_rtsp_media_new (url);
72 gst_rtsp_media_factory_create (GstRTSPMediaFactory *factory, const gchar *url)
74 GstRTSPMedia *result = NULL;
75 GstRTSPMediaFactoryClass *klass;
77 klass = GST_RTSP_MEDIA_FACTORY_GET_CLASS (factory);
79 if (klass->create_media)
80 result = klass->create_media (factory, url);
86 gst_rtsp_media_factory_add (GstRTSPMediaFactory *factory, const gchar *path,
89 g_warning ("gst_rtsp_media_factory_add: not implemented");
92 gst_rtsp_media_factory_remove (GstRTSPMediaFactory *factory, const gchar *path,
95 g_warning ("gst_rtsp_media_factory_remove: not implemented");