JDownloader Community - Appwork GmbH
 

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11.09.2016, 15:38
mostafaz4 mostafaz4 is offline
Junior Loader
 
Join Date: Aug 2012
Posts: 13
Talking Tweaking HLSDownloader.java

I'm doing some changes in the jd2 source code for local personal use and need some help...
So, just IGNORE this thread if i'm not supposed to

I'm trying to download hls of ffmpeg unsupported media so i need to download the segment then re-encode it to support ffmpeg then write it back to the outputStream but HLSDownloader download segments in chunks of [32*1024] bytes and stream every chunk to the outputStream.

My Progress so far:
Code:
Added byte[] segment = br.getPage(url).getBytes();
Before byte[] readWriteBuffer = HLSDownloader.this.instanceBuffer.getAndSet(null);
Code:
Added if (reencodehls) {readWriteBuffer = new byte[br.getPage(url).getBytes().length];}
After readWriteBuffer = new byte[32 * 1024];
Code:
Added if (reencodehls) {readWriteBuffer = reencodeHLS(segment);}
Before outputStream.write(readWriteBuffer, 0, len);

The result is plugin-defect, any suggestions ??
* reencodeHLS(byte[] binary) is a re-encoding function which is working without errors according to the log.
* Unfortunately cannot provide links because it's a VPN :(

Thanks
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 12:58.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.