1 /* GStreamer DVD title source
2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 * Copyright (C) <2001> Billy Biggs <vektor@dumbterm.net>.
4 * Copyright (C) <2006> Tim-Philipp Müller <tim centricular net>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __GST_DVD_READ_SRC_H__
23 #define __GST_DVD_READ_SRC_H__
26 #include <gst/base/gstpushsrc.h>
28 #include <dvdread/dvd_reader.h>
29 #include <dvdread/ifo_types.h>
30 #include <dvdread/ifo_read.h>
31 #include <dvdread/nav_read.h>
32 #include <dvdread/nav_print.h>
36 #define GST_TYPE_DVD_READ_SRC (gst_dvd_read_src_get_type())
37 #define GST_DVD_READ_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVD_READ_SRC,GstDvdReadSrc))
38 #define GST_DVD_READ_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVD_READ_SRC,GstDvdReadSrcClass))
39 #define GST_IS_DVD_READ_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DVD_READ_SRC))
40 #define GST_IS_DVD_READ_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DVD_READ_SRC))
42 typedef struct _GstDvdReadSrc GstDvdReadSrc;
43 typedef struct _GstDvdReadSrcClass GstDvdReadSrcClass;
45 struct _GstDvdReadSrc {
57 gint uri_title; /* set via the URI handler or properties, */
58 gint uri_chapter; /* otherwise not touched; these values */
59 gint uri_angle; /* start from 1 */
61 gint title; /* current position while open, set to the */
62 gint chapter; /* URI-set values in ::start(). these */
63 gint angle; /* values start from 0 */
65 gint start_cell, last_cell, cur_cell;
69 ifo_handle_t *vmg_file;
74 ifo_handle_t *vts_file;
75 vts_ptt_srpt_t *vts_ptt_srpt;
76 vts_tmapt_t *vts_tmapt;
77 dvd_file_t *dvd_title;
81 GstClockTime *chapter_starts; /* start time of chapters within title */
83 /* which program chain to watch (based on title and chapter number) */
88 gboolean need_newsegment;
89 GstEvent *title_lang_event_pending;
90 GstEvent *pending_clut_event;
93 struct _GstDvdReadSrcClass {
94 GstPushSrcClass parent_class;
97 GType gst_dvd_read_src_get_type (void);
101 #endif /* __GST_DVD_READ_SRC_H__ */