/* TODO: Make this configurable */
videodec_class->core_name = "/usr/local/lib/libomxil-bellagio.so.0";
videodec_class->component_name = "OMX.st.video_decoder.mpeg4";
+ videodec_class->in_port_index = 0;
+ videodec_class->out_port_index = 1;
videodec_class->is_format_change =
GST_DEBUG_FUNCPTR (gst_omx_mpeg4_video_dec_is_format_change);
GST_DEBUG_FUNCPTR (gst_omx_video_dec_handle_frame);
base_video_decoder_class->finish =
GST_DEBUG_FUNCPTR (gst_omx_video_dec_finish);
+
+ klass->in_port_index = 0;
+ klass->out_port_index = 1;
}
static void
return FALSE;
/* FIXME: Always 0 == input, 1 == output? Make configurable? Let subclass decide? */
- self->in_port = gst_omx_component_add_port (self->component, 0);
- self->out_port = gst_omx_component_add_port (self->component, 1);
+ self->in_port =
+ gst_omx_component_add_port (self->component, klass->in_port_index);
+ self->out_port =
+ gst_omx_component_add_port (self->component, klass->out_port_index);
if (!self->in_port || !self->out_port)
return FALSE;
const gchar *core_name;
const gchar *component_name;
+
+ guint32 in_port_index, out_port_index;
gboolean (*is_format_change) (GstOMXVideoDec * self, GstOMXPort * port, GstVideoState * state);
gboolean (*set_format) (GstOMXVideoDec * self, GstOMXPort * port, GstVideoState * state);