From 49b8ebdb37af39aea2c367a7b2b9c7c629ba10b7 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 7 May 2004 16:17:25 +0000 Subject: [PATCH] ext/dv/gstdvdec.c: Fix caps nego and pad templates. RGB mode caps should work now. Original commit message from CVS: * ext/dv/gstdvdec.c: (gst_dvdec_video_link): Fix caps nego and pad templates. RGB mode caps should work now. * ext/dvdnav/gst-dvd: Move mpeg2dec inside the thread because otherwise the queue rejects cap changes mid-stream * ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_get_type), (gst_mpeg2dec_flush_decoder): For mpeg2dec > 0.4.0, call the flush function instead of manually extracting all in-flight frames. * ext/raw1394/gstdv1394src.c: (gst_dv1394src_factory), (gst_dv1394src_init), (gst_dv1394src_iso_receive): Change mime type video/dv go video/x-dv to match the rest of gst-plugins --- ChangeLog | 16 ++++++++++++++++ ext/dvdnav/gst-dvd | 2 +- ext/mpeg2dec/gstmpeg2dec.c | 11 +++++++---- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab7a05c6b1..8b7fd9edfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2004-05-08 Jan Schmidt + * ext/dv/gstdvdec.c: (gst_dvdec_video_link): + Fix caps nego and pad templates. RGB mode caps should + work now. + * ext/dvdnav/gst-dvd: + Move mpeg2dec inside the thread because otherwise the + queue rejects cap changes mid-stream + * ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_get_type), + (gst_mpeg2dec_flush_decoder): + For mpeg2dec > 0.4.0, call the flush function instead of + manually extracting all in-flight frames. + * ext/raw1394/gstdv1394src.c: (gst_dv1394src_factory), + (gst_dv1394src_init), (gst_dv1394src_iso_receive): + Change mime type video/dv go video/x-dv to match the + rest of gst-plugins + 2004-05-07 Ronald Bultje * ext/alsa/gstalsamixer.c: (gst_alsa_mixer_build_list): diff --git a/ext/dvdnav/gst-dvd b/ext/dvdnav/gst-dvd index 8e2bb21e74..df6511d22f 100755 --- a/ext/dvdnav/gst-dvd +++ b/ext/dvdnav/gst-dvd @@ -1,6 +1,6 @@ #!/bin/sh AUDIOSINK=`gconftool-2 -g /system/gstreamer/default/audiosink` -gst-launch dvdnavsrc ! dvddemux name=demux .current_video ! mpeg2dec ! { queue max-size-buffers=10 ! mpeg2subt name=sub ! \ +gst-launch dvdnavsrc ! dvddemux name=demux .current_video ! { queue max-size-buffers=10 ! mpeg2dec ! mpeg2subt name=sub ! \ navseek ! xvimagesink } demux.current_subpicture ! queue max-size-buffers=5 block-timeout=100000 ! sub.subtitle \ demux.current_audio ! { queue ! a52dec ! audioscale ! $AUDIOSINK } $@ diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c index b84e41aca9..aff6883e93 100644 --- a/ext/mpeg2dec/gstmpeg2dec.c +++ b/ext/mpeg2dec/gstmpeg2dec.c @@ -479,10 +479,10 @@ update_streaminfo (GstMpeg2dec * mpeg2dec) static void gst_mpeg2dec_flush_decoder (GstMpeg2dec * mpeg2dec) { - mpeg2_state_t state; - if (mpeg2dec->decoder) { +#if MPEG2_RELEASE < MPEG2_VERSION(0,4,0) const mpeg2_info_t *info = mpeg2_info (mpeg2dec->decoder); + mpeg2_state_t state; do { state = mpeg2_parse (mpeg2dec->decoder); @@ -493,6 +493,9 @@ gst_mpeg2dec_flush_decoder (GstMpeg2dec * mpeg2dec) } } while (state != STATE_BUFFER && state != -1); +#else + mpeg2_reset (mpeg2dec->decoder, 1); +#endif } } @@ -1016,7 +1019,7 @@ index_seek (GstPad * pad, GstEvent * event) if (entry) { const GstFormat *peer_formats, *try_formats; - /* since we know the exaxt byteoffset of the frame, make sure to seek on bytes first */ + /* since we know the exact byteoffset of the frame, make sure to seek on bytes first */ const GstFormat try_all_formats[] = { GST_FORMAT_BYTES, GST_FORMAT_TIME, @@ -1042,7 +1045,7 @@ index_seek (GstPad * pad, GstEvent * event) seek_event = gst_event_new_seek (*try_formats | GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, value); - /* do the seekk */ + /* do the seek */ if (gst_pad_send_event (GST_PAD_PEER (mpeg2dec->sinkpad), seek_event)) { /* seek worked, we're done, loop will exit */ gst_mpeg2dec_flush_decoder (mpeg2dec);