09.02.2013 Views

Sviluppo di una piattaforma per lo streaming multimediale - MobiLab ...

Sviluppo di una piattaforma per lo streaming multimediale - MobiLab ...

Sviluppo di una piattaforma per lo streaming multimediale - MobiLab ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Open <strong>lo</strong>calhost 5554<br />

dobbiamo aprire le porte dell'AVD:<br />

re<strong>di</strong>r add udp:11001:10001<br />

re<strong>di</strong>r add udp:11002:10002<br />

<strong>Sviluppo</strong> <strong>di</strong> <strong>una</strong> <strong>piattaforma</strong> <strong>per</strong> <strong>lo</strong> <strong>streaming</strong> multime<strong>di</strong>ale in ambiente Android<br />

In tal modo abbiamo fatto sì che <strong>per</strong> riferirsi al porto 10.0.2.15:10001 con protocol<strong>lo</strong><br />

UDP, si debba comunicare sulla macchina <strong>lo</strong>cale riferendosi al proprio in<strong>di</strong>rizzo sul<br />

porto 11001 (<strong>per</strong> esempio 192.168.1.12:11001, oppure 127.0.0.1:11001).<br />

Ma a valle <strong>di</strong> queste mo<strong>di</strong>fiche è ancora impossibile stabilire <strong>una</strong> connessione,<br />

in quanto stavolta è JMF stesso a porre delle limitazioni.<br />

Nel file RTPSessionMgr.java infatti, il co<strong>di</strong>ce <strong>di</strong> assegnazione <strong>di</strong> un in<strong>di</strong>rizzo <strong>lo</strong>cale<br />

come target della comunicazione RTP non prevede la possibilità <strong>di</strong> riferirsi<br />

all'in<strong>di</strong>rizzo 10.0.2.15.<br />

Sarà al<strong>lo</strong>ra necessario mo<strong>di</strong>ficare <strong>lo</strong> stralcio <strong>di</strong> co<strong>di</strong>ce qui riportato<br />

da:<br />

a:<br />

host = InetAddress.getLocalHost();<br />

String hostname = host.getHostName();<br />

addrlist = InetAddress.getAllByName(hostname);<br />

host = InetAddress.getLocalHost();<br />

String hostname = host.getHostName();<br />

addrlist = InetAddress.getAllByName("10.0.2.15");<br />

So<strong>lo</strong> così l'emulatore riuscirà ad attivare <strong>una</strong> connessione <strong>streaming</strong>.<br />

4.7 – Problemi A<strong>per</strong>ti<br />

Come abbiamo visto l'incompatibilità <strong>di</strong> fondo tra JMF e le API Me<strong>di</strong>a <strong>di</strong> Android ha<br />

pesantemente ritardato e limitato il nostro stu<strong>di</strong>o, rendendo necessario spostare<br />

l'obiettivo finale della nostra tesi; non ci si è addentrati <strong>di</strong>fatti nel<strong>lo</strong> strato progettato<br />

76

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!