diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-11-18 03:09:18 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-11-18 03:10:32 +0000 |
commit | 6b45854967c45a1012613859cc432b4e276250eb (patch) | |
tree | ee18a0e991120e809e03c7a33c10dc49af9848a9 /ext/resindvd/resindvdsrc.c | |
parent | 3ea450ba27e67f4fa80b6d43e91bb291dc6e2c13 (diff) | |
download | gstreamer-plugins-bad-6b45854967c45a1012613859cc432b4e276250eb.tar.gz |
resindvd, dvdspu: Use new still-frame API from gst-plugins-base
Replace the current custom DVD still-frame events with new event
creation/parsing API from libgstvideo.
Diffstat (limited to 'ext/resindvd/resindvdsrc.c')
-rw-r--r-- | ext/resindvd/resindvdsrc.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 7f342d344..e5421ca3c 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -1,5 +1,5 @@ /* GStreamer - * Copyright (C) 2008 Jan Schmidt <thaytan@noraisin.net> + * Copyright (C) 2008-2009 Jan Schmidt <thaytan@noraisin.net> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -27,6 +27,7 @@ #include <gst/gst.h> #include <gst/gst-i18n-plugin.h> #include <gst/interfaces/navigation.h> +#include <gst/video/video.h> #include "resindvdsrc.h" @@ -597,7 +598,6 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) GstEvent *still_event; GstEvent *hl_event; gboolean cmds_changed; - GstStructure *s; GstEvent *seg_event; GstSegment *segment = &(RSN_BASE_SRC (src)->segment); @@ -610,12 +610,9 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) else src->still_time_remaining = GST_SECOND * duration; - /* Send a close-segment event, and a dvd-still start + /* Send a close-segment event, and a still-frame start * event, then sleep */ - s = gst_structure_new ("application/x-gst-dvd", - "event", G_TYPE_STRING, "dvd-still", - "still-state", G_TYPE_BOOLEAN, TRUE, NULL); - still_event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, s); + still_event = gst_video_event_new_still_frame (TRUE); gst_segment_set_last_stop (segment, GST_FORMAT_TIME, src->cur_end_ts); @@ -734,10 +731,7 @@ rsn_dvdsrc_do_still (resinDvdSrc * src, int duration) /* Tell downstream the still is over. * We only do this if the still isn't interrupted: */ - s = gst_structure_new ("application/x-gst-dvd", - "event", G_TYPE_STRING, "dvd-still", - "still-state", G_TYPE_BOOLEAN, FALSE, NULL); - still_event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, s); + still_event = gst_video_event_new_still_frame (FALSE); /* If the segment was too short in a timed still, it may need extending */ if (segment->last_stop < segment->start + GST_SECOND * duration) |