I am a iOS developer. Now I am developing DLNA/UPNP iOS application. My target is directly to cast video from iPhone to Samsung smart TV without any middleware. So I am using upnpx library for that. Wireframe is below. iPhone download videolink from server. And directly cast video to TV. Of course, server is not DMS. In here my issue is that some videos are played well on TV. But some videos are not played on TV. Only audio is played. What do I miss on implementing app? I hope to get best solution from everybody. Thank you.
This is how I selected DMR:
MediaRenderer1Device *render = (MediaRenderer1Device*)device;
[[PlayBack GetInstance] setRenderer:render];
[[PlayBack GetInstance] Play:0];
/*choosed DMR urn 'urn:schemas-upnp-org:device:MediaRenderer:1' */
//play func
-(int)Play:(NSInteger)position {
if([[renderer avTransportService]isObserver:BasicUPnPServiceObserver*)self]== NO){
[[renderer avTransportService] addObserver:(BasicUPnPServiceObserver*)self];
}
NSString *uri = @"http://parstvco.files.wordpress.com/2015/11/dandoon-tala-10.mp4"; // This uri will be played on TV(DMR)
NSString *iid = @"0";
[[renderer avTransport] SetPlayModeWithInstanceID:iid NewPlayMode:@"NORMAL"];
[[renderer avTransport] SetAVTransportURIWithInstanceID:iid CurrentURI:uri CurrentURIMetaData:@"video/mp4"];
[[renderer avTransport] PlayWithInstanceID:iid Speed:@"1"];
}
//result log
2016-06-11 09:33:16.120 upnpxdemo[841:8340] Error (SoapAction): Got a non 200 response: 500. Data:
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>UPnPError</faultstring><detail><u:UPnPError xmlns:u="urn:schemas-upnp-org:control-1-0"><u:errorCode>701</u:errorCode><u:errorDescription>Transition not available</u:errorDescription></u:UPnPError></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Aucun commentaire:
Enregistrer un commentaire