| 1 |
BUILDING |
| 2 |
-------- |
| 3 |
|
| 4 |
(optionally, if needed, do "autoreconf -i") |
| 5 |
|
| 6 |
./configure --enable-ilservice |
| 7 |
make all |
| 8 |
sudo make install |
| 9 |
make check |
| 10 |
|
| 11 |
In case you omit the "--enable-ilservice", the service(s) will not be built. |
| 12 |
|
| 13 |
Compiling with --enable-ilservice requires that you have Bellagio |
| 14 |
(http://omxil.sourceforge.net/) installed, and that pkgconfig finds its .pc |
| 15 |
files. |
| 16 |
|
| 17 |
If necessary, set PKG_CONFIG_PATH to where ever you installed Bellagio to. |
| 18 |
|
| 19 |
Typically that would be done with something like: |
| 20 |
|
| 21 |
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig |
| 22 |
|
| 23 |
After you have successfully built and installed the service, you get three |
| 24 |
binaries into /usr/local/bin: |
| 25 |
|
| 26 |
point2pointilservice |
| 27 |
ilservice |
| 28 |
standardstructtestilservice |
| 29 |
|
| 30 |
If you didn't compile the services, you only get the proxy libraries under |
| 31 |
/usr/local/lib |
| 32 |
|
| 33 |
and you get the "omxproxystandardstructtest" test under |
| 34 |
test/standardstructs/app |
| 35 |
|
| 36 |
and you get the "simpletest" test under |
| 37 |
test/simpletest |
| 38 |
|
| 39 |
The libilproxyloader.so can be used with Bellagio core as a component loader. |
| 40 |
If you don't want to use Bellagio, you can use libilproxy.so, which provides |
| 41 |
a minimal OpenMAX IL Core interface for your IL Client. |
| 42 |
|
| 43 |
By default the proxy uses direct TCP sockets for its IPC. |
| 44 |
|
| 45 |
If you want to use NoTA H_IN3 as the IPC transport library, you must run |
| 46 |
configure with --enable-hin3proxy or with --enable-hin3spproxy (for linking |
| 47 |
against HIN3 single process libs). The NoTA H_IN3 transport has been tested with |
| 48 |
a single Ubuntu 8.04 PC running with TCP L_IN with loopback device. |
| 49 |
Using the normal, not single process libraries, requires starting two H_IN |
| 50 |
daemons, one for the IL client and one for the IL service. Use NOTA_IN_DAEMON |
| 51 |
environment variable to define the socket both for the daemons and the |
| 52 |
applications. |
| 53 |
|
| 54 |
STANDARDSTRUCTTESTILSERVICE |
| 55 |
--------------------------- |
| 56 |
The "standardstructtestilservice" is to be used only to run against the |
| 57 |
"omxproxystandardstructtest" found at: |
| 58 |
|
| 59 |
test/standardstructs/app |
| 60 |
|
| 61 |
With this test you can verify that all the OpenMAX IL standard structures can be |
| 62 |
passed over the proxy. Note that by default the proxy logging level is so low |
| 63 |
that a successful run will not show much output. Use a higher debug level in |
| 64 |
file "omx_proxy_debug.h" if you want to see the test progress. First start the |
| 65 |
service, then start the test. |
| 66 |
|
| 67 |
SIMPLETEST |
| 68 |
---------- |
| 69 |
This is very simple test which basically only verifies that your proxy is |
| 70 |
properly set up with your IL implementation library and can connect to the IL |
| 71 |
service. It enumerates the IL component names which it can see in the IL |
| 72 |
service, and prints their names. Use a higher debug level (omx_proxy_debug.h) |
| 73 |
if you want to see more tracing. |
| 74 |
|
| 75 |
To run the test, simply: |
| 76 |
1) run /usr/local/bin/point2pointilservice |
| 77 |
2) run test/simpletest/simpletest |
| 78 |
|
| 79 |
ILSERVICE |
| 80 |
--------- |
| 81 |
The "ilservice" is the full featured version of the proxy IL service, which is |
| 82 |
able to create connections and tunnels between other ilservices. Normally you |
| 83 |
would not use this unless you want to experiment with having some components |
| 84 |
in one IL service and some other components in another. Basically using this |
| 85 |
requires that you use Bellagio as the IL Core library on the client side, and |
| 86 |
instantiate multiple proxy component loaders in it. Then just start your |
| 87 |
ilservices with a sequential command line argument starting with connection |
| 88 |
id 832 (..833, 834..) |
| 89 |
|
| 90 |
POINT2POINTILSERVICE |
| 91 |
-------------------- |
| 92 |
The "point2pointilservice" is the minimal version of the proxy IL service. You |
| 93 |
simply link it against your OpenMAX IL implementation and run the executable. |
| 94 |
This is what you would most likely typically use as your IL service. |
| 95 |
|
| 96 |
TESTING WITH BELLAGIO |
| 97 |
--------------------- |
| 98 |
NOTE: This only applies to the Bellagio 0.9.1 release! |
| 99 |
|
| 100 |
Get Bellagio sources, make them, install it. Register the Bellagio components |
| 101 |
with omxregister-bellagio. Make the test applications. See that you get the |
| 102 |
audiodectest to play your ogg-files, you likely will need libasound, |
| 103 |
libasound-dev, libvorbis and libvorbis-dev libraries (in Ubuntu). Once ogg files |
| 104 |
are playing fine with Bellagio, replace the Bellagio libomxil library for the |
| 105 |
"omxaudiodectest" in its Makefile.am with libilproxy. |
| 106 |
|
| 107 |
If you want to use pkg-config, you can put this into Bellagio configure.ac: |
| 108 |
|
| 109 |
PKG_CHECK_MODULES([ILPROXY], [libilproxy]) |
| 110 |
|
| 111 |
Then you could use $(ILPROXY_LIBS) and $(ILPROXY_CFLAGS) in the Bellagio test |
| 112 |
application's Makefile.am to make things simpler. |
| 113 |
|
| 114 |
Once you have Bellagio audiodectest compiled against libilproxy and doing an |
| 115 |
|
| 116 |
ldd omxaudiodectest |
| 117 |
|
| 118 |
In the respective folder where the binary executable is, verify that you really |
| 119 |
have it correctly linked against libilproxy and all libraries are found. If |
| 120 |
all libraries are not found, you might want to try: |
| 121 |
|
| 122 |
export LD_LIBRARY_PATH=/usr/local/lib |
| 123 |
|
| 124 |
Alternatively, you could of course install to /usr or use ld.so.conf and |
| 125 |
ldconfig. |
| 126 |
|
| 127 |
Finally, when ldd shows that all libraries are found, just fire up the |
| 128 |
"point2pointilservice" and run the omxaudiodectest. It should send commands |
| 129 |
over the proxy, and if you have full logging (0x77) in omx_proxy_debug.h, |
| 130 |
you'll most likely see a lot of debug trace prints. |
| 131 |
|
| 132 |
You might still end up not hearing any music, because the Bellagio test |
| 133 |
applications are made so that they may decide to wait in callbacks for other |
| 134 |
callbacks to occur. This happens typically when port settings change due to |
| 135 |
the playback content file. There is a kludge in the proxy to circumvent this |
| 136 |
issue of waiting for callbacks in callbacks, it is put behind a compiler flag |
| 137 |
OMX_PROXY_CALLBACK_STRATEGY. See "omx_proxy_types.h". |
| 138 |
|
| 139 |
Basically, if you configure the proxy with this: |
| 140 |
|
| 141 |
./configure --enable-ilservice CFLAGS='-DOMX_PROXY_CALLBACK_STRATEGY=4' |
| 142 |
|
| 143 |
(After that, you'll need of course to make clean all install check) |
| 144 |
You will enable the callbacks strategy which allows the Bellagio test |
| 145 |
applications to sleep in as many callbacks as they wish. Using the thread |
| 146 |
spawning callback strategy is however not exactly encouraged nor are we |
| 147 |
encouraging writing OpenMAX IL client applications which require such a callback |
| 148 |
strategy. But it is there to support Bellagio. |
| 149 |
|
| 150 |
Also note that the Bellagio 0.9.1 audiodectest has a thread bug related to |
| 151 |
sending the first two buffers, which may or may not end up being sent in the |
| 152 |
order assumed by the audiodectest application. It will show as an error message |
| 153 |
about a corrupt ogg file - if you get that error you already know the proxy is |
| 154 |
working fine. Fixing the Bellagio audiodectest first two buffer send order is |
| 155 |
left as an exercise to the reader. Hint: the callback from the first buffer |
| 156 |
being emptied may happen before the second buffer is sent. |
| 157 |
|
| 158 |
COMPILER FLAGS |
| 159 |
-------------- |
| 160 |
The proxy has plenty of compiler flags, of which some are explained here. You |
| 161 |
can define these at configure time into CFLAGS: |
| 162 |
|
| 163 |
OMX_PROXY_CALLBACK_STRATEGY - values 1, 2, 4. |
| 164 |
1) is for direct callbacks, use when you want to minimize thread usage in your |
| 165 |
IL client - note that you can not call any OpenMAX IL functions over the proxy |
| 166 |
from the callback function context. The callback is executed directly in the |
| 167 |
IPC thread, thus waiting for a response from the IL service would cause a |
| 168 |
deadlock. (you can't sleep in callbacks nor do OpenMAX IL function calls) |
| 169 |
|
| 170 |
2) is for queued callbacks from a separate thread, the default. It allows you |
| 171 |
to send IL commands over the proxy in the callback context, but you can't wait |
| 172 |
for other callbacks to occur (you can't sleep in callbacks) |
| 173 |
|
| 174 |
4) is threaded callbacks. Basically only created to support Bellagio, it allows |
| 175 |
you to wait for other callbacks in the context of callbacks, and spawns new |
| 176 |
threads to do that when necessary. (you CAN sleep in callbacks) |
| 177 |
|
| 178 |
OMX_SKIP64BIT |
| 179 |
This is by default defined in configure.ac. It makes the proxy handle 64bit |
| 180 |
types in 32 bit chunks. You probably want to have this defined, but you can of |
| 181 |
course take it out if you know what you are doing. Search the sources to see |
| 182 |
the effects. |
| 183 |
|
| 184 |
IGNORE_CMIMETYPE |
| 185 |
This is by default defined in configure.ac. It makes the proxy skip cmimetype |
| 186 |
field in port definition structures. Most IL implementations have not been able |
| 187 |
to properly handle those fields. If you link the IL service against a proper |
| 188 |
IL implementation and implement your IL clients properly as well, you will want |
| 189 |
to remove this define. |
| 190 |
|
| 191 |
OMX_PROXY_USE_COMPONENT_TUNNEL_REQUEST |
| 192 |
This is by default defined for the "ilservice" executable, because the |
| 193 |
distributed IL services need to create tunnels to other IL services instead of |
| 194 |
just issuing an OMX_SetupTunnel to one IL Core. |
| 195 |
|
| 196 |
By default this is not defined for libilproxyloader, and the proxy will only |
| 197 |
send the OMX_SetupTunnel function call over to the service. OMX_SetupTunnel is |
| 198 |
faster, it only requires one message to be sent, where as the component tunnel |
| 199 |
request is always two messages. |
| 200 |
|
| 201 |
Basically you want to define this for the component loader library when you |
| 202 |
compile the loader to be used with the Bellagio IL Core and run multiple IL |
| 203 |
services. The Bellagio core will call component tunnel request in the proxy. |
| 204 |
|
| 205 |
To summarize: if you use libilproxy with libilproxyloader, you are stuck in |
| 206 |
point 2 point operation and you are better off not defining this, as |
| 207 |
OMX_SetupTunnel is faster. But it should still work if you define it. |
| 208 |
|
| 209 |
If you use libomxil (Bellagio) with libilproxyloader, you NEED to define this. |
| 210 |
|
| 211 |
DISABLING UNNECESSARY MARSHALING |
| 212 |
-------------------------------- |
| 213 |
In case your IL implementation (or client) does not need the ability to marshall |
| 214 |
all different types of OpenMAX structures (used in OMX_GetParameter / |
| 215 |
OMX_SetParameter / OMX_GetConfig / OMX_SetConfig), you might want to choose to |
| 216 |
reduce the size of the proxy by modifying the "WITH_..." #defines in the file |
| 217 |
|
| 218 |
omx_proxy_with_network_structs.h |
| 219 |
|
| 220 |
If you disable every struct by defining zeroes instead of ones, the stripped |
| 221 |
code size of point2pointilservice, for example, drops to roughly half in Ubuntu. |
| 222 |
|
| 223 |
Note that some of the "disabled" structs may still work (memcpy is used instead |
| 224 |
of the normal marshaling to a specifically packed/aligned/byteswapped structure) |
| 225 |
provided that the packing, alignment and endianness match on both sides of |
| 226 |
the proxy. |