blob: 548d5a5139e00cfa0a0221895278539a3835e05e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
require ffmpeg.inc
DEPENDS += "libgsm"
PV = "0.4.9+${PR}+gitr${SRCREV}"
PR = "r14"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_armv7a = "1"
FFBRANCH_arm = "arm-neon"
FFBRANCH ?= "master"
SRCREV = "dee1c2d60a67dc6411ed3fcbe26db5113cb1a371"
SRCREV_arm = "3ea1180b31078c276783f68e153ec54cfe567977"
SRC_URI = "git://git.mansr.com/ffmpeg.mru;protocol=git;branch=${FFBRANCH} \
"
S = "${WORKDIR}/git"
B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -ftree-vectorize -fomit-frame-pointer -O4 -ffast-math"
BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
EXTRA_FFCONF ?= ""
EXTRA_OECONF = " \
--enable-shared \
--enable-pthreads \
--disable-stripping \
--enable-gpl \
--enable-nonfree \
--enable-postproc \
\
--cross-prefix=${TARGET_PREFIX} \
--prefix=${prefix} \
\
--enable-x11grab \
--enable-libfaac \
--enable-libfaad \
--enable-libfaadbin \
--enable-libgsm \
--enable-libmp3lame \
--disable-swscale \
--arch=${TARGET_ARCH} \
--enable-cross-compile \
--extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
--extra-ldflags="${TARGET_LDFLAGS}" \
--enable-hardcoded-tables \
${EXTRA_FFCONF} \
"
do_configure() {
cd ${S} ; git clone git://git.mplayerhq.hu/libswscale || true
mkdir -p ${B}
cd ${B}
${S}/configure ${EXTRA_OECONF}
sed -i -e s:Os:O4:g ${B}/config.h
}
do_stage() {
for lib in libavcodec libavdevice libavformat \
libavutil libpostproc libswscale
do
oe_libinstall -a -so -C $lib $lib ${STAGING_LIBDIR} || true
install -d ${STAGING_INCDIR}/$lib
done
install -d ${STAGING_INCDIR}/ffmpeg
install -m 0644 ${S}/libavcodec/avcodec.h ${STAGING_INCDIR}/ffmpeg/avcodec.h
install -m 0644 ${S}/libavcodec/opt.h ${STAGING_INCDIR}/ffmpeg/opt.h
install -m 0644 ${S}/libavcodec/avcodec.h ${STAGING_INCDIR}/libavcodec/avcodec.h
install -m 0644 ${S}/libavcodec/opt.h ${STAGING_INCDIR}/libavcodec/opt.h
install -m 0644 ${S}/libavdevice/avdevice.h ${STAGING_INCDIR}/ffmpeg/avdevice.h
for h in avformat.h avio.h rtp.h rtsp.h rtspcodes.h
do
install -m 0644 ${S}/libavformat/$h ${STAGING_INCDIR}/ffmpeg/$h
install -m 0644 ${S}/libavformat/$h ${STAGING_INCDIR}/libavformat/$h
done
for h in adler32.h avstring.h avutil.h base64.h bswap.h \
common.h crc.h fifo.h integer.h intfloat_readwrite.h \
log.h lzo.h mathematics.h md5.h mem.h random.h \
rational.h sha1.h
do
install -m 0644 ${S}/libavutil/$h ${STAGING_INCDIR}/ffmpeg/$h
install -m 0644 ${S}/libavutil/$h ${STAGING_INCDIR}/libavutil/$h
done
install -m 0644 ${S}/libswscale/swscale.h ${STAGING_INCDIR}/ffmpeg/swscale.h
install -m 0644 ${S}/libswscale/rgb2rgb.h ${STAGING_INCDIR}/ffmpeg/rgb2rgb.h
install -d ${STAGING_INCDIR}/libpostproc
install -d ${STAGING_INCDIR}/postproc
install -m 0644 ${S}/libpostproc/postprocess.h ${STAGING_INCDIR}/libpostproc/postprocess.h
install -m 0644 ${S}/libpostproc/postprocess.h ${STAGING_INCDIR}/postproc/postprocess.h
}
PACKAGES += "libavcodec libavcodec-dev libavcodec-dbg \
libavdevice libavdevice-dev libavdevice-dbg \
libavformat libavformat-dev libavformat-dbg \
libavutil libavutil-dev libavutil-dbg \
libpostproc libpostproc-dev libpostproc-dbg \
libswscale libswscale-dev libswscale-dbg"
FILES_${PN}-dev = "${includedir}"
FILES_libavcodec = "${libdir}/libavcodec*.so.*"
FILES_libavcodec-dev = "${libdir}/libavcodec*.so ${libdir}/pkgconfig/libavcodec.pc ${libdir}/libavcodec*.a"
FILES_libavcodec-dbg += "${libdir}/.debug/libavcodec*"
FILES_libavdevice = "${libdir}/libavdevice*.so.*"
FILES_libavdevice-dev = "${libdir}/libavdevice*.so ${libdir}/pkgconfig/libavdevice.pc ${libdir}/libavdevice*.a"
FILES_libavdevice-dbg += "${libdir}/.debug/libavdevice*"
FILES_libavformat = "${libdir}/libavformat*.so.*"
FILES_libavformat-dev = "${libdir}/libavformat*.so ${libdir}/pkgconfig/libavformat.pc ${libdir}/libavformat*.a"
FILES_libavformat-dbg += "${libdir}/.debug/libavformat*"
FILES_libavutil = "${libdir}/libavutil*.so.*"
FILES_libavutil-dev = "${libdir}/libavutil*.so ${libdir}/pkgconfig/libavutil.pc ${libdir}/libavutil*.a"
FILES_libavutil-dbg += "${libdir}/.debug/libavutil*"
FILES_libpostproc = "${libdir}/libpostproc*.so.*"
FILES_libpostproc-dev = "${libdir}/libpostproc*.so ${libdir}/pkgconfig/libpostproc.pc ${libdir}/libpostproc*.a ${includedir}/postproc"
FILES_libpostproc-dbg += "${libdir}/.debug/libpostproc*"
FILES_libswscale = "${libdir}/libswscale*.so.*"
FILES_libswscale-dev = "${libdir}/libswscale*.so ${libdir}/pkgconfig/libswscale.pc ${libdir}/libswscale*.a"
FILES_libswscale-dbg += "${libdir}/.debug/libswscale*"
|