Build Qt from LTIB

cancel
Showing results for 
Search instead for 
Did you mean: 

Build Qt from LTIB

1,804 Views
NXP Employee
NXP Employee

As more and more people are looking into Qt on i.MX processors, I thought to make the whole process easier and make patches to allow building of latest version directly from LTIB. There's some possibilities for this already in Freescale BSPs, but for older Qt and with some issues.

 

Attached are the patches that, once applied to the BSP, will allow building latest Qt 4.7.2 directly from LTIB. Qt won't be downloaded automatically, so remember to do that and store it to /opt/freescale/pkgs .

 

Copy patches to where you've installed BSP, and apply them in order, by executing:

cat patch_name | patch -p2

 

Let me know if there's any issues....

 

(Last patch is in the next message, only 3 attachments allowed per post...)

Original Attachment has been moved to: 788-003_qt_x11.patch

Original Attachment has been moved to: 787-002_packages.patch

Original Attachment has been moved to: 786-001_ltib.patch

Tags (2)
0 Kudos
23 Replies

88 Views
Contributor II

imx53 BSP L2.6..35_11.09.01, Qt4.7.1  environment. Try your example

.....

            mPlayer = gst_element_factory_make("playbin2", NULL);
            GstElement *brace_videosink = gst_element_factory_make("mfw_v4lsink", "videosink")

            g_object_set(mPlayer, "video-sink", brace_videosink, NULL);

             gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(videosink), w->winId());

......

compile ok! But run this on board . element created failed.

I try mfw_v4lsink and mfw_isink, element created failed too.

Tks

0 Kudos

88 Views
Contributor I

@Swamy : Have you tried executing, export QWS_KEYBOARD="" , and then running your application ?

What keyboard are you using...the above should work if your keyboard is using standard drivers.

0 Kudos

88 Views
Contributor III

Hi Travis,

I followed your steps and able to build the QT4.7.4 with webkit enabled. But when I open the browser which is present in the demo folder, I am unable to use the keyboard.

Kindly tell me how to use the browser provided inside the demo folder. How to configure the keyboard.

Regards,

Swamy

0 Kudos

88 Views
Contributor I

Hello Pierluigi,

That's good to know. As i see it you can just slightly modify freescale plugin to actually work (with qt-embedded) on FB1. Are you familiar with Freescale Plugin's code in order to explain to you what to change?

 

Best Regards,

Stavros.

Pierluigi Passaro said:

Hello Stavros,

at the time being, LCD is on fb0 and DVI on fb1.

Best Regards

Pierluigi


STAVROS MARKOU said:

Hello Pierluigi,

As i understand your main LCD uses FB0 and your secondary FB1 or FB2 ? If yes then i can suggest one or two things.

Please let me know in order to help you.

Best Regards,

Stavros.

Pierluigi Passaro said:

Hello Stavros,

thanks for your reply.

I have a dual display system, with LCD as primary and DVI as secondary, and a single application managing both displays.

I need to show a video in a portion of DVI display.

As far as I understood, this is not allowed with QT embedded, so I'm trying with QT-X11.

Any suggestion will be appreciated.

 

Best Regatds

Pierluigi

 

STAVROS MARKOU said:

Hello Pierluigi,

Can you tell me first of all if you want to follow the qt/X11 version or the qt-embedded version ?

If you are going to use the qt/X11 version in order to see something on the display ( i assume that you change the state to GST_STATE_PLAYING) you don't need to do something else. On resize events you are going to need the call for

QApplication::syncX();

gst_x_overlay_expose(GST_X_OVERLAY(your_video_sink));

I shall try and make a minimal test application that works with qt/X11, but i know for fact that gstreamer API guide has an exaple like this that uses xvimagesink (you just have to replace xvimagesink with mfw_v4lsink). Currently the time i have is limited since i am working on an imx51 project which takes a lot of my time so, it's going to take a while for me to make the test app ( i shall see if i have one already ;) ).

 

Best Regards,

