Lines Matching +full:video +full:- +full:decoder
3 * Author: Randy Li <randy.li@rock-chips.com>
6 * Author: Jeffy Chen <jeffy.chen@rock-chips.com>
21 * Boston, MA 02110-1301, USA.
65 GST_STATIC_CAPS ("video/x-h263, parsed = (boolean) true;"
66 "video/x-h264, parsed = (boolean) true;"
67 "video/x-h265, parsed = (boolean) true;"
68 "video/x-av1, parsed = (boolean) true;"
69 "video/x-vp8; video/x-vp9;"
70 "video/mpeg, parsed = (boolean) true,"
84 if (gst_structure_has_name (s, "video/x-h263")) in gst_mpp_video_dec_get_mpp_type()
87 if (gst_structure_has_name (s, "video/x-h264")) in gst_mpp_video_dec_get_mpp_type()
90 if (gst_structure_has_name (s, "video/x-h265")) in gst_mpp_video_dec_get_mpp_type()
93 if (gst_structure_has_name (s, "video/x-av1")) in gst_mpp_video_dec_get_mpp_type()
96 if (gst_structure_has_name (s, "video/mpeg")) { in gst_mpp_video_dec_get_mpp_type()
112 if (gst_structure_has_name (s, "video/x-vp8")) in gst_mpp_video_dec_get_mpp_type()
115 if (gst_structure_has_name (s, "video/x-vp9")) in gst_mpp_video_dec_get_mpp_type()
125 GstVideoDecoder *decoder = GST_VIDEO_DECODER (object); in gst_mpp_video_dec_set_property() local
126 GstMppDec *mppdec = GST_MPP_DEC (decoder); in gst_mpp_video_dec_set_property()
130 if (mppdec->input_state) in gst_mpp_video_dec_set_property()
131 GST_WARNING_OBJECT (decoder, "unable to change output format"); in gst_mpp_video_dec_set_property()
133 mppdec->format = g_value_get_enum (value); in gst_mpp_video_dec_set_property()
137 if (mppdec->input_state) in gst_mpp_video_dec_set_property()
138 GST_WARNING_OBJECT (decoder, "unable to change ARM AFBC"); in gst_mpp_video_dec_set_property()
140 mppdec->arm_afbc = g_value_get_boolean (value); in gst_mpp_video_dec_set_property()
153 GstVideoDecoder *decoder = GST_VIDEO_DECODER (object); in gst_mpp_video_dec_get_property() local
154 GstMppDec *mppdec = GST_MPP_DEC (decoder); in gst_mpp_video_dec_get_property()
158 g_value_set_enum (value, mppdec->format); in gst_mpp_video_dec_get_property()
161 g_value_set_boolean (value, mppdec->arm_afbc); in gst_mpp_video_dec_get_property()
170 gst_mpp_video_dec_set_format (GstVideoDecoder * decoder, in gst_mpp_video_dec_set_format() argument
174 GstMppDec *mppdec = GST_MPP_DEC (decoder); in gst_mpp_video_dec_set_format()
178 structure = gst_caps_get_structure (state->caps, 0); in gst_mpp_video_dec_set_format()
179 mppdec->mpp_type = gst_mpp_video_dec_get_mpp_type (structure); in gst_mpp_video_dec_set_format()
180 g_return_val_if_fail (mppdec->mpp_type != MPP_VIDEO_CodingUnused, FALSE); in gst_mpp_video_dec_set_format()
183 if (mppdec->mpp_type == MPP_VIDEO_CodingAVC) { in gst_mpp_video_dec_set_format()
184 chroma_format = gst_structure_get_string (structure, "chroma-format"); in gst_mpp_video_dec_set_format()
189 return pclass->set_format (decoder, state); in gst_mpp_video_dec_set_format()
193 gst_mpp_video_dec_startup (GstVideoDecoder * decoder) in gst_mpp_video_dec_startup() argument
195 GstMppVideoDec *self = GST_MPP_VIDEO_DEC (decoder); in gst_mpp_video_dec_startup()
196 GstMppDec *mppdec = GST_MPP_DEC (decoder); in gst_mpp_video_dec_startup()
197 GstVideoCodecState *state = mppdec->input_state; in gst_mpp_video_dec_startup()
198 GstBuffer *codec_data = state->codec_data; in gst_mpp_video_dec_startup()
209 mppdec->mpi->decode_put_packet (mppdec->mpp_ctx, mpkt); in gst_mpp_video_dec_startup()
216 if (mppdec->arm_afbc) { in gst_mpp_video_dec_startup()
218 mppdec->mpi->control (mppdec->mpp_ctx, MPP_DEC_SET_OUTPUT_FORMAT, in gst_mpp_video_dec_startup()
222 self->poll_timeout = 0; in gst_mpp_video_dec_startup()
228 gst_mpp_video_dec_get_mpp_packet (GstVideoDecoder * decoder UNUSED, in gst_mpp_video_dec_get_mpp_packet()
232 mpp_packet_init (&mpkt, mapinfo->data, mapinfo->size); in gst_mpp_video_dec_get_mpp_packet()
237 gst_mpp_video_dec_send_mpp_packet (GstVideoDecoder * decoder, in gst_mpp_video_dec_send_mpp_packet() argument
240 GstMppDec *mppdec = GST_MPP_DEC (decoder); in gst_mpp_video_dec_send_mpp_packet()
245 ret = mppdec->mpi->decode_put_packet (mppdec->mpp_ctx, mpkt); in gst_mpp_video_dec_send_mpp_packet()
252 timeout_ms -= interval_ms; in gst_mpp_video_dec_send_mpp_packet()
259 gst_mpp_video_dec_poll_mpp_frame (GstVideoDecoder * decoder, gint timeout_ms) in gst_mpp_video_dec_poll_mpp_frame() argument
261 GstMppVideoDec *self = GST_MPP_VIDEO_DEC (decoder); in gst_mpp_video_dec_poll_mpp_frame()
262 GstMppDec *mppdec = GST_MPP_DEC (decoder); in gst_mpp_video_dec_poll_mpp_frame()
265 if (self->poll_timeout != timeout_ms) { in gst_mpp_video_dec_poll_mpp_frame()
266 self->poll_timeout = timeout_ms; in gst_mpp_video_dec_poll_mpp_frame()
267 mppdec->mpi->control (mppdec->mpp_ctx, MPP_SET_OUTPUT_TIMEOUT, &timeout_ms); in gst_mpp_video_dec_poll_mpp_frame()
270 mppdec->mpi->decode_get_frame (mppdec->mpp_ctx, &mframe); in gst_mpp_video_dec_poll_mpp_frame()
276 gst_mpp_video_dec_shutdown (GstVideoDecoder * decoder, gboolean drain) in gst_mpp_video_dec_shutdown() argument
278 GstMppDec *mppdec = GST_MPP_DEC (decoder); in gst_mpp_video_dec_shutdown()
285 mppdec->mpi->reset (mppdec->mpp_ctx); in gst_mpp_video_dec_shutdown()
293 ret = mppdec->mpi->decode_put_packet (mppdec->mpp_ctx, mpkt); in gst_mpp_video_dec_shutdown()
337 mppdec->format = DEFAULT_PROP_FORMAT; in gst_mpp_video_dec_init()
338 mppdec->arm_afbc = DEFAULT_PROP_ARM_AFBC; in gst_mpp_video_dec_init()
356 DEFAULT_PROP_FORMAT = value->value; in gst_mpp_video_dec_setup_default_format()
370 "MPP video decoder"); in gst_mpp_video_dec_class_init()
372 decoder_class->set_format = GST_DEBUG_FUNCPTR (gst_mpp_video_dec_set_format); in gst_mpp_video_dec_class_init()
374 pclass->startup = GST_DEBUG_FUNCPTR (gst_mpp_video_dec_startup); in gst_mpp_video_dec_class_init()
375 pclass->get_mpp_packet = GST_DEBUG_FUNCPTR (gst_mpp_video_dec_get_mpp_packet); in gst_mpp_video_dec_class_init()
376 pclass->send_mpp_packet = in gst_mpp_video_dec_class_init()
378 pclass->poll_mpp_frame = GST_DEBUG_FUNCPTR (gst_mpp_video_dec_poll_mpp_frame); in gst_mpp_video_dec_class_init()
379 pclass->shutdown = GST_DEBUG_FUNCPTR (gst_mpp_video_dec_shutdown); in gst_mpp_video_dec_class_init()
381 gobject_class->set_property = in gst_mpp_video_dec_class_init()
383 gobject_class->get_property = in gst_mpp_video_dec_class_init()
400 g_param_spec_boolean ("arm-afbc", "ARM AFBC", in gst_mpp_video_dec_class_init()
411 "Rockchip's MPP video decoder", "Decoder/Video", in gst_mpp_video_dec_class_init()
412 "Multicodec (HEVC / AVC / VP8 / VP9) hardware decoder", in gst_mpp_video_dec_class_init()
413 "Randy Li <randy.li@rock-chips.com>, " in gst_mpp_video_dec_class_init()
414 "Jeffy Chen <jeffy.chen@rock-chips.com>"); in gst_mpp_video_dec_class_init()