1 /* GStreamer
2 *
3 * Copyright (C) 2014-2015 Sebastian Dröge <sebastian@centricular.com>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20
21 #ifdef HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24
25 #include "gstplayer-video-renderer.h"
26 #include "gstplayer-video-renderer-private.h"
27
28 G_DEFINE_INTERFACE (GstPlayerVideoRenderer, gst_player_video_renderer,
29 G_TYPE_OBJECT);
30
31 static void
gst_player_video_renderer_default_init(G_GNUC_UNUSED GstPlayerVideoRendererInterface * iface)32 gst_player_video_renderer_default_init (G_GNUC_UNUSED
33 GstPlayerVideoRendererInterface * iface)
34 {
35
36 }
37
38 GstElement *
gst_player_video_renderer_create_video_sink(GstPlayerVideoRenderer * self,GstPlayer * player)39 gst_player_video_renderer_create_video_sink (GstPlayerVideoRenderer * self,
40 GstPlayer * player)
41 {
42 GstPlayerVideoRendererInterface *iface;
43
44 g_return_val_if_fail (GST_IS_PLAYER_VIDEO_RENDERER (self), NULL);
45 iface = GST_PLAYER_VIDEO_RENDERER_GET_INTERFACE (self);
46 g_return_val_if_fail (iface->create_video_sink != NULL, NULL);
47
48 return iface->create_video_sink (self, player);
49 }
50