mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
codecs: Change output_picture() to mandatory implementation
GstVideoCodecFrame is expected to be consumed by subclass per output_picture(). So the implementation cannot be optional.
This commit is contained in:
parent
83b056cb77
commit
82f1d5e8be
6 changed files with 23 additions and 17 deletions
|
@ -1117,7 +1117,7 @@ gst_h264_decoder_do_output_picture (GstH264Decoder * self,
|
|||
|
||||
klass = GST_H264_DECODER_GET_CLASS (self);
|
||||
|
||||
if (klass->output_picture)
|
||||
g_assert (klass->output_picture);
|
||||
priv->last_ret = klass->output_picture (self, picture);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,9 +65,11 @@ struct _GstH264Decoder
|
|||
* Called whenever new #GstH264Picture is created.
|
||||
* Subclass can set implementation specific user data
|
||||
* on the #GstH264Picture via gst_h264_picture_set_user_data()
|
||||
* @output_picture: Optional.
|
||||
* Called just before gst_video_decoder_have_frame().
|
||||
* Subclass should be prepared for handle_frame()
|
||||
* @output_picture: Called with a #GstH264Picture which is required to be outputted.
|
||||
* Subclass can retrieve parent #GstVideoCodecFrame by using
|
||||
* gst_video_decoder_get_frame() with system_frame_number
|
||||
* and the #GstVideoCodecFrame must be consumed by subclass via
|
||||
* gst_video_decoder_{finish,drop,release}_frame().
|
||||
* @start_picture: Optional.
|
||||
* Called per one #GstH264Picture to notify subclass to prepare
|
||||
* decoding process for the #GstH264Picture
|
||||
|
|
|
@ -1112,7 +1112,7 @@ gst_h265_decoder_do_output_picture (GstH265Decoder * self,
|
|||
|
||||
klass = GST_H265_DECODER_GET_CLASS (self);
|
||||
|
||||
if (klass->output_picture)
|
||||
g_assert (klass->output_picture);
|
||||
priv->last_ret = klass->output_picture (self, picture);
|
||||
}
|
||||
|
||||
|
|
|
@ -78,9 +78,11 @@ struct _GstH265Decoder
|
|||
* Called whenever new #GstH265Picture is created.
|
||||
* Subclass can set implementation specific user data
|
||||
* on the #GstH265Picture via gst_h265_picture_set_user_data()
|
||||
* @output_picture: Optional.
|
||||
* Called just before gst_video_decoder_have_frame().
|
||||
* Subclass should be prepared for handle_frame()
|
||||
* @output_picture: Called with a #GstH265Picture which is required to be outputted.
|
||||
* Subclass can retrieve parent #GstVideoCodecFrame by using
|
||||
* gst_video_decoder_get_frame() with system_frame_number
|
||||
* and the #GstVideoCodecFrame must be consumed by subclass via
|
||||
* gst_video_decoder_{finish,drop,release}_frame().
|
||||
* @start_picture: Optional.
|
||||
* Called per one #GstH265Picture to notify subclass to prepare
|
||||
* decoding process for the #GstH265Picture
|
||||
|
|
|
@ -373,7 +373,7 @@ gst_vp9_decoder_handle_frame (GstVideoDecoder * decoder,
|
|||
(GDestroyNotify) gst_vp9_picture_unref);
|
||||
}
|
||||
|
||||
if (klass->output_picture)
|
||||
g_assert (klass->output_picture);
|
||||
ret = klass->output_picture (self, picture);
|
||||
|
||||
gst_vp9_picture_unref (picture);
|
||||
|
@ -433,7 +433,7 @@ gst_vp9_decoder_handle_frame (GstVideoDecoder * decoder,
|
|||
}
|
||||
}
|
||||
|
||||
if (klass->output_picture)
|
||||
g_assert (klass->output_picture);
|
||||
ret = klass->output_picture (self, picture);
|
||||
|
||||
/* transfer ownership of picture */
|
||||
|
|
|
@ -66,9 +66,11 @@ struct _GstVp9Decoder
|
|||
* Subclass can set implementation specific user data
|
||||
* on the #GstH264Picture via gst_h264_picture_set_user_data()
|
||||
* @duplicate_picture: Duplicate the #GstVp9Picture
|
||||
* @output_picture: Optional.
|
||||
* Called just before gst_video_decoder_have_frame().
|
||||
* Subclass should be prepared for handle_frame()
|
||||
* @output_picture: Called with a #GstVp9Picture which is required to be outputted.
|
||||
* Subclass can retrieve parent #GstVideoCodecFrame by using
|
||||
* gst_video_decoder_get_frame() with system_frame_number
|
||||
* and the #GstVideoCodecFrame must be consumed by subclass via
|
||||
* gst_video_decoder_{finish,drop,release}_frame().
|
||||
* @start_picture: Optional.
|
||||
* Called per one #GstH264Picture to notify subclass to prepare
|
||||
* decoding process for the #GstH264Picture
|
||||
|
|
Loading…
Reference in a new issue