Stavros.

Pierluigi Passaro said:

Hi Stavros,

I tried your code snippet by actually I cannot see anything on the display.

Could be possible share a fully working example?

I' working on MX51 with LTIB release 10.11.01.

 

Thanks

Regards

Pierluigi

 

0 Kudos

90 Views
Contributor I

Hello Stavros,

at the time being, LCD is on fb0 and DVI on fb1.

Best Regards

Pierluigi


STAVROS MARKOU said:

Hello Pierluigi,

As i understand your main LCD uses FB0 and your secondary FB1 or FB2 ? If yes then i can suggest one or two things.

Please let me know in order to help you.

Best Regards,

Stavros.

Pierluigi Passaro said:

Hello Stavros,

thanks for your reply.

I have a dual display system, with LCD as primary and DVI as secondary, and a single application managing both displays.

I need to show a video in a portion of DVI display.

As far as I understood, this is not allowed with QT embedded, so I'm trying with QT-X11.

Any suggestion will be appreciated.

 

Best Regatds

Pierluigi

 

STAVROS MARKOU said:

Hello Pierluigi,

Can you tell me first of all if you want to follow the qt/X11 version or the qt-embedded version ?

If you are going to use the qt/X11 version in order to see something on the display ( i assume that you change the state to GST_STATE_PLAYING) you don't need to do something else. On resize events you are going to need the call for

QApplication::syncX();

gst_x_overlay_expose(GST_X_OVERLAY(your_video_sink));

I shall try and make a minimal test application that works with qt/X11, but i know for fact that gstreamer API guide has an exaple like this that uses xvimagesink (you just have to replace xvimagesink with mfw_v4lsink). Currently the time i have is limited since i am working on an imx51 project which takes a lot of my time so, it's going to take a while for me to make the test app ( i shall see if i have one already ;) ).

 

Best Regards,

Stavros.

Pierluigi Passaro said:

Hi Stavros,

I tried your code snippet by actually I cannot see anything on the display.

Could be possible share a fully working example?

I' working on MX51 with LTIB release 10.11.01.

 

Thanks

Regards

Pierluigi

 

0 Kudos

90 Views
Contributor I

Hello Pierluigi,

As i understand your main LCD uses FB0 and your secondary FB1 or FB2 ? If yes then i can suggest one or two things.

Please let me know in order to help you.

Best Regards,

Stavros.

Pierluigi Passaro said:

Hello Stavros,

thanks for your reply.

I have a dual display system, with LCD as primary and DVI as secondary, and a single application managing both displays.

I need to show a video in a portion of DVI display.

As far as I understood, this is not allowed with QT embedded, so I'm trying with QT-X11.

Any suggestion will be appreciated.

 

Best Regatds

Pierluigi

 

STAVROS MARKOU said:

Hello Pierluigi,

Can you tell me first of all if you want to follow the qt/X11 version or the qt-embedded version ?

If you are going to use the qt/X11 version in order to see something on the display ( i assume that you change the state to GST_STATE_PLAYING) you don't need to do something else. On resize events you are going to need the call for

QApplication::syncX();

gst_x_overlay_expose(GST_X_OVERLAY(your_video_sink));

I shall try and make a minimal test application that works with qt/X11, but i know for fact that gstreamer API guide has an exaple like this that uses xvimagesink (you just have to replace xvimagesink with mfw_v4lsink). Currently the time i have is limited since i am working on an imx51 project which takes a lot of my time so, it's going to take a while for me to make the test app ( i shall see if i have one already ;) ).

 

Best Regards,

Stavros.

Pierluigi Passaro said:

Hi Stavros,

I tried your code snippet by actually I cannot see anything on the display.

Could be possible share a fully working example?

I' working on MX51 with LTIB release 10.11.01.

 

Thanks

Regards

Pierluigi

 

0 Kudos

90 Views
Contributor I

Hello Stavros,

thanks for your reply.

I have a dual display system, with LCD as primary and DVI as secondary, and a single application managing both displays.

