Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Initial autotools implementation and port to Meego

replace 'stropts.h' with 'sys/ioctl.h' for non
android platforms.

TEST=build only for meego
Tested as follows

$ cd $MEEGO_WORKSPACE
$ sudo chroot build-root # build-root is meego chroot
(chroot)$ cd /home/abuild/vendor/qcom/opensource/omx/mm-video
(chroot)$ ./autogen.sh
(chroot)$ ./configure --enable-target-msm8660
            --with-sanitized-headers=/usr/local
(chroot)$ make; make install; make clean; make distclean
(chroot)$ ./configure --disable-target-msm8660
            --with-sanitized-headers=/usr/local
(chroot)$ ./configure --enable-target-msm7630
            --with-sanitized-headers=/usr/local
(chroot)$ make; make install; make clean; make distclean
(chroot)$ ./configure --enable-target-msm7630
            --with-sanitized-headers=/usr/local

sanitized headers were generated using the tip of
the android kernel, as follows

$ git checkout -b dev --track quic/android-msm-2.6.35
(chroot)$ cd /home/abuild/kernel
(chroot)$ make headers_install INSTALL_HDR_PATH=/usr/local

Change-Id: I6bd90254e3caf3dfdc8ec4b7bd147f73fcc2e626
  • Loading branch information...
commit 8f1d91a75f637c8434c6058276a456d376102098 1 parent 5a0283d
Anshul Gupta authored Linux Build Service Account committed
8 Makefile
... ... @@ -1,8 +0,0 @@
1   -all:
2   - @echo "invoking opensource mm-video make"
3   - $(MAKE) -C vidc/vdec
4   - $(MAKE) -C vidc/venc
5   -
6   -install:
7   - $(MAKE) -C vidc/vdec install
8   - $(MAKE) -C vidc/venc install
5 Makefile.am
... ... @@ -0,0 +1,5 @@
  1 +# Makefile.am - Automake script for mm-omxvideo
  2 +#
  3 +ACLOCAL_AMFLAGS = -I m4
  4 +
  5 +SUBDIRS = vidc
10 autogen.sh
... ... @@ -0,0 +1,10 @@
  1 +#!/bin/sh
  2 +
  3 +# autogen.sh -- Autotools bootstrapping
  4 +
  5 +libtoolize --copy --force
  6 +aclocal &&\
  7 +autoheader &&\
  8 +autoconf &&\
  9 +automake --add-missing --copy
  10 +
