static inline const GstVaapiDecoderClass *
gst_vaapi_decoder_jpeg_class(void)
{
    static GstVaapiDecoderJpegClass g_class;
    static gsize g_class_init = FALSE;

    if (g_once_init_enter(&g_class_init)) {
        gst_vaapi_decoder_jpeg_class_init(&g_class);
        g_once_init_leave(&g_class_init, TRUE);
    }
    return GST_VAAPI_DECODER_CLASS(&g_class);
}
static void
gst_vaapi_decoder_vc1_class_init(GstVaapiDecoderVC1Class *klass)
{
    GObjectClass * const object_class = G_OBJECT_CLASS(klass);
    GstVaapiDecoderClass * const decoder_class = GST_VAAPI_DECODER_CLASS(klass);

    g_type_class_add_private(klass, sizeof(GstVaapiDecoderVC1Private));

    object_class->finalize      = gst_vaapi_decoder_vc1_finalize;
    object_class->constructed   = gst_vaapi_decoder_vc1_constructed;

    decoder_class->decode       = gst_vaapi_decoder_vc1_decode;
}
static void
gst_vaapi_decoder_jpeg_class_init (GstVaapiDecoderJpegClass * klass)
{
  GObjectClass *const object_class = G_OBJECT_CLASS (klass);
  GstVaapiDecoderClass *const decoder_class = GST_VAAPI_DECODER_CLASS (klass);

  object_class->finalize = gst_vaapi_decoder_jpeg_finalize;

  decoder_class->reset = gst_vaapi_decoder_jpeg_reset;
  decoder_class->parse = gst_vaapi_decoder_jpeg_parse;
  decoder_class->decode = gst_vaapi_decoder_jpeg_decode;
  decoder_class->start_frame = gst_vaapi_decoder_jpeg_start_frame;
  decoder_class->end_frame = gst_vaapi_decoder_jpeg_end_frame;
}
static void
gst_vaapi_decoder_jpeg_class_init(GstVaapiDecoderJpegClass *klass)
{
    GstVaapiMiniObjectClass * const object_class =
        GST_VAAPI_MINI_OBJECT_CLASS(klass);
    GstVaapiDecoderClass * const decoder_class = GST_VAAPI_DECODER_CLASS(klass);

    object_class->size          = sizeof(GstVaapiDecoderJpeg);
    object_class->finalize      = (GDestroyNotify)gst_vaapi_decoder_finalize;

    decoder_class->create       = gst_vaapi_decoder_jpeg_create;
    decoder_class->destroy      = gst_vaapi_decoder_jpeg_destroy;
    decoder_class->parse        = gst_vaapi_decoder_jpeg_parse;
    decoder_class->decode       = gst_vaapi_decoder_jpeg_decode;
    decoder_class->start_frame  = gst_vaapi_decoder_jpeg_start_frame;
    decoder_class->end_frame    = gst_vaapi_decoder_jpeg_end_frame;
}