void schro_video_format_set_std_colour_spec (DiracSequenceHeader * format,
int index);
-
-
-
int
dirac_sequence_header_parse (DiracSequenceHeader * header,
unsigned char *data, int n_bytes)
static gboolean gst_dirac_parse_convert (GstBaseParse * parse,
GstFormat src_format, gint64 src_value, GstFormat dest_format,
gint64 * dest_value);
-static gboolean gst_dirac_parse_event (GstBaseParse * parse, GstEvent * event);
-static gboolean gst_dirac_parse_src_event (GstBaseParse * parse,
- GstEvent * event);
static GstFlowReturn gst_dirac_parse_pre_push_frame (GstBaseParse * parse,
GstBaseParseFrame * frame);
base_parse_class->handle_frame =
GST_DEBUG_FUNCPTR (gst_dirac_parse_handle_frame);
base_parse_class->convert = GST_DEBUG_FUNCPTR (gst_dirac_parse_convert);
- base_parse_class->event = GST_DEBUG_FUNCPTR (gst_dirac_parse_event);
- base_parse_class->src_event = GST_DEBUG_FUNCPTR (gst_dirac_parse_src_event);
base_parse_class->pre_push_frame =
GST_DEBUG_FUNCPTR (gst_dirac_parse_pre_push_frame);
return FALSE;
}
-static gboolean
-gst_dirac_parse_event (GstBaseParse * parse, GstEvent * event)
-{
- /* Sink pad event handler */
-
- return FALSE;
-}
-
-static gboolean
-gst_dirac_parse_src_event (GstBaseParse * parse, GstEvent * event)
-{
- /* Src pad event handler */
-
- return FALSE;
-}
-
static GstFlowReturn
gst_dirac_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
{
gst_h263_parse_sink_event (GstBaseParse * parse, GstEvent * event)
{
GstH263Parse *h263parse;
- gboolean res = FALSE;
h263parse = GST_H263_PARSE (parse);
break;
}
-
default:
break;
}
- return res;
+ return GST_BASE_PARSE_CLASS (parent_class)->event (parse, event);
}
static guint
static gboolean
gst_h264_parse_event (GstBaseParse * parse, GstEvent * event)
{
- gboolean handled = FALSE;
+ gboolean res;
GstH264Parse *h264parse = GST_H264_PARSE (parse);
switch (GST_EVENT_TYPE (event)) {
gboolean all_headers;
guint count;
- if (!gst_video_event_is_force_key_unit (event))
- break;
-
- gst_video_event_parse_downstream_force_key_unit (event,
- ×tamp, &stream_time, &running_time, &all_headers, &count);
-
- GST_INFO_OBJECT (h264parse, "received downstream force key unit event, "
- "seqnum %d running_time %" GST_TIME_FORMAT " all_headers %d count %d",
- gst_event_get_seqnum (event), GST_TIME_ARGS (running_time),
- all_headers, count);
- handled = TRUE;
-
- if (h264parse->force_key_unit_event) {
- GST_INFO_OBJECT (h264parse, "ignoring force key unit event "
- "as one is already queued");
+ if (gst_video_event_is_force_key_unit (event)) {
+ gst_video_event_parse_downstream_force_key_unit (event,
+ ×tamp, &stream_time, &running_time, &all_headers, &count);
+
+ GST_INFO_OBJECT (h264parse, "received downstream force key unit event, "
+ "seqnum %d running_time %" GST_TIME_FORMAT
+ " all_headers %d count %d", gst_event_get_seqnum (event),
+ GST_TIME_ARGS (running_time), all_headers, count);
+ if (h264parse->force_key_unit_event) {
+ GST_INFO_OBJECT (h264parse, "ignoring force key unit event "
+ "as one is already queued");
+ } else {
+ h264parse->pending_key_unit_ts = running_time;
+ gst_event_replace (&h264parse->force_key_unit_event, event);
+ }
+ res = TRUE;
+ } else {
+ res = GST_BASE_PARSE_CLASS (parent_class)->event (parse, event);
break;
}
-
- h264parse->pending_key_unit_ts = running_time;
- gst_event_replace (&h264parse->force_key_unit_event, event);
break;
}
case GST_EVENT_FLUSH_STOP:
h264parse->dts = GST_CLOCK_TIME_NONE;
h264parse->ts_trn_nb = GST_CLOCK_TIME_NONE;
+
+ res = GST_BASE_PARSE_CLASS (parent_class)->event (parse, event);
break;
case GST_EVENT_SEGMENT:
{
(segment->start != 0 || segment->rate != 1.0
|| segment->applied_rate != 1.0))
h264parse->do_ts = FALSE;
+
+ res = GST_BASE_PARSE_CLASS (parent_class)->event (parse, event);
break;
}
default:
+ res = GST_BASE_PARSE_CLASS (parent_class)->event (parse, event);
break;
}
-
- return handled;
+ return res;
}
static gboolean
gst_h264_parse_src_event (GstBaseParse * parse, GstEvent * event)
{
- gboolean handled = FALSE;
+ gboolean res;
GstH264Parse *h264parse = GST_H264_PARSE (parse);
switch (GST_EVENT_TYPE (event)) {
gboolean all_headers;
guint count;
- if (!gst_video_event_is_force_key_unit (event))
- break;
+ if (gst_video_event_is_force_key_unit (event)) {
+ gst_video_event_parse_upstream_force_key_unit (event,
+ &running_time, &all_headers, &count);
- gst_video_event_parse_upstream_force_key_unit (event,
- &running_time, &all_headers, &count);
+ GST_INFO_OBJECT (h264parse, "received upstream force-key-unit event, "
+ "seqnum %d running_time %" GST_TIME_FORMAT
+ " all_headers %d count %d", gst_event_get_seqnum (event),
+ GST_TIME_ARGS (running_time), all_headers, count);
- GST_INFO_OBJECT (h264parse, "received upstream force-key-unit event, "
- "seqnum %d running_time %" GST_TIME_FORMAT " all_headers %d count %d",
- gst_event_get_seqnum (event), GST_TIME_ARGS (running_time),
- all_headers, count);
-
- if (!all_headers)
- break;
-
- h264parse->pending_key_unit_ts = running_time;
- gst_event_replace (&h264parse->force_key_unit_event, event);
- /* leave handled = FALSE so that the event gets propagated upstream */
+ if (all_headers) {
+ h264parse->pending_key_unit_ts = running_time;
+ gst_event_replace (&h264parse->force_key_unit_event, event);
+ }
+ }
+ res = GST_BASE_PARSE_CLASS (parent_class)->src_event (parse, event);
break;
}
default:
+ res = GST_BASE_PARSE_CLASS (parent_class)->src_event (parse, event);
break;
}
- return handled;
+ return res;
}
static GstFlowReturn
static gboolean
gst_mpeg4vparse_event (GstBaseParse * parse, GstEvent * event)
{
- gboolean handled = FALSE;
+ gboolean res;
GstMpeg4VParse *mp4vparse = GST_MPEG4VIDEO_PARSE (parse);
switch (GST_EVENT_TYPE (event)) {
gboolean all_headers;
guint count;
- if (!gst_video_event_is_force_key_unit (event))
- break;
-
- gst_video_event_parse_downstream_force_key_unit (event,
- ×tamp, &stream_time, &running_time, &all_headers, &count);
+ if (gst_video_event_is_force_key_unit (event)) {
+ gst_video_event_parse_downstream_force_key_unit (event,
+ ×tamp, &stream_time, &running_time, &all_headers, &count);
- GST_INFO_OBJECT (mp4vparse, "received downstream force key unit event, "
- "seqnum %d running_time %" GST_TIME_FORMAT " all_headers %d count %d",
- gst_event_get_seqnum (event), GST_TIME_ARGS (running_time),
- all_headers, count);
- handled = TRUE;
+ GST_INFO_OBJECT (mp4vparse, "received downstream force key unit event, "
+ "seqnum %d running_time %" GST_TIME_FORMAT
+ " all_headers %d count %d", gst_event_get_seqnum (event),
+ GST_TIME_ARGS (running_time), all_headers, count);
- if (mp4vparse->force_key_unit_event) {
- GST_INFO_OBJECT (mp4vparse, "ignoring force key unit event "
- "as one is already queued");
- break;
+ if (mp4vparse->force_key_unit_event) {
+ GST_INFO_OBJECT (mp4vparse, "ignoring force key unit event "
+ "as one is already queued");
+ } else {
+ mp4vparse->pending_key_unit_ts = running_time;
+ gst_event_replace (&mp4vparse->force_key_unit_event, event);
+ }
+ res = TRUE;
+ } else {
+ res = GST_BASE_PARSE_CLASS (parent_class)->event (parse, event);
}
-
- mp4vparse->pending_key_unit_ts = running_time;
- gst_event_replace (&mp4vparse->force_key_unit_event, event);
break;
}
default:
+ res = GST_BASE_PARSE_CLASS (parent_class)->event (parse, event);
break;
}
-
- return handled;
+ return res;
}
static gboolean
gst_mpeg4vparse_src_event (GstBaseParse * parse, GstEvent * event)
{
- gboolean handled = FALSE;
+ gboolean res;
GstMpeg4VParse *mp4vparse = GST_MPEG4VIDEO_PARSE (parse);
switch (GST_EVENT_TYPE (event)) {
gboolean all_headers;
guint count;
- if (!gst_video_event_is_force_key_unit (event))
- break;
-
- gst_video_event_parse_upstream_force_key_unit (event,
- &running_time, &all_headers, &count);
-
- GST_INFO_OBJECT (mp4vparse, "received upstream force-key-unit event, "
- "seqnum %d running_time %" GST_TIME_FORMAT " all_headers %d count %d",
- gst_event_get_seqnum (event), GST_TIME_ARGS (running_time),
- all_headers, count);
+ if (gst_video_event_is_force_key_unit (event)) {
+ gst_video_event_parse_upstream_force_key_unit (event,
+ &running_time, &all_headers, &count);
- if (!all_headers)
- break;
+ GST_INFO_OBJECT (mp4vparse, "received upstream force-key-unit event, "
+ "seqnum %d running_time %" GST_TIME_FORMAT
+ " all_headers %d count %d", gst_event_get_seqnum (event),
+ GST_TIME_ARGS (running_time), all_headers, count);
- mp4vparse->pending_key_unit_ts = running_time;
- gst_event_replace (&mp4vparse->force_key_unit_event, event);
- /* leave handled = FALSE so that the event gets propagated upstream */
+ if (all_headers) {
+ mp4vparse->pending_key_unit_ts = running_time;
+ gst_event_replace (&mp4vparse->force_key_unit_event, event);
+ }
+ }
+ res = GST_BASE_PARSE_CLASS (parent_class)->src_event (parse, event);
break;
}
default:
+ res = GST_BASE_PARSE_CLASS (parent_class)->src_event (parse, event);
break;
}
- return handled;
+ return res;
}