summaryrefslogtreecommitdiff
path: root/media-video/jubler
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-video/jubler
reinit the tree, so we can have metadata
Diffstat (limited to 'media-video/jubler')
-rw-r--r--media-video/jubler/Manifest11
-rw-r--r--media-video/jubler/files/jubler-4.6.1-ffmpeg-1.patch274
-rw-r--r--media-video/jubler/files/jubler-4.6.1-ffmpeg-2.patch37
-rw-r--r--media-video/jubler/files/jubler-4.6.1-gentoo.patch163
-rw-r--r--media-video/jubler/files/update-4.6.1.xml326
-rw-r--r--media-video/jubler/jubler-4.6.1-r3.ebuild98
-rw-r--r--media-video/jubler/jubler-5.1.ebuild81
-rw-r--r--media-video/jubler/metadata.xml10
8 files changed, 1000 insertions, 0 deletions
diff --git a/media-video/jubler/Manifest b/media-video/jubler/Manifest
new file mode 100644
index 000000000000..856f412c9de2
--- /dev/null
+++ b/media-video/jubler/Manifest
@@ -0,0 +1,11 @@
+AUX jubler-4.6.1-ffmpeg-1.patch 14239 SHA256 f062f8073d9e21e97638c1952024d4faeea4738e372ddc3bda626ba76a21e7b2 SHA512 c20848a23dfea2e023e041af8c5a249aa0f7399cb21012a997fcbc864691599f817eb1fa5b58fd0b8494ad936119a1366cbb75cac940e2e45b6edb13d35f4c69 WHIRLPOOL c932b2fa42ee44ce5a1a924ac9fbd564311f454b41a5a9c406ed110fbbf62fc852d5c22545b7f0e7579343511a1b7c7d73bf62393e22688259b7e5ba8fb22ffa
+AUX jubler-4.6.1-ffmpeg-2.patch 1846 SHA256 fad5663e54040e7e00091b851d480f80d3ef82b6adacbbf11df7182d98fed972 SHA512 c5c3d6749c6860a91de1f9901c23590803782a69530534fd3635a385e21c0d1d493f43821e26d10491199b86682719fd3d4b0603641812b741714eda0c795d10 WHIRLPOOL df69fd19b4165879ea9270700b9f848cf3e7dac194ce5eef6bede9521c824bb85e4030ed1ac85d6d427a7d421cec9c9fd27d73c6e3d9b83b38f4f08196fd6d74
+AUX jubler-4.6.1-gentoo.patch 7061 SHA256 bdbd3cd908b57e2838c30e590e5296933615bf88369a1ebea19a77bd6fd017ed SHA512 d7d50774c3f3f6780bce455d6e0b2765d14588b3545a913b8f8adedb947877115fcae788eb1d3fed322fac472ae33362c53e36808a3f276b60926e183bab8e0d WHIRLPOOL 53853d0dc0d699f5541dd52f92e97d87178dc60ae0ecf96b7a54c51d985fe349b6e1985479e3a1dd2f532739f94d241e81ad9b68246ad0d63bf4a7c3bc423500
+AUX update-4.6.1.xml 20433 SHA256 c133425099109638160243bf299f395cda13fe9e98ee3a6a1322e576f340d78b SHA512 f50876c78c25f7fc5c20511911427713a11f7063055fc3d3ad0a77b6416af7385108a5426e9c75e773fcbe329cb8a12e580b350bac86442f03a50a7d517306e4 WHIRLPOOL da4465f3962ce7e499210f4fd2490a4742917304f942d55abbfd901acd6f8f398c85b3b39204c13576ee0cf93c6aec8f99f6579f0a3add7c0c99f16f97ff7ff8
+DIST Jubler-source-4.6.1.tar.bz2 1971701 SHA256 1aeed14cc500165470b29884585432e9d14940c314bafa0f6318789005dd18f1 SHA512 629aef58f98d2d8569a58a4c68c9bf440cd4693ca8847a0b8ad9e84458cd88de44542b5fc84e25033c1e22b26a4d675e070c5a58203a6bbe671072e5cdc2680a WHIRLPOOL bf3e95a5515e3895a6773433681f5abfebc159f30b8a91acf51aa6ea961247db8686ab3d92112725b5443b5f1ffb16a5cc4c46036e7b3fa6a5a562e6c7ae211d
+DIST jubler-5.1.tar.bz2 1815531 SHA256 bee88e6e6210ee525749bfb6469261a0ff129ed0233286010503b69b8390c8e6 SHA512 e2a0da737362a3c8dc12966aec1e9939291237fc714a586186b72daa16abf967c8fea8dac04fb191cb803aa11db20cf6d67468d2383f17f5c6114a643860acef WHIRLPOOL 8a5c5ed8f3225ad4984f9755acefe2171460639896baaace0bcbdcd2a9ffcf553b87f3aab8d5b4e8370bee0b97f524050a0fd34bfa1a1592b96a44d8ff7b0f56
+EBUILD jubler-4.6.1-r3.ebuild 3029 SHA256 88e21044b61cfa65f153720667e642a2b8fdadf224db850808f89498d44cad37 SHA512 03dfd15739806037ed90c4c92400c87eca9ae382553be794fcff5464ecb185b9184b3dbbb9ecaef8a0eafe3018591619d2b0beff6bbfe06ebef0487ace847e65 WHIRLPOOL 596cc6f81d290f0d51e4aca4494986ba9d5737a8f3646ecd5c283d43385636390c8a39aa85a92f71b0c1ae53b6525659d5168d1d6da105203b0b2478b18b3462
+EBUILD jubler-5.1.ebuild 1715 SHA256 5a898373515eced756a7991497ea182c7132760cc168fd32a9bdda74300add7c SHA512 850dde8c189238ea16c4a90203ac312333bda382e1125bd56b2b2d1498fa5a228e71bdcd36025423026003aa714650440d7dba8ec7ba2c7a0e24545ff2f99b41 WHIRLPOOL bcd0cc4f89d2029adfaebddaecea39a5e0dd840f0a27fbe17a210728abc73718176ca6e91c526d89b66e803695d6edfea330d22aa700ed388c07efb2a1367382
+MISC ChangeLog 2871 SHA256 6cd0f1813b1a97de71dcdd77e97ac84ab41db9c195adf5f2c141df6faceabfb8 SHA512 a188fd3d134d6d6f95b5e54130ec5e64898853228d0da1ae243957357463022934118f31ccde47825e4d6aece75c0f103dcdb6e651064eb3100a519e4d0cf9e0 WHIRLPOOL 5b8cbeec2b5dedf6ab5288fe1b2092e115d8fe8a09d7309dd05467c6c9d893060c5aceaab5146d53b699622efbaebc860a9e0a4735014f7fdb6c01cedcb1c0f3
+MISC ChangeLog-2015 8075 SHA256 a7a0508dcace6054ea8b5e629559e5f8f65d1cf3396f85248773079f5538cfc5 SHA512 1f5b4b1bf4ce7e5b8f8f8d5606ff158c5ad4513ccafde6ebdbbe4c30634b51c065834a5f84b1f615fea93e1e093e485299e0a6fd77ba7f098e438d949204f686 WHIRLPOOL 60d403eb70454d4949eae31b0a071c793b26957b2fbeefb1548912bc4c4e0c97281cc683268909a76e06a02c9960986fb4fc7f71e14842f2c786a496afa611c7
+MISC metadata.xml 292 SHA256 675da525138f5597c65e0283840ff356109f60853a84bb7360ab35f6a76fcfb8 SHA512 c7131847c06b95cec1212b3ead2a170abc2a5eeae13d6e7db0683370c7e8949e6ebbcffd320f54c3bf26cf50b88cdd44bc02a7e315e7a943407a68c8747c4031 WHIRLPOOL bab2aa573e621eb88eb553e341386ec8fb0abe8f3f7e713c95cdecc5046383c2f69b6fd08e23bbea6f2feb27869c4bff45a28ec20ba6e1776b8f65c9e2c7a043
diff --git a/media-video/jubler/files/jubler-4.6.1-ffmpeg-1.patch b/media-video/jubler/files/jubler-4.6.1-ffmpeg-1.patch
new file mode 100644
index 000000000000..18df9069d198
--- /dev/null
+++ b/media-video/jubler/files/jubler-4.6.1-ffmpeg-1.patch
@@ -0,0 +1,274 @@
+Index: Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c
+===================================================================
+--- Jubler-4.6.1.orig/resources/ffmpeg/ffdecode/decodeaudio.c
++++ Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c
+@@ -67,19 +67,19 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ AVStream *audio_st=NULL;
+ int got_audio, len, err=0, audio_index=-1, i=0, pack_duration=0, packsize=0, codec_is_open=-1, video_index=-1, codec_enc_is_open=-1;
+ jlong pack_pts=0;
+- char *outbuf=NULL;
++ AVFrame *outbuf=NULL;
+ unsigned char *packptr;
+ jboolean ret = JNI_TRUE, nobrk = JNI_TRUE;
+
+ av_register_all();
+
+ /* Open the input/output files */
+- err = av_open_input_file(&fcx, input_filename, NULL, 0, NULL);
++ err = avformat_open_input(&fcx, input_filename, NULL, NULL);
+ if(err<0){
+ DEBUG(env, this, "decodeAudio", "Could not open file '%s'.", input_filename);
+ ret = JNI_FALSE;
+ }
+- outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
++ outbuf = avcodec_alloc_frame();
+ if(outbuf==NULL) {
+ DEBUG(env, this, "decodeAudio", "Could not allocate memory for outbuf.");
+ ret = JNI_FALSE;
+@@ -129,7 +129,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ }
+ else {
+ /* open it */
+- if ((codec_is_open = avcodec_open(ccx, codec)) < 0) {
++ if ((codec_is_open = avcodec_open2(ccx, codec, NULL)) < 0) {
+ DEBUG(env, this, "decodeAudio", "Could not open codec.");
+ ret = JNI_FALSE;
+ }
+@@ -158,10 +158,10 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ }
+
+ /* use wav as the output format of the file */
+- fmt = guess_format(NULL, output_filename, NULL);
++ fmt = av_guess_format(NULL, output_filename, NULL);
+ if (!fmt) {
+ DEBUG(env, this, "decodeAudio", "Could not deduce output format from file extension: using WAV.");
+- fmt = guess_format("wav", NULL, NULL);
++ fmt = av_guess_format("wav", NULL, NULL);
+ }
+ if (!fmt) {
+ DEBUG(env, this, "decodeAudio", "Could not find suitable output format.");
+@@ -182,35 +182,28 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ audio_st = add_audio_stream(env, this, ofcx, fmt->audio_codec, ccx->sample_rate, ccx->channels);
+ }
+
+- /* set the output parameters (must be done even if no parameters) */
+- if (av_set_parameters(ofcx, NULL) < 0) {
+- DEBUG(env, this, "decodeAudio", "Invalid output format parameters.");
+- ret = JNI_FALSE;
+- }
+- else {
+ codec_enc = avcodec_find_encoder(audio_st->codec->codec_id);
+ if (!codec_enc) {
+ DEBUG(env, this, "decodeAudio", "Encoder codec not found.");
+ ret = JNI_FALSE;
+ }
+ else {
+- if ((codec_enc_is_open = avcodec_open(audio_st->codec, codec_enc)) < 0) {
++ if ((codec_enc_is_open = avcodec_open2(audio_st->codec, codec_enc, NULL)) < 0) {
+ DEBUG(env, this, "decodeAudio", "Could not open encoder codec.");
+ ret = JNI_FALSE;
+ }
+ else {
+ if (!(fmt->flags & AVFMT_NOFILE)) {
+- if (url_fopen(&ofcx->pb, output_filename, URL_WRONLY) < 0) {
++ if (avio_open(&ofcx->pb, output_filename, AVIO_FLAG_WRITE) < 0) {
+ DEBUG(env, this, "decodeAudio", "Could not open file '%s'", output_filename);
+ ret = JNI_FALSE;
+ }
+ else {
+- av_write_header(ofcx);
++ avformat_write_header(ofcx,NULL);
+ }
+ }
+ }
+ }
+- }
+ }
+ }
+ else {
+@@ -243,7 +236,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ ccx->request_channels = 2;
+ }
+ got_audio = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+- len = avcodec_decode_audio2(ccx, (short *)outbuf, &got_audio, packptr, packsize);
++ len = avcodec_decode_audio4(ccx, outbuf, &got_audio, &pkt);
+
+ if (len < 0) {
+ DEBUG(env, this, "decodeAudio", "Error while decoding.");
+@@ -258,7 +251,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ * this is the frame we want */
+ if (pack_pts >= seek_time_start) {
+ /* if a frame has been decoded, output it */
+- audio_enc_out(env, this, ofcx, audio_st, (short *)outbuf, got_audio);
++ audio_enc_out(env, this, ofcx, audio_st, (short *)(outbuf->data[0]), av_samples_get_buffer_size(NULL, ccx->channels, outbuf->nb_samples, ccx->sample_fmt, 1));
+ /* if the next frame gets past our stop time, we want to stop decoding */
+ if ( pack_pts + pack_duration > seek_time_stop ) {
+ av_free_packet(&pkt);
+@@ -269,7 +262,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ /* If the next frame will be past our start seek time, this is the frame we want */
+ else if (pack_pts + pack_duration > seek_time_start) {
+ /* if a frame has been decoded, output it */
+- audio_enc_out(env, this, ofcx, audio_st, (short *)outbuf, got_audio);
++ audio_enc_out(env, this, ofcx, audio_st, (short *)(outbuf->data[0]), av_samples_get_buffer_size(NULL, ccx->channels, outbuf->nb_samples, ccx->sample_fmt, 1));
+ /* if the next frame gets past our stop time, we want to stop decoding */
+ if ( pack_pts + pack_duration > seek_time_stop ) {
+ av_free_packet(&pkt);
+@@ -301,7 +294,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+
+ /* close the output file */
+ if (!(fmt->flags & AVFMT_NOFILE) && ofcx->pb != NULL) {
+- url_fclose(ofcx->pb);
++ avio_close(ofcx->pb);
+ }
+
+ /* free the stream */
+@@ -309,7 +302,7 @@ jboolean decodeAudio(JNIEnv * env, jobje
+ }
+
+ if(codec_is_open >= 0) avcodec_close(ccx);
+- if(outbuf != NULL) free(outbuf);
++ if(outbuf != NULL) av_free(outbuf);
+ if(fcx != NULL) av_close_input_file(fcx);
+
+ return ret;
+Index: Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeframe.c
+===================================================================
+--- Jubler-4.6.1.orig/resources/ffmpeg/ffdecode/decodeframe.c
++++ Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeframe.c
+@@ -122,7 +122,7 @@ AVPicture* decodeFrame(JNIEnv * env, job
+ AVFrame *frame=avcodec_alloc_frame();
+
+ /* Open the input file */
+- err = av_open_input_file(&fcx, input_filename, NULL, 0, NULL);
++ err = avformat_open_input(&fcx, input_filename, NULL, NULL);
+ if(err<0){
+ DEBUG(env, this, "decodeFrame", "Could not open file '%s'.", input_filename);
+ retflag = FALSE;
+@@ -157,7 +157,7 @@ AVPicture* decodeFrame(JNIEnv * env, job
+ }
+ else {
+ // Open codec
+- if((codec_is_open = avcodec_open(ccx, codec)) < 0 ) {
++ if((codec_is_open = avcodec_open2(ccx, codec, NULL)) < 0 ) {
+ DEBUG(env, this, "decodeFrame", "Could not open codec.");
+ retflag = FALSE;
+ }
+@@ -190,7 +190,7 @@ AVPicture* decodeFrame(JNIEnv * env, job
+ pack_duration = av_rescale_q(pkt.duration, fcx->streams[video_index]->time_base, AV_TIME_BASE_Q);
+ comp_pts += pkt.duration;
+ // Decode this packet
+- len = avcodec_decode_video(ccx, frame, &got_picture, pkt.data, pkt.size);
++ len = avcodec_decode_video2(ccx, frame, &got_picture, &pkt);
+ if (len < 0) {
+ DEBUG(env, this, "decodeFrame", "Error while decoding.");
+ retflag = FALSE;
+@@ -265,7 +265,7 @@ int file_info(JNIEnv * env, jobject this
+ av_register_all();
+
+ // Open the input file.
+- err = av_open_input_file(&fcx, input_filename, NULL, 0, NULL);
++ err = avformat_open_input(&fcx, input_filename, NULL, NULL);
+ if(err<0){
+ DEBUG(env, this, "file_info", "Could not open file '%s'.", input_filename);
+ return 1;
+@@ -275,9 +275,9 @@ int file_info(JNIEnv * env, jobject this
+ err = av_find_stream_info(fcx);
+
+ // Give us information about the file and exit
+- dump_format(fcx, 0, input_filename, FALSE);
++ av_dump_format(fcx, 0, input_filename, FALSE);
+
+- av_close_input_file(fcx);
++ avformat_close_input(&fcx);
+ return 0;
+ }
+
+Index: Jubler-4.6.1/resources/ffmpeg/ffdecode/grabinfo.c
+===================================================================
+--- Jubler-4.6.1.orig/resources/ffmpeg/ffdecode/grabinfo.c
++++ Jubler-4.6.1/resources/ffmpeg/ffdecode/grabinfo.c
+@@ -82,7 +82,7 @@ void get_information(JNIEnv * env, jobje
+ av_register_all();
+
+ // Open the input file.
+- err = av_open_input_file(&fcx, video_c, NULL, 0, NULL);
++ err = avformat_open_input(&fcx, video_c, NULL, NULL);
+ if(err<0) {
+ DEBUG(env, this, "get_information", "Could not open file '%s'.", video_c);
+ ret = JNI_FALSE;
+Index: Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c
+===================================================================
+--- Jubler-4.6.1.orig/resources/ffmpeg/ffdecode/makecache.c
++++ Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c
+@@ -59,7 +59,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ float ratewindow = 0;
+ unsigned int offset=0, maxbyte=0, sampledcounter=1;
+ FILE *cachefile=NULL;
+- uint8_t *outbuf=NULL;
++ AVFrame *outbuf=NULL;
+ jboolean nobrk = JNI_TRUE;
+
+ int ENDIANESS = isLittleEndian();
+@@ -81,7 +81,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ ret = JNI_TRUE;
+
+ // Open the input file.
+- err = av_open_input_file(&fcx, audio_c, NULL, 0, NULL);
++ err = avformat_open_input(&fcx, audio_c, NULL, NULL);
+ cachefile = fopen(cache_c, "wb");
+ if(err<0){
+ DEBUG(env, this, "makeCache", "Could not open audio file '%s'.", audio_c);
+@@ -91,7 +91,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ DEBUG(env, this, "makeCache", "Could not open cache file '%s'.", cache_c);
+ ret = JNI_FALSE;
+ }
+- outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
++ outbuf = avcodec_alloc_frame();
+ if(outbuf==NULL) {
+ DEBUG(env, this, "makeCache", "Could not allocate memory for outbuf.");
+ ret = JNI_FALSE;
+@@ -123,7 +123,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ }
+ else {
+ /* open it */
+- if ((codec_is_open = avcodec_open(ccx, codec)) < 0) {
++ if ((codec_is_open = avcodec_open2(ccx, codec,NULL)) < 0) {
+ DEBUG(env, this, "makeCache", "Could not open codec.");
+ ret = JNI_FALSE;
+ }
+@@ -175,7 +175,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ pack_pts = av_rescale_q(pkt.pts, fcx->streams[audio_index]->time_base, AV_TIME_BASE_Q);
+ // Decode the paket
+ got_audio = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+- len = avcodec_decode_audio2(ccx, (short *)outbuf, &got_audio, pkt.data, pkt.size);
++ len = avcodec_decode_audio4(ccx, outbuf, &got_audio, &pkt);
+
+ if (len < 0) {
+ DEBUG(env, this, "makeCache", "Error while decoding.");
+@@ -196,7 +196,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ if (bytecounter+offset + step*channels >= maxbyte) {
+ for (j = 1; j <= channels ; j++) {
+ // actually sample is not the whole sample, but the data for one channel each time
+- sample = (char)outbuf[bytecounter+ENDIANESS];
++ sample = (char)outbuf->data[0][bytecounter+ENDIANESS];
+ // min max averaging: only keep the highest and the lowest sample value
+ if (maxsample[j-1] < sample) maxsample[j-1] = sample;
+ if (minsample[j-1] > sample) minsample[j-1] = sample;
+@@ -215,7 +215,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ }
+ else {
+ for (j = 1; j <= channels; j++) {
+- sample = (char)outbuf[bytecounter+ENDIANESS];
++ sample = (char)outbuf->data[0][bytecounter+ENDIANESS];
+ // min max averaging
+ if (maxsample[j-1] < sample) maxsample[j-1] = sample;
+ if (minsample[j-1] > sample) minsample[j-1] = sample;
+@@ -254,7 +254,7 @@ JNIEXPORT jboolean JNICALL Java_com_pana
+ if(minsample != NULL) free(minsample);
+ if(cachefile != NULL) fclose(cachefile);
+ if(codec_is_open >= 0) avcodec_close(ccx);
+- if(outbuf != NULL) free(outbuf);
++ if(outbuf != NULL) av_free(outbuf);
+ if(fcx != NULL) av_close_input_file(fcx);
+
+ return ret;
diff --git a/media-video/jubler/files/jubler-4.6.1-ffmpeg-2.patch b/media-video/jubler/files/jubler-4.6.1-ffmpeg-2.patch
new file mode 100644
index 000000000000..28f50b57d6ad
--- /dev/null
+++ b/media-video/jubler/files/jubler-4.6.1-ffmpeg-2.patch
@@ -0,0 +1,37 @@
+diff --git a/Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c b/Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c
+index 92bf071..d163010 100644
+--- a/Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c
++++ b/Jubler-4.6.1/resources/ffmpeg/ffdecode/decodeaudio.c
+@@ -37,6 +37,13 @@ jboolean decodeAudio(JNIEnv* env, jobject this, const char *input_filename, cons
+ AVStream *add_audio_stream(JNIEnv* env, jobject this, AVFormatContext *oc, int codec_id, int sample_rate, int channels);
+ void audio_enc_out(JNIEnv * env, jobject this, AVFormatContext *ofcx, AVStream *audio_st, const short *samples, int buf_size);
+
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++#ifndef MAX_AUDIO_FRAME_SIZE
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++#else
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE MAX_AUDIO_FRAME_SIZE
++#endif
++#endif
+
+ JNIEXPORT jboolean JNICALL Java_com_panayotis_jubler_media_preview_decoders_FFMPEG_createClip(JNIEnv * env, jobject this, jstring audio, jstring wav, jlong start, jlong stop) {
+ const char * audio_c;
+diff --git a/Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c b/Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c
+index d7ea88b..0190b79 100644
+--- a/Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c
++++ b/Jubler-4.6.1/resources/ffmpeg/ffdecode/makecache.c
+@@ -38,6 +38,14 @@
+ #include "defaults.h"
+ #include "utilities.h"
+
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++#ifndef MAX_AUDIO_FRAME_SIZE
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++#else
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE MAX_AUDIO_FRAME_SIZE
++#endif
++#endif
++
+ JNIEXPORT jboolean JNICALL Java_com_panayotis_jubler_media_preview_decoders_NativeDecoder_makeCache(JNIEnv * env, jobject this, jstring audio, jstring cache, jstring original) {
+ const char *audio_c;
+ const char *cache_c;
diff --git a/media-video/jubler/files/jubler-4.6.1-gentoo.patch b/media-video/jubler/files/jubler-4.6.1-gentoo.patch
new file mode 100644
index 000000000000..25afdba2fcc9
--- /dev/null
+++ b/media-video/jubler/files/jubler-4.6.1-gentoo.patch
@@ -0,0 +1,163 @@
+diff -Nur Jubler-4.6.1/build.xml Jubler-4.6.1_patched/build.xml
+--- Jubler-4.6.1/build.xml 2011-02-05 23:46:03.000000000 +0200
++++ Jubler-4.6.1_patched/build.xml 2011-02-13 14:46:56.562977001 +0200
+@@ -1,36 +1,9 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+-<project name="Jubler" default="dist" basedir=".">
++<project name="Jubler" default="allparts" basedir=".">
+ <description>Builds, tests, and runs the project Jubler.</description>
+ <property file="core/src/com/panayotis/jubler/information/version.prop" />
+-
+- <taskdef resource="net/sf/antcontrib/antlib.xml">
+- <classpath>
+- <pathelement location="resources/libs/ant-contrib/ant-contrib-1.0b3.jar"/>
+- </classpath>
+- </taskdef>
++ <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+
+- <taskdef name="jarbundler"
+- onerror="report"
+- classpath="/opt/local/share/java/jarbundler.jar"
+- classname="net.sourceforge.jarbundler.JarBundler" />
+-
+- <taskdef name="izpack"
+- onerror="report"
+- classpath="../../Tools/IzPack/standalone-compiler.jar"
+- classname="com.izforge.izpack.ant.IzPackTask"/>
+-
+- <taskdef name="launch4j"
+- onerror="report"
+- classpath="/opt/local/share/launch4j/launch4j.jar:/opt/local/share/launch4j/lib/xstream.jar"
+- classname="net.sf.launch4j.ant.Launch4jTask"/>
+-
+- <target name="jupidator">
+- <ant antfile="../jupidator/build.xml" inheritall="false" target="jar"/>
+- <copy file="../jupidator/dist/jupidator.jar" todir="dist/lib"/>
+- <ant antfile="../jupidator/build.xml" inheritall="false" target="clean"/>
+- </target>
+-
+-
+ <target name="i18n">
+ <exec dir="resources/i18n" executable="bash" failonerror="true">
+ <arg line="compile"/>
+@@ -45,12 +18,14 @@
+ <move file="resources/help/jubler-faq.html" todir="dist/help"/>
+ <copy file="resources/help/question.png" todir="dist/help"/>
+ </target>
+-
++
++ <target name="jupidator"/>
++
+ <target name="changelog" depends="jupidator">
+ <delete file="ChangeLog.html"/>
+ <echo message="" file="ChangeLog.html"/>
+- <java fork="true" classname="com.panayotis.jupidator.helpers.ChangeLogCreator" classpath="dist/lib/jupidator.jar">
+- <arg value="http://www.jubler.org/files/updates/update.xml"/>
++ <java fork="true" classname="com.panayotis.jupidator.helpers.ChangeLogCreator" classpath="resources/libs/jupidator.jar">
++ <arg value="update-${version}.xml"/>
+ <arg value="ChangeLog.html"/>
+ </java>
+ </target>
+@@ -311,7 +286,7 @@
+ </target>
+
+ <!-- Create an isntallation-like file tree -->
+- <target name="-linuxinstall" depends="-linuxproperties, -cleandestdir, -linuxdesktopintegration">
++ <target name="-linuxinstall" depends="-linuxproperties, -cleandestdir, linuxdesktopintegration">
+ <!-- Basic Jubler files -->
+ <copy file="dist/Jubler.jar" todir="${libdir}"/>
+ <copy todir="${libdir}/lib">
+@@ -337,7 +312,7 @@
+ </target>
+
+ <!-- Linux desktop intergration -->
+- <target name="-linuxdesktopintegration" depends="-linuxproperties">
++ <target name="linuxdesktopintegration" depends="-linuxproperties">
+ <!-- Icon files -->
+ <copy file="resources/installers/linux/jubler.menu" tofile="${sharedir}/menu/jubler"/>
+ <copy file="resources/installers/linux/jubler.xpm" todir="${sharedir}/pixmaps"/>
+diff -Nur Jubler-4.6.1/core/src/com/panayotis/jubler/information/HelpBrowser.java Jubler-4.6.1_patched/core/src/com/panayotis/jubler/information/HelpBrowser.java
+--- Jubler-4.6.1/core/src/com/panayotis/jubler/information/HelpBrowser.java 2011-01-31 01:19:02.000000000 +0200
++++ Jubler-4.6.1_patched/core/src/com/panayotis/jubler/information/HelpBrowser.java 2011-02-12 14:38:50.220780001 +0200
+@@ -47,7 +47,7 @@
+
+ history = new ArrayList<String>();
+
+- String initpage = "file:" + SystemFileFinder.getJublerAppPath() + "/help/jubler-faq.html";
++ String initpage = "file:" + SystemFileFinder.getJublerAppPath() + "/../help/jubler-faq.html";
+ setPage(initpage);
+ history.add(initpage);
+
+diff -Nur Jubler-4.6.1/core/src/com/panayotis/jubler/os/SystemDependent.java Jubler-4.6.1_patched/core/src/com/panayotis/jubler/os/SystemDependent.java
+--- Jubler-4.6.1/core/src/com/panayotis/jubler/os/SystemDependent.java 2011-01-31 01:19:02.000000000 +0200
++++ Jubler-4.6.1_patched/core/src/com/panayotis/jubler/os/SystemDependent.java 2011-02-12 14:43:25.740780001 +0200
+@@ -182,7 +182,7 @@
+ Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
+ else { //assume Unix or Linux
+ String[] browsers = {
+- "firefox", "konqueror", "opera", "epiphany", "mozilla", "netscape"};
++ "xdg-open", "firefox", "konqueror", "opera", "epiphany", "mozilla", "netscape"};
+ String browser = null;
+ for (int count = 0; count < browsers.length && browser == null; count++)
+ if (Runtime.getRuntime().exec(
+diff -Nur Jubler-4.6.1/core/src/com/panayotis/jubler/os/SystemFileFinder.java Jubler-4.6.1_patched/core/src/com/panayotis/jubler/os/SystemFileFinder.java
+--- Jubler-4.6.1/core/src/com/panayotis/jubler/os/SystemFileFinder.java 2011-02-05 01:59:45.000000000 +0200
++++ Jubler-4.6.1_patched/core/src/com/panayotis/jubler/os/SystemFileFinder.java 2011-02-12 14:38:18.520780001 +0200
+@@ -56,9 +56,8 @@
+
+ public static boolean loadLibrary(String name) {
+ File libfile = findFile("lib" + FileCommunicator.FS + System.mapLibraryName(name));
+- if (libfile != null)
+ try {
+- System.load(libfile.getAbsolutePath());
++ System.loadLibrary(name);
+ return true;
+ } catch (UnsatisfiedLinkError e) {
+ DEBUG.debug(e);
+diff -Nur Jubler-4.6.1/resources/ffmpeg/ffdecode/Makefile Jubler-4.6.1_patched/resources/ffmpeg/ffdecode/Makefile
+--- Jubler-4.6.1/resources/ffmpeg/ffdecode/Makefile 2011-01-31 16:26:26.000000000 +0200
++++ Jubler-4.6.1_patched/resources/ffmpeg/ffdecode/Makefile 2011-02-15 20:26:34.213149001 +0200
+@@ -12,9 +12,6 @@
+ # Name of the produced library
+ PROJ=ffdecode
+
+-# Paths of include files
+-JAVA_HOME=${shell /bin/sh ../../system/findjava.sh -j}
+-
+ # Current Path
+ CPATH=${shell pwd}
+
+@@ -42,7 +39,6 @@
+ # Various options
+ FFCONF=configure
+ LIBSUF=_${SYSTEM}.${ARCH}
+-MAKEOPTS=-j3
+
+ # Find requested files
+ NATIVES=${shell cd ../../src && grep -r ' native ' * | grep -v '/.svn/' | gawk -F ':' '{print $$1}' | uniq | sed -e 's/\.java$$//g' | tr '/' '.' }
+@@ -136,7 +132,6 @@
+ CCPREF_NOS=${shell echo ${CCPREF} | sed -e 's/-$$//g' }
+ DCONFIG=--with-mp4v2 --host=${CCPREF_NOS}
+
+-CC=${CCPREF}gcc
+ RANLIB=${CCPREF}ranlib
+
+ ifeq (${NOSTRIP},)
+@@ -151,7 +146,7 @@
+ .SUFFIXES:.o .c
+
+ .c.o:
+- ${CC} ${CFLAGS} ${GCCOPTS} -std=c99 -pedantic -O3 -Wall ${INCS} ${JINCLUDE} -c -o $@ $?
++ ${CC} ${CFLAGS} ${GCCOPTS} -std=c99 -pedantic -Wall ${INCS} ${JINCLUDE} -c -o $@ $?
+
+
+ develop:javacheck
+@@ -208,7 +203,7 @@
+ LIB:${LIBNAME}
+
+ ${LIBNAME}:${LIBRARYREQ} ${OBJS} ${RANLIBREQ}
+- ${LD} ${GCCOPTS} -o ${LIBNAME} ${OBJS} ${LIBS}
++ ${LD} ${LDFLAGS} ${GCCOPTS} -o ${LIBNAME} ${OBJS} ${LIBS}
+ ${STRIPCMD} ${LIBNAME}
+
+
diff --git a/media-video/jubler/files/update-4.6.1.xml b/media-video/jubler/files/update-4.6.1.xml
new file mode 100644
index 000000000000..130d59aacafb
--- /dev/null
+++ b/media-video/jubler/files/update-4.6.1.xml
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<updatelist application="Jubler" baseurl="http://www.jubler.org/files/updates" icon="icons/jubler.png" jupidator="600">
+
+ <mirror constructor="${URL}${FILEBASE}-${FILEPATH}${FILEEXT}${FILECOMPR}" url="http://jubler.googlecode.com/files/Jubler-"/>
+
+ <architect tag="any" os="" arch="">
+ <launcher exec="${JAVABIN}">
+ <argument value="-jar"/>
+ <argument value="${APPHOME}/Jubler.jar"/>
+ </launcher>
+ </architect>
+
+ <architect tag="macosx" os="mac" arch="i386">
+ <launcher exec="${APPHOME}/../../MacOS/JavaApplicationStub"/>
+ </architect>
+
+ <architect tag="macosx" os="mac" arch="ppc">
+ <launcher exec="${APPHOME}/../../MacOS/JavaApplicationStub"/>
+ </architect>
+
+ <architect tag="macosx" os="mac" arch="x86">
+ <launcher exec="${APPHOME}/../../MacOS/JavaApplicationStub"/>
+ </architect>
+
+ <architect tag="linux_i386" os="Linux" arch="i386">
+ <launcher exec="${JAVABIN}">
+ <argument value="-jar"/>
+ <argument value="${APPHOME}/Jubler.jar"/>
+ </launcher>
+ </architect>
+
+ <architect tag="linux_amd64" os="Linux" arch="amd64">
+ <launcher exec="${JAVABIN}">
+ <argument value="-jar"/>
+ <argument value="${APPHOME}/Jubler.jar"/>
+ </launcher>
+ </architect>
+
+ <architect tag="win32" os="Windows" arch="x86">
+ <launcher exec="${APPHOME}\Jubler.exe"/>
+ </architect>
+
+ <version release="1106" version="4.6.1">
+ <description>
+ Fixed ffdecode library for 64 bit Mac OS X. Dutch translation.
+ </description>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.6.1" destdir="${APPHOME}" size="720681" compress="gz"/>
+ </arch>
+ <arch name="macosx">
+ <file name="Info.plist" sourcedir="4.6.1" destdir="${APPHOME}/../../" size="601" compress="gz"/>
+ <file name="Jubler.jar" sourcedir="4.6.1" destdir="${APPHOME}" size="675217" compress="gz"/>
+ <file name="libffdecode.jnilib" sourcedir="4.6.1" destdir="${APPHOME}/lib" size="4902215" compress="gz"/>
+ </arch>
+ <arch name="any">
+ <file name="Jubler.jar" sourcedir="4.6.1" destdir="${APPHOME}" size="675217" compress="gz"/>
+ </arch>
+ <arch name="all">
+ <file name="nl.jar" sourcedir="4.6.1" destdir="${APPHOME}/i18n" size="29264" compress="gz"/>
+ </arch>
+ </version>
+
+ <version release="1083" version="4.6">
+ <description>
+ Plugin system introduced. Updates to GoogleTranslate, MPlayer. Many bug fixes ans minor improvements.
+ </description>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.6" destdir="${APPHOME}" size="720582" compress="gz"/>
+ </arch>
+ <arch name="macosx">
+ <file name="Info.plist" sourcedir="4.6" destdir="${APPHOME}/../../" size="599" compress="gz"/>
+ <file name="Jubler.jar" sourcedir="4.6" destdir="${APPHOME}" size="675200" compress="gz"/>
+ <file name="macapp.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="4565"/>
+ </arch>
+ <arch name="any">
+ <file name="Jubler.jar" sourcedir="4.6" destdir="${APPHOME}" size="675200" compress="gz"/>
+ </arch>
+ <arch name="all">
+ <file name="aspell.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="6578"/>
+ <file name="autoupdate.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="1940"/>
+ <file name="basetextsubs.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="20847"/>
+ <file name="googletranslate.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="18881"/>
+ <file name="mplayer.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="8032"/>
+ <file name="zemberek.jar" sourcedir="4.6" destdir="${APPHOME}/lib/" size="3193"/>
+ <file name="cs.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="28377"/>
+ <file name="de.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="27379"/>
+ <file name="el.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="33120"/>
+ <file name="es.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="29243"/>
+ <file name="fr.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="30089"/>
+ <file name="it.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="30813"/>
+ <file name="pt.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="29012"/>
+ <file name="sr.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="20194"/>
+ <file name="tr.jar" sourcedir="4.6" destdir="${APPHOME}/i18n/" size="27872"/>
+ <file name="jubler-faq.html" sourcedir="4.6" destdir="${APPHOME}/help/" size="5402" compress="gz"/>
+ </arch>
+ </version>
+
+ <version release="775" version="4.1.3">
+ <description>
+ Fixed Save not wroking. Fixed Recents menu, when display non-existent entries.
+ </description>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.1.3" destdir="${APPHOME}" size="750826" compress="gz"/>
+ </arch>
+ <arch name="any">
+ <file name="Jubler.jar" sourcedir="4.1.3" destdir="${APPHOME}" size="706856" compress="gz"/>
+ </arch>
+ </version>
+
+ <version release="684" version="4.1.2">
+ <description>
+ Fixed a bug in x64 version of Windows. Fixed a bug in trimmed 64-bit Leopard.
+ </description>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.1.2" destdir="${APPHOME}" size="750138" compress="gz"/>
+ </arch>
+ <arch name="macosx">
+ <file name="Jubler.jar" sourcedir="4.1.2" destdir="${APPHOME}" size="706775" compress="gz"/>
+ <file name="JavaApplicationStub" sourcedir="4.1.2" destdir="${APPHOME}/../../MacOS" size="8714" compress="gz"/>
+ <chmod file="${APPHOME}/../../MacOS/JavaApplicationStub" attr="a+x"/>
+ </arch>
+ </version>
+
+ <version release="681" version="4.1.1">
+ <description>
+ Updated auto-update library. Fixed bug not updating Recents menu. Fixed bug agressively truncating save file name. Modular translation files.
+ </description>
+ <arch name="macosx">
+ <file name="Jubler.jar" sourcedir="4.1.1" destdir="${APPHOME}" size="706794" compress="gz"/>
+ <file name="jupidator.jar" sourcedir="4.1.1" destdir="${APPHOME}/lib" size="121077"/>
+ <file name="cs.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="28706"/>
+ <file name="de.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29094"/>
+ <file name="el.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="31983"/>
+ <file name="es.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29504"/>
+ <file name="fr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="21845"/>
+ <file name="pt.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29361"/>
+ <file name="sr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="20822"/>
+ <file name="tr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29658"/>
+ </arch>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.1.1" destdir="${APPHOME}" size="750790" compress="gz"/>
+ <file name="jupidator.jar" sourcedir="4.1.1" destdir="${APPHOME}/lib" size="121077"/>
+ <file name="cs.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="28706"/>
+ <file name="de.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29094"/>
+ <file name="el.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="31983"/>
+ <file name="es.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29504"/>
+ <file name="fr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="21845"/>
+ <file name="pt.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29361"/>
+ <file name="sr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="20822"/>
+ <file name="tr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29658"/>
+ </arch>
+ <arch name="linux_amd64">
+ <file name="Jubler.jar" sourcedir="4.1.1" destdir="${APPHOME}" size="706794" compress="gz"/>
+ <file name="jupidator.jar" sourcedir="4.1.1" destdir="${APPHOME}/lib" size="121077"/>
+ <file name="cs.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="28706"/>
+ <file name="de.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29094"/>
+ <file name="el.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="31983"/>
+ <file name="es.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29504"/>
+ <file name="fr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="21845"/>
+ <file name="pt.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29361"/>
+ <file name="sr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="20822"/>
+ <file name="tr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29658"/>
+ </arch>
+ <arch name="linux_i386">
+ <file name="Jubler.jar" sourcedir="4.1.1" destdir="${APPHOME}" size="706794" compress="gz"/>
+ <file name="jupidator.jar" sourcedir="4.1.1" destdir="${APPHOME}/lib" size="121077"/>
+ <file name="cs.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="28706"/>
+ <file name="de.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29094"/>
+ <file name="el.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="31983"/>
+ <file name="es.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29504"/>
+ <file name="fr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="21845"/>
+ <file name="pt.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29361"/>
+ <file name="sr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="20822"/>
+ <file name="tr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29658"/>
+ </arch>
+ <arch name="any">
+ <file name="Jubler.jar" sourcedir="4.1.1" destdir="${APPHOME}" size="706794" compress="gz"/>
+ <file name="jupidator.jar" sourcedir="4.1.1" destdir="${APPHOME}/lib" size="121077"/>
+ <file name="cs.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="28706"/>
+ <file name="de.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29094"/>
+ <file name="el.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="31983"/>
+ <file name="es.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29504"/>
+ <file name="fr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="21845"/>
+ <file name="pt.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29361"/>
+ <file name="sr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="20822"/>
+ <file name="tr.jar" sourcedir="4.1.1" destdir="${APPHOME}/i18n" size="29658"/>
+ </arch>
+ </version>
+
+ <version release="669" version="4.1">
+ <description>
+ Only one instance of Jubler is now run in a system. Every file remembers loading parameters and uses it when saving. Improved load/save dialog, which encapsulates the information inside the load dialog. General GUI improvements, especially in Mac OSX. Relaxed file loading, when file contains encoding errors. Improved subtitle support. Improved visuals in Video Console window. More compact Preferences dialog. Minor changes and bug fixes.
+ </description>
+ <arch name="macosx">
+ <file name="Jubler.jar" sourcedir="4.1" destdir="${APPHOME}" size="924599" compress="bzip2"/>
+ </arch>
+ <arch name="win32">
+ <file name="Jubler.exe" sourcedir="4.1" destdir="${APPHOME}" size="975784" compress="bzip2"/>
+ </arch>
+ <arch name="linux_i386">
+ <file name="Jubler.jar" sourcedir="4.1" destdir="${APPHOME}" size="924599" compress="bzip2"/>
+ </arch>
+ <arch name="linux_amd64">
+ <file name="Jubler.jar" sourcedir="4.1" destdir="${APPHOME}" size="924599" compress="bzip2"/>
+ </arch>
+ <arch name="any">
+ <file name="Jubler.jar" sourcedir="4.1" destdir="${APPHOME}" size="924599" compress="bzip2"/>
+ </arch>
+ </version>
+
+ <version release="559" version="4.0">
+ <description>
+ Auto-update support. Jubler is able to smart update with minimum user interaction. Improved time fixed tool for overlapping subtitles. Improved FFMPEG color model.
+ </description>
+ </version>
+ <version release="22" version="3.9.6">
+ <description>
+ Improved Google translator parsing engine. Fixed compile issues with ffmpeg under OS X 10.4. Fixed Linux GTK Look and Feel bug with time-spinner under Java 6.0.
+ </description>
+ </version>
+ <version release="21" version="3.9.5">
+ <description>
+ Autosave/recovery of changed subtitles. Automatic translate of subtitles through Google. Updated to latest FFMPEG. Small GUI improvements. Better SRT support. Minor bug fixes and enhancements.
+ </description>
+ </version>
+ <version release="20" version="3.9.0">
+ <description>
+ Improved user interface. Preview interface integrated inside main Jubler window. Subtitle number is now visible, if desired. Use of preset file encodings. Visual display, using color, of affected subtitles. Maximize waveform visualization. Support of AAC audio streams.
+ </description>
+ </version>
+ <version release="19" version="3.4.1">
+ <description>
+ MPlayer uses threads to properly handle out and error stream. Updated to latest ffmpeg library. Support of correct MIME type under Linux.
+ </description>
+ </version>
+ <version release="18" version="3.4.0">
+ <description>
+ SRT supports font formatting. Subtitle statistics. Better handling of preview bars. Improved splitting interface. Updated Media files configuration. Display number of lines and characters per line while editing. MPlayer display formatted subtitles - use of ASS format instead of SRT. Linux man and doc paths fixed. Support for Quicktime Texttrack subtitles. Fixed an error with MPL2 subtitles. Frame icon now properly display under Windows/Linux. Quit confirmation dialogue properly works under Mac. Check for new version only once per day. Better display of selected subtitles. Fixed serious memory allocation error in Windows. Various bug fixes and updates.
+ </description>
+ </version>
+ <version release="17" version="3.3.0">
+ <description>
+ Automatic detection of MPlayer/ASpell executables. Preview window GUI updates. Alt-mousewheel / alt-click slows down rotation in JTimeSpinner boxes. Support for Spruce DVDMaestro (STL) and MPL2 subtitles (without formatting). Fixed autoload for Java 1.6 in Linux. Added missing tooltips. Fixed gettext bug with ' character. Improved ffmpeg support. Keep application alive if "Close window" is selected. New window will not fully overlap old one. Spanish, French and Serbian translations introduced. Czech, German, Portuguese and Greek translation corrections. Various bug fixes and usability improvements.
+ </description>
+ </version>
+ <version release="16" version="3.2.0">
+ <description>
+ Doube click on icons launch Jubler (in Mac OSX, Windows and Debian systems). MPlayer fixes. Jubler installs in systems with JRE 1.6. MPlayer supports different audio stream. Video playback doesn't change system mixers. FFMPEG time offset and WMV bug fixes. Better handling of audio caches. Updated to newer version of FFMPEG. ASpell updates supported languages when opening preferences. Major internal changes and cleanups. Initial Debian package.
+ </description>
+ </version>
+ <version release="15" version="3.1.0">
+ <description>
+ Read frames per second from the movie now supported. Movie synchronization on the fly, based on time differences between time points supported. Updated recoring of subtitles on the fly. A lot of fine tuning. Zemberek updates.
+ </description>
+ </version>
+ <version release="14" version="3.0.0">
+ <description>
+ FFDecode bugs fixed, preview should be much more stable and accurate. Preview bug fixed, where wrong duration was reported. Tools remember last values. Column width is now saved. Now it is compatible with latest version of MPlayer. Updated to newest ffmpeg sources. Turkish translation added. Support for zemberek added. Preliminary built-in FAQ subsystem. Tweaks and code changes. New icons and splash screen. Linux installation script fixes. Supports cocoASpell under Mac OSX.
+ </description>
+ </version>
+ <version release="13" version="3.0.0-rc4">
+ <description>
+ Fixed bugs: audio line not closing, saving file with an illegal character set, banner not closing, Jubler crashing when audio codec could not be opened, Jubler didn't start under Linux. Mac OSX port is now universal binary. Synchronize subtitle texts and timestamps. Subtitle preview updates live on key events. Automatic version check through internet. Smaller code changes.
+ </description>
+ </version>
+ <version release="12" version="3.0.0-rc3">
+ <description>
+ Initial Mac OS X version. Big endian bugs fixed. "Quit" introduced. Menu shortcuts are now editable. MPlayer threading issues fixed. Cache is created only when needed. Full AC3 support.
+ </description>
+ </version>
+ <version release="11" version="3.0.0-rc2">
+ <description>
+ Great speedup improvements were made on subtitle preview. Alpha channel values in SSA/ASS format were flipped. MPlayer options may now be edited. Recent items are sorted according to their call. A bug with the installer not properly detecting JRE was fixed. Subtitle preview fixes were done.
+ </description>
+ </version>
+ <version release="10" version="3.0.0-rc1">
+ <description>
+ Czech translation. Subtitle text display on frame preview (draft and full details) using Java 2D. Default display frame when no library is present, or no actual frame preview is required. When FFDecode library is missing, a notice is displayed and no more a popup dialog appers. Subtitle is movable on wave panel too (in preview). Display subtitle time when moving subtitles in preview. Revert, clone and open recent subtitles in File menu. Video preview in normal and half size. Reparent current subtitles (for translations). MPlayer now supports default font size (and font name in Linux). Only static version of ffmpeg for linux is provided. Varius bug fixes.
+ </description>
+ </version>
+ <version release="9" version="2.9.9">
+ <description>
+ Preview of subtitles added (dependance on FFMPEG library). Frame preview of the current frame, waveform preview and waveform listening is supported. Graphically display of subtitles, which can be moved and resized. Jubler no longer distributed as JAR file but using self expandable platform specific installers (due to FFMPEG). Mouse wheel over subtitle time changes its value. Various bug fixes and other enchacements.
+ </description>
+ </version>
+ <version release="8" version="2.5.1">
+ <description>
+ Fix while trying to save a splitted subtitle file.
+ </description>
+ </version>
+ <version release="7" version="2.5.0">
+ <description>
+ Suport for SubStation Alpha (SSA), Advanced SubStation (ASS), and SubViewer (1+2) subtitle formats. A German translation. Styles are supported (when saving in SubStation formats). A translating mode. A lot of fine tuning and bugfixes.
+ </description>
+ </version>
+ <version release="6" version="2.0.0">
+ <description>
+ Mostly code cleanup and changes in the "about" box.
+ </description>
+ </version>
+ <version release="5" version="2.0-rc1">
+ <description>
+ This version adds I18n support through gettext.
+ </description>
+ </version>
+ <version release="4" version="1.9.3">
+ <description>
+ Find and replace and global replace features were added. The focus of the subtitle textbox was fixed.
+ </description>
+ </version>
+ <version release="3" version="1.9.1">
+ <description>
+ Enhancements were made to the command line arguments of mplayer in order to play correctly under the Windows ports of MPlayer. A few unimportant corrections were made to the ASpell options.
+ </description>
+ </version>
+ <version release="2" version="1.9.0">
+ <description>
+ This version has great improvements in the mplayer frontend, ASpell support, GUI lifting, and new tools.
+ </description>
+ </version>
+ <version release="1" version="0.9">
+ <description>
+ Initial announcement
+ </description>
+ </version>
+</updatelist> \ No newline at end of file
diff --git a/media-video/jubler/jubler-4.6.1-r3.ebuild b/media-video/jubler/jubler-4.6.1-r3.ebuild
new file mode 100644
index 000000000000..c8541a6b8181
--- /dev/null
+++ b/media-video/jubler/jubler-4.6.1-r3.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+WANT_ANT_TASKS="ant-nodeps ant-contrib"
+inherit fdo-mime eutils java-pkg-2 java-ant-2 toolchain-funcs
+
+MY_PN=${PN/#j/J}
+DESCRIPTION="Java subtitle editor"
+HOMEPAGE="http://www.jubler.org/"
+SRC_URI="https://${PN}.googlecode.com/files/${MY_PN}-source-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="mplayer nls spell"
+
+RDEPEND=">=virtual/jre-1.5
+ virtual/ffmpeg
+ mplayer? ( media-video/mplayer[libass] )
+ spell? (
+ app-text/aspell
+ >=dev-java/zemberek-2.0[l10n_tr]
+ )"
+
+DEPEND=">=virtual/jdk-1.5
+ virtual/ffmpeg
+ app-text/xmlto
+ >=dev-java/jupidator-0.6.0
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_unpack() {
+ unpack ${A}
+ cp "${FILESDIR}"/update-${PV}.xml "${S}" || die
+}
+
+java_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ epatch "${FILESDIR}"/${P}-ffmpeg-1.patch
+ epatch "${FILESDIR}"/${P}-ffmpeg-2.patch
+ chmod +x resources/installers/linux/iconinstall
+ #cd resources/libs || die
+ java-pkg_jarfrom --build-only --into resources/libs jupidator
+ rm -R plugins/{autoupdate,macapp} || die "unneeded plugin cleanup failed"
+ rm -R resources/libs/ant-contrib || die "jar cleanup failed"
+ if ! use mplayer; then
+ rm -R plugins/mplayer || die "mplayer plugin removal failed"
+ fi
+ if ! use spell; then
+ rm -R plugins/{zemberek,aspell} || die "spellcheck plugin removal failed"
+ fi
+ sed -i -e "s/CODEC_TYPE/AVMEDIA_TYPE/g" $(find resources/ffmpeg/ffdecode -name "*.c")
+ sed -i -e "s:PKT_FLAG_KEY:AV_PKT_FLAG_KEY:g" $(find resources/ffmpeg/ffdecode -name "*.c")
+}
+
+src_compile() {
+ java-pkg_filter-compiler ecj-3.2
+ ANT_TASKS="ant-nodeps ant-contrib" eant $(use nls && echo allparts) $(use nls || echo parts) help changelog || die "eant failed"
+ #cp -v dist/help/jubler-faq.html build/classes/help || die "cp failed"
+ cd resources/ffmpeg/ffdecode || die
+ CC=$(tc-getCC) NOSTRIP=true emake linuxdyn || die "make failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/Jubler.jar
+ use nls && java-pkg_dojar dist/i18n/*.jar
+ insinto /usr/share/jubler/lib/lib
+ doins dist/lib/*.jar || die "Plugin installation failed"
+ #java-pkg_dojar dist/lib/*.jar
+ use spell && java-pkg_register-dependency zemberek zemberek2-cekirdek.jar
+ use spell && java-pkg_register-dependency zemberek zemberek2-tr.jar
+ java-pkg_doso resources/ffmpeg/ffdecode/libffdecode.so
+ doicon resources/installers/linux/jubler.png
+ domenu resources/installers/linux/jubler.desktop
+
+ DESTDIR="${D}" eant linuxdesktopintegration
+ rm -vr "${D}/usr/share/menu" || die
+
+ java-pkg_dolauncher jubler --main Jubler
+ dohtml ChangeLog.html || die "dohtml failed"
+ dodoc README || die "dodoc failed"
+ doman resources/installers/linux/jubler.1 || die "doman failed"
+ insinto /usr/share/jubler/help
+ doins dist/help/* || die "doins failed"
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-video/jubler/jubler-5.1.ebuild b/media-video/jubler/jubler-5.1.ebuild
new file mode 100644
index 000000000000..05d272f4c3d5
--- /dev/null
+++ b/media-video/jubler/jubler-5.1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit fdo-mime java-pkg-2 java-ant-2
+
+MY_PN="${PN^}"
+
+DESCRIPTION="Java subtitle editor"
+HOMEPAGE="http://www.jubler.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-source-${PV}.tar.bz2 -> ${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="mplayer spell nls"
+
+RDEPEND="
+ mplayer? ( media-video/mplayer[libass] )
+ spell? ( app-text/aspell )
+ >=virtual/jre-1.6"
+
+DEPEND="
+ >=virtual/jdk-1.6"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ default
+
+ local REMOVE_PLUGINS=() _plugin
+ use mplayer || REMOVE_PLUGINS+=( mplayer )
+ use spell || REMOVE_PLUGINS+=( aspell zemberek )
+ for _plugin in "${REMOVE_PLUGINS[@]}"; do
+ rm -rv "plugins/${_plugin}" || die
+ done
+}
+
+src_compile() {
+ local JUBLER_TARGETS=()
+ use nls || JUBLER_TARGETS+=( core help )
+ eant -f "${S}/build.xml" "${JUBLER_TARGETS[@]}"
+}
+
+src_install() {
+ DESTDIR="${D}" eant linuxdesktopintegration
+ rm -rv "${D}/usr/share/menu" || die
+
+ doicon "resources/installers/linux/${PN}.png"
+ domenu "resources/installers/linux/${PN}.desktop"
+
+ java-pkg_dojar dist/Jubler.jar
+ java-pkg_dolauncher "${PN}" --main Jubler
+
+ if use nls; then
+ insinto "/usr/share/${PN}/lib/i18n/"
+ doins dist/i18n/*.jar
+ fi
+
+ insinto "/usr/share/${PN}/lib/themes"
+ doins dist/themes/coretheme.jar
+ insinto "/usr/share/${PN}/lib/lib"
+ doins dist/lib/*.jar
+
+ insinto "/usr/share/${PN}/help"
+ doins resources/help/*
+
+ doman "resources/installers/linux/${PN}.1"
+ einstalldocs
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-video/jubler/metadata.xml b/media-video/jubler/metadata.xml
new file mode 100644
index 000000000000..ebc08c4e9cdb
--- /dev/null
+++ b/media-video/jubler/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">jubler</remote-id>
+ </upstream>
+</pkgmetadata>