return caps;
}
+static gboolean
+gst_x265_enc_sink_query (GstVideoEncoder * enc, GstQuery * query)
+{
+ gboolean res;
+
+ switch (GST_QUERY_TYPE (query)) {
+ case GST_QUERY_ACCEPT_CAPS:{
+ GstCaps *acceptable, *caps;
+
+ acceptable = gst_x265_enc_get_supported_input_caps ();
+ gst_query_parse_accept_caps (query, &caps);
+
+ gst_query_set_accept_caps_result (query,
+ gst_caps_is_subset (caps, acceptable));
+ gst_caps_unref (acceptable);
+ res = TRUE;
+ }
+ break;
+ default:
+ res = GST_VIDEO_ENCODER_CLASS (parent_class)->sink_query (enc, query);
+ break;
+ }
+
+ return res;
+}
+
static GstCaps *
gst_x265_enc_sink_getcaps (GstVideoEncoder * enc, GstCaps * filter)
{
gstencoder_class->flush = GST_DEBUG_FUNCPTR (gst_x265_enc_flush);
gstencoder_class->finish = GST_DEBUG_FUNCPTR (gst_x265_enc_finish);
gstencoder_class->getcaps = GST_DEBUG_FUNCPTR (gst_x265_enc_sink_getcaps);
+ gstencoder_class->sink_query = GST_DEBUG_FUNCPTR (gst_x265_enc_sink_query);
gstencoder_class->propose_allocation =
GST_DEBUG_FUNCPTR (gst_x265_enc_propose_allocation);