omxaacenc: Implement ::get_num_samples() vfunc

This commit is contained in:
Sebastian Dröge 2011-08-17 13:04:19 +02:00
parent d1e1980e01
commit 0928205ed4

View file

@ -39,6 +39,8 @@ static gboolean gst_omx_aac_enc_set_format (GstOMXAudioEnc * enc,
GstOMXPort * port, GstAudioState * state);
static GstCaps *gst_omx_aac_enc_get_caps (GstOMXAudioEnc * enc,
GstOMXPort * port, GstAudioState * state);
static guint gst_omx_aac_enc_get_num_samples (GstOMXAudioEnc * enc,
GstOMXPort * port, GstAudioState * state, GstOMXBuffer * buf);
enum
{
@ -156,6 +158,8 @@ gst_omx_aac_enc_class_init (GstOMXAACEncClass * klass)
audioenc_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_aac_enc_set_format);
audioenc_class->get_caps = GST_DEBUG_FUNCPTR (gst_omx_aac_enc_get_caps);
audioenc_class->get_num_samples =
GST_DEBUG_FUNCPTR (gst_omx_aac_enc_get_num_samples);
audioenc_class->default_src_template_caps = "audio/mpeg, "
"mpegversion=(int){2, 4}, "
@ -430,3 +434,11 @@ gst_omx_aac_enc_get_caps (GstOMXAudioEnc * enc, GstOMXPort * port,
return caps;
}
static guint
gst_omx_aac_enc_get_num_samples (GstOMXAudioEnc * enc, GstOMXPort * port,
GstAudioState * state, GstOMXBuffer * buf)
{
/* FIXME: Depends on the profile at least */
return 1024;
}