1 /***************************************************************************** 2 * gstvlcvideosink.h: VLC gstreamer video sink 3 ***************************************************************************** 4 * Copyright (C) 2016 VLC authors and VideoLAN 5 * $Id: 6 * 7 * Author: Vikram Fugro <vikram.fugro@gmail.com> 8 * 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. 13 * 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. 18 * 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 *****************************************************************************/ 23 24 /***************************************************************************** 25 * Preamble 26 *****************************************************************************/ 27 #ifndef VLC_GST_VIDEO_SINK_H 28 #define VLC_GST_VIDEO_SINK_H 29 30 #include <gst/gst.h> 31 #include <gst/gstallocator.h> 32 33 #include <gst/video/video.h> 34 #include <gst/video/gstvideometa.h> 35 #include <gst/base/gstbasesink.h> 36 37 #include <vlc_codec.h> 38 39 typedef struct _GstVlcVideoSink GstVlcVideoSink; 40 typedef struct _GstVlcVideoSinkClass GstVlcVideoSinkClass; 41 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, \ 46 GstVlcVideoSink)) 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)) 54 55 struct _GstVlcVideoSink 56 { 57 GstBaseSink parent; 58 59 GstAllocator *p_allocator; 60 GstVideoInfo vinfo; 61 62 decoder_t *p_dec; 63 64 //FIXME: caps_signal 65 gboolean (*new_caps) ( GstElement *p_ele, GstCaps *p_caps, 66 gpointer p_data ); 67 }; 68 69 struct _GstVlcVideoSinkClass 70 { 71 GstBaseSinkClass parent_class; 72 73 //FIXME: caps_signal 74 #if 0 75 gboolean (*new_caps) ( GstElement *p_ele, GstCaps *p_caps, 76 gpointer p_data ); 77 #endif 78 void (*new_buffer) ( GstElement *p_ele, GstBuffer *p_buffer, 79 gpointer p_data ); 80 }; 81 82 GType gst_vlc_video_sink_get_type (void); 83 84 #endif /* __GST_VLC_VIDEO_SINK_H__ */ 85