ios - Caching in VLC Media Player -


i'm using vlc media player (mobilevlckit.framwork) playing .mpd format file. in case of avcaching player, have option caching in case i'm not able add caching feature. tried not getting info solving problem. great if body can give few ideas solve problem. i'm working on ios development.

this code avcaching player catch , want same vlc media player caching.

-(void)connection:(nsurlconnection *)connection didreceiveresponse:(nsurlresponse *)response{      log(@"response received");      if(self.videocacheobject.response == nil){         self.videocacheobject.response = (nshttpurlresponse *)response;     }      if([self.delegate respondstoselector:@selector(requestdidreceiveresponse)]){         [self.delegate requestdidreceiveresponse];     } }  - (void)connection:(nsurlconnection *)connection didreceivedata:(nsdata *)data{     [self.videocacheobject.videodata appenddata:data];      log(@"video data length = %lu", (unsigned long)self.videocacheobject.videodata.length);      if(self.videocacheobject.videodata.length > partial_load_length * self.videocacheobject.response.expectedcontentlength && shouldloadpartial){         [[tmcache sharedcache] setobject:self.videocacheobject forkey:self.videoname];         [self.connection cancel];          if([self.delegate respondstoselector:@selector(requestprefetchingcompleted)]){             log(@"prefetching completed");             [self.delegate requestprefetchingcompleted];         }     }     else if(self.videocacheobject.videodata.length > 0.15*self.videocacheobject.response.expectedcontentlength){         [[tmcache sharedcache] setobject:self.videocacheobject forkey:self.videoname];     }      if([self.delegate respondstoselector:@selector(requestdidreceivedata)]){         [self.delegate requestdidreceivedata];     } } 

mobilevlckit not allow caching way.

you have 2 options:

  • trust vlc doing right thing (or provide "--network-caching" option desired buffer size in milliseconds, default 300)
  • cache media file , ask vlc play file. desktop vlc, file not need complete played formats.

future versions of mobilevlckit add third option, namely memory input module vlc, can provide data in memory without storing them local first, won't ready production before fall year.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -