mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-04 14:08:51 +02:00
Merge all changes from trunk
This commit is contained in:
27
media-video/ffmpeg/ffmpeg-0.10.2-vlc.bep
Normal file
27
media-video/ffmpeg/ffmpeg-0.10.2-vlc.bep
Normal file
@@ -0,0 +1,27 @@
|
||||
DESCRIPTION="FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It includes libavcodec - the leading audio/video codec library."
|
||||
HOMEPAGE="http://www.ffmpeg.org"
|
||||
SRC_URI="http://www.ffmpeg.org/releases/ffmpeg-0.10.2.tar.bz2"
|
||||
CHECKSUM_MD5="de1bd5fc4bbf3ef730a5361ee596fedd"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND="media-libs/libogg >= 1.3.0
|
||||
media-libs/speex >= 1.2rc1
|
||||
media-libs/libtheora >= 1.1.0
|
||||
media-libs/libvorbis >= 1.3.2
|
||||
media-libs/libvpx >= 1.0.0"
|
||||
BUILD {
|
||||
cd ffmpeg-0.10.2
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-debug --enable-shared \
|
||||
--enable-libvorbis --enable-libspeex --enable-libtheora --enable-libvpx \
|
||||
--enable-gpl --datadir=`finddir B_COMMON_DATA_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
cd ffmpeg-0.10.2
|
||||
make install
|
||||
}
|
||||
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="2000-2003 Fabrice Bellard
|
||||
2003-2012 the FFmpeg developers"
|
||||
28
media-video/ffmpeg/ffmpeg-0.10.2.bep
Normal file
28
media-video/ffmpeg/ffmpeg-0.10.2.bep
Normal file
@@ -0,0 +1,28 @@
|
||||
DESCRIPTION="FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It includes libavcodec - the leading audio/video codec library."
|
||||
HOMEPAGE="http://www.ffmpeg.org"
|
||||
SRC_URI="http://www.ffmpeg.org/releases/ffmpeg-0.10.2.tar.bz2"
|
||||
CHECKSUM_MD5="de1bd5fc4bbf3ef730a5361ee596fedd"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND="media-libs/libogg >= 1.3.0
|
||||
media-libs/speex >= 1.2rc1
|
||||
media-libs/libtheora >= 1.1.0
|
||||
media-libs/libvorbis >= 1.3.2
|
||||
media-libs/libvpx >= 1.0.0"
|
||||
BUILD {
|
||||
cd ffmpeg-0.10.2
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-debug --enable-shared \
|
||||
--enable-libvorbis --enable-libspeex --enable-libtheora --enable-libvpx \
|
||||
--datadir=`finddir B_COMMON_DATA_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
cd ffmpeg-0.10.2
|
||||
make install
|
||||
}
|
||||
|
||||
LICENSE="GNU LGPL v2.1
|
||||
GNU GPL v2"
|
||||
COPYRIGHT="2000-2003 Fabrice Bellard
|
||||
2003-2012 the FFmpeg developers"
|
||||
27
media-video/ffmpeg/ffmpeg-0.10.bep
Normal file
27
media-video/ffmpeg/ffmpeg-0.10.bep
Normal file
@@ -0,0 +1,27 @@
|
||||
DESCRIPTION="FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It includes libavcodec - the leading audio/video codec library."
|
||||
HOMEPAGE="http://www.ffmpeg.org"
|
||||
SRC_URI="http://www.ffmpeg.org/releases/ffmpeg-0.10.tar.bz2"
|
||||
CHECKSUM_MD5="dc665cc599a739e3c5262ccdac13d129"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND="media-libs/libogg >= 1.3.0
|
||||
media-libs/speex >= 1.2rc1
|
||||
media-libs/libtheora >= 1.1.0
|
||||
media-libs/libvorbis >= 1.3.2
|
||||
media-libs/libvpx >= 1.0.0"
|
||||
BUILD {
|
||||
cd ffmpeg-0.10
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-debug --enable-shared \
|
||||
--enable-libvorbis --enable-libspeex --enable-libtheora --enable-libvpx
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
cd ffmpeg-0.10
|
||||
make install
|
||||
}
|
||||
|
||||
LICENSE="GNU LGPL v2.1
|
||||
GNU GPL v2"
|
||||
COPYRIGHT="2000-2003 Fabrice Bellard
|
||||
2003-2012 the FFmpeg developers"
|
||||
28
media-video/ffmpeg/ffmpeg-0.11.1.bep
Normal file
28
media-video/ffmpeg/ffmpeg-0.11.1.bep
Normal file
@@ -0,0 +1,28 @@
|
||||
DESCRIPTION="FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It includes libavcodec - the leading audio/video codec library."
|
||||
HOMEPAGE="http://www.ffmpeg.org"
|
||||
SRC_URI="http://www.ffmpeg.org/releases/ffmpeg-0.11.1.tar.bz2"
|
||||
CHECKSUM_MD5="ff8cb914f657e164dd60ea1008b555a8"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND="media-libs/libogg >= 1.3.0
|
||||
media-libs/speex >= 1.2rc1
|
||||
media-libs/libtheora >= 1.1.0
|
||||
media-libs/libvorbis >= 1.3.2
|
||||
media-libs/libvpx >= 1.0.0"
|
||||
BUILD {
|
||||
cd ffmpeg-0.11.1
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-debug --enable-shared \
|
||||
--enable-libvorbis --enable-libspeex --enable-libtheora --enable-libvpx \
|
||||
--datadir=`finddir B_COMMON_DATA_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
cd ffmpeg-0.11.1
|
||||
make install
|
||||
}
|
||||
|
||||
LICENSE="GNU LGPL v2.1
|
||||
GNU GPL v2"
|
||||
COPYRIGHT="2000-2003 Fabrice Bellard
|
||||
2003-2012 the FFmpeg developers"
|
||||
@@ -7,7 +7,7 @@ STATUS_HAIKU="stable"
|
||||
DEPEND=""
|
||||
BUILD {
|
||||
cd ffmpeg-0.5
|
||||
./configure --prefix=/boot/common --disable-debug --disable-mmx --enable-shared
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-debug --disable-mmx --enable-shared
|
||||
make
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ STATUS_HAIKU="stable"
|
||||
DEPEND=""
|
||||
BUILD {
|
||||
cd ffmpeg-0.6
|
||||
./configure --prefix=/boot/common --disable-debug --disable-mmx --enable-shared
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-debug --disable-mmx --enable-shared
|
||||
make
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ DEPEND=""
|
||||
BUILD {
|
||||
cd ffmpeg-23081
|
||||
chmod 777 configure
|
||||
./configure --prefix=/boot/common --disable-debug --disable-mmx --enable-shared --enable-gpl
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-debug --disable-mmx --enable-shared --enable-gpl
|
||||
make
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ DEPEND=""
|
||||
BUILD {
|
||||
cd ffmpeg-7407
|
||||
chmod 777 configure
|
||||
./configure --prefix=/boot/common --disable-debug --disable-mmx --enable-shared --enable-gpl --enable-pp
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-debug --disable-mmx --enable-shared --enable-gpl --enable-pp
|
||||
make
|
||||
}
|
||||
|
||||
|
||||
268
media-video/ffmpeg/patches/ffmpeg-0.10-gcc2.patch
Normal file
268
media-video/ffmpeg/patches/ffmpeg-0.10-gcc2.patch
Normal file
@@ -0,0 +1,268 @@
|
||||
diff --git a/cmdutils.c b/cmdutils.c
|
||||
index 386db3d..f918600 100644
|
||||
--- ffmpeg-0.10/cmdutils.c
|
||||
+++ ffmpeg-0.10/cmdutils.c
|
||||
@@ -89,7 +89,7 @@ static void log_callback_report(void *ptr, int level, const char *fmt, va_list v
|
||||
char line[1024];
|
||||
static int print_prefix = 1;
|
||||
|
||||
- va_copy(vl2, vl);
|
||||
+ __va_copy(vl2, vl);
|
||||
av_log_default_callback(ptr, level, fmt, vl);
|
||||
av_log_format_line(ptr, level, fmt, vl2, line, sizeof(line), &print_prefix);
|
||||
va_end(vl2);
|
||||
diff --git a/ffmpeg.c b/ffmpeg.c
|
||||
index 463e1f4..245e8b5 100644
|
||||
--- ffmpeg-0.10/ffmpeg.c
|
||||
+++ ffmpeg-0.10/ffmpeg.c
|
||||
@@ -1247,9 +1247,11 @@ need_realloc:
|
||||
av_fifo_size(ost->fifo) / (enc->channels * osize); // FIXME wrong
|
||||
|
||||
if (ost->audio_resample) {
|
||||
+ uint8_t *buftmp2[] = { buftmp };
|
||||
+ const uint8_t *buf2[] = { buf };
|
||||
buftmp = audio_buf;
|
||||
- size_out = swr_convert(ost->swr, ( uint8_t*[]){buftmp}, audio_buf_size / (enc->channels * osize),
|
||||
- (const uint8_t*[]){buf }, size / (dec->channels * isize));
|
||||
+ size_out = swr_convert(ost->swr, buftmp2, audio_buf_size / (enc->channels * osize),
|
||||
+ buf2, size / (dec->channels * isize));
|
||||
size_out = size_out * enc->channels * osize;
|
||||
} else {
|
||||
buftmp = buf;
|
||||
diff --git a/ffprobe.c b/ffprobe.c
|
||||
index ca6133e..43f9d39 100644
|
||||
--- ffmpeg-0.10/ffprobe.c
|
||||
+++ ffmpeg-0.10/ffprobe.c
|
||||
@@ -293,7 +293,9 @@ static void writer_print_time(WriterContext *wctx, const char *key,
|
||||
writer_print_string(wctx, key, "N/A", 1);
|
||||
} else {
|
||||
double d = ts * av_q2d(*time_base);
|
||||
- value_string(buf, sizeof(buf), (struct unit_value){.val.d=d, .unit=unit_second_str});
|
||||
+ struct unit_value value2 = {.unit=unit_second_str};
|
||||
+ value2.val.d = d;
|
||||
+ value_string(buf, sizeof(buf), value2);
|
||||
writer_print_string(wctx, key, buf, 0);
|
||||
}
|
||||
}
|
||||
@@ -1249,8 +1251,8 @@ static void writer_register_all(void)
|
||||
#define print_str_opt(k, v) writer_print_string(w, k, v, 1)
|
||||
#define print_time(k, v, tb) writer_print_time(w, k, v, tb)
|
||||
#define print_ts(k, v) writer_print_ts(w, k, v)
|
||||
-#define print_val(k, v, u) writer_print_string(w, k, \
|
||||
- value_string(val_str, sizeof(val_str), (struct unit_value){.val.i = v, .unit=u}), 0)
|
||||
+#define print_val(k, v, u) value2.val.i = v; value2.unit=u; writer_print_string(w, k, \
|
||||
+ value_string(val_str, sizeof(val_str), value2), 0);
|
||||
#define print_section_header(s) writer_print_section_header(w, s)
|
||||
#define print_section_footer(s) writer_print_section_footer(w, s)
|
||||
#define show_tags(metadata) writer_show_tags(w, metadata)
|
||||
@@ -1261,6 +1263,7 @@ static void show_packet(WriterContext *w, AVFormatContext *fmt_ctx, AVPacket *pk
|
||||
AVStream *st = fmt_ctx->streams[pkt->stream_index];
|
||||
struct print_buf pbuf = {.s = NULL};
|
||||
const char *s;
|
||||
+ struct unit_value value2;
|
||||
|
||||
print_section_header("packet");
|
||||
s = av_get_media_type_string(st->codec->codec_type);
|
||||
@@ -1404,6 +1407,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
|
||||
const char *s;
|
||||
AVRational display_aspect_ratio;
|
||||
struct print_buf pbuf = {.s = NULL};
|
||||
+ struct unit_value value2;
|
||||
|
||||
print_section_header("stream");
|
||||
|
||||
@@ -1516,6 +1520,7 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
{
|
||||
char val_str[128];
|
||||
int64_t size = fmt_ctx->pb ? avio_size(fmt_ctx->pb) : -1;
|
||||
+ struct unit_value value2;
|
||||
|
||||
print_section_header("format");
|
||||
print_str("filename", fmt_ctx->filename);
|
||||
@@ -1524,9 +1529,9 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
print_str("format_long_name", fmt_ctx->iformat->long_name);
|
||||
print_time("start_time", fmt_ctx->start_time, &AV_TIME_BASE_Q);
|
||||
print_time("duration", fmt_ctx->duration, &AV_TIME_BASE_Q);
|
||||
- if (size >= 0) print_val ("size", size, unit_byte_str);
|
||||
+ if (size >= 0) { print_val ("size", size, unit_byte_str); }
|
||||
else print_str_opt("size", "N/A");
|
||||
- if (fmt_ctx->bit_rate > 0) print_val ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str);
|
||||
+ if (fmt_ctx->bit_rate > 0) { print_val ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str); }
|
||||
else print_str_opt("bit_rate", "N/A");
|
||||
show_tags(fmt_ctx->metadata);
|
||||
print_section_footer("format");
|
||||
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
|
||||
index 55f0286..35d5f1a 100644
|
||||
--- ffmpeg-0.10/libavcodec/aacenc.c
|
||||
+++ ffmpeg-0.10/libavcodec/aacenc.c
|
||||
@@ -223,8 +223,9 @@ WINDOW_FUNC(eight_short)
|
||||
const float *pwindow = sce->ics.use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;
|
||||
const float *in = audio + 448;
|
||||
float *out = sce->ret;
|
||||
+ int w;
|
||||
|
||||
- for (int w = 0; w < 8; w++) {
|
||||
+ for (w = 0; w < 8; w++) {
|
||||
dsp->vector_fmul (out, in, w ? pwindow : swindow, 128);
|
||||
out += 128;
|
||||
in += 128;
|
||||
@@ -686,11 +687,12 @@ static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
|
||||
|
||||
static av_cold int alloc_buffers(AVCodecContext *avctx, AACEncContext *s)
|
||||
{
|
||||
+ int ch;
|
||||
FF_ALLOCZ_OR_GOTO(avctx, s->buffer.samples, 3 * 1024 * s->channels * sizeof(s->buffer.samples[0]), alloc_fail);
|
||||
FF_ALLOCZ_OR_GOTO(avctx, s->cpe, sizeof(ChannelElement) * s->chan_map[0], alloc_fail);
|
||||
FF_ALLOCZ_OR_GOTO(avctx, avctx->extradata, 5 + FF_INPUT_BUFFER_PADDING_SIZE, alloc_fail);
|
||||
|
||||
- for(int ch = 0; ch < s->channels; ch++)
|
||||
+ for(ch = 0; ch < s->channels; ch++)
|
||||
s->planar_samples[ch] = s->buffer.samples + 3 * 1024 * ch;
|
||||
|
||||
return 0;
|
||||
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
|
||||
index e73fbfe..3cde56c 100644
|
||||
--- ffmpeg-0.10/libavutil/pixdesc.c
|
||||
+++ ffmpeg-0.10/libavutil/pixdesc.c
|
||||
@@ -1096,12 +1096,6 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
||||
.log2_chroma_h = 1,
|
||||
.flags = PIX_FMT_HWACCEL,
|
||||
},
|
||||
- [PIX_FMT_VDA_VLD] = {
|
||||
- .name = "vda_vld",
|
||||
- .log2_chroma_w = 1,
|
||||
- .log2_chroma_h = 1,
|
||||
- .flags = PIX_FMT_HWACCEL,
|
||||
- },
|
||||
[PIX_FMT_GRAY8A] = {
|
||||
.name = "gray8a",
|
||||
.nb_components = 2,
|
||||
@@ -1110,16 +1104,6 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
||||
{ 0, 1, 2, 0, 7 }, /* A */
|
||||
},
|
||||
},
|
||||
- [PIX_FMT_GBR24P] = {
|
||||
- .name = "gbr24p",
|
||||
- .nb_components= 3,
|
||||
- .comp = {
|
||||
- { 1, 0, 1, 0, 7 }, /* B */
|
||||
- { 0, 0, 1, 0, 7 }, /* G */
|
||||
- { 2, 0, 1, 0, 7 }, /* R */
|
||||
- },
|
||||
- .flags = PIX_FMT_PLANAR | PIX_FMT_RGB,
|
||||
- },
|
||||
[PIX_FMT_GBRP] = {
|
||||
.name = "gbrp",
|
||||
.nb_components = 3,
|
||||
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
|
||||
index e1ba799..3820056 100644
|
||||
--- ffmpeg-0.10/libswscale/swscale_unscaled.c
|
||||
+++ ffmpeg-0.10/libswscale/swscale_unscaled.c
|
||||
@@ -370,30 +370,38 @@ static int planarRgbToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStr
|
||||
}
|
||||
|
||||
switch (c->dstFormat) {
|
||||
- case PIX_FMT_BGR24:
|
||||
- gbr24ptopacked24((const uint8_t* []) {src[1], src[0], src[2]}, (int []) {srcStride[1], srcStride[0], srcStride[2]},
|
||||
+ case PIX_FMT_BGR24: {
|
||||
+ const uint8_t* src2[] = {src[1], src[0], src[2]};
|
||||
+ int srcStride2[] = {srcStride[1], srcStride[0], srcStride[2]};
|
||||
+ gbr24ptopacked24(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, c->srcW);
|
||||
break;
|
||||
-
|
||||
- case PIX_FMT_RGB24:
|
||||
- gbr24ptopacked24((const uint8_t* []) {src[2], src[0], src[1]}, (int []) {srcStride[2], srcStride[0], srcStride[1]},
|
||||
+ }
|
||||
+ case PIX_FMT_RGB24: {
|
||||
+ const uint8_t* src2[] = {src[2], src[0], src[1]};
|
||||
+ int srcStride2[] = {srcStride[2], srcStride[0], srcStride[1]};
|
||||
+ gbr24ptopacked24(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
case PIX_FMT_ARGB:
|
||||
alpha_first = 1;
|
||||
- case PIX_FMT_RGBA:
|
||||
- gbr24ptopacked32((const uint8_t* []) {src[2], src[0], src[1]}, (int []) {srcStride[2], srcStride[0], srcStride[1]},
|
||||
+ case PIX_FMT_RGBA: {
|
||||
+ const uint8_t* src2[] = {src[2], src[0], src[1]};
|
||||
+ int srcStride2[] = {srcStride[2], srcStride[0], srcStride[1]};
|
||||
+ gbr24ptopacked32(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, alpha_first, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
case PIX_FMT_ABGR:
|
||||
alpha_first = 1;
|
||||
- case PIX_FMT_BGRA:
|
||||
- gbr24ptopacked32((const uint8_t* []) {src[1], src[0], src[2]}, (int []) {srcStride[1], srcStride[0], srcStride[2]},
|
||||
+ case PIX_FMT_BGRA: {
|
||||
+ const uint8_t* src2[] = {src[1], src[0], src[2]};
|
||||
+ int srcStride2[] = {srcStride[1], srcStride[0], srcStride[2]};
|
||||
+ gbr24ptopacked32(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, alpha_first, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
default:
|
||||
av_log(c, AV_LOG_ERROR, "unsupported planar RGB conversion %s -> %s\n",
|
||||
av_get_pix_fmt_name(c->srcFormat), av_get_pix_fmt_name(c->dstFormat));
|
||||
diff --git a/configure b/configure
|
||||
--- ffmpeg-0.10/configure 2012-01-26 22:15:59.047710208 +0000
|
||||
+++ ffmpeg-0.10-haiku/configure 2012-03-28 22:30:34.330563584 +0000
|
||||
@@ -1359,7 +1359,6 @@
|
||||
|
||||
aligned_stack_if_any="ppc x86"
|
||||
fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
|
||||
-fast_clz_if_any="alpha armv5te avr32 mips ppc x86"
|
||||
fast_unaligned_if_any="armv6 ppc x86"
|
||||
|
||||
inline_asm_deps="!tms470"
|
||||
@@ -1866,7 +1865,7 @@
|
||||
CC_O='-o $@'
|
||||
CXX_O='-o $@'
|
||||
|
||||
-host_cflags='-D_ISOC99_SOURCE -O3 -g'
|
||||
+host_cflags='-D_ISOC99_SOURCE -O2 -g'
|
||||
host_libs='-lm'
|
||||
|
||||
target_path='$(CURDIR)'
|
||||
@@ -1948,6 +1947,7 @@
|
||||
done
|
||||
|
||||
enable $ARCH_EXT_LIST $ALL_TESTS
|
||||
+disable sse
|
||||
|
||||
die_unknown(){
|
||||
echo "Unknown option \"$1\"."
|
||||
@@ -2144,7 +2144,7 @@
|
||||
CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
|
||||
AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
|
||||
fi
|
||||
- speed_cflags='-O3'
|
||||
+ speed_cflags='-O2'
|
||||
size_cflags='-Os'
|
||||
elif $cc --version 2>/dev/null | grep -q Intel; then
|
||||
cc_type=icc
|
||||
@@ -2831,10 +2831,6 @@
|
||||
struct { int x; } __attribute__((packed)) x;
|
||||
EOF
|
||||
|
||||
-check_cc <<EOF && enable attribute_may_alias
|
||||
-union { int x; } __attribute__((may_alias)) x;
|
||||
-EOF
|
||||
-
|
||||
check_cc <<EOF || die "endian test failed"
|
||||
unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
|
||||
EOF
|
||||
@@ -3108,8 +3104,6 @@
|
||||
enabled vaapi && require vaapi va/va.h vaInitialize -lva
|
||||
|
||||
check_mathfunc cbrtf
|
||||
-check_mathfunc exp2
|
||||
-check_mathfunc exp2f
|
||||
check_mathfunc llrint
|
||||
check_mathfunc llrintf
|
||||
check_mathfunc log2
|
||||
268
media-video/ffmpeg/patches/ffmpeg-0.10.2-gcc2.patch
Normal file
268
media-video/ffmpeg/patches/ffmpeg-0.10.2-gcc2.patch
Normal file
@@ -0,0 +1,268 @@
|
||||
diff --git a/cmdutils.c b/cmdutils.c
|
||||
index 386db3d..f918600 100644
|
||||
--- ffmpeg-0.10.2/cmdutils.c
|
||||
+++ ffmpeg-0.10.2/cmdutils.c
|
||||
@@ -89,7 +89,7 @@ static void log_callback_report(void *ptr, int level, const char *fmt, va_list v
|
||||
char line[1024];
|
||||
static int print_prefix = 1;
|
||||
|
||||
- va_copy(vl2, vl);
|
||||
+ __va_copy(vl2, vl);
|
||||
av_log_default_callback(ptr, level, fmt, vl);
|
||||
av_log_format_line(ptr, level, fmt, vl2, line, sizeof(line), &print_prefix);
|
||||
va_end(vl2);
|
||||
diff --git a/ffmpeg.c b/ffmpeg.c
|
||||
index 463e1f4..245e8b5 100644
|
||||
--- ffmpeg-0.10.2/ffmpeg.c
|
||||
+++ ffmpeg-0.10.2/ffmpeg.c
|
||||
@@ -1247,9 +1247,11 @@ need_realloc:
|
||||
av_fifo_size(ost->fifo) / (enc->channels * osize); // FIXME wrong
|
||||
|
||||
if (ost->audio_resample) {
|
||||
+ uint8_t *buftmp2[] = { buftmp };
|
||||
+ const uint8_t *buf2[] = { buf };
|
||||
buftmp = audio_buf;
|
||||
- size_out = swr_convert(ost->swr, ( uint8_t*[]){buftmp}, audio_buf_size / (enc->channels * osize),
|
||||
- (const uint8_t*[]){buf }, size / (dec->channels * isize));
|
||||
+ size_out = swr_convert(ost->swr, buftmp2, audio_buf_size / (enc->channels * osize),
|
||||
+ buf2, size / (dec->channels * isize));
|
||||
size_out = size_out * enc->channels * osize;
|
||||
} else {
|
||||
buftmp = buf;
|
||||
diff --git a/ffprobe.c b/ffprobe.c
|
||||
index ca6133e..43f9d39 100644
|
||||
--- ffmpeg-0.10.2/ffprobe.c
|
||||
+++ ffmpeg-0.10.2/ffprobe.c
|
||||
@@ -293,7 +293,9 @@ static void writer_print_time(WriterContext *wctx, const char *key,
|
||||
writer_print_string(wctx, key, "N/A", 1);
|
||||
} else {
|
||||
double d = ts * av_q2d(*time_base);
|
||||
- value_string(buf, sizeof(buf), (struct unit_value){.val.d=d, .unit=unit_second_str});
|
||||
+ struct unit_value value2 = {.unit=unit_second_str};
|
||||
+ value2.val.d = d;
|
||||
+ value_string(buf, sizeof(buf), value2);
|
||||
writer_print_string(wctx, key, buf, 0);
|
||||
}
|
||||
}
|
||||
@@ -1249,8 +1251,8 @@ static void writer_register_all(void)
|
||||
#define print_str_opt(k, v) writer_print_string(w, k, v, 1)
|
||||
#define print_time(k, v, tb) writer_print_time(w, k, v, tb)
|
||||
#define print_ts(k, v) writer_print_ts(w, k, v)
|
||||
-#define print_val(k, v, u) writer_print_string(w, k, \
|
||||
- value_string(val_str, sizeof(val_str), (struct unit_value){.val.i = v, .unit=u}), 0)
|
||||
+#define print_val(k, v, u) value2.val.i = v; value2.unit=u; writer_print_string(w, k, \
|
||||
+ value_string(val_str, sizeof(val_str), value2), 0);
|
||||
#define print_section_header(s) writer_print_section_header(w, s)
|
||||
#define print_section_footer(s) writer_print_section_footer(w, s)
|
||||
#define show_tags(metadata) writer_show_tags(w, metadata)
|
||||
@@ -1261,6 +1263,7 @@ static void show_packet(WriterContext *w, AVFormatContext *fmt_ctx, AVPacket *pk
|
||||
AVStream *st = fmt_ctx->streams[pkt->stream_index];
|
||||
struct print_buf pbuf = {.s = NULL};
|
||||
const char *s;
|
||||
+ struct unit_value value2;
|
||||
|
||||
print_section_header("packet");
|
||||
s = av_get_media_type_string(st->codec->codec_type);
|
||||
@@ -1404,6 +1407,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
|
||||
const char *s;
|
||||
AVRational display_aspect_ratio;
|
||||
struct print_buf pbuf = {.s = NULL};
|
||||
+ struct unit_value value2;
|
||||
|
||||
print_section_header("stream");
|
||||
|
||||
@@ -1516,6 +1520,7 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
{
|
||||
char val_str[128];
|
||||
int64_t size = fmt_ctx->pb ? avio_size(fmt_ctx->pb) : -1;
|
||||
+ struct unit_value value2;
|
||||
|
||||
print_section_header("format");
|
||||
print_str("filename", fmt_ctx->filename);
|
||||
@@ -1524,9 +1529,9 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
print_str("format_long_name", fmt_ctx->iformat->long_name);
|
||||
print_time("start_time", fmt_ctx->start_time, &AV_TIME_BASE_Q);
|
||||
print_time("duration", fmt_ctx->duration, &AV_TIME_BASE_Q);
|
||||
- if (size >= 0) print_val ("size", size, unit_byte_str);
|
||||
+ if (size >= 0) { print_val ("size", size, unit_byte_str); }
|
||||
else print_str_opt("size", "N/A");
|
||||
- if (fmt_ctx->bit_rate > 0) print_val ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str);
|
||||
+ if (fmt_ctx->bit_rate > 0) { print_val ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str); }
|
||||
else print_str_opt("bit_rate", "N/A");
|
||||
show_tags(fmt_ctx->metadata);
|
||||
print_section_footer("format");
|
||||
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
|
||||
index 55f0286..35d5f1a 100644
|
||||
--- ffmpeg-0.10.2/libavcodec/aacenc.c
|
||||
+++ ffmpeg-0.10.2/libavcodec/aacenc.c
|
||||
@@ -223,8 +223,9 @@ WINDOW_FUNC(eight_short)
|
||||
const float *pwindow = sce->ics.use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;
|
||||
const float *in = audio + 448;
|
||||
float *out = sce->ret;
|
||||
+ int w;
|
||||
|
||||
- for (int w = 0; w < 8; w++) {
|
||||
+ for (w = 0; w < 8; w++) {
|
||||
dsp->vector_fmul (out, in, w ? pwindow : swindow, 128);
|
||||
out += 128;
|
||||
in += 128;
|
||||
@@ -686,11 +687,12 @@ static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
|
||||
|
||||
static av_cold int alloc_buffers(AVCodecContext *avctx, AACEncContext *s)
|
||||
{
|
||||
+ int ch;
|
||||
FF_ALLOCZ_OR_GOTO(avctx, s->buffer.samples, 3 * 1024 * s->channels * sizeof(s->buffer.samples[0]), alloc_fail);
|
||||
FF_ALLOCZ_OR_GOTO(avctx, s->cpe, sizeof(ChannelElement) * s->chan_map[0], alloc_fail);
|
||||
FF_ALLOCZ_OR_GOTO(avctx, avctx->extradata, 5 + FF_INPUT_BUFFER_PADDING_SIZE, alloc_fail);
|
||||
|
||||
- for(int ch = 0; ch < s->channels; ch++)
|
||||
+ for(ch = 0; ch < s->channels; ch++)
|
||||
s->planar_samples[ch] = s->buffer.samples + 3 * 1024 * ch;
|
||||
|
||||
return 0;
|
||||
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
|
||||
index e73fbfe..3cde56c 100644
|
||||
--- ffmpeg-0.10.2/libavutil/pixdesc.c
|
||||
+++ ffmpeg-0.10.2/libavutil/pixdesc.c
|
||||
@@ -1096,12 +1096,6 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
||||
.log2_chroma_h = 1,
|
||||
.flags = PIX_FMT_HWACCEL,
|
||||
},
|
||||
- [PIX_FMT_VDA_VLD] = {
|
||||
- .name = "vda_vld",
|
||||
- .log2_chroma_w = 1,
|
||||
- .log2_chroma_h = 1,
|
||||
- .flags = PIX_FMT_HWACCEL,
|
||||
- },
|
||||
[PIX_FMT_GRAY8A] = {
|
||||
.name = "gray8a",
|
||||
.nb_components = 2,
|
||||
@@ -1110,16 +1104,6 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
||||
{ 0, 1, 2, 0, 7 }, /* A */
|
||||
},
|
||||
},
|
||||
- [PIX_FMT_GBR24P] = {
|
||||
- .name = "gbr24p",
|
||||
- .nb_components= 3,
|
||||
- .comp = {
|
||||
- { 1, 0, 1, 0, 7 }, /* B */
|
||||
- { 0, 0, 1, 0, 7 }, /* G */
|
||||
- { 2, 0, 1, 0, 7 }, /* R */
|
||||
- },
|
||||
- .flags = PIX_FMT_PLANAR | PIX_FMT_RGB,
|
||||
- },
|
||||
[PIX_FMT_GBRP] = {
|
||||
.name = "gbrp",
|
||||
.nb_components = 3,
|
||||
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
|
||||
index e1ba799..3820056 100644
|
||||
--- ffmpeg-0.10.2/libswscale/swscale_unscaled.c
|
||||
+++ ffmpeg-0.10.2/libswscale/swscale_unscaled.c
|
||||
@@ -370,30 +370,38 @@ static int planarRgbToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStr
|
||||
}
|
||||
|
||||
switch (c->dstFormat) {
|
||||
- case PIX_FMT_BGR24:
|
||||
- gbr24ptopacked24((const uint8_t* []) {src[1], src[0], src[2]}, (int []) {srcStride[1], srcStride[0], srcStride[2]},
|
||||
+ case PIX_FMT_BGR24: {
|
||||
+ const uint8_t* src2[] = {src[1], src[0], src[2]};
|
||||
+ int srcStride2[] = {srcStride[1], srcStride[0], srcStride[2]};
|
||||
+ gbr24ptopacked24(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, c->srcW);
|
||||
break;
|
||||
-
|
||||
- case PIX_FMT_RGB24:
|
||||
- gbr24ptopacked24((const uint8_t* []) {src[2], src[0], src[1]}, (int []) {srcStride[2], srcStride[0], srcStride[1]},
|
||||
+ }
|
||||
+ case PIX_FMT_RGB24: {
|
||||
+ const uint8_t* src2[] = {src[2], src[0], src[1]};
|
||||
+ int srcStride2[] = {srcStride[2], srcStride[0], srcStride[1]};
|
||||
+ gbr24ptopacked24(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
case PIX_FMT_ARGB:
|
||||
alpha_first = 1;
|
||||
- case PIX_FMT_RGBA:
|
||||
- gbr24ptopacked32((const uint8_t* []) {src[2], src[0], src[1]}, (int []) {srcStride[2], srcStride[0], srcStride[1]},
|
||||
+ case PIX_FMT_RGBA: {
|
||||
+ const uint8_t* src2[] = {src[2], src[0], src[1]};
|
||||
+ int srcStride2[] = {srcStride[2], srcStride[0], srcStride[1]};
|
||||
+ gbr24ptopacked32(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, alpha_first, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
case PIX_FMT_ABGR:
|
||||
alpha_first = 1;
|
||||
- case PIX_FMT_BGRA:
|
||||
- gbr24ptopacked32((const uint8_t* []) {src[1], src[0], src[2]}, (int []) {srcStride[1], srcStride[0], srcStride[2]},
|
||||
+ case PIX_FMT_BGRA: {
|
||||
+ const uint8_t* src2[] = {src[1], src[0], src[2]};
|
||||
+ int srcStride2[] = {srcStride[1], srcStride[0], srcStride[2]};
|
||||
+ gbr24ptopacked32(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0], srcSliceH, alpha_first, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
default:
|
||||
av_log(c, AV_LOG_ERROR, "unsupported planar RGB conversion %s -> %s\n",
|
||||
av_get_pix_fmt_name(c->srcFormat), av_get_pix_fmt_name(c->dstFormat));
|
||||
diff --git a/configure b/configure
|
||||
--- ffmpeg-0.10.2/configure 2012-01-26 22:15:59.047710208 +0000
|
||||
+++ ffmpeg-0.10-haiku/configure 2012-03-28 22:30:34.330563584 +0000
|
||||
@@ -1359,7 +1359,6 @@
|
||||
|
||||
aligned_stack_if_any="ppc x86"
|
||||
fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
|
||||
-fast_clz_if_any="alpha armv5te avr32 mips ppc x86"
|
||||
fast_unaligned_if_any="armv6 ppc x86"
|
||||
|
||||
inline_asm_deps="!tms470"
|
||||
@@ -1866,7 +1865,7 @@
|
||||
CC_O='-o $@'
|
||||
CXX_O='-o $@'
|
||||
|
||||
-host_cflags='-D_ISOC99_SOURCE -O3 -g'
|
||||
+host_cflags='-D_ISOC99_SOURCE -O2 -g'
|
||||
host_libs='-lm'
|
||||
|
||||
target_path='$(CURDIR)'
|
||||
@@ -1948,6 +1947,7 @@
|
||||
done
|
||||
|
||||
enable $ARCH_EXT_LIST $ALL_TESTS
|
||||
+disable sse
|
||||
|
||||
die_unknown(){
|
||||
echo "Unknown option \"$1\"."
|
||||
@@ -2144,7 +2144,7 @@
|
||||
CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
|
||||
AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
|
||||
fi
|
||||
- speed_cflags='-O3'
|
||||
+ speed_cflags='-O2'
|
||||
size_cflags='-Os'
|
||||
elif $cc --version 2>/dev/null | grep -q Intel; then
|
||||
cc_type=icc
|
||||
@@ -2831,10 +2831,6 @@
|
||||
struct { int x; } __attribute__((packed)) x;
|
||||
EOF
|
||||
|
||||
-check_cc <<EOF && enable attribute_may_alias
|
||||
-union { int x; } __attribute__((may_alias)) x;
|
||||
-EOF
|
||||
-
|
||||
check_cc <<EOF || die "endian test failed"
|
||||
unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
|
||||
EOF
|
||||
@@ -3108,8 +3104,6 @@
|
||||
enabled vaapi && require vaapi va/va.h vaInitialize -lva
|
||||
|
||||
check_mathfunc cbrtf
|
||||
-check_mathfunc exp2
|
||||
-check_mathfunc exp2f
|
||||
check_mathfunc llrint
|
||||
check_mathfunc llrintf
|
||||
check_mathfunc log2
|
||||
289
media-video/ffmpeg/patches/ffmpeg-0.11.1-gcc2.patch
Normal file
289
media-video/ffmpeg/patches/ffmpeg-0.11.1-gcc2.patch
Normal file
@@ -0,0 +1,289 @@
|
||||
diff --git a/cmdutils.c b/cmdutils.c
|
||||
index 386db3d..f918600 100644
|
||||
--- ffmpeg-0.11.1/cmdutils.c
|
||||
+++ ffmpeg-0.11.1/cmdutils.c
|
||||
@@ -89,7 +89,7 @@ static void log_callback_report(void *ptr, int level, const char *fmt, va_list v
|
||||
char line[1024];
|
||||
static int print_prefix = 1;
|
||||
|
||||
- va_copy(vl2, vl);
|
||||
+ __va_copy(vl2, vl);
|
||||
av_log_default_callback(ptr, level, fmt, vl);
|
||||
av_log_format_line(ptr, level, fmt, vl2, line, sizeof(line), &print_prefix);
|
||||
va_end(vl2);
|
||||
diff --git a/ffprobe.c b/ffprobe.c
|
||||
index ca6133e..43f9d39 100644
|
||||
--- ffmpeg-0.11.1/ffprobe.c
|
||||
+++ ffmpeg-0.11.1/ffprobe.c
|
||||
@@ -1249,8 +1251,8 @@ static void writer_register_all(void)
|
||||
#define print_str_opt(k, v) writer_print_string(w, k, v, 1)
|
||||
#define print_time(k, v, tb) writer_print_time(w, k, v, tb)
|
||||
#define print_ts(k, v) writer_print_ts(w, k, v)
|
||||
-#define print_val(k, v, u) writer_print_string(w, k, \
|
||||
- value_string(val_str, sizeof(val_str), (struct unit_value){.val.i = v, .unit=u}), 0)
|
||||
+#define print_val(k, v, u) value2.val.i = v; value2.unit=u; writer_print_string(w, k, \
|
||||
+ value_string(val_str, sizeof(val_str), value2), 0);
|
||||
#define print_section_header(s) writer_print_section_header(w, s)
|
||||
#define print_section_footer(s) writer_print_section_footer(w, s)
|
||||
#define show_tags(metadata) writer_show_tags(w, metadata)
|
||||
@@ -1261,6 +1263,7 @@ static void show_packet(WriterContext *w, AVFormatContext *fmt_ctx, AVPacket *pk
|
||||
AVStream *st = fmt_ctx->streams[pkt->stream_index];
|
||||
struct print_buf pbuf = {.s = NULL};
|
||||
const char *s;
|
||||
+ struct unit_value value2;
|
||||
|
||||
print_section_header("packet");
|
||||
s = av_get_media_type_string(st->codec->codec_type);
|
||||
@@ -1516,6 +1520,7 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
{
|
||||
char val_str[128];
|
||||
int64_t size = fmt_ctx->pb ? avio_size(fmt_ctx->pb) : -1;
|
||||
+ struct unit_value value2;
|
||||
|
||||
print_section_header("format");
|
||||
print_str("filename", fmt_ctx->filename);
|
||||
@@ -1524,9 +1529,9 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
print_str("format_long_name", fmt_ctx->iformat->long_name);
|
||||
print_time("start_time", fmt_ctx->start_time, &AV_TIME_BASE_Q);
|
||||
print_time("duration", fmt_ctx->duration, &AV_TIME_BASE_Q);
|
||||
- if (size >= 0) print_val ("size", size, unit_byte_str);
|
||||
+ if (size >= 0) { print_val ("size", size, unit_byte_str); }
|
||||
else print_str_opt("size", "N/A");
|
||||
- if (fmt_ctx->bit_rate > 0) print_val ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str);
|
||||
+ if (fmt_ctx->bit_rate > 0) { print_val ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str); }
|
||||
else print_str_opt("bit_rate", "N/A");
|
||||
show_tags(fmt_ctx->metadata);
|
||||
print_section_footer("format");
|
||||
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
|
||||
index e73fbfe..3cde56c 100644
|
||||
--- ffmpeg-0.11.1/libavutil/pixdesc.c
|
||||
+++ ffmpeg-0.11.1/libavutil/pixdesc.c
|
||||
@@ -1096,12 +1096,6 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
||||
.log2_chroma_h = 1,
|
||||
.flags = PIX_FMT_HWACCEL,
|
||||
},
|
||||
- [PIX_FMT_VDA_VLD] = {
|
||||
- .name = "vda_vld",
|
||||
- .log2_chroma_w = 1,
|
||||
- .log2_chroma_h = 1,
|
||||
- .flags = PIX_FMT_HWACCEL,
|
||||
- },
|
||||
[PIX_FMT_GRAY8A] = {
|
||||
.name = "gray8a",
|
||||
.nb_components = 2,
|
||||
|
||||
diff --git a/configure b/configure
|
||||
--- ffmpeg-0.11.1/configure 2012-01-26 22:15:59.047710208 +0000
|
||||
+++ ffmpeg-0.10-haiku/configure 2012-03-28 22:30:34.330563584 +0000
|
||||
@@ -1359,7 +1359,6 @@
|
||||
|
||||
aligned_stack_if_any="ppc x86"
|
||||
fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
|
||||
-fast_clz_if_any="alpha armv5te avr32 mips ppc x86"
|
||||
fast_unaligned_if_any="armv6 ppc x86"
|
||||
|
||||
inline_asm_deps="!tms470"
|
||||
@@ -1866,7 +1865,7 @@
|
||||
CC_O='-o $@'
|
||||
CXX_O='-o $@'
|
||||
|
||||
-host_cflags='-D_ISOC99_SOURCE -O3 -g'
|
||||
+host_cflags='-D_ISOC99_SOURCE -O2 -g'
|
||||
host_libs='-lm'
|
||||
|
||||
target_path='$(CURDIR)'
|
||||
@@ -1948,6 +1947,7 @@
|
||||
done
|
||||
|
||||
enable $ARCH_EXT_LIST $ALL_TESTS
|
||||
+disable sse
|
||||
|
||||
die_unknown(){
|
||||
echo "Unknown option \"$1\"."
|
||||
@@ -2144,7 +2144,7 @@
|
||||
CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
|
||||
AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
|
||||
fi
|
||||
- speed_cflags='-O3'
|
||||
+ speed_cflags='-O2'
|
||||
size_cflags='-Os'
|
||||
elif $cc --version 2>/dev/null | grep -q Intel; then
|
||||
cc_type=icc
|
||||
@@ -2831,10 +2831,6 @@
|
||||
struct { int x; } __attribute__((packed)) x;
|
||||
EOF
|
||||
|
||||
-check_cc <<EOF && enable attribute_may_alias
|
||||
-union { int x; } __attribute__((may_alias)) x;
|
||||
-EOF
|
||||
-
|
||||
check_cc <<EOF || die "endian test failed"
|
||||
unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
|
||||
EOF
|
||||
@@ -3108,8 +3104,6 @@
|
||||
enabled vaapi && require vaapi va/va.h vaInitialize -lva
|
||||
|
||||
check_mathfunc cbrtf
|
||||
-check_mathfunc exp2
|
||||
-check_mathfunc exp2f
|
||||
check_mathfunc llrint
|
||||
check_mathfunc llrintf
|
||||
check_mathfunc log2
|
||||
diff a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
|
||||
--- ffmpeg-0.11.1/libavfilter/af_aresample.c 2012-08-06 22:49:06.681836544 +0000
|
||||
+++ ffmpeg-0.11.1/libavfilter/af_aresample.c 2012-08-06 22:52:24.251658240 +0000
|
||||
@@ -103,20 +103,23 @@
|
||||
ff_channel_layouts_ref(in_layouts, &inlink->out_channel_layouts);
|
||||
|
||||
if(out_rate > 0) {
|
||||
- out_samplerates = avfilter_make_format_list((int[]){ out_rate, -1 });
|
||||
+ int rate_tmp[] = { out_rate, -1 };
|
||||
+ out_samplerates = avfilter_make_format_list(rate_tmp);
|
||||
} else {
|
||||
out_samplerates = ff_all_samplerates();
|
||||
}
|
||||
avfilter_formats_ref(out_samplerates, &outlink->in_samplerates);
|
||||
|
||||
if(out_format != AV_SAMPLE_FMT_NONE) {
|
||||
- out_formats = avfilter_make_format_list((int[]){ out_format, -1 });
|
||||
+ int format_tmp[] = { out_format, -1 };
|
||||
+ out_formats = avfilter_make_format_list(format_tmp);
|
||||
} else
|
||||
out_formats = avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO);
|
||||
avfilter_formats_ref(out_formats, &outlink->in_formats);
|
||||
|
||||
if(out_layout) {
|
||||
- out_layouts = avfilter_make_format64_list((int64_t[]){ out_layout, -1 });
|
||||
+ int64_t layout_tmp[] = { out_layout, -1 };
|
||||
+ out_layouts = avfilter_make_format64_list(layout_tmp);
|
||||
} else
|
||||
out_layouts = ff_all_channel_layouts();
|
||||
ff_channel_layouts_ref(out_layouts, &outlink->in_channel_layouts);
|
||||
diff a/libswresample/x86/swresample_x86.c b/libswresample/x86/swresample_x86.c
|
||||
--- ffmpeg-0.11.1/libswresample/x86/swresample_x86.c 2012-08-06 22:49:12.765984768 +0000
|
||||
+++ ffmpeg-0.11.1/libswresample/x86/swresample_x86.c 2012-08-06 22:57:04.826015744 +0000
|
||||
@@ -25,7 +25,7 @@
|
||||
#define PROTO2(pre, out, cap) PROTO(pre, int16, out, cap) PROTO(pre, int32, out, cap) PROTO(pre, float, out, cap)
|
||||
#define PROTO3(pre, cap) PROTO2(pre, int16, cap) PROTO2(pre, int32, cap) PROTO2(pre, float, cap)
|
||||
#define PROTO4(pre) PROTO3(pre, mmx) PROTO3(pre, sse) PROTO3(pre, sse2) PROTO3(pre, ssse3) PROTO3(pre, sse4) PROTO3(pre, avx)
|
||||
-PROTO4()
|
||||
+PROTO4( )
|
||||
PROTO4(_pack_2ch)
|
||||
PROTO4(_pack_6ch)
|
||||
PROTO4(_unpack_2ch)
|
||||
diff -u a/libavcodec/pngenc.c b/libavcodec/pngenc.c
|
||||
--- ffmpeg-0.11.1/libavcodec/pngenc.c 2012-08-06 22:49:04.337117184 +0000
|
||||
+++ ffmpeg-0.11.1/libavcodec/pngenc.c 2012-08-06 23:04:38.048758784 +0000
|
||||
@@ -55,8 +55,9 @@
|
||||
int x, mask, dst_x, j, b, bpp;
|
||||
uint8_t *d;
|
||||
const uint8_t *s;
|
||||
+ int mask_tmp[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
|
||||
|
||||
- mask = (int[]){0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}[pass];
|
||||
+ mask = mask_tmp[pass];
|
||||
switch(bits_per_pixel) {
|
||||
case 1:
|
||||
memset(dst, 0, row_size);
|
||||
diff -u a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
|
||||
--- ffmpeg-0.11.1/libswscale/swscale_unscaled.c 2012-08-06 22:49:12.936902656 +0000
|
||||
+++ ffmpeg-0.11.1/libswscale/swscale_unscaled.c 2012-08-06 23:18:25.574095360 +0000
|
||||
@@ -472,38 +472,40 @@
|
||||
}
|
||||
|
||||
switch (c->dstFormat) {
|
||||
- case PIX_FMT_BGR24:
|
||||
- gbr24ptopacked24((const uint8_t *[]) { src[1], src[0], src[2] },
|
||||
- (int []) { srcStride[1], srcStride[0], srcStride[2] },
|
||||
- dst[0] + srcSliceY * dstStride[0], dstStride[0],
|
||||
+ case PIX_FMT_BGR24: {
|
||||
+ const uint8_t* src2[] = {src[1], src[0], src[2]};
|
||||
+ int srcStride2[] = {srcStride[1], srcStride[0], srcStride[2]};
|
||||
+ gbr24ptopacked24(src2, srcStride2, dst[0] + srcSliceY * dstStride[0], dstStride[0],
|
||||
srcSliceH, c->srcW);
|
||||
break;
|
||||
-
|
||||
- case PIX_FMT_RGB24:
|
||||
- gbr24ptopacked24((const uint8_t *[]) { src[2], src[0], src[1] },
|
||||
- (int []) { srcStride[2], srcStride[0], srcStride[1] },
|
||||
- dst[0] + srcSliceY * dstStride[0], dstStride[0],
|
||||
+ }
|
||||
+ case PIX_FMT_RGB24: {
|
||||
+ const uint8_t* src2[] = {src[2], src[0], src[1]};
|
||||
+ int srcStride2[] = {srcStride[2], srcStride[0], srcStride[1]};
|
||||
+ gbr24ptopacked24(src2, srcStride2, dst[0] + srcSliceY * dstStride[0], dstStride[0],
|
||||
srcSliceH, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
case PIX_FMT_ARGB:
|
||||
alpha_first = 1;
|
||||
- case PIX_FMT_RGBA:
|
||||
- gbr24ptopacked32((const uint8_t *[]) { src[2], src[0], src[1] },
|
||||
- (int []) { srcStride[2], srcStride[0], srcStride[1] },
|
||||
+ case PIX_FMT_RGBA: {
|
||||
+ const uint8_t* src2[] = {src[2], src[0], src[1]};
|
||||
+ int srcStride2[] = {srcStride[2], srcStride[0], srcStride[1]};
|
||||
+ gbr24ptopacked32(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0],
|
||||
srcSliceH, alpha_first, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
case PIX_FMT_ABGR:
|
||||
alpha_first = 1;
|
||||
- case PIX_FMT_BGRA:
|
||||
- gbr24ptopacked32((const uint8_t *[]) { src[1], src[0], src[2] },
|
||||
- (int []) { srcStride[1], srcStride[0], srcStride[2] },
|
||||
+ case PIX_FMT_BGRA: {
|
||||
+ const uint8_t* src2[] = {src[1], src[0], src[2]};
|
||||
+ int srcStride2[] = {srcStride[1], srcStride[0], srcStride[2]};
|
||||
+ gbr24ptopacked32(src2, srcStride2,
|
||||
dst[0] + srcSliceY * dstStride[0], dstStride[0],
|
||||
srcSliceH, alpha_first, c->srcW);
|
||||
break;
|
||||
-
|
||||
+ }
|
||||
default:
|
||||
av_log(c, AV_LOG_ERROR,
|
||||
"unsupported planar RGB conversion %s -> %s\n",
|
||||
diff -u a/ffprobe.c b/ffprobe.c
|
||||
--- ffmpeg-0.11.1/ffprobe.c 2012-08-06 22:49:00.930873344 +0000
|
||||
+++ ffmpeg-0.11.1/ffprobe.c 2012-08-06 23:26:28.951844864 +0000
|
||||
@@ -312,7 +312,9 @@
|
||||
writer_print_string(wctx, key, "N/A", 1);
|
||||
} else {
|
||||
double d = ts * av_q2d(*time_base);
|
||||
- value_string(buf, sizeof(buf), (struct unit_value){.val.d=d, .unit=unit_second_str});
|
||||
+ struct unit_value value2 = {.unit=unit_second_str};
|
||||
+ value2.val.d = d;
|
||||
+ value_string(buf, sizeof(buf), value2);
|
||||
writer_print_string(wctx, key, buf, 0);
|
||||
}
|
||||
}
|
||||
@@ -1188,7 +1190,7 @@
|
||||
#define print_time(k, v, tb) writer_print_time(w, k, v, tb)
|
||||
#define print_ts(k, v) writer_print_ts(w, k, v)
|
||||
#define print_val(k, v, u) value2.val.i = v; value2.unit=u; writer_print_string(w, k, \
|
||||
- value_string(val_str, sizeof(val_str), value2), 0);
|
||||
+ value_string(val_str, sizeof(val_str), value2), 0);
|
||||
#define print_section_header(s) writer_print_section_header(w, s)
|
||||
#define print_section_footer(s) writer_print_section_footer(w, s)
|
||||
#define show_tags(metadata) writer_show_tags(w, metadata)
|
||||
@@ -1357,6 +1359,7 @@
|
||||
const char *s;
|
||||
AVRational display_aspect_ratio;
|
||||
AVBPrint pbuf;
|
||||
+ struct unit_value value2;
|
||||
|
||||
av_bprint_init(&pbuf, 1, AV_BPRINT_SIZE_UNLIMITED);
|
||||
|
||||
@@ -1447,7 +1450,7 @@
|
||||
print_fmt("time_base", "%d/%d", stream->time_base.num, stream->time_base.den);
|
||||
print_time("start_time", stream->start_time, &stream->time_base);
|
||||
print_time("duration", stream->duration, &stream->time_base);
|
||||
- if (dec_ctx->bit_rate > 0) print_val ("bit_rate", dec_ctx->bit_rate, unit_bit_per_second_str);
|
||||
+ if (dec_ctx->bit_rate > 0) { print_val ("bit_rate", dec_ctx->bit_rate, unit_bit_per_second_str); }
|
||||
else print_str_opt("bit_rate", "N/A");
|
||||
if (stream->nb_frames) print_fmt ("nb_frames", "%"PRId64, stream->nb_frames);
|
||||
else print_str_opt("nb_frames", "N/A");
|
||||
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.handbrake.fr"
|
||||
SRC_URI="http://handbrake.fr/rotation.php?file=HandBrake-0.9.5.tar.bz2"
|
||||
CHECKSUM_MD5="e17d3663fc36a985fe43e188695e3196"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
STATUS_HAIKU="broken"
|
||||
DEPEND="dev-libs/libxml2 >= 2.7.7
|
||||
media-libs/lame >= 3.98
|
||||
media-libs/faac >= 1.28
|
||||
@@ -30,7 +30,7 @@ BUILD {
|
||||
sed -i 's/MODULES += contrib\/libass/ /' make/include/main.defs
|
||||
sed -i 's/MODULES += contrib\/dvdread/ /' make/include/main.defs
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
cd build
|
||||
make
|
||||
}
|
||||
|
||||
552
media-video/vlc/patches/vlc-2.0.5.patch
Normal file
552
media-video/vlc/patches/vlc-2.0.5.patch
Normal file
@@ -0,0 +1,552 @@
|
||||
--- vlc-2.0.5-orig/configure.ac 2012-10-22 09:03:51.049545216 +0000
|
||||
+++ vlc-2.0.5/configure.ac 2012-12-25 23:08:34.519045120 +0000
|
||||
@@ -279,11 +279,18 @@
|
||||
SYS=os2
|
||||
LDFLAGS_save="${LDFLAGS_save} -Zomf -Zbin-files -Zargs-wild"; LDFLAGS="${LDFLAGS_save}"
|
||||
;;
|
||||
+ *haiku*)
|
||||
+ SYS=haiku
|
||||
+ VLC_ADD_LIBS([libvlccore libvlc vlc],[-lnetwork -lbe])
|
||||
+ VLC_ADD_PLUGIN([haiku_aout])
|
||||
+ VLC_ADD_LIBS([haiku_aout],[-lmedia])
|
||||
+ ;;
|
||||
*)
|
||||
SYS="${host_os}"
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")
|
||||
+AM_CONDITIONAL(HAVE_HAIKU, test "${SYS}" = "haiku")
|
||||
AM_CONDITIONAL(HAVE_LINUX, test "${SYS}" = "linux")
|
||||
AM_CONDITIONAL(HAVE_OS2, test "${SYS}" = "os2")
|
||||
AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
|
||||
@@ -513,10 +520,13 @@
|
||||
dnl Check for system libs needed
|
||||
need_libc=false
|
||||
|
||||
+#this fails to detect that we have if_nameindex and if_nametoindex on haiku
|
||||
+#and then it dails to detect that we don't have tdestroy...
|
||||
+
|
||||
dnl Check for usual libc functions
|
||||
AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
|
||||
AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
|
||||
-AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r inet_pton lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy])
|
||||
+AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r inet_pton lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab])
|
||||
AC_CHECK_FUNCS(fdatasync,,
|
||||
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
|
||||
])
|
||||
@@ -578,6 +588,9 @@
|
||||
AS_IF([test "${SYS}" = "mingwce"], [
|
||||
SOCKET_LIBS="-lws2"
|
||||
])
|
||||
+ AS_IF([test "${SYS}" = "haiku"], [
|
||||
+ SOCKET_LIBS="-lnetwork"
|
||||
+ ])
|
||||
])
|
||||
LIBS="$LIBS_save"
|
||||
AS_IF([test -n "$SOCKET_LIBS"], [
|
||||
@@ -3110,7 +3123,7 @@
|
||||
if test "${SYS}" != "darwin"; then
|
||||
VLC_ADD_PLUGIN([vout_sdl])
|
||||
fi
|
||||
- if test "${SYS}" != "mingw32" -a "${SYS}" != "os2"; then
|
||||
+ if test "${SYS}" != "mingw32" -a "${SYS}" != "haiku"; then
|
||||
VLC_ADD_LIBS([vout_sdl],[${X_LIBS} ${X_PRE_LIBS} -lX11])
|
||||
fi
|
||||
VLC_ADD_CFLAGS([vout_sdl],[${SDL_CFLAGS}])
|
||||
@@ -4155,7 +4168,7 @@
|
||||
dnl Stuff used by the program
|
||||
dnl
|
||||
VERSION_MESSAGE="${VERSION} ${CODENAME}"
|
||||
-COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} VLC authors and VideoLAN"
|
||||
+COPYRIGHT_MESSAGE="Copyright (C) ${COPYRIGHT_YEARS} VLC authors and VideoLAN"
|
||||
AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION_MESSAGE}", [Simple version string])
|
||||
AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "${COPYRIGHT_MESSAGE}", [Copyright string])
|
||||
AC_DEFINE_UNQUOTED(COPYRIGHT_YEARS, "${COPYRIGHT_YEARS}", [The copyright years])
|
||||
|
||||
--- vlc-2.0.3-orig/src/modules/bank.c 2011-12-08 18:00:28.032243712 +0000
|
||||
+++ vlc-2.0.5/src/modules/bank.c 2012-07-30 22:00:12.285736960 +0000
|
||||
@@ -71,28 +71,30 @@
|
||||
modules.head = module;
|
||||
}
|
||||
|
||||
-#ifdef __ELF__
|
||||
-# ifdef __GNUC__
|
||||
-__attribute__((weak))
|
||||
-# else
|
||||
-# pragma weak vlc_static_modules
|
||||
-# endif
|
||||
-extern vlc_plugin_cb vlc_static_modules[];
|
||||
-
|
||||
-static void module_InitStaticModules(void)
|
||||
-{
|
||||
- if (!vlc_static_modules)
|
||||
- return;
|
||||
-
|
||||
- for (unsigned i = 0; vlc_static_modules[i]; i++) {
|
||||
- module_t *module = module_InitStatic (vlc_static_modules[i]);
|
||||
- if (likely(module != NULL))
|
||||
- module_StoreBank (module);
|
||||
- }
|
||||
-}
|
||||
-#else
|
||||
+//Haiku bug #8288
|
||||
+//#ifdef __ELF__
|
||||
+//# ifdef __GNUC__
|
||||
+//__attribute__((weak))
|
||||
+//# else
|
||||
+//# pragma weak vlc_static_modules
|
||||
+//# endif
|
||||
+//extern vlc_plugin_cb vlc_static_modules[];
|
||||
+//
|
||||
+//static void module_InitStaticModules(void)
|
||||
+//{
|
||||
+// if (!vlc_static_modules)
|
||||
+// return;
|
||||
+//
|
||||
+// for (unsigned i = 0; vlc_static_modules[i]; i++) {
|
||||
+// module_t *module = module_InitStatic (vlc_static_modules[i]);
|
||||
+// if (likely(module != NULL))
|
||||
+// module_StoreBank (module);
|
||||
+// }
|
||||
+//}
|
||||
+//#else
|
||||
static void module_InitStaticModules(void) { }
|
||||
-#endif
|
||||
+//#endif
|
||||
+
|
||||
|
||||
/**
|
||||
* Init bank
|
||||
--- vlc-2.0.3-orig/include/vlc_threads.h 2012-01-27 23:03:32.051904512 +0000
|
||||
+++ vlc-2.0.5/include/vlc_threads.h 2012-07-30 22:08:53.845414400 +0000
|
||||
@@ -124,7 +124,13 @@
|
||||
typedef pthread_cond_t vlc_cond_t;
|
||||
#define VLC_STATIC_COND PTHREAD_COND_INITIALIZER
|
||||
typedef pthread_rwlock_t vlc_rwlock_t;
|
||||
+// Haiku bug #8798
|
||||
+#ifdef __HAIKU__
|
||||
+#define VLC_STATIC_RWLOCK \
|
||||
+ { VLC_STATIC_MUTEX, VLC_STATIC_COND, 0, 0, 0 }
|
||||
+#else
|
||||
#define VLC_STATIC_RWLOCK PTHREAD_RWLOCK_INITIALIZER
|
||||
+#endif
|
||||
typedef pthread_key_t vlc_threadvar_t;
|
||||
typedef struct vlc_timer *vlc_timer_t;
|
||||
|
||||
--- vlc-2.0.3-orig/include/vlc_fixups.h 2012-01-30 21:37:14.052428800 +0000
|
||||
+++ vlc-2.0.5/include/vlc_fixups.h 2012-07-30 22:21:46.086245376 +0000
|
||||
@@ -246,10 +246,13 @@
|
||||
#endif
|
||||
|
||||
/* Socket stuff */
|
||||
+// configure doesn't detect these, likely not linking to -lnetwork, must investigate
|
||||
+#ifndef __HAIKU__
|
||||
#ifndef HAVE_INET_PTON
|
||||
int inet_pton(int, const char *, void *);
|
||||
const char *inet_ntop(int, const void *, char *, int);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#ifndef HAVE_STRUCT_POLLFD
|
||||
enum
|
||||
@@ -276,6 +279,8 @@
|
||||
# define poll(a, b, c) vlc_poll(a, b, c)
|
||||
#endif
|
||||
|
||||
+// or these
|
||||
+#ifndef __HAIKU__
|
||||
#ifndef HAVE_IF_NAMEINDEX
|
||||
#include <errno.h>
|
||||
struct if_nameindex
|
||||
@@ -289,6 +294,7 @@
|
||||
# define if_nameindex() (errno = ENOBUFS, NULL)
|
||||
# define if_freenameindex(list) (void)0
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* search.h */
|
||||
#ifndef HAVE_SEARCH_H
|
||||
--- vlc-2.0.3-orig/bin/override.c 2011-12-08 18:00:25.033554432 +0000
|
||||
+++ vlc-2.0.5/bin/override.c 2012-07-31 20:19:54.136314880 +0000
|
||||
@@ -124,6 +124,8 @@
|
||||
*
|
||||
* Some evil libraries modify the environment. We currently ignore the calls as
|
||||
* they could crash the process. This may cause funny behaviour though. */
|
||||
+#ifndef __HAIKU__
|
||||
+//not working
|
||||
int putenv (char *str)
|
||||
{
|
||||
if (override)
|
||||
@@ -133,7 +135,7 @@
|
||||
}
|
||||
return CALL(putenv, str);
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
int setenv (const char *name, const char *value, int overwrite)
|
||||
{
|
||||
if (override)
|
||||
--- vlc-2.0.3-orig/modules/text_renderer/freetype.c 2012-06-20 18:07:49.059244544 +0000
|
||||
+++ vlc-2.0.5/modules/text_renderer/freetype.c 2012-08-04 15:22:01.509870080 +0000
|
||||
@@ -58,6 +58,9 @@
|
||||
#elif defined( HAVE_MAEMO )
|
||||
# define DEFAULT_FONT_FILE "/usr/share/fonts/nokia/nosnb.ttf"
|
||||
# define DEFAULT_FAMILY "Nokia Sans Bold"
|
||||
+#elif defined(__HAIKU__)
|
||||
+# define DEFAULT_FONT_FILE "/boot/system/data/fonts/ttfonts/DejaVuSans.ttf"
|
||||
+# define DEFAULT_FAMILY "DejaVu Sans"
|
||||
#else
|
||||
# define DEFAULT_FONT_FILE "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf"
|
||||
# define DEFAULT_FAMILY "Serif Bold"
|
||||
--- vlc-2.0.3-orig/modules/audio_output/haiku.cpp 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ vlc-2.0.5/modules/audio_output/haiku.cpp 2012-08-06 23:15:46.251396096 +0000
|
||||
@@ -0,0 +1,197 @@
|
||||
+/*****************************************************************************
|
||||
+ * Haiku.cpp - Haiku Media Kit audio output
|
||||
+ *****************************************************************************
|
||||
+ * Copyright (C) 1999, 2000, 2001, 2012 the VideoLAN team
|
||||
+ *
|
||||
+ * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
|
||||
+ * Samuel Hocevar <sam@zoy.org>
|
||||
+ * Eric Petit <titer@videolan.org>
|
||||
+ * Cian Duffy <myob87@gmail.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
+ *****************************************************************************/
|
||||
+
|
||||
+/*****************************************************************************
|
||||
+ * Preamble
|
||||
+ *****************************************************************************/
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h> /* malloc(), free() */
|
||||
+#include <malloc.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+#include <iostream>
|
||||
+#include <queue>
|
||||
+using namespace std;
|
||||
+
|
||||
+#include <SoundPlayer.h>
|
||||
+#include <media/MediaDefs.h>
|
||||
+
|
||||
+#ifdef HAVE_CONFIG_H
|
||||
+# include "config.h"
|
||||
+#endif
|
||||
+
|
||||
+#include <vlc_aout.h>
|
||||
+#include <vlc_common.h>
|
||||
+#include <vlc_plugin.h>
|
||||
+
|
||||
+/*****************************************************************************
|
||||
+ * aout_sys_t: BeOS audio output method descriptor
|
||||
+ *****************************************************************************/
|
||||
+
|
||||
+queue<uint8> a_queue;
|
||||
+
|
||||
+struct aout_sys_t
|
||||
+{
|
||||
+ BSoundPlayer * p_player;
|
||||
+ mtime_t latency;
|
||||
+ media_raw_audio_format * p_format;
|
||||
+};
|
||||
+
|
||||
+/*****************************************************************************
|
||||
+ * Local prototypes.
|
||||
+ *****************************************************************************/
|
||||
+static void Close ( vlc_object_t * );
|
||||
+static void Pause (audio_output_t *, bool, mtime_t);
|
||||
+static void Play (audio_output_t *, block_t *);
|
||||
+
|
||||
+static void Flush (audio_output_t *, bool);static int Open ( vlc_object_t * );
|
||||
+static void BufferProc ( void * p_aout, void * p_buffer, size_t size,
|
||||
+ const media_raw_audio_format & format );
|
||||
+
|
||||
+/*****************************************************************************
|
||||
+ * Module descriptor
|
||||
+ *****************************************************************************/
|
||||
+vlc_module_begin ()
|
||||
+ set_shortname( "haiku_aout" )
|
||||
+ set_description( N_("Haiku Media Kit audio output") )
|
||||
+ set_capability( "audio output", 100 )
|
||||
+ set_category( CAT_AUDIO )
|
||||
+ set_subcategory( SUBCAT_AUDIO_AOUT )
|
||||
+ set_callbacks( Open, Close )
|
||||
+vlc_module_end ()
|
||||
+/*****************************************************************************
|
||||
+ * OpenAudio
|
||||
+ *****************************************************************************/
|
||||
+static int Open( vlc_object_t * p_this )
|
||||
+{
|
||||
+ audio_output_t *p_aout = (audio_output_t *)p_this;
|
||||
+ p_aout->sys = (aout_sys_t*)malloc( sizeof( aout_sys_t ) );
|
||||
+ if( p_aout->sys == NULL )
|
||||
+ {
|
||||
+ return VLC_ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ aout_sys_t * p_sys = p_aout->sys;
|
||||
+
|
||||
+ audio_format_t format = p_aout->format;
|
||||
+
|
||||
+ int i_nb_channels = aout_FormatNbChannels( &format );
|
||||
+
|
||||
+// media_raw_audio_format must be passed to BSoundPlayer
|
||||
+ p_sys->p_format = (media_raw_audio_format*)
|
||||
+ malloc( sizeof( media_raw_audio_format ) );
|
||||
+
|
||||
+ p_aout->format.i_format = VLC_CODEC_FI32;
|
||||
+ p_aout->format.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
|
||||
+ p_aout->format.i_rate = 44100;
|
||||
+
|
||||
+ p_sys->p_format->channel_count = i_nb_channels;
|
||||
+ p_sys->p_format->frame_rate = p_aout->format.i_rate;
|
||||
+ p_sys->p_format->format = media_raw_audio_format::B_AUDIO_INT;
|
||||
+ p_sys->p_format->byte_order = B_MEDIA_LITTLE_ENDIAN;
|
||||
+ // 'magic' number obtained from checking what size the buffers being
|
||||
+ // passed by the callback were
|
||||
+ // in theory, any buffer size should work
|
||||
+ p_sys->p_format->buffer_size = 9216;
|
||||
+
|
||||
+ aout_VolumeSoftInit( p_aout );
|
||||
+
|
||||
+ //BSoundPlayer init - format, name, buffer producer, notifier, cookie
|
||||
+
|
||||
+ p_sys->p_player = new BSoundPlayer( p_sys->p_format, "player", BufferProc, NULL, NULL );
|
||||
+ if( p_sys->p_player->InitCheck() != B_OK )
|
||||
+ {
|
||||
+ msg_Err( p_aout, "BSoundPlayer InitCheck failed" );
|
||||
+ delete p_sys->p_player;
|
||||
+ free( p_sys );
|
||||
+ }
|
||||
+ p_sys->latency = p_sys->p_player->Latency();
|
||||
+
|
||||
+ p_aout->pf_play = Play;
|
||||
+ p_aout->pf_pause = Pause;
|
||||
+ p_aout->pf_flush = Flush;
|
||||
+
|
||||
+ return VLC_SUCCESS;
|
||||
+
|
||||
+}
|
||||
+
|
||||
+/*****************************************************************************
|
||||
+ * BufferProc- buffer producer function
|
||||
+ *****************************************************************************/
|
||||
+static void BufferProc( void * _p_aout, void * _p_buffer, size_t i_size,
|
||||
+ const media_raw_audio_format &format )
|
||||
+{
|
||||
+// Load buffer
|
||||
+ for (size_t i = 0; i < i_size; i++)
|
||||
+ {
|
||||
+ uint8 data = a_queue.front();
|
||||
+ vlc_memset(_p_buffer + i, data, 1);
|
||||
+ a_queue.pop();
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+/*****************************************************************************
|
||||
+ * CloseAudio
|
||||
+ *****************************************************************************/
|
||||
+static void Close( vlc_object_t * p_this )
|
||||
+{
|
||||
+ printf("Close Called");
|
||||
+ audio_output_t *p_aout = (audio_output_t *)p_this;
|
||||
+ struct aout_sys_t *p_sys;
|
||||
+ p_aout->sys = p_sys;
|
||||
+
|
||||
+ /* Clean up */
|
||||
+ p_sys->p_player->Stop();
|
||||
+ delete p_sys->p_player;
|
||||
+ free( p_sys );
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void Play (audio_output_t *aout, block_t *block)
|
||||
+{
|
||||
+ aout_sys_t * p_sys = aout->sys;
|
||||
+
|
||||
+// load buffer to STL queue, sample by sample
|
||||
+ for (size_t i = 0; i < block->i_buffer; i++)
|
||||
+ {
|
||||
+ a_queue.push(block->p_buffer[i]);
|
||||
+ }
|
||||
+
|
||||
+ p_sys->p_player->Start();
|
||||
+ p_sys->p_player->SetHasData( true );
|
||||
+// release buffer
|
||||
+ block_Release (block);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void Pause (audio_output_t *aout, bool pause, mtime_t date)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void Flush (audio_output_t *aout, bool wait)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
--- vlc-2.0.3-orig/modules/audio_output/Modules.am 2011-12-08 18:00:26.046923776 +0000
|
||||
+++ vlc-2.0.5/modules/audio_output/Modules.am 2012-08-04 15:40:24.463208448 +0000
|
||||
@@ -6,6 +6,7 @@
|
||||
SOURCES_jack = jack.c
|
||||
SOURCES_audioqueue = audioqueue.c
|
||||
SOURCES_opensles_android = opensles_android.c
|
||||
+SOURCES_haiku_aout = haiku.cpp
|
||||
|
||||
libadummy_plugin_la_SOURCES = adummy.c
|
||||
libadummy_plugin_la_CFLAGS = $(AM_CFLAGS)
|
||||
--- vlc-2.0.3-orig/src/haiku/specific.cpp 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ vlc-2.0.5/src/haiku/specific.cpp 2012-08-05 12:18:40.333185024 +0000
|
||||
@@ -0,0 +1,57 @@
|
||||
+/*****************************************************************************
|
||||
+ * specific.c: stubs for POSIX OS-specific initialization
|
||||
+ *****************************************************************************
|
||||
+ * Copyright © 2008 Rémi Denis-Courmont
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU Lesser General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2.1 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public License
|
||||
+ * along with this program; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
+ *****************************************************************************/
|
||||
+
|
||||
+#ifdef HAVE_CONFIG_H
|
||||
+# include "config.h"
|
||||
+#endif
|
||||
+
|
||||
+#include <Application.h>
|
||||
+
|
||||
+
|
||||
+#include <vlc_common.h>
|
||||
+extern "C"
|
||||
+{
|
||||
+#include "../libvlc.h"
|
||||
+#include <pthread.h>
|
||||
+
|
||||
+
|
||||
+static void set_libvlc_path (void)
|
||||
+{
|
||||
+ psz_vlcpath = (char *)PKGLIBDIR;
|
||||
+}
|
||||
+
|
||||
+void system_Init (void)
|
||||
+{
|
||||
+ BApplication app("application/x-vnd.videolan");
|
||||
+ pthread_once_t once = PTHREAD_ONCE_INIT;
|
||||
+
|
||||
+ pthread_once (&once, set_libvlc_path);
|
||||
+}
|
||||
+
|
||||
+void system_Configure (libvlc_int_t *libvlc,
|
||||
+ int argc, const char *const argv[])
|
||||
+{
|
||||
+ (void)libvlc; (void)argc; (void)argv;
|
||||
+}
|
||||
+
|
||||
+void system_End (void)
|
||||
+{
|
||||
+}
|
||||
+}
|
||||
--- vlc-2.0.3-orig/src/Makefile.am 2012-05-15 12:41:19.024641536 +0000
|
||||
+++ vlc-2.0.5/src/Makefile.am 2012-08-05 01:50:39.982253568 +0000
|
||||
@@ -221,6 +221,9 @@
|
||||
if HAVE_OS2
|
||||
libvlccore_la_SOURCES += $(SOURCES_libvlc_os2)
|
||||
else
|
||||
+if HAVE_HAIKU
|
||||
+libvlccore_la_SOURCES += $(SOURCES_libvlc_haiku)
|
||||
+else
|
||||
libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
|
||||
endif
|
||||
endif
|
||||
@@ -228,6 +231,7 @@
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
+endif
|
||||
if BUILD_HTTPD
|
||||
libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
|
||||
endif
|
||||
@@ -287,6 +291,16 @@
|
||||
os2/specific.c \
|
||||
$(NULL)
|
||||
|
||||
+SOURCES_libvlc_haiku = \
|
||||
+ posix/dirs.c \
|
||||
+ misc/atomic.c \
|
||||
+ posix/filesystem.c \
|
||||
+ network/poll.c \
|
||||
+ posix/thread.c \
|
||||
+ posix/plugin.c \
|
||||
+ haiku/specific.cpp \
|
||||
+ $(NULL)
|
||||
+
|
||||
SOURCES_libvlc_other = \
|
||||
posix/dirs.c \
|
||||
misc/atomic.c \
|
||||
|
||||
--- vlc-2.0.3-orig/modules/gui/qt4/qt4.cpp 2012-07-02 00:47:23.031457280 +0000
|
||||
+++ vlc-2.0.5/modules/gui/qt4/qt4.cpp 2012-12-11 21:52:28.551288832 +0000
|
||||
@@ -628,7 +628,7 @@
|
||||
if( !p_wnd->handle.hwnd )
|
||||
return VLC_EGENERIC;
|
||||
|
||||
-#elif defined (Q_WS_MAC)
|
||||
+#elif defined (Q_WS_MAC) || defined(Q_WS_HAIKU)
|
||||
p_wnd->handle.nsobject = (void *)p_mi->getVideo( &i_x, &i_y, &i_width, &i_height );
|
||||
if( !p_wnd->handle.nsobject )
|
||||
return VLC_EGENERIC;
|
||||
|
||||
--- vlc-2.0.3-orig/src/network/io.c 2012-04-27 17:14:57.020709376 +0000
|
||||
+++ vlc-2.0.5/src/network/io.c 2012-12-11 21:34:34.143392768 +0000
|
||||
@@ -215,7 +215,9 @@
|
||||
switch (ptr->ai_socktype)
|
||||
{
|
||||
case SOCK_STREAM:
|
||||
+#ifdef SOCK_RDM
|
||||
case SOCK_RDM:
|
||||
+#endif
|
||||
case SOCK_SEQPACKET:
|
||||
#ifdef SOCK_DCCP
|
||||
case SOCK_DCCP:
|
||||
--- vlc-2.0.5-orig/modules/video_output/sdl.c 2011-12-08 18:00:27.022282240 +0000
|
||||
+++ vlc-2.0.5/modules/video_output/sdl.c 2012-12-20 21:47:16.280494080 +0000
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
-#if !defined(WIN32) && !defined(__OS2__)
|
||||
+#if !defined(WIN32) && !defined(__OS2__) && !defined(__HAIKU__)
|
||||
# ifdef X_DISPLAY_MISSING
|
||||
# error Xlib required due to XInitThreads
|
||||
# endif
|
||||
@@ -116,7 +116,7 @@
|
||||
vout_display_t *vd = (vout_display_t *)object;
|
||||
vout_display_sys_t *sys;
|
||||
|
||||
-#if !defined(WIN32) && !defined(__OS2__)
|
||||
+#if !defined(WIN32) && !defined(__OS2__) && !defined(__HAIKU__)
|
||||
if (!vlc_xlib_init (object))
|
||||
return VLC_EGENERIC;
|
||||
#endif
|
||||
@@ -15,7 +15,7 @@ CHECKSUM_MD5="fd852166d1705573cd7768a06117ed51"
|
||||
BUILD {
|
||||
cd vlc-0.8.6i
|
||||
libtoolize --force --copy --install
|
||||
./configure --prefix=/boot/common
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ CHECKSUM_MD5="9ab7d8218ff37e362f996fd7d8879dbc"
|
||||
BUILD {
|
||||
cd vlc-1.1.5
|
||||
./bootstrap
|
||||
./configure --prefix=/boot/common --disable-postproc --disable-xcb --disable-skins2 --disable-qt4 --disable-libgcrypt --disable-remoteosd
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-postproc --disable-xcb --disable-skins2 --disable-qt4 --disable-libgcrypt --disable-remoteosd
|
||||
make
|
||||
}
|
||||
|
||||
|
||||
40
media-video/vlc/vlc-2.0.5.bep
Normal file
40
media-video/vlc/vlc-2.0.5.bep
Normal file
@@ -0,0 +1,40 @@
|
||||
DESCRIPTION="vlc - media player"
|
||||
HOMEPAGE="http://www.videolan.org/vlc/"
|
||||
SRC_URI="http://download.videolan.org/pub/videolan/vlc/2.0.5/vlc-2.0.5.tar.xz"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="unstable"
|
||||
MESSAGE="This port only builds on gcc4 systems"
|
||||
DEPEND="faad2,
|
||||
libdca,
|
||||
libdvdnav >= 4.2.0,
|
||||
libmatroska,
|
||||
libmad,
|
||||
a52dec,
|
||||
schroedinger,
|
||||
twolame,
|
||||
lua >= 5.1.4,
|
||||
taglib >= 1.7,
|
||||
libbluray,
|
||||
lame >= 3.98.4,
|
||||
libgcrypt,
|
||||
libcddb,
|
||||
x264,
|
||||
flac,
|
||||
ffmpeg = 0.10.2-vlc
|
||||
libsdl
|
||||
sdl-image"
|
||||
CHECKSUM_MD5="4f959c0766ada8cea5a72c65fce94ebe"
|
||||
BUILD {
|
||||
cd vlc-2.0.5
|
||||
bootstrap
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --with-kde-solid=no --disable-xcb --enable-run-as-root --enable-static
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
cd vlc-2.0.5
|
||||
make install
|
||||
}
|
||||
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="1998-2012"
|
||||
Reference in New Issue
Block a user