porting gstreamer plugins to a bitbake environent on imx27

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

porting gstreamer plugins to a bitbake environent on imx27

4,939 Views
Wierd
Contributor I
Hi all,

I am trying to port the gstreamer plugins to imx27 board. For a different purpose, I am using a bitbake environment on the imx27 board. I have downloaded the gstreamer plugins which were compiled for the freescale root fs but the plugins donot seem to be working on my system. Here are some of the errors...

############################################################################
root@mxads: ther; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:612.0pt 792.0pt; margin:70.85pt 70.85pt 70.85pt 70.85pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:smileyfrustrated:ection1;} -->

gst-launch filesrc -v location=/test.mp4 ! mfw_mp4demuxer name=demux demux. ! mfw_vpudecoder codec-type=std_mpeg4 ! mfw_v4lsink demux. &

Setting pipeline to PAUSED ...
Can't map register
ERROR: Pipeline doesn't want to pause.
Setting pipeline to NULL ...
FREEING pipeline ...

###########################################################################

Should i recompile the plugins using a different cross compiler ? I am in a bit of confusion.

Thanks ,

W.
0 Kudos
15 Replies

1,278 Views
fabio_estevam
NXP Employee
NXP Employee
If you are using the most updadeted MX27 Gstreamer plugins (for rel3 BSP) you should use a toolchain EABI version 4 compatible.
 
Also, what does "gst_inspect | grep mfw" gives you?
 
Regards,
 
Fabio Estevam
0 Kudos

1,278 Views
Wierd
Contributor I
Hi Fabio,

Thanks for the reply. The output of gst-inspect shows that the plugins are installed. Here it is :

##############################################################################
root@mx21ads: gst-inspect | grep mfw
mfw_vpudecoder:  mfw_vpudecoder: Freescale: Hardware (VPU) Decoder
mfw_v4lsrc:  mfw_v4lsrc: Freescale Video Source plug-in
mfw_v4lsink:  mfw_v4lsink: v4l_sink
mfw_mp4demuxer:  mfw_mp4demuxer: freescale-mp4 demuxer plugin
mfw_avidemuxer:  mfw_avidemuxer: FSL Avi Demuxer
mfw_vpuencoder:  mfw_vpuencoder: Freescale: Hardware (VPU) Encoder

##############################################################################

Could there be a problem in the vpu driver on the bitbake environment?

Best Regards,

W.
0 Kudos

1,278 Views
fabio_estevam
NXP Employee
NXP Employee
Is the toolchain you are using an EABI version 4 one?
 
Regards,
 
Fabio Estevam
0 Kudos

1,278 Views
Wierd
Contributor I
Hi Fabio,

The toolchain that I am using is compatible with the EABI version 4. But i have still the problem in the register mapping for the VPU in the imx27. It seems that there is a segmentation fault when it tries to map a register for the vpu. I dont know what caused this.

Best regards,

W.

0 Kudos

1,278 Views
fabio_estevam
NXP Employee
NXP Employee
I understand you want to use bitbake as your build environment, but can you try it in LTIB first, just to make sure you have all you need?
 
Does your kernel have VPU support? You can select the mxc-misc packages in LTIB (and even port it to bitbak). It contains a mxc_vpu_test folder with some tests that exercise the MX27 VPU.
 
Regards,
 
Fabio Estevam
0 Kudos

1,278 Views
Wierd
Contributor I
Dear Fabio,

As you suggested, I have first used the ltib from freescale to try the plugins and they work fine. I could stream the video. Then, I ported the gstreamer plugins to the bitbake built system, where the vpu driver problem seems to be solved now. But i am now encountered with a new problem on the demuxers. It responds with a Parsing error when i try to stream a video.
Here is the output ...

root@mx27ads:~$ gst-launch-0.10 filesrc -v location=/video/test_7.mp4 ! mfw_mp4demuxer name=demux demux. ! mfw_vpudecoder codec-type=std_avc ! mfw_v4lsink demuxi. &
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /pipeline0/demux:  Error in parsing:corrupted stream
Additional debug info:
debug none
Setting pipeline to NULL ...
FREEING pipeline ...

