Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Category:QtMediaHub::ST7105: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
== Assumptions ==
== Assumptions ==


# Qt 4.8.0 is configured, built and installed as per "ST7105":http://wiki.qt.io/ST7105
# Qt 4.8.0 is configured, built and installed as per "ST7105":http://wiki.qt.io/ST7105
# Can run STM’s “Test-Tool” on reference board to test media playback.
# Can run STM’s “Test-Tool” on reference board to test media playback.
# "QTDIR" and "PATH" environment variables are set to use Qt 4.8.0 crosscompiled and installed for ST7105 in your build terminal
# "QTDIR" and "PATH" environment variables are set to use Qt 4.8.0 crosscompiled and installed for ST7105 in your build terminal


== Getting Source ==
== Getting Source ==


You can get the latest source code from gitorious &quot;https://gitorious.org/qtmediahub&amp;quot;:https://gitorious.org/qtmediahub.<br />You can use &quot;sync-to-head&amp;quot;:http://gitorious.org/qtmediahub/qtmediahub/blobs/master/scripts/sync-to-head to update your sources to latest version
You can get the latest source code from gitorious "https://gitorious.org/qtmediahub":https://gitorious.org/qtmediahub.
You can use "sync-to-head":http://gitorious.org/qtmediahub/qtmediahub/blobs/master/scripts/sync-to-head to update your sources to latest version


Note that we are in the process of moving the git repositories to the qt.io.
Note that we are in the process of moving the git repositories to the qt.io.
Line 15: Line 16:
== Multimedia Playback Support ==
== Multimedia Playback Support ==


