ext/dvdread/dvdreadsrc.*: Add basic support for time-based seeking; set timestamps on outgoing buffers if we have the...
Original commit message from CVS:
* ext/dvdread/dvdreadsrc.c: (gst_dvd_read_src_stop),
(gst_dvd_read_src_goto_chapter),
(gst_dvd_read_src_get_chapter_starts),
(gst_dvd_read_src_goto_title), (gst_dvd_read_src_get_next_cell),
(gst_dvd_read_src_get_time_for_sector),
(gst_dvd_read_src_get_sector_from_time), (gst_dvd_read_src_read),
(gst_dvd_read_src_handle_seek_event), (gst_dvd_read_src_do_seek),
(gst_dvd_read_src_goto_sector):
* ext/dvdread/dvdreadsrc.h:
Add basic support for time-based seeking; set timestamps on
outgoing buffers if we have them; create table with
chapter to time mapping when opening a title; rename
gst_dvd_read_src_get_next_cell_for() to _get_next_cell() and
make it take an explicit pgc argument; fix up some debugging
messages so that title/chapter numbers are printed as starting
from 1 for easier readability.
2006-08-06 19:47:40 +00:00
|
|
|
/* GStreamer DVD title source
|
2001-12-23 12:29:33 +00:00
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
ext/dvdread/dvdreadsrc.*: Add basic support for time-based seeking; set timestamps on outgoing buffers if we have the...
Original commit message from CVS:
* ext/dvdread/dvdreadsrc.c: (gst_dvd_read_src_stop),
(gst_dvd_read_src_goto_chapter),
(gst_dvd_read_src_get_chapter_starts),
(gst_dvd_read_src_goto_title), (gst_dvd_read_src_get_next_cell),
(gst_dvd_read_src_get_time_for_sector),
(gst_dvd_read_src_get_sector_from_time), (gst_dvd_read_src_read),
(gst_dvd_read_src_handle_seek_event), (gst_dvd_read_src_do_seek),
(gst_dvd_read_src_goto_sector):
* ext/dvdread/dvdreadsrc.h:
Add basic support for time-based seeking; set timestamps on
outgoing buffers if we have them; create table with
chapter to time mapping when opening a title; rename
gst_dvd_read_src_get_next_cell_for() to _get_next_cell() and
make it take an explicit pgc argument; fix up some debugging
messages so that title/chapter numbers are printed as starting
from 1 for easier readability.
2006-08-06 19:47:40 +00:00
|
|
|
* Copyright (C) <2001> Billy Biggs <vektor@dumbterm.net>.
|
|
|
|
* Copyright (C) <2006> Tim-Philipp Müller <tim centricular net>
|
2001-12-23 12:29:33 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 20:40:37 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2001-12-23 12:29:33 +00:00
|
|
|
*/
|
|
|
|
|
2006-02-09 17:27:57 +00:00
|
|
|
#ifndef __GST_DVD_READ_SRC_H__
|
|
|
|
#define __GST_DVD_READ_SRC_H__
|
2001-12-23 12:29:33 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2006-02-09 17:27:57 +00:00
|
|
|
#include <gst/base/gstpushsrc.h>
|
|
|
|
|
|
|
|
#include <dvdread/dvd_reader.h>
|
|
|
|
#include <dvdread/ifo_types.h>
|
|
|
|
#include <dvdread/ifo_read.h>
|
|
|
|
#include <dvdread/nav_read.h>
|
|
|
|
#include <dvdread/nav_print.h>
|
2001-12-23 12:29:33 +00:00
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2006-02-09 17:27:57 +00:00
|
|
|
#define GST_TYPE_DVD_READ_SRC (gst_dvd_read_src_get_type())
|
|
|
|
#define GST_DVD_READ_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVD_READ_SRC,GstDvdReadSrc))
|
|
|
|
#define GST_DVD_READ_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVD_READ_SRC,GstDvdReadSrcClass))
|
|
|
|
#define GST_IS_DVD_READ_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DVD_READ_SRC))
|
|
|
|
#define GST_IS_DVD_READ_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DVD_READ_SRC))
|
|
|
|
|
|
|
|
typedef struct _GstDvdReadSrc GstDvdReadSrc;
|
|
|
|
typedef struct _GstDvdReadSrcClass GstDvdReadSrcClass;
|
|
|
|
|
|
|
|
struct _GstDvdReadSrc {
|
|
|
|
GstPushSrc pushsrc;
|
|
|
|
|
|
|
|
/* location */
|
|
|
|
gchar *location;
|
|
|
|
|
2015-05-12 11:52:24 +00:00
|
|
|
gboolean first_seek;
|
2006-02-09 17:27:57 +00:00
|
|
|
gboolean new_seek;
|
|
|
|
gboolean change_cell;
|
|
|
|
|
|
|
|
gboolean new_cell;
|
|
|
|
|
ext/dvdread/dvdreadsrc.*: Let's try to play the title the user set via the URI handler or via properties instead of a...
Original commit message from CVS:
* ext/dvdread/dvdreadsrc.c: (gst_dvd_read_src_init),
(gst_dvd_read_src_class_init), (gst_dvd_read_src_start),
(gst_dvd_read_src_stop), (gst_dvd_read_src_goto_title),
(gst_dvd_read_src_set_property), (gst_dvd_read_src_get_property),
(gst_dvd_read_src_uri_get_uri), (gst_dvd_read_src_uri_set_uri):
* ext/dvdread/dvdreadsrc.h:
Let's try to play the title the user set via the URI handler or
via properties instead of always playing the first title. Also,
Also, count title/chapter/angle number in URI and properties
from 1 rather than 0.
2006-02-14 14:57:18 +00:00
|
|
|
gint uri_title; /* set via the URI handler or properties, */
|
|
|
|
gint uri_chapter; /* otherwise not touched; these values */
|
|
|
|
gint uri_angle; /* start from 1 */
|
|
|
|
|
|
|
|
gint title; /* current position while open, set to the */
|
|
|
|
gint chapter; /* URI-set values in ::start(). these */
|
|
|
|
gint angle; /* values start from 0 */
|
|
|
|
|
2006-02-09 17:27:57 +00:00
|
|
|
gint start_cell, last_cell, cur_cell;
|
|
|
|
gint cur_pack;
|
|
|
|
gint next_cell;
|
|
|
|
dvd_reader_t *dvd;
|
|
|
|
ifo_handle_t *vmg_file;
|
|
|
|
|
|
|
|
/* title stuff */
|
|
|
|
gint ttn;
|
|
|
|
tt_srpt_t *tt_srpt;
|
|
|
|
ifo_handle_t *vts_file;
|
|
|
|
vts_ptt_srpt_t *vts_ptt_srpt;
|
ext/dvdread/dvdreadsrc.*: Add basic support for time-based seeking; set timestamps on outgoing buffers if we have the...
Original commit message from CVS:
* ext/dvdread/dvdreadsrc.c: (gst_dvd_read_src_stop),
(gst_dvd_read_src_goto_chapter),
(gst_dvd_read_src_get_chapter_starts),
(gst_dvd_read_src_goto_title), (gst_dvd_read_src_get_next_cell),
(gst_dvd_read_src_get_time_for_sector),
(gst_dvd_read_src_get_sector_from_time), (gst_dvd_read_src_read),
(gst_dvd_read_src_handle_seek_event), (gst_dvd_read_src_do_seek),
(gst_dvd_read_src_goto_sector):
* ext/dvdread/dvdreadsrc.h:
Add basic support for time-based seeking; set timestamps on
outgoing buffers if we have them; create table with
chapter to time mapping when opening a title; rename
gst_dvd_read_src_get_next_cell_for() to _get_next_cell() and
make it take an explicit pgc argument; fix up some debugging
messages so that title/chapter numbers are printed as starting
from 1 for easier readability.
2006-08-06 19:47:40 +00:00
|
|
|
vts_tmapt_t *vts_tmapt;
|
2006-02-09 17:27:57 +00:00
|
|
|
dvd_file_t *dvd_title;
|
|
|
|
gint num_chapters;
|
2006-06-30 11:26:22 +00:00
|
|
|
gint num_angles;
|
2006-02-09 17:27:57 +00:00
|
|
|
|
ext/dvdread/dvdreadsrc.*: Add basic support for time-based seeking; set timestamps on outgoing buffers if we have the...
Original commit message from CVS:
* ext/dvdread/dvdreadsrc.c: (gst_dvd_read_src_stop),
(gst_dvd_read_src_goto_chapter),
(gst_dvd_read_src_get_chapter_starts),
(gst_dvd_read_src_goto_title), (gst_dvd_read_src_get_next_cell),
(gst_dvd_read_src_get_time_for_sector),
(gst_dvd_read_src_get_sector_from_time), (gst_dvd_read_src_read),
(gst_dvd_read_src_handle_seek_event), (gst_dvd_read_src_do_seek),
(gst_dvd_read_src_goto_sector):
* ext/dvdread/dvdreadsrc.h:
Add basic support for time-based seeking; set timestamps on
outgoing buffers if we have them; create table with
chapter to time mapping when opening a title; rename
gst_dvd_read_src_get_next_cell_for() to _get_next_cell() and
make it take an explicit pgc argument; fix up some debugging
messages so that title/chapter numbers are printed as starting
from 1 for easier readability.
2006-08-06 19:47:40 +00:00
|
|
|
GstClockTime *chapter_starts; /* start time of chapters within title */
|
|
|
|
|
2006-02-09 17:27:57 +00:00
|
|
|
/* which program chain to watch (based on title and chapter number) */
|
|
|
|
pgc_t *cur_pgc;
|
|
|
|
gint pgc_id;
|
|
|
|
gint pgn;
|
|
|
|
|
2006-06-30 11:26:22 +00:00
|
|
|
gboolean need_newsegment;
|
2006-02-09 17:27:57 +00:00
|
|
|
GstEvent *title_lang_event_pending;
|
|
|
|
GstEvent *pending_clut_event;
|
2001-12-23 12:29:33 +00:00
|
|
|
};
|
|
|
|
|
2006-02-09 17:27:57 +00:00
|
|
|
struct _GstDvdReadSrcClass {
|
|
|
|
GstPushSrcClass parent_class;
|
2001-12-23 12:29:33 +00:00
|
|
|
};
|
|
|
|
|
2006-02-09 17:27:57 +00:00
|
|
|
GType gst_dvd_read_src_get_type (void);
|
2021-03-29 10:28:28 +00:00
|
|
|
GST_ELEMENT_REGISTER_DECLARE (dvdreadsrc);
|
2001-12-23 12:29:33 +00:00
|
|
|
|
2002-05-26 17:39:45 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 16:32:53 +00:00
|
|
|
|
2006-02-09 17:27:57 +00:00
|
|
|
#endif /* __GST_DVD_READ_SRC_H__ */
|
|
|
|
|