root@mx27ads:~$

Best regards ,

W.



0 Kudos

1,278 Views
Wierd
Contributor I
Here is a more detailed debugging result ...

root@mx27adsd:~$ gst-launch-0.10 filesrc -v location=/video/test_7.mp4 ! mfw_mp4demuxer name=demux demux. ! mfw_vpudecoder codec-type=std_avc ! mfw_v4lsink demuxi. --gst-debug-level=2


0:00:01.024446000   479 0x15050 WARN  default ./grammar.y:731:_gst_parse_yyerror: Error during parsing: syntax error, unexpected $end, expecting LINK
Setting pipeline to PAUSED ...
0:00:01.075282000   479 0x15050 ERROR   mfw_mp4demuxer mfw_gst_mp4demuxer.c:275:mfw_gst_mp4demuxer_parse: Error in initializing the mp4_parser

0:00:01.076896000   479 0x15050 WARN              GST_PADS gstpad.c:674:gst_pad_set_active:<demux:sink> Failed to activate pad
ERROR: Pipeline doesn't want to pause.
ERROR: from element /pipeline0/demux:  Error in parsing:corrupted stream
Additional debug info:
debug none
Setting pipeline to NULL ...
FREEING pipeline ...

Best regards ,

W.


0 Kudos

1,278 Views
fabio_estevam
NXP Employee
NXP Employee
What is the video codec in your test_7.mp4 file? Is it MPEG4 or H.264?
 
Regards,
 
Fabio Estevam
0 Kudos

1,278 Views
Wierd
Contributor I
Hi Fabio ,

It is a H.264 file. ection1;} -->
Video codec : avc1 – H.264 AVC


Audio codec : mp4a – MPEG-4 AAC LC

Best regards,


W.

0 Kudos

1,278 Views
admin
Specialist II
I have analogical problem with gstreamer.
I use for testing MX27_TEST_STREAMS.zip from this website (i.MX27 Codecs page).

There is only one file from this archive, than can be plays with gstreamer on i.mx27ads board with lastest LTIB_BSP Linux 2.6.22.6 pkg.


This file is named "MX27_TEST_STREAMS\MX27_TEST_STREAMS_R1\MPEG4_VPU\Kaleidoscope_mp4v_mp3_320x240_30fps_1200kbps_a_48khz_128kbps.mp4"

I use this command for plaing:
# gst-launch filesrc location=mov2.mp4 ! mfw_mp4demuxer name=demux demux. ! mfw_vpudecoder codec-type=std_mpeg4 ! mfw_v4lsink demux. ! queue max-size-buffers=0 ! mad ! alsasink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock
Got EOS from element "pipeline0".
Execution ended after 69933770000 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...

When this video is being played, sound is disappearing from time to time.

Others file from this stream pkg is cant be played:

/home/mov1.mp4 is ranamed MPEG4_VPU\kaleidoscope_mp4v_acc_480x260_24fps.mp4

mx27# gst-launch-0.10 filesrc -v location=/home/mov1.mp4 ! mfw_mp4demuxer name=demux demux. ! mfw_vpudecoder codec-type=std_avc ! mfw_v4lsink demuxi. --gst-debug-level=2
0:00:01.845198000 1791 0x15050 WARN default ./grammar.y:700:_gst_parse__yyerror: Error during parsing: syntax error, unexpected $end, expecting LINK
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:01.930515000 1791 0x94600 ERROR mfw_mp4demuxer mfw_gst_mp4demuxer.c:1280:mp4_write_audio_data:
Cannot send new segment to the src pad

