static void gst_omx_aac_dec_class_init (GstOMXAACDecClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstOMXAudioDecClass *audiodec_class = GST_OMX_AUDIO_DEC_CLASS (klass); audiodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_aac_dec_set_format); audiodec_class->is_format_change = GST_DEBUG_FUNCPTR (gst_omx_aac_dec_is_format_change); audiodec_class->get_samples_per_frame = GST_DEBUG_FUNCPTR (gst_omx_aac_dec_get_samples_per_frame); audiodec_class->get_channel_positions = GST_DEBUG_FUNCPTR (gst_omx_aac_dec_get_channel_positions); audiodec_class->cdata.default_sink_template_caps = "audio/mpeg, " "mpegversion=(int){2, 4}, " "stream-format=(string) { raw, adts, adif, loas }, " "rate=(int)[8000,48000], " "channels=(int)[1,9], " "framed=(boolean) true"; gst_element_class_set_static_metadata (element_class, "OpenMAX AAC Audio Decoder", "Codec/Decoder/Audio", "Decode AAC audio streams", "Sebastian Dröge <*****@*****.**>"); gst_omx_set_default_role (&audiodec_class->cdata, "audio_decoder.aac"); }
static void gst_omx_h264_enc_class_init (GstOMXH264EncClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstVideoEncoderClass *basevideoenc_class = GST_VIDEO_ENCODER_CLASS (klass); GstOMXVideoEncClass *videoenc_class = GST_OMX_VIDEO_ENC_CLASS (klass); videoenc_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_h264_enc_set_format); videoenc_class->get_caps = GST_DEBUG_FUNCPTR (gst_omx_h264_enc_get_caps); gobject_class->set_property = gst_omx_h264_enc_set_property; gobject_class->get_property = gst_omx_h264_enc_get_property; #ifdef USE_OMX_TARGET_RPI g_object_class_install_property (gobject_class, PROP_INLINESPSPPSHEADERS, g_param_spec_boolean ("inline-header", "Inline SPS/PPS headers before IDR", "Inline SPS/PPS header before IDR", GST_OMX_H264_VIDEO_ENC_INLINE_SPS_PPS_HEADERS_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_MUTABLE_READY)); #endif g_object_class_install_property (gobject_class, PROP_PERIODICITYOFIDRFRAMES, g_param_spec_uint ("periodicty-idr", "Target Bitrate", "Periodicity of IDR frames (0xffffffff=component default)", 0, G_MAXUINT, GST_OMX_H264_VIDEO_ENC_PERIODICITY_OF_IDR_FRAMES_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_MUTABLE_READY)); g_object_class_install_property (gobject_class, PROP_INTERVALOFCODINGINTRAFRAMES, g_param_spec_uint ("interval-intraframes", "Interval of coding Intra frames", "Interval of coding Intra frames (0xffffffff=component default)", 0, G_MAXUINT, GST_OMX_H264_VIDEO_ENC_INTERVAL_OF_CODING_INTRA_FRAMES_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_MUTABLE_READY)); basevideoenc_class->flush = gst_omx_h264_enc_flush; basevideoenc_class->stop = gst_omx_h264_enc_stop; videoenc_class->cdata.default_src_template_caps = "video/x-h264, " "width=(int) [ 16, 4096 ], " "height=(int) [ 16, 4096 ]"; videoenc_class->handle_output_frame = GST_DEBUG_FUNCPTR (gst_omx_h264_enc_handle_output_frame); gst_element_class_set_static_metadata (element_class, "OpenMAX H.264 Video Encoder", "Codec/Encoder/Video", "Encode H.264 video streams", "Sebastian Dröge <*****@*****.**>"); gst_omx_set_default_role (&videoenc_class->cdata, "video_encoder.avc"); }
static void gst_omx_wmv_dec_class_init (GstOMXWMVDecClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstOMXVideoDecClass *videodec_class = GST_OMX_VIDEO_DEC_CLASS (klass); videodec_class->is_format_change = GST_DEBUG_FUNCPTR (gst_omx_wmv_dec_is_format_change); videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_wmv_dec_set_format); videodec_class->cdata.default_sink_template_caps = "video/x-wmv, " "width=(int) [1,MAX], " "height=(int) [1,MAX]"; gst_element_class_set_static_metadata (element_class, "OpenMAX WMV Video Decoder", "Codec/Decoder/Video", "Decode WMV video streams", "Sebastian Dröge <*****@*****.**>"); gst_omx_set_default_role (&videodec_class->cdata, "video_decoder.wmv"); }
static void gst_omx_h264_enc_class_init (GstOMXH264EncClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstOMXVideoEncClass *videoenc_class = GST_OMX_VIDEO_ENC_CLASS (klass); videoenc_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_h264_enc_set_format); videoenc_class->get_caps = GST_DEBUG_FUNCPTR (gst_omx_h264_enc_get_caps); videoenc_class->cdata.default_src_template_caps = "video/x-h264, " "width=(int) [ 16, 4096 ], " "height=(int) [ 16, 4096 ]"; videoenc_class->handle_output_frame = GST_DEBUG_FUNCPTR (gst_omx_h264_enc_handle_output_frame); gst_element_class_set_static_metadata (element_class, "OpenMAX H.264 Video Encoder", "Codec/Encoder/Video", "Encode H.264 video streams", "Sebastian Dröge <*****@*****.**>"); gst_omx_set_default_role (&videoenc_class->cdata, "video_encoder.avc"); }
static void gst_omx_mpeg4_video_dec_class_init (GstOMXMPEG4VideoDecClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstOMXVideoDecClass *videodec_class = GST_OMX_VIDEO_DEC_CLASS (klass); videodec_class->is_format_change = GST_DEBUG_FUNCPTR (gst_omx_mpeg4_video_dec_is_format_change); videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_mpeg4_video_dec_set_format); videodec_class->cdata.default_sink_template_caps = "video/mpeg, " "mpegversion=(int) 4, " "systemstream=(boolean) false, " "parsed=(boolean) true"; gst_element_class_set_details_simple (element_class, "OpenMAX MPEG4 Video Decoder", "Codec/Decoder/Video", "Decode MPEG4 video streams", "Sebastian Dröge <*****@*****.**>"); gst_omx_set_default_role (&videodec_class->cdata, "video_decoder.mpeg4"); }
static void gst_omx_mpeg4_video_enc_class_init (GstOMXMPEG4VideoEncClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstOMXVideoEncClass *videoenc_class = GST_OMX_VIDEO_ENC_CLASS (klass); videoenc_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_mpeg4_video_enc_set_format); videoenc_class->get_caps = GST_DEBUG_FUNCPTR (gst_omx_mpeg4_video_enc_get_caps); videoenc_class->cdata.default_src_template_caps = "video/mpeg, " "mpegversion=(int) 4, " "systemstream=(boolean) false, " "width=(int) [ 16, 4096 ], " "height=(int) [ 16, 4096 ]"; gst_element_class_set_details_simple (element_class, "OpenMAX MPEG4 Video Encoder", "Codec/Encoder/Video", "Encode MPEG4 video streams", "Sebastian Dröge <*****@*****.**>"); gst_omx_set_default_role (&videoenc_class->cdata, "video_encoder.mpeg4"); }