1 /*****************************************************************************
2 * gstvlcvideosink.h: VLC gstreamer video sink
3 *****************************************************************************
4 * Copyright (C) 2016 VLC authors and VideoLAN
7 * Author: Vikram Fugro <vikram.fugro@gmail.com>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
27 #ifndef VLC_GST_VIDEO_SINK_H
28 #define VLC_GST_VIDEO_SINK_H
31 #include <gst/gstallocator.h>
33 #include <gst/video/video.h>
34 #include <gst/video/gstvideometa.h>
35 #include <gst/base/gstbasesink.h>
37 #include <vlc_codec.h>
39 typedef struct _GstVlcVideoSink GstVlcVideoSink
;
40 typedef struct _GstVlcVideoSinkClass GstVlcVideoSinkClass
;
42 #define GST_TYPE_VLC_VIDEO_SINK \
43 (gst_vlc_video_sink_get_type())
44 #define GST_VLC_VIDEO_SINK(obj) \
45 (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_VLC_VIDEO_SINK, \
47 #define GST_VLC_VIDEO_SINK_CLASS(klass) \
48 (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_VLC_VIDEO_SINK, \
49 GstVlcVideoSinkClass))
50 #define GST_IS_VLC_VIDEO_SINK(obj) \
51 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_VLC_VIDEO_SINK))
52 #define GST_IS_VLC_VIDEO_SINK_CLASS(klass) \
53 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VLC_VIDEO_SINK))
55 struct _GstVlcVideoSink
59 GstAllocator
*p_allocator
;
65 gboolean (*new_caps
) ( GstElement
*p_ele
, GstCaps
*p_caps
,
69 struct _GstVlcVideoSinkClass
71 GstBaseSinkClass parent_class
;
75 gboolean (*new_caps
) ( GstElement
*p_ele
, GstCaps
*p_caps
,
78 void (*new_buffer
) ( GstElement
*p_ele
, GstBuffer
*p_buffer
,
82 GType
gst_vlc_video_sink_get_type (void);
84 #endif /* __GST_VLC_VIDEO_SINK_H__ */