0:00:01.935110000 1791 0x94600 ERROR mfw_mp4demuxer mfw_gst_mp4demuxer.c:1307:mp4_write_audio_data:
Cannot Create Output Buffer, result is -1
WARNING: from element /pipeline0/demux: pads are not negotiated!
Additional debug info:
audio pads are not negotiated!
Cannot Create Output Buffer, result is -1
0:00:02.020178000 1786 0x94600 ERROR mfw_mp4demuxer mfw_gst_mp4demuxer.c:1307:mp4_write_audio_data:
Cannot Create Output Buffer, result is -1
Caught SIGSEGV accessing address (nil)
Spinning. Please run 'gdb gst-launch 1786' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
Caught interrupt -- handling interrupt.
Interrupt: Setting pipeline to PAUSED ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...

And at dmesg has lines:
gst-launch-0.10: page allocation failure. order:8, mode:0xd1
[] (dump_stack+0x0/0x14) from [] (__alloc_pages+0x288/0x29c)
[] (__alloc_pages+0x0/0x29c) from [] (__dma_alloc+0x16c/0x42c)
[] (__dma_alloc+0x0/0x42c) from [] (dma_alloc_coherent+0x24/0x30)
[] (dma_alloc_coherent+0x0/0x30) from [] (vpu_ioctl+0xcc/0x404)
[] (vpu_ioctl+0x0/0x404) from [] (do_ioctl+0xa8/0xd0)
r7:00005600 r6:c7a87500 r5:c01d4dd8 r4:ffffffe7
[] (do_ioctl+0x0/0xd0) from [] (vfs_ioctl+0x2b4/0x2e4)
r7:00000036 r6:406063fc r5:00000006 r4:c7a87500
[] (vfs_ioctl+0x0/0x2e4) from [] (sys_ioctl+0x40/0x64)
r9:c37aa000 r8:c0026044 r6:00005600 r5:fffffff7 r4:c7a87500
[] (sys_ioctl+0x0/0x64) from [] (ret_fast_syscall+0x0/0x2c)
r6:400cb7c4 r5:406063fc r4:406063fc
Physical memory allocation error!
0 Kudos

1,278 Views
fabio_estevam
NXP Employee
NXP Employee
In order to play Kaleidoscope_mp4v_mp3_320x240_30fps_1200kbps_a_48khz_128kbps.mp4 , you need to pass codec-type=std_mpeg4  instead of codec-type=std_avc.
 
Regards,
 
Fabio Estevam
0 Kudos

1,278 Views
fabio_estevam
NXP Employee
NXP Employee
In order to play Kaleidoscope_mp4v_mp3_320x240_30fps_1200kbps_a_48khz_128kbps.mp4 you should use codec-type=std_mpeg4  instead of codec-type=std_avc
 
Regards,
 
Fabio Estevam
0 Kudos

1,278 Views
admin
Specialist II
Thanx, Fabio. Can you say, how to determinate what are "codec type" should be used with video streams for play it's? What can i do with disappearing sounds when playing videos with MAD plug-in. May be others plugins for playing mp3?

Message Edited by SFx on 2009-01-20 07:34 AM
0 Kudos

1,278 Views
FasikaAssegie
Contributor I
Hi,

I have also encountered a similar problem- porting the gstreamer plugins to a bitbake built environment. I used to have vpu driver related problems but fixed that with kernel configuration. But the problems lies with the plugins. gst-inspect shows that the plugings are installed but there is a segmentation fault when i tried to use them. I think it is also related with the register mapping problem that was stated earlier.

Anyone has any idea ?

Fasika
0 Kudos

1,278 Views
FasikaAssegie
Contributor I
Hi ,

I used a toolchain compatible with the EABI version 4 and modifications on the vpu driver on the kernel to prevent bus error [AHB-lite to AIPI]. Now the plugins seems to work with a little bit of quality degredation. Otherwise porting the plugins to the bitbake environment is successful for most of the plugins, especially the parsers. Thanks for the help ...I thought it might be useful to post the result of porting the plugins to the bitbake built system.

Best regards,

Fasika A.

0 Kudos