Category:QtMediaHub::ST7108: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Running QtMediaHub on ST7108=
h1. Running QtMediaHub on ST7108


==Assumptions==
== Assumptions ==


# Qt 4.8.0 is configured, built and installed as per [[ST7108]] ''[qt.io]''
# Qt 4.8.0 is configured, built and installed as per "ST7108":http://wiki.qt.io/ST7108
# Can run STM’s “Test-Tool” on reference board to test OpenGL ES 2.0 and media playback.
# Can run STM’s “Test-Tool” on reference board to test OpenGL ES 2.0 and media playback.
# “<span class="caps">QTDIR</span>” and “<span class="caps">PATH</span>” environment variables are set to use Qt 4.8.0 cross compiled and installed for ST7108 in your build terminal
# &quot;QTDIR&amp;quot; and &quot;PATH&amp;quot; environment variables are set to use Qt 4.8.0 cross compiled and installed for ST7108 in your build terminal


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


You can get the latest source code from gitorious https://gitorious.org/qtmediahub ''[gitorious.org]''.<br /> You can use [http://gitorious.org/qtmediahub/qtmediahub/blobs/master/scripts/sync-to-head sync-to-head] ''[gitorious.org]'' to update your sources to latest version
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


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.


==Multimedia Playback Support==
== Multimedia Playback Support ==


<span class="caps">QMH</span> uses “platform specific media player application” (in ST’s case it is the Test-Tool) to have media playback facility.<br /> This is achieved using “out of process integration” which means:-
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:-


# Start “Test-Tool” in background and redirect a <span class="caps">FIFO</span> (/tmp/stapp_fifo2”) to “Test-Tool“s <span class="caps">STDIN</span>
## 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
# Redirect “Test-Tool”‘s <span class="caps">STDOUT</span> and <span class="caps">STDERROR</span> to a normal file (”/tmp/stapp_log”)
# <span class="caps">QMH</span> issues commands to “platform specific media player application” to another <span class="caps">FIFO</span> (/tmp/stapp_fifo”)
# Have an arrangement to transfer data from FIF0 (/tmp/stapp_fifo”) to <span class="caps">FIFO</span> (/tmp/stapp_fifo2”)
# And <span class="caps">QMH</span> collects the feedback by reading “platform specific media player application”‘s <span class="caps">STDOUT</span> and <span class="caps">STDERROR</span>


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


ST7108 specific media control integration can be found in files [http://gitorious.org/qtmediahub/qtmediahub-core/blobs/master/src/mediaplayer/mediaplayerST7108.h mediaplayerST7108.h] ''[gitorious.org]'' and [http://gitorious.org/qtmediahub/qtmediahub-core/blobs/master/src/mediaplayer/mediaplayerST7108.cpp mediaplayerST7108.cpp] ''[gitorious.org]''
<code><br />rm -f /tmp/stapp_fifo /tmp/stapp_fifo2 /tmp/stapp_log<br />mkfifo /tmp/stapp_fifo<br />mkfifo /tmp/stapp_fifo2<br />( source /modules/load_env.sh &amp;&amp; /main_hdk7108_7108_ST40HOST_LINUX_32BITS.out &lt;/tmp/stapp_fifo2 &gt;/tmp/stapp_log 2&amp;gt;&amp;1 &amp; )<br />sleep 1<br />( while [ 1 ] ; do cat /tmp/stapp_fifo &gt;/tmp/stapp_fifo2 ; done &amp; )<br />echo '' &gt; /tmp/stapp_fifo<br />sleep 5<br /></code>


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


Use “ -media-backend ST7108” configure option to enable multimedia playback capability of <span class="caps">QMH</span>
== Configuring ==


==Building==
Use &quot; -media-backend ST7108&amp;quot; configure option to enable multimedia playback capability of QMH


Build <span class="caps">QMH</span> as follows
<code><br />cd /path/to/qtmediahub/<br />/path/to/qtmediahub/configure -media-backend ST7108<br /></code>


==Installing==
== Building ==


As installation of <span class="caps">QMH</span> on ST7108 reference board copy entire “qtmediahub” directory so that its path is exactly same as that on build machine.
Build QMH as follows


==Running <span class="caps">QMH</span> on Qt 4.8 (<span class="caps">QWS</span>)==
<code><br />cd /path/to/qtmediahub/<br />make<br /></code>


Setup <span class="caps">QTDIR</span>, <span class="caps">QWS</span>_KEYBOARD, <span class="caps">QWS</span>_MOUSE_PROTO and LD_LIBRARY_PATH environment variables as follows
== Installing ==


Rum <span class="caps">QMH</span> as follows to use OpenGL ES 2.0
As installation of QMH on ST7108 reference board copy entire &quot;qtmediahub&amp;quot; directory so that its path is exactly same as that on build machine.


Rum <span class="caps">QMH</span> as follows to use DirectFB
<code><br />cd /path/to/<br />rsync -arv /path/to/qtmediahub root</code>&lt;ST7108 IP Address&amp;gt;:/path/to/<br /><code>


Rum <span class="caps">QMH</span> as follows to use Linux Frame Buffer
== Running QMH on Qt 4.8 (QWS) ==


===There is only one article in "QtMediaHub -&gt; ST7108":===
Setup QTDIR, QWS_KEYBOARD, QWS_MOUSE_PROTO and LD_LIBRARY_PATH environment variables as follows


===Q===
</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>
* [[:Category:QtMediaHub::Supported Platforms|Category:QtMediaHub -&gt; Supported_Platforms]]
 
Rum QMH as follows to use OpenGL ES 2.0
 
</code><br />cd /path/to/qtmediahub/<br />/path/to/qtmediahub/qtmediahub-core/hub/bin/qtmediahub -qws -keyboard -mouse -display eglnullws:size=1280x720 -skin=confluence -overlayMode=true -opengl-usage=true -opengl-viewport=true -opengl-format-hack=false<br /><code>
 
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>
 
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>

Revision as of 11:23, 24 February 2015

h1. Running QtMediaHub on ST7108

Assumptions

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

Getting Source

You can get the latest source code from gitorious "https://gitorious.org/qtmediahub&quot;:https://gitorious.org/qtmediahub.
You can use "sync-to-head&quot;: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&quot; (in ST's case it is the Test-Tool) to have media playback facility.
This is achieved using "out of process integration&quot; which means:-

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

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

<br />rm -f /tmp/stapp_fifo /tmp/stapp_fifo2 /tmp/stapp_log<br />mkfifo /tmp/stapp_fifo<br />mkfifo /tmp/stapp_fifo2<br />( source /modules/load_env.sh &amp;&amp; /main_hdk7108_7108_ST40HOST_LINUX_32BITS.out &lt;/tmp/stapp_fifo2 &gt;/tmp/stapp_log 2&amp;gt;&amp;1 &amp; )<br />sleep 1<br />( while [ 1 ] ; do cat /tmp/stapp_fifo &gt;/tmp/stapp_fifo2 ; done &amp; )<br />echo '' &gt; /tmp/stapp_fifo<br />sleep 5<br />

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

Configuring

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

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

Building

Build QMH as follows

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

Installing

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

<br />cd /path/to/<br />rsync -arv /path/to/qtmediahub root

<ST7108 IP Address&gt;:/path/to/

== 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&quot; //Use appropriate device node
export QWS_MOUSE_PROTO="LinuxInput:/dev/input/event1&quot; //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/&quot;

Rum QMH as follows to use OpenGL ES 2.0


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

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.