head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.4 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.2 pkgsrc-2012Q4-base:1.3 pkgsrc-2012Q2:1.2.0.22 pkgsrc-2012Q2-base:1.2 pkgsrc-2012Q1:1.2.0.20 pkgsrc-2012Q1-base:1.2 pkgsrc-2011Q4:1.2.0.18 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q3:1.2.0.16 pkgsrc-2011Q3-base:1.2 pkgsrc-2011Q2:1.2.0.14 pkgsrc-2011Q2-base:1.2 pkgsrc-2011Q1:1.2.0.12 pkgsrc-2011Q1-base:1.2 pkgsrc-2010Q4:1.2.0.10 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.2.0.8 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.2.0.6 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.2.0.4 pkgsrc-2010Q1-base:1.2 pkgsrc-2009Q4:1.2.0.2 pkgsrc-2009Q4-base:1.2; locks; strict; comment @# @; 1.3 date 2012.09.24.10.29.36; author ryoon; state dead; branches; next 1.2; 1.2 date 2009.11.28.19.31.29; author kefren; state Exp; branches; next 1.1; 1.1 date 2009.11.28.18.37.22; author kefren; state Exp; branches; next ; desc @@ 1.3 log @Update to 0.660 * Fix build with recent ffmpeg Changelog: Version SVN-660 2010-01-11 * fixed subscription parsing for coherence UPnP framework * initial support for wpl playlists (Robert Massaioli) * initial ffmpegthumbnailer plugin * initial windows service * WMP 11 support * cleanup and bugfixes * added album & genre search/sort capabilities @ text @$NetBSD: patch-ad,v 1.2 2009/11/28 19:31:29 kefren Exp $ --- src/plugins/ffmpeg/ffmpeg.cpp.orig 2009-07-18 16:08:59.000000000 +0300 +++ src/plugins/ffmpeg/ffmpeg.cpp 2009-11-28 21:00:33.000000000 +0200 @@@@ -201,7 +201,7 @@@@ if(pFFmpeg->audio_sync_method){ double delta = get_sync_ipts(ost, pFFmpeg) * enc->sample_rate - ost->sync_opts - - av_fifo_size(&ost->fifo)/(ost->st->codec->channels * 2); + - av_fifo_size(ost->fifo)/(ost->st->codec->channels * 2); double idelta= delta*ist->st->codec->sample_rate / enc->sample_rate; int byte_delta= ((int)idelta)*2*ist->st->codec->channels; @@@@ -238,13 +238,13 @@@@ assert(ost->audio_resample); if(pFFmpeg->verbose > 2) fprintf(stderr, "compensating audio timestamp drift:%f compensation:%d in:%d\n", delta, comp, enc->sample_rate); -// fprintf(stderr, "drift:%f len:%d opts:%"PRId64" ipts:%"PRId64" fifo:%d\n", delta, -1, ost->sync_opts, (int64_t)(get_sync_ipts(ost) * enc->sample_rate), av_fifo_size(&ost->fifo)/(ost->st->codec->channels * 2)); +// fprintf(stderr, "drift:%f len:%d opts:%"PRId64" ipts:%"PRId64" fifo:%d\n", delta, -1, ost->sync_opts, (int64_t)(get_sync_ipts(ost) * enc->sample_rate), av_fifo_size(ost->fifo)/(ost->st->codec->channels * 2)); av_resample_compensate(*(struct AVResampleContext**)ost->resample, comp, enc->sample_rate); } } }else ost->sync_opts= lrintf(get_sync_ipts(ost, pFFmpeg) * enc->sample_rate) - - av_fifo_size(&ost->fifo)/(ost->st->codec->channels * 2); //FIXME wrong + - av_fifo_size(ost->fifo)/(ost->st->codec->channels * 2); //FIXME wrong if (ost->audio_resample) { buftmp = audio_buf; @@@@ -260,11 +260,11 @@@@ /* now encode as many frames as possible */ if (enc->frame_size > 1) { /* output resampled raw samples */ - av_fifo_write(&ost->fifo, buftmp, size_out); + av_fifo_generic_write(ost->fifo, buftmp, size_out, NULL); frame_bytes = enc->frame_size * 2 * enc->channels; - while (av_fifo_read(&ost->fifo, audio_buf, frame_bytes) == 0) { + while (av_fifo_generic_read(ost->fifo, audio_buf, frame_bytes, NULL) == 0) { AVPacket pkt; av_init_packet(&pkt); @@@@ -1065,13 +1065,13 @@@@ switch(ost->st->codec->codec_type) { case CODEC_TYPE_AUDIO: - fifo_bytes = av_fifo_size(&ost->fifo); + fifo_bytes = av_fifo_size(ost->fifo); ret = 0; /* encode any samples remaining in fifo */ if(fifo_bytes > 0 && enc->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) { int fs_tmp = enc->frame_size; enc->frame_size = fifo_bytes / (2 * enc->channels); - if(av_fifo_read(&ost->fifo, (uint8_t *)samples, fifo_bytes) == 0) { + if(av_fifo_generic_read(ost->fifo, (uint8_t *)samples, fifo_bytes, NULL) == 0) { ret = avcodec_encode_audio(enc, pFFmpeg->bit_buffer, pFFmpeg->bit_buffer_size, samples); } enc->frame_size = fs_tmp; @@@@ -1320,7 +1320,7 @@@@ } else { switch(codec->codec_type) { case CODEC_TYPE_AUDIO: - if (av_fifo_init(&ost->fifo, 2 * MAX_AUDIO_PACKET_SIZE)) + if ((ost->fifo = av_fifo_alloc(2 * MAX_AUDIO_PACKET_SIZE)) == NULL) goto fail; if (codec->channels == icodec->channels && @@@@ -1777,7 +1777,7 @@@@ fclose(ost->logfile); ost->logfile = NULL; } - av_fifo_free(&ost->fifo); /* works even if fifo is not + av_fifo_free(ost->fifo); /* works even if fifo is not initialized but set to zero */ av_free(ost->pict_tmp.data[0]); #ifdef HAVE_LIBSWSCALE @ 1.2 log @optional mysql support not enabled by default remove stray patch pkgrevision++ @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Update to r640, another semi-release, this time published on sf.net The most important change is that it compiles and works. Tested with PS3. XXX: probably mysql functions should be optional. @ text @d2 2 a3 2 --- src/plugins/ffmpeg/ffmpeg.cpp.orig 2009-11-28 18:48:32.000000000 +0200 +++ src/plugins/ffmpeg/ffmpeg.cpp 2009-11-28 19:04:32.000000000 +0200 d43 1 a43 15 @@@@ -1020,11 +1020,11 @@@@ /* XXX: allocate the subtitles in the codec ? */ if (subtitle_to_free) { if (subtitle_to_free->rects != NULL) { - for (i = 0; i < subtitle_to_free->num_rects; i++) { +/* for (i = 0; i < subtitle_to_free->num_rects; i++) { av_free(subtitle_to_free->rects[i].bitmap); av_free(subtitle_to_free->rects[i].rgba_palette); } - av_freep(&subtitle_to_free->rects); +*/ av_freep(&subtitle_to_free->rects); } subtitle_to_free->num_rects = 0; subtitle_to_free = NULL; @@@@ -1054,13 +1054,13 @@@@ d59 1 a59 1 @@@@ -1309,7 +1309,7 @@@@ d68 1 a68 1 @@@@ -1766,7 +1766,7 @@@@ @