i.MX6Q/BSP3.10.17 LPCM/MPEG-2 with gStreamer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6Q/BSP3.10.17 LPCM/MPEG-2 with gStreamer

915 Views
norishinozaki
Contributor V

Hello,

My customer is developing using i.MX6Q and BSP 3.10.17.

They would like to use LPCM in MPEG2-PS, and asking the spec such as bit rates, bit width and depth.

Are LPCM and MPEG2-PS supported in the BSP from the beginning?

As far as I checked, there is a table in  i.MX_6_Series_Yocto_Project_Multimedia_Release_Notes.pdf.

pastedImage_0.png

I'm not sure this PCM means LPCM and the MPG2 includes Program Stream or not.

I also checked "audio/x-raw-int" fields by # gst-inspect in QSabreSD, however the results is not satisfaction.

# gst-inspect wavenc

  SINK template: 'sink'

    Availability: Always

    Capabilities:

      audio/x-raw-int

                   rate: [ 1, 2147483647 ]

               channels: [ 1, 2 ]

             endianness: 1234

                  width: 32

                  depth: 32

                 signed: true

      audio/x-raw-int

                   rate: [ 1, 2147483647 ]

               channels: [ 1, 2 ]

             endianness: 1234

                  width: 24

                  depth: 24

                 signed: true

      audio/x-raw-int

                   rate: [ 1, 2147483647 ]

               channels: [ 1, 2 ]

             endianness: 1234

                  width: 16

                  depth: 16

                 signed: true

      audio/x-raw-int

                   rate: [ 1, 2147483647 ]

               channels: [ 1, 2 ]

                  width: 8

                  depth: 8

                 signed: false

      audio/x-raw-float

                   rate: [ 1, 2147483647 ]

               channels: [ 1, 2 ]

             endianness: 1234

                  width: { 32, 64 }

# gst-inspect wavparse

      audio/x-raw-int

             endianness: 1234

                 signed: { true, false }

                  width: { 8, 16, 24, 32 }

                  depth: [ 1, 32 ]

                   rate: [ 1000, 192000 ]

               channels: [ 1, 8 ]

# gst-inspect auparse | more

  SRC template: 'src'

    Availability: Sometimes

    Capabilities:

      audio/x-raw-int

                   rate: [ 1, 2147483647 ]

               channels: [ 1, 2147483647 ]

             endianness: { 1234, 4321 }

                  width: { 8, 16, 24, 32 }

                  depth: [ 1, 32 ]

                 signed: { true, false }

      audio/x-raw-float

                   rate: [ 1, 2147483647 ]

               channels: [ 1, 2147483647 ]

             endianness: { 1234, 4321 }

                  width: { 32, 64 }

# gst-inspect osssink

Pad Templates:

  SINK template: 'sink'

    Availability: Always

    Capabilities:

      audio/x-raw-int

             endianness: { 1234 }

                 signed: { true, false }

                  width: 16

                  depth: 16

                   rate: [ 1, 2147483647 ]

               channels: [ 1, 2 ]

      audio/x-raw-int

                 signed: { true, false }

                  width: 8

                  depth: 8

                   rate: [ 1, 2147483647 ]

               channels: [ 1, 2 ]

Best regards,

Nori Shinozaki

Labels (2)
0 Kudos
4 Replies

466 Views
gusarambula
NXP TechSupport
NXP TechSupport

Have you tried the following command:

$ gst-inspect | grep imx

It should list the mpeg2 decoder:

mpeg2dec.imx: mfw_mpeg2decoder: mpeg2 video decoder

If not please make sure that the gstreamer package is selected on your image or add it on the local.conf file.

+ IMAGE_INSTALL_append=” packagegroup-fsl-gstreamer”

0 Kudos

466 Views
norishinozaki
Contributor V

Hello, Thank you,

Yes, mpeg2dec is fine.

The trouble is demuxer(aiurdemux).

Please take a look at attached logs from gst-launch.

If LPCM format is S16BE, aiurdemux can demux video(MPEG2) and audio(LPCM) successfully.

However if it's S24BE, aiurdemux can't recognize the format type correctly.

The gst-launch log says "aiurdemux aiurdemux.c:3208:aiurdemux_parse_audio: Unknown Audio code-type=1, sub-type=8"

Snap39.jpg

I checked sub-type=8 is defined as AUDIO_PCM_DVD in fsl_media_types.h

However in aiurdemux_parse_audio() in aiurdemux.c, AUDIO_PCM_DVD is not checked in case AUDIO_PCM sentence in line 3029.

Why is AUDIO_PCM_DVD not checked here?

How AUDIO_PCM_S24BE  and AUDIO_PCM_DVD are distinguished?

Best regards,

Nori Shinozaki

0 Kudos

466 Views
norishinozaki
Contributor V

Hello Champs,

Let me summerize this issue.

The customer would like to support a DVD format with gStreamer.

They are trying to re-use a FSL's aiurdemux plugin for the implementation.

The version is gst-fsl-plugins-3.0.7 in L3.0.35_4.1.0_130816.

However aiurdemux doesn't support some LPCM formats necessory for DVD, such as 20bit LPCM, big or little, signed or unsigned.

When we tried to look into the perser source, we found out the source code is not open.

It's a CORE_API (inf, getTrackType,,..). the implementation seems like Mpeg2GetTrackType in  lib_mpg2_parser_arm11_elinux_hfp.so.3.1

Now we have come to a conclusion that there is one out of following solutions which the customer can take.

1. Freescale to modify aiurdemux to support full DVD format as the customer requests.

2. Freescale to disclose parser source code for the customer to modify by themselves.

3. Ask Richo to find other gStreamer demuxer plugin, if any.

4. Ask Richo to go to other multi-media middleware than gStreamer.

Could you please find any possibilities for #1 and 2?

Best regards,

Nori Shinozaki

0 Kudos

466 Views
gusarambula
NXP TechSupport
NXP TechSupport

I apologize. Unfortunately as mentioned on the note below table 3 of the Multimedia Release Notes, the demuxer support of a certain audio or video type does not necessarily mean that it can be played. This depends on the availability of the codec.

There was a known issue listed on previous releases of the BSP documentation where 24-bit PCM output was not supported by ALSALIB. In this scenario it would seems that the Linux Driver Audio might be part of the limitation as you mentioned.

The gstreamer source code is available on the BSP. You may find some more information on building gstreamer plugins on the following thread:

https://community.freescale.com/thread/300387

As for the possibility of Freescale to modify aiurdemux  I would recommend consulting the Professional Engineering Services (link below)

http://www.freescale.com/webapp/sps/site/overview.jsp?code=CW_PROFESSIONAL

0 Kudos