60 configure.ac
... ... @@ -0,0 +1,60 @@
  1 +# -*- Autoconf -*-
  2 +
  3 +# configure.ac -- Autoconf script for mm-omxvideo
  4 +#
  5 +
  6 +# Process this file with autoconf to produce a configure script.
  7 +
  8 +AC_PREREQ(2.61)
  9 +AC_INIT([omxvideo],
  10 + 1.0.0)
  11 +AM_INIT_AUTOMAKE([-Wall -Werror gnu foreign])
  12 +AM_MAINTAINER_MODE
  13 +AC_CONFIG_HEADER([config.h])
  14 +AC_CONFIG_MACRO_DIR([m4])
  15 +
  16 +#release versioning
  17 +OMXVIDEO_MAJOR_VERSION=1
  18 +OMXVIDEO_MINOR_VERSION=0
  19 +OMXVIDEO_MICRO_VERSION=0
  20 +
  21 +OMXVIDEO_LIBRARY_VERSION=$OMXVIDEO_MAJOR_VERSION:$OMXVIDEO_MINOR_VERSION:$OMXVIDEO_MICRO_VERSION
  22 +AC_SUBST(OMXVIDEO_LIBRARY_VERSION)
  23 +
  24 +# Checks for programs.
  25 +AC_PROG_CC
  26 +AC_PROG_CPP
  27 +AC_PROG_CXX
  28 +AM_PROG_CC_C_O
  29 +AC_PROG_LIBTOOL
  30 +AC_PROG_AWK
  31 +AC_PROG_INSTALL
  32 +AC_PROG_LN_S
  33 +AC_PROG_MAKE_SET
  34 +
  35 +AC_ARG_ENABLE([target-msm7630],
  36 + AC_HELP_STRING([--enable-target-msm7630],
  37 + [Enable conditional compile for target msm7630 [default=no]]),
  38 + [target_msm7630="${enableval}"],
  39 + target_msm7630=no)
  40 +
  41 +AC_ARG_ENABLE([target-msm8660],
  42 + AC_HELP_STRING([--enable-target-msm8660],
  43 + [Enable conditional compile for target msm8660 [default=no]]),
  44 + [target_msm8660="${enableval}"],
  45 + target_msm8660=no)
  46 +
  47 +AM_CONDITIONAL([TARGET_MSM7630], [test x$target_msm7630 = xyes])
  48 +AM_CONDITIONAL([TARGET_MSM8660], [test x$target_msm8660 = xyes])
  49 +
  50 +AC_ARG_WITH([sanitized-headers],
  51 + [AS_HELP_STRING([--with-sanitized-headers=DIR],[location of the sanitized Linux headers])],
  52 + [CPPFLAGS="$CPPFLAGS -I$withval"])
  53 +
  54 +AC_CONFIG_FILES([ \
  55 + Makefile \
  56 + vidc/Makefile \
  57 + vidc/vdec/Makefile \
  58 + vidc/venc/Makefile \
  59 + ])
  60 +AC_OUTPUT
5 vidc/Makefile.am
... ... @@ -0,0 +1,5 @@
  1 +# Makefile.am - Automake script for mm-omxvideo
  2 +#
  3 +ACLOCAL_AMFLAGS = -I m4
  4 +
  5 +SUBDIRS = vdec venc