I need to show a video in a portion of DVI display.

As far as I understood, this is not allowed with QT embedded, so I'm trying with QT-X11.

Any suggestion will be appreciated.

 

Best Regatds

Pierluigi

 

STAVROS MARKOU said:

Hello Pierluigi,

Can you tell me first of all if you want to follow the qt/X11 version or the qt-embedded version ?

If you are going to use the qt/X11 version in order to see something on the display ( i assume that you change the state to GST_STATE_PLAYING) you don't need to do something else. On resize events you are going to need the call for

QApplication::syncX();

gst_x_overlay_expose(GST_X_OVERLAY(your_video_sink));

I shall try and make a minimal test application that works with qt/X11, but i know for fact that gstreamer API guide has an exaple like this that uses xvimagesink (you just have to replace xvimagesink with mfw_v4lsink). Currently the time i have is limited since i am working on an imx51 project which takes a lot of my time so, it's going to take a while for me to make the test app ( i shall see if i have one already ;) ).

 

Best Regards,

Stavros.

Pierluigi Passaro said:

Hi Stavros,

I tried your code snippet by actually I cannot see anything on the display.

Could be possible share a fully working example?

I' working on MX51 with LTIB release 10.11.01.

 

Thanks

Regards

Pierluigi

 

0 Kudos

90 Views
Contributor I

Hello Pierluigi,

Can you tell me first of all if you want to follow the qt/X11 version or the qt-embedded version ?

If you are going to use the qt/X11 version in order to see something on the display ( i assume that you change the state to GST_STATE_PLAYING) you don't need to do something else. On resize events you are going to need the call for

QApplication::syncX();

gst_x_overlay_expose(GST_X_OVERLAY(your_video_sink));

I shall try and make a minimal test application that works with qt/X11, but i know for fact that gstreamer API guide has an exaple like this that uses xvimagesink (you just have to replace xvimagesink with mfw_v4lsink). Currently the time i have is limited since i am working on an imx51 project which takes a lot of my time so, it's going to take a while for me to make the test app ( i shall see if i have one already ;) ).

 

Best Regards,

Stavros.

Pierluigi Passaro said:

Hi Stavros,

I tried your code snippet by actually I cannot see anything on the display.

Could be possible share a fully working example?

I' working on MX51 with LTIB release 10.11.01.

 

Thanks

Regards

Pierluigi

 


STAVROS MARKOU said:

Try this :

            mPlayer = gst_element_factory_make("playbin2", NULL);
            GstElement *brace_videosink = gst_element_factory_make("mfw_v4lsink", "videosink")

            g_object_set(mPlayer, "video-sink", brace_videosink, NULL);

             gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(videosink), w->winId());

 

This shall work only if you have qt/X11 version. Another way to do it (i am looking at this option also) is by using the properties of mfw_v4lsink to display video anywhere on the display and qt embedded.

 

Best Regards,

Stavros. 
brace said:

thanks, I am waiting to hear your good news.

By the way,can you help you to see follow code:

               mPlayer = gst_element_factory_make("playbin2", NULL);
               GstElement *videosink = gst_element_factory_make("mfw_v4lsink", NULL);

               gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(videosink), w->winId());

 

  Waring: invalid cast from `MFW_GST_V4LSINK_INFO_T' to `GstXOverlay' and sink to framebuffer ,not QWidget

  Can you give me some suggest? thank you.

 

STAVROS MARKOU said:


Hello Brace,

For the moment these classes are in development phase and not ready to be released yet. As soon as i am ready i shall release to the list a draft of what needs to be done in order to take full advantage of freescale's VPU capabilities.

Best Regards,

Stavros.
brace said:

hi,stavros markou:

     i met same problem, using qt/phonon and gstreamer freescale plugins.can you share you class sets  for media playing using the playbin2 element using mfw_v4lsink as videosink element.

     thank you!.

 

 

0 Kudos

90 Views
Contributor I

Hi Stavros,