QMH uses &quot;platform specific media player application&amp;quot; (in ST's case it is the Test-Tool) to have media playback facility.<br />This is achieved using &quot;out of process integration&amp;quot; which means:-
QMH uses "platform specific media player application" (in ST's case it is the Test-Tool) to have media playback facility.
This is achieved using "out of process integration" which means:-


## Start &quot;Test-Tool&amp;quot; in background and redirect a FIFO (&quot;/tmp/stapp_fifo2&amp;quot;) to &quot;Test-Tool&amp;quot;s STDIN<br />## Redirect &quot;Test-Tool&amp;quot;'s STDOUT and STDERROR to a normal file &amp;#40;&quot;/tmp/stapp_log&amp;quot;&amp;#41;<br />## QMH issues commands to &quot;platform specific media player application&amp;quot; to another FIFO (&quot;/tmp/stapp_fifo&amp;quot;)<br />## Have an arrangement to transfer data from FIF0 (&quot;/tmp/stapp_fifo&amp;quot;) to FIFO (&quot;/tmp/stapp_fifo2&amp;quot;)<br />## And QMH collects the feedback by reading &quot;platform specific media player application&amp;quot;'s STDOUT and STDERROR
## Start "Test-Tool" in background and redirect a FIFO ("/tmp/stapp_fifo2") to "Test-Tool"s STDIN
## Redirect "Test-Tool"'s STDOUT and STDERROR to a normal file ("/tmp/stapp_log")
## QMH issues commands to "platform specific media player application" to another FIFO ("/tmp/stapp_fifo")
## Have an arrangement to transfer data from FIF0 ("/tmp/stapp_fifo") to FIFO ("/tmp/stapp_fifo2")
## And QMH collects the feedback by reading "platform specific media player application"'s STDOUT and STDERROR


This is achieved using following shell (commands in a init) script on ST7105 reference board.
This is achieved using following shell (commands in a init) script on ST7105 reference board.


<code><br />cd /root/
<code>
cd /root/


export MODULES_INSTALL_DIR=/root/modules<br />export LD_LIBRARY_PATH=/lib:/usr/lib:/root/modules:$LD_LIBRARY_PATH
export MODULES_INSTALL_DIR=/root/modules
export LD_LIBRARY_PATH=/lib:/usr/lib:/root/modules:$LD_LIBRARY_PATH


rm -f /tmp/stapp_fifo /tmp/stapp_fifo2 /tmp/stapp_log<br />mkfifo /tmp/stapp_fifo<br />mkfifo /tmp/stapp_fifo2
rm -f /tmp/stapp_fifo /tmp/stapp_fifo2 /tmp/stapp_log
mkfifo /tmp/stapp_fifo
mkfifo /tmp/stapp_fifo2


( source /root/modules/load_modules.sh &amp;&amp; /root/main_iptv7105_7105_ST40_LINUX_32BITS.out &lt;/tmp/stapp_fifo2 &gt;/tmp/stapp_log 2&amp;gt;&amp;1 &amp; )<br />sleep 10<br />( while [ 1 ] ; do cat /tmp/stapp_fifo &gt;/tmp/stapp_fifo2 ; done &amp; )<br />sleep 10<br />echo '' &gt; /tmp/stapp_fifo<br />sleep 10<br />echo 'VTG_SETMODE 0 +33' &gt; /tmp/stapp_fifo<br />sleep 10<br />echo '' &gt; /tmp/stapp_fifo<br />sleep 10<br />( source /root/modules/load_fb.sh HD )<br />sleep 10<br /></code>
( source /root/modules/load_modules.sh &amp;&amp; /root/main_iptv7105_7105_ST40_LINUX_32BITS.out </tmp/stapp_fifo2 >/tmp/stapp_log 2>&amp;1 &amp; )
sleep 10
( while [ 1 ] ; do cat /tmp/stapp_fifo >/tmp/stapp_fifo2 ; done &amp; )
sleep 10
echo '' > /tmp/stapp_fifo
sleep 10
echo 'VTG_SETMODE 0 +33' > /tmp/stapp_fifo
sleep 10
echo '' > /tmp/stapp_fifo
sleep 10
( source /root/modules/load_fb.sh HD )
sleep 10
</code>


ST7105 specific media control integration can be found in files &quot;mediaplayerST7105.h&amp;quot;:http://gitorious.org/qtmediahub/qtmediahub-core/blobs/master/src/mediaplayer/mediaplayerST7105.h and &quot;mediaplayerST7105.cpp&amp;quot;:http://gitorious.org/qtmediahub/qtmediahub-core/blobs/master/src/mediaplayer/mediaplayerST7105.cpp
ST7105 specific media control integration can be found in files "mediaplayerST7105.h":http://gitorious.org/qtmediahub/qtmediahub-core/blobs/master/src/mediaplayer/mediaplayerST7105.h and "mediaplayerST7105.cpp":http://gitorious.org/qtmediahub/qtmediahub-core/blobs/master/src/mediaplayer/mediaplayerST7105.cpp


== Configuring ==
== Configuring ==


Use &quot; -media-backend ST7105&amp;quot; configure option to enable multimedia playback capability of QMH
Use " -media-backend ST7105" configure option to enable multimedia playback capability of QMH


<code><br />cd /path/to/qtmediahub/<br />/path/to/qtmediahub/configure -media-backend ST7105<br /></code>
<code>
cd /path/to/qtmediahub/
/path/to/qtmediahub/configure -media-backend ST7105
</code>


== Building ==
== Building ==
Line 41: Line 66:
Build QMH as follows
Build QMH as follows


<code><br />cd /path/to/qtmediahub/<br />make<br /></code>
<code>
cd /path/to/qtmediahub/
make
</code>


== Installing ==
== Installing ==


As installation of QMH on ST7105 reference board copy entire &quot;qtmediahub&amp;quot; directory so that its path is exactly same as that on build machine.
As installation of QMH on ST7105 reference board copy entire "qtmediahub" directory so that its path is exactly same as that on build machine.


== Running QMH on Qt 4.8 (QWS) ==
== Running QMH on Qt 4.8 (QWS) ==
Line 51: Line 79:
Setup QTDIR, QWS_KEYBOARD, QWS_MOUSE_PROTO and LD_LIBRARY_PATH environment variables as follows
Setup QTDIR, QWS_KEYBOARD, QWS_MOUSE_PROTO and LD_LIBRARY_PATH environment variables as follows


<code><br />export QTDIR=/path/to/installed/qt-everywhere-opensource-src-4.8.0/<br />export QWS_KEYBOARD=&quot;LinuxInput:/dev/input/event0&amp;quot; //Use appropriate device node<br />export QWS_MOUSE_PROTO=&quot;LinuxInput:/dev/input/event1&amp;quot; //Use appropriate device node<br />export LD_LIBRARY_PATH=${QTDIR}/lib/:${LD_LIBRARY_PATH}<br />export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:&quot;/path/to/qtmediahub/qtmediahub-core/hub/lib/&amp;quot;<br /></code>
<code>
export QTDIR=/path/to/installed/qt-everywhere-opensource-src-4.8.0/
export QWS_KEYBOARD="LinuxInput:/dev/input/event0" //Use appropriate device node
export QWS_MOUSE_PROTO="LinuxInput:/dev/input/event1" //Use appropriate device node
export LD_LIBRARY_PATH=${QTDIR}/lib/:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"/path/to/qtmediahub/qtmediahub-core/hub/lib/"
</code>


Rum QMH as follows to use DirectFB
Rum QMH as follows to use DirectFB


<code><br />cd /path/to/qtmediahub/<br />/path/to/qtmediahub/qtmediahub-core/hub/bin/qtmediahub -qws -display directfb -skin=delphin -overlayMode=true -opengl-usage=false -opengl-viewport=false -opengl-format-hack=false<br /></code>
<code>
cd /path/to/qtmediahub/
/path/to/qtmediahub/qtmediahub-core/hub/bin/qtmediahub -qws -display directfb -skin=delphin -overlayMode=true -opengl-usage=false -opengl-viewport=false -opengl-format-hack=false
</code>


Rum QMH as follows to use Linux Frame Buffer
Rum QMH as follows to use Linux Frame Buffer


<code><br />cd /path/to/qtmediahub/<br />/path/to/qtmediahub/qtmediahub-core/hub/bin/qtmediahub -qws -display -keyboard -mouse linuxfb -skin=confluence— -overlayMode=true -opengl-usage=false -opengl-viewport=false -opengl-format-hack=false<br /></code>
<code>
cd /path/to/qtmediahub/
/path/to/qtmediahub/qtmediahub-core/hub/bin/qtmediahub -qws -display -keyboard -mouse linuxfb -skin=confluence— -overlayMode=true -opengl-usage=false -opengl-viewport=false -opengl-format-hack=false
</code>

Revision as of 11:12, 25 February 2015

h1. Running QtMediaHub on ST7105

Assumptions

  1. Qt 4.8.0 is configured, built and installed as per "ST7105":http://wiki.qt.io/ST7105
  2. Can run STM’s “Test-Tool” on reference board to test media playback.
  3. "QTDIR" and "PATH" environment variables are set to use Qt 4.8.0 crosscompiled and installed for ST7105 in your build terminal

Getting Source

You can get the latest source code from gitorious "https://gitorious.org/qtmediahub":https://gitorious.org/qtmediahub. You can use "sync-to-head":http://gitorious.org/qtmediahub/qtmediahub/blobs/master/scripts/sync-to-head to update your sources to latest version

Note that we are in the process of moving the git repositories to the qt.io.

Multimedia Playback Support

QMH uses "platform specific media player application" (in ST's case it is the Test-Tool) to have media playback facility. This is achieved using "out of process integration" which means:-

    1. Start "Test-Tool" in background and redirect a FIFO ("/tmp/stapp_fifo2") to "Test-Tool"s STDIN
    2. Redirect "Test-Tool"'s STDOUT and STDERROR to a normal file ("/tmp/stapp_log")
    3. QMH issues commands to "platform specific media player application" to another FIFO ("/tmp/stapp_fifo")
    4. Have an arrangement to transfer data from FIF0 ("/tmp/stapp_fifo") to FIFO ("/tmp/stapp_fifo2")
    5. And QMH collects the feedback by reading "platform specific media player application"'s STDOUT and STDERROR

This is achieved using following shell (commands in a init) script on ST7105 reference board.

cd /root/

export MODULES_INSTALL_DIR=/root/modules
export LD_LIBRARY_PATH=/lib:/usr/lib:/root/modules:$LD_LIBRARY_PATH

rm -f /tmp/stapp_fifo /tmp/stapp_fifo2 /tmp/stapp_log
mkfifo /tmp/stapp_fifo
mkfifo /tmp/stapp_fifo2

( source /root/modules/load_modules.sh &amp;&amp; /root/main_iptv7105_7105_ST40_LINUX_32BITS.out </tmp/stapp_fifo2 >/tmp/stapp_log 2>&amp;1 &amp; )
sleep 10
( while [ 1 ] ; do cat /tmp/stapp_fifo >/tmp/stapp_fifo2 ; done &amp; )
sleep 10
echo '' > /tmp/stapp_fifo
sleep 10
echo 'VTG_SETMODE 0 +33' > /tmp/stapp_fifo
sleep 10
echo '' > /tmp/stapp_fifo
sleep 10
( source /root/modules/load_fb.sh HD )
sleep 10

ST7105 specific media control integration can be found in files "mediaplayerST7105.h":http://gitorious.org/qtmediahub/qtmediahub-core/blobs/master/src/mediaplayer/mediaplayerST7105.h and "mediaplayerST7105.cpp":http://gitorious.org/qtmediahub/qtmediahub-core/blobs/master/src/mediaplayer/mediaplayerST7105.cpp

Configuring

Use " -media-backend ST7105" configure option to enable multimedia playback capability of QMH

cd /path/to/qtmediahub/
/path/to/qtmediahub/configure -media-backend ST7105

Building

Build QMH as follows

cd /path/to/qtmediahub/
make

Installing

As installation of QMH on ST7105 reference board copy entire "qtmediahub" directory so that its path is exactly same as that on build machine.

Running QMH on Qt 4.8 (QWS)

Setup QTDIR, QWS_KEYBOARD, QWS_MOUSE_PROTO and LD_LIBRARY_PATH environment variables as follows

export QTDIR=/path/to/installed/qt-everywhere-opensource-src-4.8.0/
export QWS_KEYBOARD="LinuxInput:/dev/input/event0" //Use appropriate device node
export QWS_MOUSE_PROTO="LinuxInput:/dev/input/event1" //Use appropriate device node
export LD_LIBRARY_PATH=${QTDIR}/lib/:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"/path/to/qtmediahub/qtmediahub-core/hub/lib/"

Rum QMH as follows to use DirectFB

cd /path/to/qtmediahub/
/path/to/qtmediahub/qtmediahub-core/hub/bin/qtmediahub -qws -display directfb -skin=delphin -overlayMode=true -opengl-usage=false -opengl-viewport=false -opengl-format-hack=false

Rum QMH as follows to use Linux Frame Buffer

cd /path/to/qtmediahub/
/path/to/qtmediahub/qtmediahub-core/hub/bin/qtmediahub -qws -display -keyboard -mouse linuxfb -skin=confluence -overlayMode=true -opengl-usage=false -opengl-viewport=false -opengl-format-hack=false

This category currently contains no pages or media.