95 vidc/vdec/Makefile
... ... @@ -1,95 +0,0 @@
1   -# ---------------------------------------------------------------------------------
2   -# MM-VIDEO-OSS-VDEC
3   -# ---------------------------------------------------------------------------------
4   -
5   -# cross-compiler flags
6   -CFLAGS += -Wall
7   -CFLAGS += -Wundef
8   -CFLAGS += -Wstrict-prototypes
9   -CFLAGS += -Wno-trigraphs
10   -#CFLAGS += -Werror
11   -
12   -# cross-compile flags specific to shared objects
13   -CFLAGS_SO += -fpic
14   -
15   -# required pre-processor flags
16   -CPPFLAGS += -D__packed__=
17   -CPPFLAGS += -DIMAGE_APPS_PROC
18   -CPPFLAGS += -DFEATURE_Q_SINGLE_LINK
19   -CPPFLAGS += -DFEATURE_Q_NO_SELF_QPTR
20   -CPPFLAGS += -DFEATURE_LINUX
21   -CPPFLAGS += -DFEATURE_NATIVELINUX
22   -CPPFLAGS += -DFEATURE_DSM_DUP_ITEMS
23   -CPPFLAGS += -UENABLE_DEBUG_LOW
24   -CPPFLAGS += -DENABLE_DEBUG_HIGH
25   -CPPFLAGS += -DENABLE_DEBUG_ERROR
26   -CPPFLAGS += -D_CHROME_
27   -CPPFLAGS += -UINPUT_BUFFER_LOG
28   -CPPFLAGS += -UOUTPUT_BUFFER_LOG
29   -CPPFLAGS += -DMAX_RES_1080P
30   -CPPFLAGS += -Du32="unsigned int"
31   -CPPFLAGS += -Du8="unsigned char"
32   -CPPFLAGS += -Iinc
33   -CPPFLAGS += -I../common/inc
34   -CPPFLAGS += -Isrc
35   -CPPFLAGS += -I../common/src
36   -
37   -# linker flags
38   -LDFLAGS += -L$(SYSROOT)/usr/lib
39   -
40   -# linker flags for shared objects
41   -LDFLAGS_SO += -shared
42   -
43   -# defintions
44   -LIBMAJOR := $(basename $(basename $(LIBVER)))
45   -LIBINSTALLDIR := $(DESTDIR)usr/lib
46   -BININSTALLDIR := $(DESTDIR)usr/bin
47   -
48   -# ---------------------------------------------------------------------------------
49   -# BUILD
50   -# ---------------------------------------------------------------------------------
51   -all: libOmxVdec.so.$(LIBVER) mm-vdec-omx-test
52   -
53   -install:
54   - echo "installing opensource video decoder in $(DESTDIR)"
55   - if [ ! -d $(LIBINSTALLDIR) ]; then mkdir -p $(LIBINSTALLDIR); fi
56   - if [ ! -d $(BININSTALLDIR) ]; then mkdir -p $(BININSTALLDIR); fi
57   - install -m 555 libOmxVdec.so.$(LIBVER) $(LIBINSTALLDIR)
58   - cd $(LIBINSTALLDIR) && ln -s libOmxVdec.so.$(LIBVER) libOmxVdec.so.$(LIBMAJOR)
59   - cd $(LIBINSTALLDIR) && ln -s libOmxVdec.so.$(LIBMAJOR) libOmxVdec.so
60   - install -m 555 mm-vdec-omx-test $(BININSTALLDIR)
61   -
62   -# ---------------------------------------------------------------------------------
63   -# COMPILE LIBRARY
64   -# ---------------------------------------------------------------------------------
65   -
66   -SRCS := src/frameparser.cpp
67   -SRCS += src/h264_utils.cpp
68   -SRCS += src/mp4_utils.cpp
69   -SRCS += src/omx_vdec.cpp
70   -SRCS += ../common/src/extra_data_handler.cpp
71   -
72   -LDLIBS := -lpthread
73   -LDLIBS += -lrt
74   -LDLIBS += -lstdc++
75   -LDLIBS += -lOmxCore
76   -
77   -libOmxVdec.so.$(LIBVER): $(SRCS)
78   - $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_SO) $(LDFLAGS_SO) -Wl,-soname,libOmxVdec.so.$(LIBMAJOR) -o $@ $^ $(LDFLAGS) $(LDLIBS)
79   -
80   -# ---------------------------------------------------------------------------------
81   -# COMPILE TEST APP
82   -# ---------------------------------------------------------------------------------
83   -TEST_LDLIBS := -lpthread
84   -TEST_LDLIBS += -ldl
85   -TEST_LDLIBS += -lOmxCore
86   -
87   -TEST_SRCS := src/queue.c
88   -TEST_SRCS += test/omx_vdec_test.cpp
89   -
90   -mm-vdec-omx-test: libOmxVdec.so.$(LIBVER) $(TEST_SRCS)
91   - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(TEST_LDLIBS)
92   -
93   -# ---------------------------------------------------------------------------------
94   -# END
95   -# ---------------------------------------------------------------------------------
51 vidc/vdec/Makefile.am
... ... @@ -0,0 +1,51 @@
  1 +AM_CFLAGS = -Wall
  2 +AM_CFLAGS += -Wundef
  3 +AM_CFLAGS += -Wstrict-prototypes
  4 +AM_CFLAGS += -Wno-trigraphs
  5 +AM_CFLAGS += -g -O3
  6 +
  7 +AM_CPPFLAGS := -D__alignx\(x\)=__attribute__\(\(__aligned__\(x\)\)\)
  8 +AM_CPPFLAGS += -D__align=__alignx
  9 +AM_CPPFLAGS += -Dinline=__inline
  10 +AM_CPPFLAGS += -DIMAGE_APPS_PROC
  11 +AM_CPPFLAGS += -DCDECL
  12 +AM_CPPFLAGS += -DT_ARM
  13 +AM_CPPFLAGS += -DNO_ARM_CLZ
  14 +AM_CPPFLAGS += -UENABLE_DEBUG_LOW
  15 +AM_CPPFLAGS += -DENABLE_DEBUG_HIGH
  16 +AM_CPPFLAGS += -DENABLE_DEBUG_ERROR
  17 +AM_CPPFLAGS += -UINPUT_BUFFER_LOG
  18 +AM_CPPFLAGS += -UOUTPUT_BUFFER_LOG
  19 +if TARGET_MSM7630
  20 +AM_CPPFLAGS += -DMAX_RES_720P
  21 +endif
  22 +if TARGET_MSM8660
  23 +AM_CPPFLAGS += -DMAX_RES_1080P
  24 +endif
  25 +AM_CPPFLAGS += -Iinc
  26 +AM_CPPFLAGS += -I../common/inc
  27 +
  28 +c_sources = src/frameparser.cpp
  29 +c_sources += src/h264_utils.cpp
  30 +if TARGET_MSM8660
  31 +c_sources += src/mp4_utils.cpp
  32 +endif
  33 +c_sources += src/omx_vdec.cpp
  34 +c_sources += ../common/src/extra_data_handler.cpp
  35 +
  36 +lib_LTLIBRARIES = libOmxVdec.la
  37 +libOmxVdec_la_SOURCES = $(c_sources)
  38 +libOmxVdec_la_CFLAGS = $(AM_CFLAGS) -fPIC
  39 +libOmxVdec_la_LDLIBS = -lOmxcore -lstdc++ -lpthread
  40 +libOmxVdec_la_LDFLAGS = -shared -version-info $(OMXVIDEO_LIBRARY_VERSION)
  41 +
  42 +bin_PROGRAMS = mm-vdec-omx-test
  43 +bin_PROGRAMS += mm-vdec-drv-test
  44 +
  45 +mm_vdec_omx_test_SOURCES := src/queue.c
  46 +mm_vdec_omx_test_SOURCES += test/omx_vdec_test.cpp
  47 +mm_vdec_omx_test_LDADD = -lOmxCore -ldl -lpthread libOmxVdec.la
  48 +
  49 +mm_vdec_drv_test_SOURCES := src/message_queue.c
  50 +mm_vdec_drv_test_SOURCES += test/decoder_driver_test.c
  51 +mm_vdec_drv_test_LDADD = -lpthread