I tried your code snippet by actually I cannot see anything on the display.

Could be possible share a fully working example?

I' working on MX51 with LTIB release 10.11.01.

 

Thanks

Regards

Pierluigi

 


STAVROS MARKOU said:

Try this :

            mPlayer = gst_element_factory_make("playbin2", NULL);
            GstElement *brace_videosink = gst_element_factory_make("mfw_v4lsink", "videosink")

            g_object_set(mPlayer, "video-sink", brace_videosink, NULL);

             gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(videosink), w->winId());

 

This shall work only if you have qt/X11 version. Another way to do it (i am looking at this option also) is by using the properties of mfw_v4lsink to display video anywhere on the display and qt embedded.

 

Best Regards,

Stavros. 
brace said:

thanks, I am waiting to hear your good news.

By the way,can you help you to see follow code:

               mPlayer = gst_element_factory_make("playbin2", NULL);
               GstElement *videosink = gst_element_factory_make("mfw_v4lsink", NULL);

               gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(videosink), w->winId());

 

  Waring: invalid cast from `MFW_GST_V4LSINK_INFO_T' to `GstXOverlay' and sink to framebuffer ,not QWidget

  Can you give me some suggest? thank you.

 

STAVROS MARKOU said:


Hello Brace,

For the moment these classes are in development phase and not ready to be released yet. As soon as i am ready i shall release to the list a draft of what needs to be done in order to take full advantage of freescale's VPU capabilities.

Best Regards,

Stavros.
brace said:

hi,stavros markou:

     i met same problem, using qt/phonon and gstreamer freescale plugins.can you share you class sets  for media playing using the playbin2 element using mfw_v4lsink as videosink element.

     thank you!.

 

 

0 Kudos

90 Views
Contributor I

Hi Vladan,

 

I modified your 003_qt_x11.patch file to use the latest Qt (4.7.4) as well as enabling the NEON extensions for (supposed) performance enhancements in certain areas and DISABLING WebKit as I did not need it.  I have not performed any tests on the actual performance benefits, but I highly doubt NEON would cause any performance degredation.

 

For anyone wishing to use the Qt Embedded patch, I attached a similarly patched file, however I did not test it to see if it works or not.

 

If you would like WebKit to be installed, just remove the -no-webkit from the ./configure line in the patch

0 Kudos

90 Views
Contributor I

This is only applicable for imx53 , right ? Or is it also applicable to the imx's...

0 Kudos

90 Views
Contributor I
Try this :

            mPlayer = gst_element_factory_make("playbin2", NULL);
            GstElement *brace_videosink = gst_element_factory_make("mfw_v4lsink", "videosink")

            g_object_set(mPlayer, "video-sink", brace_videosink, NULL);

             gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(videosink), w->winId());

 

This shall work only if you have qt/X11 version. Another way to do it (i am looking at this option also) is by using the properties of mfw_v4lsink to display video anywhere on the display and qt embedded.

 

Best Regards,

Stavros. 
brace said:

thanks, I am waiting to hear your good news.

By the way,can you help you to see follow code:

               mPlayer = gst_element_factory_make("playbin2", NULL);
               GstElement *videosink = gst_element_factory_make("mfw_v4lsink", NULL);

               gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(videosink), w->winId());

 

  Waring: invalid cast from `MFW_GST_V4LSINK_INFO_T' to `GstXOverlay' and sink to framebuffer ,not QWidget

  Can you give me some suggest? thank you.

 

STAVROS MARKOU said:


Hello Brace,

For the moment these classes are in development phase and not ready to be released yet. As soon as i am ready i shall release to the list a draft of what needs to be done in order to take full advantage of freescale's VPU capabilities.

Best Regards,

Stavros.
brace said:

hi,stavros markou:

     i met same problem, using qt/phonon and gstreamer freescale plugins.can you share you class sets  for media playing using the playbin2 element using mfw_v4lsink as videosink element.

     thank you!.

 

 

0 Kudos

