Skip to content
Snippets Groups Projects

openh264: add slice support

1 unresolved thread
@@ -61,9 +61,9 @@ static gboolean gst_openh264dec_decide_allocation (GstVideoDecoder * decoder,
GstQuery * query);
#if HAVE_OPENH264_MAIN_PROFILE
#define SUPPORTED_PROFILE_STR "profile=(string){ constrained-baseline, baseline, main, high }"
#define SUPPORTED_PROFILE_STR ", profile=(string){ constrained-baseline, baseline, main, high }"
#else
#define SUPPORTED_PROFILE_STR "profile=(string){ constrained-baseline, baseline }"
#define SUPPORTED_PROFILE_STR ", profile=(string){ constrained-baseline, baseline }"
#endif
/* pad templates */
@@ -72,7 +72,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS
("video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, "
("video/x-h264, stream-format=(string)byte-stream, alignment=(string){ au, nal }"
SUPPORTED_PROFILE_STR
));
@@ -123,6 +123,7 @@ gst_openh264dec_init (GstOpenh264Dec * openh264dec)
gst_video_decoder_set_packetized (GST_VIDEO_DECODER (openh264dec), TRUE);
gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (openh264dec), TRUE);
}
#ifndef GST_DISABLE_GST_DEBUG
@@ -215,6 +216,8 @@ gst_openh264dec_set_format (GstVideoDecoder * decoder,
GstVideoCodecState * state)
{
GstOpenh264Dec *openh264dec = GST_OPENH264DEC (decoder);
const GstStructure *s;
const gchar *alignment;
GST_DEBUG_OBJECT (openh264dec, "input caps: %" GST_PTR_FORMAT, state->caps);
@@ -224,6 +227,11 @@ gst_openh264dec_set_format (GstVideoDecoder * decoder,
}
openh264dec->input_state = gst_video_codec_state_ref (state);
s = gst_caps_get_structure (state->caps, 0);
alignment = gst_structure_get_string (s, "alignment");
gst_video_decoder_set_use_subframes (decoder, (g_strcmp0 (alignment, "nal") == 0));
return TRUE;
}
@@ -317,14 +325,15 @@ gst_openh264dec_handle_frame (GstVideoDecoder * decoder,
return GST_FLOW_OK;
}
gst_video_codec_frame_unref (frame);
frame = NULL;
/* No output available yet */
if (dst_buf_info.iBufferStatus != 1) {
GST_LOG_OBJECT (decoder, "No buffer decoded yet");
return GST_FLOW_OK;
}
gst_video_codec_frame_unref (frame);
frame = NULL;
}
GST_LOG_OBJECT (decoder, "Got back frame with frame ref %" G_GUINT64_FORMAT,
Loading