2  vidc/vdec/src/omx_vdec.cpp
@@ -49,7 +49,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49 49 #include <limits.h>
50 50
51 51 #ifndef _ANDROID_
52   -#include <stropts.h>
  52 +#include <sys/ioctl.h>
53 53 #include <sys/mman.h>
54 54 #endif //_ANDROID_
55 55
3  vidc/vdec/test/omx_vdec_test.cpp
@@ -44,13 +44,10 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 44 #include "OMX_QCOMExtns.h"
45 45 #include <sys/time.h>
46 46
47   -#ifdef _CHROME_
48 47 #include <linux/android_pmem.h>
49   -#endif
50 48
51 49 #ifdef _ANDROID_
52 50 #include <binder/MemoryHeapBase.h>
53   -#include <linux/android_pmem.h>
54 51
55 52 extern "C"{
56 53 #include<utils/Log.h>
96 vidc/venc/Makefile
... ... @@ -1,96 +0,0 @@
1   -# ---------------------------------------------------------------------------------
2   -# MM-VIDEO-OSS-VENC
3   -# ---------------------------------------------------------------------------------
4   -
5   -# cross-compiler flags
6   -CFLAGS += -Wall
7   -CFLAGS += -Wundef
8   -CFLAGS += -Wstrict-prototypes
9   -CFLAGS += -Wno-trigraphs
10   -#CFLAGS += -Werror
11   -
12   -# cross-compile flags specific to shared objects
13   -CFLAGS_SO += -fpic
14   -
15   -# required pre-processor flags
16   -CPPFLAGS += -D__packed__=
17   -CPPFLAGS += -DIMAGE_APPS_PROC
18   -CPPFLAGS += -DFEATURE_Q_SINGLE_LINK
19   -CPPFLAGS += -DFEATURE_Q_NO_SELF_QPTR
20   -CPPFLAGS += -DFEATURE_LINUX
21   -CPPFLAGS += -DFEATURE_NATIVELINUX
22   -CPPFLAGS += -DFEATURE_DSM_DUP_ITEMS
23   -CPPFLAGS += -UENABLE_DEBUG_LOW
24   -CPPFLAGS += -DENABLE_DEBUG_HIGH
25   -CPPFLAGS += -DENABLE_DEBUG_ERROR
26   -CPPFLAGS += -UMULTI_DEC_INST
27   -CPPFLAGS += -UINPUT_BUFFER_LOG
28   -CPPFLAGS += -UOUTPUT_BUFFER_LOG
29   -CPPFLAGS += -DMAX_RES_1080P
30   -CPPFLAGS += -Du32="unsigned int"
31   -CPPFLAGS += -Du8="unsigned char"
32   -CPPFLAGS += -Iinc
33   -CPPFLAGS += -I../common/inc
34   -CPPFLAGS += -Isrc
35   -CPPFLAGS += -I../common/src
36   -
37   -# linker flags
38   -LDFLAGS += -L$(SYSROOT)/usr/lib
39   -
40   -# linker flags for shared objects
41   -LDFLAGS_SO += -shared
42   -
43   -# defintions
44   -LIBMAJOR := $(basename $(basename $(LIBVER)))
45   -LIBINSTALLDIR := $(DESTDIR)usr/lib
46   -BININSTALLDIR := $(DESTDIR)usr/bin
47   -
48   -# ---------------------------------------------------------------------------------
49   -# BUILD
50   -# ---------------------------------------------------------------------------------
51   -all: libOmxVenc.so.$(LIBVER) mm-venc-omx-test
52   -
53   -install:
54   - echo "installing opensource video encoder in $(DESTDIR)"
55   - if [ ! -d $(LIBINSTALLDIR) ]; then mkdir -p $(LIBINSTALLDIR); fi
56   - if [ ! -d $(BININSTALLDIR) ]; then mkdir -p $(BININSTALLDIR); fi
57   - install -m 555 libOmxVenc.so.$(LIBVER) $(LIBINSTALLDIR)
58   - cd $(LIBINSTALLDIR) && ln -s libOmxVenc.so.$(LIBVER) libOmxVenc.so.$(LIBMAJOR)
59   - cd $(LIBINSTALLDIR) && ln -s libOmxVenc.so.$(LIBMAJOR) libOmxVenc.so
60   - install -m 555 mm-venc-omx-test $(BININSTALLDIR)
61   -
62   -# ---------------------------------------------------------------------------------
63   -# COMPILE LIBRARY
64   -# ---------------------------------------------------------------------------------
65   -
66   -SRCS := src/omx_video_base.cpp
67   -SRCS += src/omx_video_encoder.cpp
68   -SRCS += src/video_encoder_device.cpp
69   -SRCS += ../common/src/extra_data_handler.cpp
70   -
71   -LDLIBS := -lpthread
72   -LDLIBS += -lrt
73   -LDLIBS += -lstdc++
74   -LDLIBS += -lOmxCore
75   -
76   -libOmxVenc.so.$(LIBVER): $(SRCS)
77   - $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_SO) $(LDFLAGS_SO) -Wl,-soname,libOmxVenc.so.$(LIBMAJOR) -o $@ $^ $(LDFLAGS) $(LDLIBS)
78   -
79   -# ---------------------------------------------------------------------------------
80   -# COMPILE TEST APP
81   -# ---------------------------------------------------------------------------------
82   -TEST_LDLIBS := -lpthread
83   -TEST_LDLIBS += -ldl
84   -TEST_LDLIBS += -lOmxCore
85   -
86   -TEST_SRCS := test/venc_test.cpp
87   -TEST_SRCS += test/camera_test.cpp
88   -TEST_SRCS += test/venc_util.c
89   -TEST_SRCS += test/fb_test.c
90   -
91   -mm-venc-omx-test: libOmxVenc.so.$(LIBVER) $(TEST_SRCS)
92   - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(TEST_LDLIBS)
93   -
94   -# ---------------------------------------------------------------------------------
95   -# END
96   -# ---------------------------------------------------------------------------------
48 vidc/venc/Makefile.am
... ... @@ -0,0 +1,48 @@
  1 +AM_CFLAGS = -Wall
  2 +AM_CFLAGS += -Wundef
  3 +AM_CFLAGS += -Wstrict-prototypes
  4 +AM_CFLAGS += -Wno-trigraphs
  5 +AM_CFLAGS += -g -O3
  6 +
  7 +AM_CPPFLAGS = -Dlrintf=_ffix_r
  8 +AM_CPPFLAGS += -D__align=__alignx
  9 +AM_CPPFLAGS += -D__alignx\(x\)=__attribute__\(\(__aligned__\(x\)\)\)
  10 +AM_CPPFLAGS += -DT_ARM
  11 +AM_CPPFLAGS += -Dinline=__inline
  12 +AM_CPPFLAGS += -UENABLE_DEBUG_LOW
  13 +AM_CPPFLAGS += -DENABLE_DEBUG_HIGH
  14 +AM_CPPFLAGS += -DENABLE_DEBUG_ERROR
  15 +AM_CPPFLAGS += -UINPUT_BUFFER_LOG
  16 +AM_CPPFLAGS += -UOUTPUT_BUFFER_LOG
  17 +AM_CPPFLAGS += -USINGLE_ENCODER_INSTANCE
  18 +if TARGET_MSM7630
  19 +AM_CPPFLAGS += -DMAX_RES_720P
  20 +endif
  21 +if TARGET_MSM8660
  22 +AM_CPPFLAGS += -DMAX_RES_1080P
  23 +endif
  24 +AM_CPPFLAGS += -Iinc
  25 +AM_CPPFLAGS += -I../common/inc
  26 +
  27 +c_sources = src/omx_video_base.cpp
  28 +c_sources += src/omx_video_encoder.cpp
  29 +c_sources += src/video_encoder_device.cpp
  30 +c_sources += ../common/src/extra_data_handler.cpp
  31 +
  32 +lib_LTLIBRARIES = libOmxVenc.la
  33 +libOmxVenc_la_SOURCES = $(c_sources)
  34 +libOmxVenc_la_CFLAGS = $(AM_CFLAGS) -fPIC
  35 +libOmxVenc_la_LDLIBS = -lOmxcore -lstdc++ -lpthread
  36 +libOmxVenc_la_LDFLAGS = -shared -version-info $(OMXVIDEO_LIBRARY_VERSION)
  37 +
  38 +bin_PROGRAMS = mm-venc-omx-test720p
  39 +bin_PROGRAMS += mm-video-encdrv-test
  40 +mm_video_encdrv_test_SOURCES := test/queue.c
  41 +mm_video_encdrv_test_SOURCES += test/video_encoder_test.c
  42 +mm_video_encdrv_test_LDADD = -lpthread
  43 +
  44 +mm_venc_omx_test720p_SOURCES = test/venc_test.cpp
  45 +mm_venc_omx_test720p_SOURCES += test/camera_test.cpp
  46 +mm_venc_omx_test720p_SOURCES += test/venc_util.c
  47 +mm_venc_omx_test720p_SOURCES += test/fb_test.c
  48 +mm_venc_omx_test720p_LDADD = -ldl -lpthread -lOmxCore libOmxVenc.la

0 comments on commit 8f1d91a

Please sign in to comment.
Something went wrong with that request. Please try again.