90 Views
Contributor II

Hi Stavros,

        I meet a strange problem.

............

"GstElement *brace_videosink = gst_element_factory_make("mfw_v4lsink", "videosink")

..........................

when run this

element created failed.

Someone could tell me reason?

Tks

0 Kudos

90 Views
Specialist I

Please give more info. Is this a compilation or run-time issue? what BSP are you using? do you want to construct a pipeline inside QT environment?

0 Kudos

90 Views
Contributor I

thanks, I am waiting to hear your good news.

By the way,can you help you to see follow code:

               mPlayer = gst_element_factory_make("playbin2", NULL);
               GstElement *videosink = gst_element_factory_make("mfw_v4lsink", NULL);

               gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(videosink), w->winId());

 

  Waring: invalid cast from `MFW_GST_V4LSINK_INFO_T' to `GstXOverlay' and sink to framebuffer ,not QWidget

  Can you give me some suggest? thank you.

 

STAVROS MARKOU said:


Hello Brace,

For the moment these classes are in development phase and not ready to be released yet. As soon as i am ready i shall release to the list a draft of what needs to be done in order to take full advantage of freescale's VPU capabilities.

Best Regards,

Stavros.
brace said:

hi,stavros markou:

     i met same problem, using qt/phonon and gstreamer freescale plugins.can you share you class sets  for media playing using the playbin2 element using mfw_v4lsink as videosink element.

     thank you!.

 

 

0 Kudos

90 Views
Contributor I


Hello Brace,

For the moment these classes are in development phase and not ready to be released yet. As soon as i am ready i shall release to the list a draft of what needs to be done in order to take full advantage of freescale's VPU capabilities.

Best Regards,

Stavros.
brace said:

hi,stavros markou:

     i met same problem, using qt/phonon and gstreamer freescale plugins.can you share you class sets  for media playing using the playbin2 element using mfw_v4lsink as videosink element.

     thank you!.

 

 

0 Kudos

90 Views
Contributor I

hi,stavros markou:

     i met same problem, using qt/phonon and gstreamer freescale plugins.can you share you class sets  for media playing using the playbin2 element using mfw_v4lsink as videosink element.

     thank you!.

0 Kudos

90 Views
Contributor I

hi Vladan Jovanovic,

 

            These patches can be applied to imx233 ltib.....? 

0 Kudos

90 Views
Contributor I

Hello @ all,

I am currently working with qt/phonon and gstreamer freescale plugins. I have seen (the hard way) that the problem is that phonon uses decodebin instead of playbin (or playbin2) which takes advantage of the vpu for rendering the video. I have developed my own set of classes for media playing using the playbin2 element using mfw_v4lsink as videosink element.

No i can even play without any load (smoothly) even full HD movies. I still have some questions for freescale but i could not  get the help i wanted from them. In the past i tried to contact also Vladan ( i don't know if you remember me from Nanoradio with the imx31 processor then) but with no luck.

It seems that mfw_v4lsink element supports GSTXoverlay inerface but as i 've seen from the source code of the plugins it's not yet completed so i have made some modifications in order to achieve the best results.



Vladan Jovanovic said:

I have, and noticed some of the same issues. Haven't had the time to look into it, but it looks to be an issue with how Qt uses gstreamer. Needs more investigation though..

 

vladan

 

Travis Allen said:

Hi Vladan,

 

I have compiled Qt Embedded 4.7.2 but am having serious problems getting video playback to successfully work.  Even using the qmediaplayer demo that comes with Qt shows about 1 frame every few seconds.  If you use gst-launch to play directly the file plays perfectly fine.

I am using qmediaplayer -qws to run it.

 

Have you tried playing media inside Qt?

 

Travis

0 Kudos

90 Views
Contributor III

Hi,

I got the following error when I apply the first patch

 

patching file ltib
Hunk #1 FAILED at 1507.
1 out of 1 hunk FAILED -- saving rejects to file ltib.rej

 

what goes wrong here?

0 Kudos