summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD36
-rw-r--r--libomxaudiotemplates_64bit.patch81
-rw-r--r--libomxaudiotemplates_write_fails.patch182
4 files changed, 313 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..70ab794eed4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = libomxil-component-audiotemplates
+ pkgdesc = An opensource implementation of the OpenMAX Integration Layer API - AudioTemplates component
+ pkgver = 0.1
+ pkgrel = 1
+ url = http://omxil.sourceforge.net
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ depends = glibc
+ source = http://downloads.sourceforge.net/project/omxil/components/libomxaudiotemplates-0.1.tar.gz
+ md5sums = 722a1d96d85bcce7a0e6b3218aa99209
+
+pkgname = libomxil-component-audiotemplates
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..32185673165
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id$
+# Maintainer: Wilken 'Akiko' Gottwalt <akiko@mailbox.org>
+# Contributor: Wilken 'Akiko' Gottwalt <akiko@mailbox.org>
+
+pkgname=libomxil-component-audiotemplates
+pkgver=0.1
+pkgrel=1
+pkgdesc="An opensource implementation of the OpenMAX Integration Layer API - AudioTemplates component"
+arch=('i686' 'x86_64')
+url="http://omxil.sourceforge.net"
+license=('LGPL')
+depends=('glibc')
+source=("http://downloads.sourceforge.net/project/omxil/components/libomxaudiotemplates-${pkgver}.tar.gz")
+md5sums=('722a1d96d85bcce7a0e6b3218aa99209')
+
+prepare() {
+ cd ${srcdir}/libomxaudiotemplates-${pkgver}
+
+ [ -f Makefile ] && make distclean
+ patch -Np0 -i ../../libomxaudiotemplates_64bit.patch
+ patch -Np0 -i ../../libomxaudiotemplates_write_fails.patch
+ autoreconf -fiv
+}
+
+build() {
+ cd ${srcdir}/libomxaudiotemplates-${pkgver}
+
+ ./configure --prefix=/usr --disable-static
+ make
+}
+
+package() {
+ cd ${srcdir}/libomxaudiotemplates-${pkgver}
+
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/libomxaudiotemplates_64bit.patch b/libomxaudiotemplates_64bit.patch
new file mode 100644
index 00000000000..f1dbc460e9d
--- /dev/null
+++ b/libomxaudiotemplates_64bit.patch
@@ -0,0 +1,81 @@
+proper memory address printf
+
+Wilken 'Akiko' Gottwalt <akiko@mailbox.org>
+
+--- src/audio_capturer/audio_capturer_test.c.orig 2015-11-27 08:44:32.538526765 +0100
++++ src/audio_capturer/audio_capturer_test.c 2015-11-27 08:44:59.738261885 +0100
+@@ -87,7 +87,7 @@
+
+ DEBUG(DEB_LEV_FULL_SEQ, "Hi there, I am in the %s callback.\n", __func__);
+
+- DEBUG(DEB_LEV_PARAMS, "Fill buffer %x\n", (int) pBuffer);
++ DEBUG(DEB_LEV_PARAMS, "Fill buffer %p\n", pBuffer);
+
+ write(appPriv->opd,
+ pBuffer->pBuffer + pBuffer->nOffset,
+--- src/audio_capturer/audio_capturer.c.orig 2015-11-27 08:46:19.100821855 +0100
++++ src/audio_capturer/audio_capturer.c 2015-11-27 08:46:36.617317730 +0100
+@@ -178,7 +178,7 @@
+ return OMX_ErrorInsufficientResources;
+ }
+ } else {
+- DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, Error Component %x Already Allocated\n", __func__, (int) pComponent->pComponentPrivate);
++ DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, Error Component %p Already Allocated\n", __func__, pComponent->pComponentPrivate);
+ }
+ }
+
+--- src/audio_decoder/audio_decoder.c.orig 2015-11-27 09:11:03.076408647 +0100
++++ src/audio_decoder/audio_decoder.c 2015-11-27 09:12:08.079112483 +0100
+@@ -58,7 +58,7 @@
+ return OMX_ErrorInsufficientResources;
+ }
+ } else {
+- DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, Error Component %x Already Allocated\n", __func__, (int) pComponent->pComponentPrivate);
++ DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, Error Component %p Already Allocated\n", __func__, pComponent->pComponentPrivate);
+ }
+ }
+
+--- src/audio_reader/audio_reader_test.c.orig 2015-11-27 09:21:21.720396633 +0100
++++ src/audio_reader/audio_reader_test.c 2015-11-27 09:21:37.430243383 +0100
+@@ -118,7 +118,7 @@
+
+ DEBUG(DEB_LEV_FULL_SEQ, "Hi there, I am in the %s callback.\n", __func__);
+
+- DEBUG(DEB_LEV_PARAMS, "Fill buffer %x\n", (int) pBuffer);
++ DEBUG(DEB_LEV_PARAMS, "Fill buffer %p\n", pBuffer);
+
+ if(-1 != appPriv->opd)
+ write(appPriv->opd,
+--- src/audio_reader/audio_reader.c.orig 2015-11-27 09:22:50.536196536 +0100
++++ src/audio_reader/audio_reader.c 2015-11-27 09:23:41.282367578 +0100
+@@ -297,7 +297,7 @@
+ return OMX_ErrorInsufficientResources;
+ }
+ } else {
+- DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, Error Component %x Already Allocated\n", __func__, (int) pComponent->pComponentPrivate);
++ DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, Error Component %p Already Allocated\n", __func__, pComponent->pComponentPrivate);
+ }
+ }
+
+--- src/audio_renderer/audio_renderer.c.orig 2015-11-27 09:34:36.362612582 +0100
++++ src/audio_renderer/audio_renderer.c 2015-11-27 09:35:14.072241663 +0100
+@@ -56,7 +56,7 @@
+ return OMX_ErrorInsufficientResources;
+ }
+ } else {
+- DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, Error Component %x Already Allocated\n", __func__, (int) pComponent->pComponentPrivate);
++ DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, Error Component %p Already Allocated\n", __func__, pComponent->pComponentPrivate);
+ }
+ }
+
+--- src/audio_writer/audio_writer.c.orig 2015-11-27 09:43:41.587302774 +0100
++++ src/audio_writer/audio_writer.c 2015-11-27 09:48:04.571561277 +0100
+@@ -203,7 +203,7 @@
+ return OMX_ErrorInsufficientResources;
+ }
+ } else {
+- DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, Error Component %x Already Allocated\n", __func__, (int) pComponent->pComponentPrivate);
++ DEBUG(DEB_LEV_FUNCTION_NAME, "In %s, Error Component %p Already Allocated\n", __func__, pComponent->pComponentPrivate);
+ }
+ }
+
diff --git a/libomxaudiotemplates_write_fails.patch b/libomxaudiotemplates_write_fails.patch
new file mode 100644
index 00000000000..9934aad88c3
--- /dev/null
+++ b/libomxaudiotemplates_write_fails.patch
@@ -0,0 +1,182 @@
+not the best fix for unused variables/return values and write result values,
+but it becomes compileable without changing the pedantic make options
+
+Wilken 'Akiko' Gottwalt <akiko@mailbox.org>
+
+--- src/audio_capturer/audio_capturer_test.c.orig 2015-11-27 08:50:28.948391045 +0100
++++ src/audio_capturer/audio_capturer_test.c 2015-11-27 09:06:08.949259927 +0100
+@@ -83,26 +83,26 @@
+ OMX_PTR pAppData,
+ OMX_BUFFERHEADERTYPE* pBuffer)
+ {
+- OMX_ERRORTYPE err;
++ OMX_ERRORTYPE err = OMX_ErrorNone;
+
+ DEBUG(DEB_LEV_FULL_SEQ, "Hi there, I am in the %s callback.\n", __func__);
+
+ DEBUG(DEB_LEV_PARAMS, "Fill buffer %p\n", pBuffer);
+
+- write(appPriv->opd,
+- pBuffer->pBuffer + pBuffer->nOffset,
+- pBuffer->nFilledLen);
+-
+- if((pBuffer->nFlags & OMX_BUFFERFLAG_EOS) != OMX_BUFFERFLAG_EOS) {
+- /* Reschedule the fill buffer request */
+- pBuffer->nFilledLen = 0;
+- err = OMX_FillThisBuffer(appPriv->handle, pBuffer);
++ if((write(appPriv->opd, pBuffer->pBuffer + pBuffer->nOffset, pBuffer->nFilledLen)) == -1) {
++ err = OMX_ErrorUndefined;
+ } else {
+- DEBUG(DEB_LEV_FULL_SEQ,"In %s EOS reached\n",__func__);
+- tsem_up(appPriv->eofSem);
++ if((pBuffer->nFlags & OMX_BUFFERFLAG_EOS) != OMX_BUFFERFLAG_EOS) {
++ /* Reschedule the fill buffer request */
++ pBuffer->nFilledLen = 0;
++ err = OMX_FillThisBuffer(appPriv->handle, pBuffer);
++ } else {
++ DEBUG(DEB_LEV_FULL_SEQ,"In %s EOS reached\n",__func__);
++ tsem_up(appPriv->eofSem);
++ }
+ }
+
+- return OMX_ErrorNone;
++ return err;
+ }
+
+ OMX_CALLBACKTYPE audio_capturer_callbacks = {
+--- src/audio_decoder/audio_decoder_test.c.orig 2015-11-27 09:14:41.200960846 +0100
++++ src/audio_decoder/audio_decoder_test.c 2015-11-27 09:17:14.266140218 +0100
+@@ -89,18 +89,20 @@
+ OMX_PTR pAppData,
+ OMX_BUFFERHEADERTYPE* pBuffer)
+ {
+- OMX_ERRORTYPE err;
++ OMX_ERRORTYPE err = OMX_ErrorNone;
+
+ DEBUG(DEB_LEV_FULL_SEQ, "%s: Fill buffer %p\n", __func__, pBuffer);
+
+ /* Write output data to file */
+- write(appPriv->opd, pBuffer->pBuffer, pBuffer->nFilledLen);
++ if((write(appPriv->opd, pBuffer->pBuffer, pBuffer->nFilledLen)) == -1) {
++ err = OMX_ErrorUndefined;
++ } else {
++ /* Reschedule the fill buffer request */
++ pBuffer->nFilledLen = 0;
++ err = OMX_FillThisBuffer(appPriv->decoderHandle, pBuffer);
++ }
+
+- /* Reschedule the fill buffer request */
+- pBuffer->nFilledLen = 0;
+- err = OMX_FillThisBuffer(appPriv->decoderHandle, pBuffer);
+-
+- return OMX_ErrorNone;
++ return err;
+ }
+
+ OMX_ERRORTYPE audiodecoderEmptyBufferDone(
+@@ -108,7 +110,7 @@
+ OMX_PTR pAppData,
+ OMX_BUFFERHEADERTYPE* pBuffer)
+ {
+- OMX_ERRORTYPE err;
++ OMX_ERRORTYPE err = OMX_ErrorNone;
+ int count;
+
+ DEBUG(DEB_LEV_FULL_SEQ, "%s: Fill buffer %p\n", __func__, pBuffer);
+@@ -123,7 +125,7 @@
+ /* Reschedule the empty buffer request */
+ err = OMX_EmptyThisBuffer(appPriv->decoderHandle, pBuffer);
+
+- return OMX_ErrorNone;
++ return err;
+ }
+
+ OMX_CALLBACKTYPE audio_decoder_callbacks = {
+--- src/audio_reader/audio_reader_test.c.orig 2015-11-27 09:27:07.123687711 +0100
++++ src/audio_reader/audio_reader_test.c 2015-11-27 09:29:38.045542211 +0100
+@@ -114,16 +114,17 @@
+ OMX_PTR pAppData,
+ OMX_BUFFERHEADERTYPE* pBuffer)
+ {
+- OMX_ERRORTYPE err;
++ OMX_ERRORTYPE err = OMX_ErrorNone;
+
+ DEBUG(DEB_LEV_FULL_SEQ, "Hi there, I am in the %s callback.\n", __func__);
+
+ DEBUG(DEB_LEV_PARAMS, "Fill buffer %p\n", pBuffer);
+
+- if(-1 != appPriv->opd)
+- write(appPriv->opd,
+- pBuffer->pBuffer + pBuffer->nOffset,
+- pBuffer->nFilledLen);
++ if(-1 != appPriv->opd) {
++ if((write(appPriv->opd, pBuffer->pBuffer + pBuffer->nOffset, pBuffer->nFilledLen)) == -1) {
++ err = OMX_ErrorUndefined;
++ }
++ }
+
+ if((pBuffer->nFlags & OMX_BUFFERFLAG_EOS) != OMX_BUFFERFLAG_EOS) {
+ /* Reschedule the fill buffer request */
+@@ -134,7 +135,7 @@
+ tsem_up(appPriv->eofSem);
+ }
+
+- return OMX_ErrorNone;
++ return err;
+ }
+
+ OMX_CALLBACKTYPE callbacks = {
+--- src/audio_renderer/audio_renderer_test.c.orig 2015-11-27 09:40:01.319412090 +0100
++++ src/audio_renderer/audio_renderer_test.c 2015-11-27 09:40:42.259008228 +0100
+@@ -110,7 +110,7 @@
+ OMX_PTR pAppData,
+ OMX_BUFFERHEADERTYPE* pBuffer)
+ {
+- OMX_ERRORTYPE err;
++ OMX_ERRORTYPE err = OMX_ErrorNone;
+ int count, size;
+
+ DEBUG(DEB_LEV_FULL_SEQ, "%s: Empty buffer %p\n", __func__, pBuffer);
+@@ -131,7 +131,7 @@
+ err = OMX_EmptyThisBuffer(appPriv->rendererHandle, pBuffer);
+ }
+
+- return OMX_ErrorNone;
++ return err;
+ }
+
+ static void test_component(void)
+--- src/audio_writer/audio_writer_test.c.orig 2015-11-27 09:49:46.847288358 +0100
++++ src/audio_writer/audio_writer_test.c 2015-11-27 09:52:04.072691807 +0100
+@@ -91,7 +91,7 @@
+ OMX_PTR pAppData,
+ OMX_BUFFERHEADERTYPE* pBuffer)
+ {
+- OMX_ERRORTYPE err;
++ OMX_ERRORTYPE err = OMX_ErrorNone;
+ int count;
+
+ DEBUG(DEB_LEV_FULL_SEQ, "%s: Fill buffer %p\n", __func__, pBuffer);
+@@ -108,7 +108,7 @@
+ err = OMX_EmptyThisBuffer(appPriv->handle, pBuffer);
+ }
+
+- return OMX_ErrorNone;
++ return err;
+ }
+
+ OMX_CALLBACKTYPE callbacks = {
+--- src/audio_writer/audio_writer.c.orig 2015-11-27 09:54:07.991548626 +0100
++++ src/audio_writer/audio_writer.c 2015-11-27 09:55:16.724246907 +0100
+@@ -39,10 +39,9 @@
+ OMX_BUFFERHEADERTYPE* pInBuffer)
+ {
+ omx_audio_writer_component_PrivateType *pPrivate = pComponent->pComponentPrivate;
+- CPresult res;
+
+ /* Use the pipe, luke */
+- res = pPrivate->hPipe->Write((CPhandle*) pPrivate->hPipe,
++ pPrivate->hPipe->Write((CPhandle*) pPrivate->hPipe,
+ (CPbyte*) (pInBuffer->pBuffer + pInBuffer->nOffset),
+ pInBuffer->nFilledLen);
+ pInBuffer->nFilledLen = 0;