1 /* GStreamer 2 * Copyright (C) 2008 Jan Schmidt <thaytan@noraisin.net> 3 * 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. 8 * 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. 13 * 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., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef __RESINDVDBIN_H__ 21 #define __RESINDVDBIN_H__ 22 23 #include <gst/gst.h> 24 25 G_BEGIN_DECLS 26 27 /* #defines don't like whitespacey bits */ 28 #define RESIN_TYPE_DVDBIN \ 29 (rsn_dvdbin_get_type()) 30 #define RESINDVDBIN(obj) \ 31 (G_TYPE_CHECK_INSTANCE_CAST((obj),RESIN_TYPE_DVDBIN,RsnDvdBin)) 32 #define RESINDVDBIN_CLASS(klass) \ 33 (G_TYPE_CHECK_CLASS_CAST((klass),RESIN_TYPE_DVDBIN,RsnDvdBinClass)) 34 #define IS_RESINDVDBIN(obj) \ 35 (G_TYPE_CHECK_INSTANCE_TYPE((obj),RESIN_TYPE_DVDBIN)) 36 #define IS_RESINDVDBIN_CLASS(klass) \ 37 (G_TYPE_CHECK_CLASS_TYPE((klass),RESIN_TYPE_DVDBIN)) 38 39 typedef struct _RsnDvdBin RsnDvdBin; 40 typedef struct _RsnDvdBinClass RsnDvdBinClass; 41 42 #define DVD_ELEM_SOURCE 0 43 #define DVD_ELEM_DEMUX 1 44 #define DVD_ELEM_MQUEUE 2 45 #define DVD_ELEM_SPUQ 3 46 #define DVD_ELEM_VIDPARSE 4 47 #define DVD_ELEM_VIDDEC 5 48 #define DVD_ELEM_PARSET 6 49 #define DVD_ELEM_AUDPARSE 7 50 #define DVD_ELEM_AUDDEC 8 51 #define DVD_ELEM_VIDQ 9 52 #define DVD_ELEM_SPU_SELECT 10 53 #define DVD_ELEM_AUD_SELECT 11 54 #define DVD_ELEM_LAST 12 55 56 struct _RsnDvdBin 57 { 58 GstBin element; 59 60 /* Protects pieces list and properties */ 61 GMutex dvd_lock; 62 GMutex preroll_lock; 63 64 gchar *device; 65 gchar *last_uri; 66 GstElement *pieces[DVD_ELEM_LAST]; 67 68 GstPad *video_pad; 69 GstPad *audio_pad; 70 GstPad *subpicture_pad; 71 72 gboolean video_added; 73 gboolean audio_added; 74 gboolean audio_broken; 75 gboolean subpicture_added; 76 77 gboolean did_no_more_pads; 78 79 GList *mq_req_pads; 80 }; 81 82 struct _RsnDvdBinClass 83 { 84 GstBinClass parent_class; 85 }; 86 87 GType rsn_dvdbin_get_type (void); 88 89 GST_ELEMENT_REGISTER_DECLARE (rsndvdbin); 90 91 G_END_DECLS 92 93 #endif /* __RESINDVDBIN_H__ */ 94