[Bug 740965] ac3 decoder support in gst-omx 1.2

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Dec 1 04:27:08 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=740965
  GStreamer | gst-omx | 1.x

Sebastian Dröge (slomo) <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #291882|none                        |needs-work
             status|                            |

--- Comment #1 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-12-01 12:27:05 UTC ---
Review of attachment 291882:
 --> (https://bugzilla.gnome.org/review?bug=740965&attachment=291882)

Thanks for the patch, generally looks good... just some comments below :)

::: omx/gstomxac3dec.c
@@ +66,3 @@
+       "channels=(int)[1,6], "
+       "rate=(int)[8000,48000], "
+       "alignment=(string){iec61937,frame}";

Are you sure both are always supported?

@@ +90,3 @@
+  GstOMXAC3Dec *self = GST_OMX_AC3_DEC (dec);
+  OMX_PARAM_PORTDEFINITIONTYPE port_def;
+  OMX_AUDIO_PARAM_AACPROFILETYPE ac3_param;

AAC

@@ +110,3 @@
+
+  err =
+      gst_omx_component_get_parameter (dec->dec, OMX_IndexParamAudioAac,

AAC

@@ +121,3 @@
+  s = gst_caps_get_structure (caps, 0);
+
+  if (/*!gst_structure_get_int (s, "mpegversion", &mpegversion) ||*/

No mpegversion field

@@ +148,3 @@
+{
+  GstOMXAC3Dec *self = GST_OMX_AC3_DEC (dec);
+  OMX_AUDIO_PARAM_AACPROFILETYPE ac3_param;

AAC

@@ +158,3 @@
+
+  err =
+      gst_omx_component_get_parameter (dec->dec, OMX_IndexParamAudioAac,

Should be somethnig with Ac3 instead of AAC

@@ +169,3 @@
+  s = gst_caps_get_structure (caps, 0);
+
+  if (/*!gst_structure_get_int (s, "mpegversion", &mpegversion) ||*/

There is no mpegversion field for AC3

@@ +209,3 @@
+  }
+
+  /* FIXME: Rather arbitrary values here, based on what we do in gstfaac.c */

IIRC the channel positions are fixed in AC3, so we can choose proper values
here

::: omx/gstomxac3dec.h
@@ +45,3 @@
+{
+  GstOMXAudioDec parent;
+  gint spf;

No need to have that here as AC3 always has 512 samples per frame (IIRC)

::: omx/gstomxaudiodec.c
@@ +531,3 @@
     nframes = 1;
+    if (self->parent.element.object.name == "omxac3dec-omxac3dec0")
+       spf = 512;

You would implement the get_samples_per_frame() vfunc in gstomxac3dec and
return 512 there instead. Like it's done for AAC and MP3 already.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list