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 ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
86<br />
public synchronized String start() {<br />
String result;<br />
}<br />
result = createProcessor();<br />
if (result != null)<br />
return result;<br />
result = createTransmitter();<br />
if (result != null) {<br />
processor.c<strong>lo</strong>se();<br />
processor = null;<br />
return result;<br />
}<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 />
// Start<br />
processor.start();<br />
System.err.println("Avviato il processor"); //notifica <strong>di</strong> avvio<br />
return null;<br />
public void stop() {<br />
synchronized (this) {<br />
if (processor != null) {<br />
processor.stop();<br />
processor.c<strong>lo</strong>se();<br />
processor = null;<br />
for (int i = 0; i < rtpMgrs.length; i++) {<br />
rtpMgrs[i].removeTargets("Sessione conclusa");<br />
rtpMgrs[i].<strong>di</strong>spose();<br />
}<br />
}<br />
}<br />
}<br />
private String createProcessor() {<br />
if (<strong>lo</strong>cator == null)<br />
return "Locator ha va<strong>lo</strong>re nul<strong>lo</strong>";<br />
DataSource ds = null;<br />
try {<br />
ds = javax.me<strong>di</strong>a.Manager.createDataSource(<strong>lo</strong>cator);<br />
} catch (Exception e) {<br />
e.printStackTrace();<br />
}<br />
try {<br />
processor = javax.me<strong>di</strong>a.Manager.createProcessor(ds);<br />
} catch (NoProcessorException npe) {<br />
npe.printStackTrace();<br />
} catch (IOException ioe) {<br />
ioe.printStackTrace();<br />
}