2005-08-16 14:04:39 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
*
|
|
|
|
* 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-04 00:07:18 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2005-08-16 14:04:39 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_DVDEMUX_H__
|
|
|
|
#define __GST_DVDEMUX_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <libdv/dv.h>
|
|
|
|
#include <gst/base/gstadapter.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2020-03-13 17:39:38 +00:00
|
|
|
#define GST_TYPE_DVDEMUX (gst_dvdemux_get_type())
|
|
|
|
G_DECLARE_FINAL_TYPE (GstDVDemux, gst_dvdemux, GST, DVDEMUX, GstElement)
|
2005-08-16 14:04:39 +00:00
|
|
|
|
docs/plugins/: Added dvdec and dvdemux to docs.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
Added dvdec and dvdemux to docs.
* ext/dv/gstdvdec.c: (gst_dvdec_base_init), (gst_dvdec_chain):
Added docs.
Check frame sizes so we don't crash when don't have enough
data.
Send nice error messages on error.
* ext/dv/gstdvdemux.c: (gst_dvdemux_base_init),
(gst_dvdemux_class_init), (gst_dvdemux_init),
(gst_dvdemux_finalize), (gst_dvdemux_reset),
(gst_dvdemux_src_convert), (gst_dvdemux_sink_convert),
(gst_dvdemux_src_query), (gst_dvdemux_sink_query),
(gst_dvdemux_push_event), (gst_dvdemux_handle_sink_event),
(gst_dvdemux_convert_src_pair), (gst_dvdemux_convert_sink_pair),
(gst_dvdemux_convert_src_to_sink), (gst_dvdemux_handle_push_seek),
(gst_dvdemux_do_seek), (gst_dvdemux_handle_pull_seek),
(gst_dvdemux_handle_src_event), (gst_dvdemux_demux_audio),
(gst_dvdemux_demux_video), (gst_dvdemux_demux_frame),
(gst_dvdemux_flush), (gst_dvdemux_chain), (gst_dvdemux_loop),
(gst_dvdemux_sink_activate_push), (gst_dvdemux_sink_activate_pull),
(gst_dvdemux_sink_activate), (gst_dvdemux_change_state):
* ext/dv/gstdvdemux.h:
Added docs.
Implement pull mode.
Fix memleaks.
Reduce memcpy for the video demuxing.
2006-02-28 10:22:11 +00:00
|
|
|
typedef gboolean (*GstDVDemuxSeekHandler) (GstDVDemux *demux, GstPad * pad, GstEvent * event);
|
|
|
|
|
2005-08-16 14:04:39 +00:00
|
|
|
struct _GstDVDemux {
|
2005-12-06 19:44:58 +00:00
|
|
|
GstElement element;
|
2005-08-16 14:04:39 +00:00
|
|
|
|
2005-12-06 19:44:58 +00:00
|
|
|
GstPad *sinkpad;
|
2005-08-16 14:04:39 +00:00
|
|
|
GstPad *videosrcpad;
|
|
|
|
GstPad *audiosrcpad;
|
|
|
|
|
2013-07-22 13:21:49 +00:00
|
|
|
gboolean have_group_id;
|
|
|
|
guint group_id;
|
|
|
|
|
2005-12-06 19:44:58 +00:00
|
|
|
dv_decoder_t *decoder;
|
2005-08-16 14:04:39 +00:00
|
|
|
|
|
|
|
GstAdapter *adapter;
|
2005-12-06 19:44:58 +00:00
|
|
|
gint frame_len;
|
2005-08-16 14:04:39 +00:00
|
|
|
|
|
|
|
/* video params */
|
2005-11-22 17:09:36 +00:00
|
|
|
gint framerate_numerator;
|
|
|
|
gint framerate_denominator;
|
2005-12-06 19:44:58 +00:00
|
|
|
gint height;
|
|
|
|
gboolean wide;
|
2005-08-16 14:04:39 +00:00
|
|
|
/* audio params */
|
2005-12-06 19:44:58 +00:00
|
|
|
gint frequency;
|
|
|
|
gint channels;
|
2005-08-16 14:04:39 +00:00
|
|
|
|
2016-06-02 10:53:44 +00:00
|
|
|
gboolean discont;
|
docs/plugins/: Added dvdec and dvdemux to docs.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
Added dvdec and dvdemux to docs.
* ext/dv/gstdvdec.c: (gst_dvdec_base_init), (gst_dvdec_chain):
Added docs.
Check frame sizes so we don't crash when don't have enough
data.
Send nice error messages on error.
* ext/dv/gstdvdemux.c: (gst_dvdemux_base_init),
(gst_dvdemux_class_init), (gst_dvdemux_init),
(gst_dvdemux_finalize), (gst_dvdemux_reset),
(gst_dvdemux_src_convert), (gst_dvdemux_sink_convert),
(gst_dvdemux_src_query), (gst_dvdemux_sink_query),
(gst_dvdemux_push_event), (gst_dvdemux_handle_sink_event),
(gst_dvdemux_convert_src_pair), (gst_dvdemux_convert_sink_pair),
(gst_dvdemux_convert_src_to_sink), (gst_dvdemux_handle_push_seek),
(gst_dvdemux_do_seek), (gst_dvdemux_handle_pull_seek),
(gst_dvdemux_handle_src_event), (gst_dvdemux_demux_audio),
(gst_dvdemux_demux_video), (gst_dvdemux_demux_frame),
(gst_dvdemux_flush), (gst_dvdemux_chain), (gst_dvdemux_loop),
(gst_dvdemux_sink_activate_push), (gst_dvdemux_sink_activate_pull),
(gst_dvdemux_sink_activate), (gst_dvdemux_change_state):
* ext/dv/gstdvdemux.h:
Added docs.
Implement pull mode.
Fix memleaks.
Reduce memcpy for the video demuxing.
2006-02-28 10:22:11 +00:00
|
|
|
gint64 frame_offset;
|
|
|
|
gint64 audio_offset;
|
|
|
|
gint64 video_offset;
|
2005-08-16 14:04:39 +00:00
|
|
|
|
docs/plugins/: Added dvdec and dvdemux to docs.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
Added dvdec and dvdemux to docs.
* ext/dv/gstdvdec.c: (gst_dvdec_base_init), (gst_dvdec_chain):
Added docs.
Check frame sizes so we don't crash when don't have enough
data.
Send nice error messages on error.
* ext/dv/gstdvdemux.c: (gst_dvdemux_base_init),
(gst_dvdemux_class_init), (gst_dvdemux_init),
(gst_dvdemux_finalize), (gst_dvdemux_reset),
(gst_dvdemux_src_convert), (gst_dvdemux_sink_convert),
(gst_dvdemux_src_query), (gst_dvdemux_sink_query),
(gst_dvdemux_push_event), (gst_dvdemux_handle_sink_event),
(gst_dvdemux_convert_src_pair), (gst_dvdemux_convert_sink_pair),
(gst_dvdemux_convert_src_to_sink), (gst_dvdemux_handle_push_seek),
(gst_dvdemux_do_seek), (gst_dvdemux_handle_pull_seek),
(gst_dvdemux_handle_src_event), (gst_dvdemux_demux_audio),
(gst_dvdemux_demux_video), (gst_dvdemux_demux_frame),
(gst_dvdemux_flush), (gst_dvdemux_chain), (gst_dvdemux_loop),
(gst_dvdemux_sink_activate_push), (gst_dvdemux_sink_activate_pull),
(gst_dvdemux_sink_activate), (gst_dvdemux_change_state):
* ext/dv/gstdvdemux.h:
Added docs.
Implement pull mode.
Fix memleaks.
Reduce memcpy for the video demuxing.
2006-02-28 10:22:11 +00:00
|
|
|
GstDVDemuxSeekHandler seek_handler;
|
ext/dv/: Ueber spiffify some more, added debug category.
Original commit message from CVS:
* ext/dv/gstdvdec.c: (gst_dvdec_base_init), (gst_dvdec_init),
(gst_dvdec_change_state):
* ext/dv/gstdvdec.h:
* ext/dv/gstdvdemux.c: (gst_dvdemux_base_init), (gst_dvdemux_init),
(gst_dvdemux_src_convert), (gst_dvdemux_sink_convert),
(gst_dvdemux_src_query), (gst_dvdemux_sink_query),
(gst_dvdemux_handle_sink_event), (gst_dvdemux_demux_frame),
(gst_dvdemux_flush), (gst_dvdemux_chain),
(gst_dvdemux_change_state):
* ext/dv/gstdvdemux.h:
Ueber spiffify some more, added debug category.
Use _scale.
Use segments, respect playback rate from newsegment.
Fix refcount issue.
2006-02-22 20:22:25 +00:00
|
|
|
GstSegment byte_segment;
|
2016-06-03 07:36:32 +00:00
|
|
|
gboolean upstream_time_segment;
|
ext/dv/: Ueber spiffify some more, added debug category.
Original commit message from CVS:
* ext/dv/gstdvdec.c: (gst_dvdec_base_init), (gst_dvdec_init),
(gst_dvdec_change_state):
* ext/dv/gstdvdec.h:
* ext/dv/gstdvdemux.c: (gst_dvdemux_base_init), (gst_dvdemux_init),
(gst_dvdemux_src_convert), (gst_dvdemux_sink_convert),
(gst_dvdemux_src_query), (gst_dvdemux_sink_query),
(gst_dvdemux_handle_sink_event), (gst_dvdemux_demux_frame),
(gst_dvdemux_flush), (gst_dvdemux_chain),
(gst_dvdemux_change_state):
* ext/dv/gstdvdemux.h:
Ueber spiffify some more, added debug category.
Use _scale.
Use segments, respect playback rate from newsegment.
Fix refcount issue.
2006-02-22 20:22:25 +00:00
|
|
|
GstSegment time_segment;
|
|
|
|
gboolean need_segment;
|
2016-06-03 07:49:17 +00:00
|
|
|
guint32 segment_seqnum;
|
2005-12-06 19:44:58 +00:00
|
|
|
gboolean new_media;
|
2009-09-13 19:01:27 +00:00
|
|
|
int frames_since_new_media;
|
2005-08-16 14:04:39 +00:00
|
|
|
|
2006-03-29 16:06:50 +00:00
|
|
|
gint found_header; /* ATOMIC */
|
|
|
|
GstEvent *seek_event;
|
2006-08-18 13:25:06 +00:00
|
|
|
GstEvent *pending_segment;
|
2015-09-06 15:19:59 +00:00
|
|
|
GstEvent *tag_event;
|
2005-08-16 14:04:39 +00:00
|
|
|
|
2005-12-06 19:44:58 +00:00
|
|
|
gint16 *audio_buffers[4];
|
2005-08-16 14:04:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_DVDEMUX_H__ */
|