mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
omxvideoenc: Set the coding type in the subclasses to the specific codec
This commit is contained in:
parent
42937eaea0
commit
eef92abf28
3 changed files with 21 additions and 0 deletions
|
@ -81,12 +81,19 @@ gst_omx_h263_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port,
|
|||
{
|
||||
GstOMXH263Enc *self = GST_OMX_H263_ENC (enc);
|
||||
GstCaps *peercaps;
|
||||
OMX_PARAM_PORTDEFINITIONTYPE port_def;
|
||||
OMX_VIDEO_H263PROFILETYPE profile = OMX_VIDEO_H263ProfileBaseline;
|
||||
OMX_VIDEO_H263LEVELTYPE level = OMX_VIDEO_H263Level10;
|
||||
OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
|
||||
OMX_ERRORTYPE err;
|
||||
guint profile_id, level_id;
|
||||
|
||||
gst_omx_port_get_port_definition (port, &port_def);
|
||||
port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingH263;
|
||||
err = gst_omx_port_update_port_definition (port, &port_def);
|
||||
if (err != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
|
||||
peercaps = gst_pad_peer_query_caps (GST_VIDEO_ENCODER_SRC_PAD (enc),
|
||||
gst_pad_get_pad_template_caps (GST_VIDEO_ENCODER_SRC_PAD (enc)));
|
||||
if (peercaps) {
|
||||
|
|
|
@ -85,12 +85,19 @@ gst_omx_h264_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port,
|
|||
{
|
||||
GstOMXH264Enc *self = GST_OMX_H264_ENC (enc);
|
||||
GstCaps *peercaps;
|
||||
OMX_PARAM_PORTDEFINITIONTYPE port_def;
|
||||
OMX_VIDEO_AVCPROFILETYPE profile = OMX_VIDEO_AVCProfileBaseline;
|
||||
OMX_VIDEO_AVCLEVELTYPE level = OMX_VIDEO_AVCLevel11;
|
||||
OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
|
||||
OMX_ERRORTYPE err;
|
||||
const gchar *profile_string, *level_string;
|
||||
|
||||
gst_omx_port_get_port_definition (port, &port_def);
|
||||
port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingAVC;
|
||||
err = gst_omx_port_update_port_definition (port, &port_def);
|
||||
if (err != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
|
||||
peercaps = gst_pad_peer_query_caps (GST_VIDEO_ENCODER_SRC_PAD (enc),
|
||||
gst_pad_get_pad_template_caps (GST_VIDEO_ENCODER_SRC_PAD (enc)));
|
||||
if (peercaps) {
|
||||
|
|
|
@ -85,12 +85,19 @@ gst_omx_mpeg4_video_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port,
|
|||
{
|
||||
GstOMXMPEG4VideoEnc *self = GST_OMX_MPEG4_VIDEO_ENC (enc);
|
||||
GstCaps *peercaps, *intersection;
|
||||
OMX_PARAM_PORTDEFINITIONTYPE port_def;
|
||||
OMX_VIDEO_MPEG4PROFILETYPE profile = OMX_VIDEO_MPEG4ProfileSimple;
|
||||
OMX_VIDEO_MPEG4LEVELTYPE level = OMX_VIDEO_MPEG4Level1;
|
||||
OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
|
||||
OMX_ERRORTYPE err;
|
||||
const gchar *profile_string, *level_string;
|
||||
|
||||
gst_omx_port_get_port_definition (port, &port_def);
|
||||
port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingMPEG4;
|
||||
err = gst_omx_port_update_port_definition (port, &port_def);
|
||||
if (err != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
|
||||
peercaps = gst_pad_peer_query_caps (GST_VIDEO_ENCODER_SRC_PAD (enc), NULL);
|
||||
if (peercaps) {
|
||||
GstStructure *s;
|
||||
|
|
Loading…
Reference in a new issue