aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote.h1
-rw-r--r--tools/android/depends/Makefile.in3
-rw-r--r--tools/android/depends/libcec/Makefile11
-rw-r--r--tools/android/depends/libcec/android.patch10
-rw-r--r--tools/android/depends/libnfs/001_fix_hanewin.patch12
-rw-r--r--tools/android/depends/libnfs/Makefile18
-rw-r--r--tools/android/depends/libnfs/libnfs_android.patch45
-rw-r--r--tools/android/depends/libnfs/rpcinc/auth.h216
-rw-r--r--tools/android/depends/libnfs/rpcinc/auth_unix.h106
-rw-r--r--tools/android/depends/libnfs/rpcinc/clnt.h445
-rw-r--r--tools/android/depends/libnfs/rpcinc/pmap_clnt.h124
-rw-r--r--tools/android/depends/libnfs/rpcinc/pmap_prot.h147
-rw-r--r--tools/android/depends/libnfs/rpcinc/pmap_rmt.h95
-rw-r--r--tools/android/depends/libnfs/rpcinc/rpc.h93
-rw-r--r--tools/android/depends/libnfs/rpcinc/rpc_msg.h243
-rw-r--r--tools/android/depends/libnfs/rpcinc/svc.h360
-rw-r--r--tools/android/depends/libnfs/rpcinc/svc_auth.h73
-rw-r--r--tools/android/depends/libnfs/rpcinc/types.h102
-rw-r--r--tools/android/depends/libnfs/rpcinc/xdr.h431
-rw-r--r--tools/android/packaging/Makefile2
-rw-r--r--tools/darwin/depends/libcec/Makefile6
-rw-r--r--xbmc/cores/omxplayer/OMXAudio.cpp132
-rw-r--r--xbmc/cores/omxplayer/OMXAudio.h5
-rw-r--r--xbmc/cores/omxplayer/OMXImage.cpp6
-rw-r--r--xbmc/cores/omxplayer/OMXPlayer.cpp61
-rw-r--r--xbmc/cores/omxplayer/OMXPlayerAudio.cpp99
-rw-r--r--xbmc/cores/omxplayer/OMXPlayerAudio.h5
-rw-r--r--xbmc/cores/omxplayer/OMXPlayerVideo.cpp7
-rw-r--r--xbmc/cores/omxplayer/OMXVideo.cpp24
-rw-r--r--xbmc/cores/omxplayer/OMXVideo.h1
-rw-r--r--xbmc/epg/Epg.cpp10
-rw-r--r--xbmc/epg/Epg.h5
-rw-r--r--xbmc/epg/EpgContainer.cpp10
-rw-r--r--xbmc/epg/EpgDatabase.cpp13
-rw-r--r--xbmc/epg/EpgDatabase.h10
-rw-r--r--xbmc/linux/OMXClock.cpp28
-rw-r--r--xbmc/linux/OMXCore.cpp218
-rw-r--r--xbmc/linux/OMXCore.h11
38 files changed, 387 insertions, 2801 deletions
diff --git a/tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote.h b/tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote.h
index dbdbb94435..bedc25eae8 100644
--- a/tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote.h
+++ b/tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote.h
@@ -21,6 +21,7 @@
#include <sys/socket.h>
#include <sys/time.h>
//#include <math.h>
+#include <unistd.h>
#ifdef DEB_PACK
#include <xbmc/xbmcclient.h>
#else
diff --git a/tools/android/depends/Makefile.in b/tools/android/depends/Makefile.in
index 8e93c6b9ac..6c95ec640c 100644
--- a/tools/android/depends/Makefile.in
+++ b/tools/android/depends/Makefile.in
@@ -13,7 +13,7 @@ SUBDIRS = \
python26-native python26 samba alsa-lib libcdio afpfs-ng libshairport \
libplist libcec libbluray boost tinyxml dummy-libxbmc libsdl \
liblzo2-native libjpeg-turbo-native libpng-native tiff-native libsdl_image rpl \
- libamplayer libssh taglib swig-native pcre-native xbmc-pvr-addons libusb
+ libamplayer libssh taglib swig-native pcre-native xbmc-pvr-addons libusb libnfs
.PHONY: buildtools $(BUILDTOOLS) subdirs $(SUBDIRS) arm
@@ -61,6 +61,7 @@ libssh: openssl cmake rpl
taglib: cmake
swig-native: buildtools pcre-native
pcre-native: buildtools
+libnfs: rpl
X86OVERRIDES=XBMC_OVERRIDE_HOST=i686-android-linux XBMC_OVERRIDE_TOOLCHAIN=$(XBMC_X86_TOOLCHAIN)
diff --git a/tools/android/depends/libcec/Makefile b/tools/android/depends/libcec/Makefile
index 7a9256640b..7d9b6b80c3 100644
--- a/tools/android/depends/libcec/Makefile
+++ b/tools/android/depends/libcec/Makefile
@@ -1,9 +1,9 @@
include ../Makefile.include
-DEPS= ../Makefile.include android.patch Makefile
+DEPS= ../Makefile.include Makefile
# lib name, version
LIBNAME=libcec
-VERSION=2.0.5-2
+VERSION=2.0.5-3
SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.gz
@@ -21,7 +21,6 @@ $(TARBALLS_LOCATION)/$(ARCHIVE):
$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
$(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); patch -p1 < ../android.patch
cd $(PLATFORM); $(AUTORECONF) -vif
cd $(PLATFORM); $(CONFIGURE)
@@ -30,9 +29,9 @@ $(LIBDYLIB): $(PLATFORM)
.installed-$(PLATFORM): $(LIBDYLIB)
$(MAKE) -C $(PLATFORM)/src/lib install
- rm -f $(PREFIX)/lib/libcec.la $(PREFIX)/lib/libcec.so $(PREFIX)/lib/libcec.so.1
- mv -f $(PREFIX)/lib/libcec.so.1.0.5 $(PREFIX)/lib/libcec.so
- $(RPL) -e "libcec.so.1" "libcec.so\x00\x00" $(PREFIX)/lib/libcec.so
+ rm -f $(PREFIX)/lib/libcec.la $(PREFIX)/lib/libcec.so $(PREFIX)/lib/libcec.so.2
+ mv -f $(PREFIX)/lib/libcec.so.2.0.0 $(PREFIX)/lib/libcec.so
+ $(RPL) -e "libcec.so.2" "libcec.so\x00\x00" $(PREFIX)/lib/libcec.so
-$(READELF) --dynamic $(PREFIX)/lib/libcec.so | grep ibrary
touch $@
diff --git a/tools/android/depends/libcec/android.patch b/tools/android/depends/libcec/android.patch
deleted file mode 100644
index 200c5a1482..0000000000
--- a/tools/android/depends/libcec/android.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- armeabi-v7a/configure.ac 2012-06-04 00:15:13.054345341 -0400
-+++ armeabi-v7a-good/configure.ac 2012-06-04 00:15:28.624345331 -0400
-@@ -8,7 +8,6 @@
- case "${host}" in
- *-*-linux*)
- PKG_CHECK_MODULES([UDEV],[libudev],,[has_libudev="no";AC_MSG_WARN("library 'udev' is missing - adapter detection will not be available")])
-- LIBS+=" -lrt"
- ;;
- *-apple-darwin*)
- has_libudev="no";
diff --git a/tools/android/depends/libnfs/001_fix_hanewin.patch b/tools/android/depends/libnfs/001_fix_hanewin.patch
deleted file mode 100644
index 507fbe6988..0000000000
--- a/tools/android/depends/libnfs/001_fix_hanewin.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- lib/libnfs.c 2011-09-02 12:45:30.000000000 +0200
-+++ lib/libnfs.c 2011-12-04 21:16:07.000000000 +0100
-@@ -666,6 +666,9 @@
- if (res->GETATTR3res_u.resok.obj_attributes.type == NF3DIR) {
- st.st_mode |= S_IFDIR ;
- }
-+ if (res->GETATTR3res_u.resok.obj_attributes.type == NF3REG) {
-+ st.st_mode |= S_IFREG ;
-+ }
- st.st_nlink = res->GETATTR3res_u.resok.obj_attributes.nlink;
- st.st_uid = res->GETATTR3res_u.resok.obj_attributes.uid;
- st.st_gid = res->GETATTR3res_u.resok.obj_attributes.gid;
diff --git a/tools/android/depends/libnfs/Makefile b/tools/android/depends/libnfs/Makefile
index 779b39546d..e14f99c440 100644
--- a/tools/android/depends/libnfs/Makefile
+++ b/tools/android/depends/libnfs/Makefile
@@ -1,17 +1,15 @@
include ../Makefile.include
-DEPS= ../Makefile.include 001_fix_hanewin.patch libnfs_android.patch Makefile rpcinc/*
+DEPS= ../Makefile.include Makefile
# lib name, version
LIBNAME=libnfs
-VERSION=0804e67
+VERSION=1.5.0
SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.gz
# configuration settings
CONFIGURE=./configure --prefix=$(PREFIX) --host=$(HOST)
-RPC_HEADERS=rpcinc/auth.h rpcinc/auth_unix.h rpcinc/clnt.h rpcinc/pmap_clnt.h rpcinc/pmap_prot.h rpcinc/pmap_rmt.h rpcinc/rpc.h rpcinc/rpc_msg.h rpcinc/svc.h rpcinc/svc_auth.h rpcinc/types.h rpcinc/xdr.h
-
LIBDYLIB=$(PLATFORM)/lib/.libs/$(LIBNAME).a
CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
@@ -24,10 +22,6 @@ $(TARBALLS_LOCATION)/$(ARCHIVE):
$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
-rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
$(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- mkdir -p $(PLATFORM)/include/rpc
- install -c -m 644 $(RPC_HEADERS) $(PLATFORM)/include/rpc/
- cd $(PLATFORM); patch -p0 < ../001_fix_hanewin.patch
- cd $(PLATFORM); patch -p0 < ../libnfs_android.patch
cd $(PLATFORM); ./bootstrap
cd $(PLATFORM); $(CONFIGURE)
@@ -36,11 +30,9 @@ $(LIBDYLIB): $(PLATFORM)
.installed-$(PLATFORM): $(LIBDYLIB)
$(MAKE) -C $(PLATFORM) install
- rm -f $(PREFIX)/lib/libnfs.la $(PREFIX)/lib/libnfs.so $(PREFIX)/lib/libnfs.so.0
- mv -f $(PREFIX)/lib/libnfs.so.0.0.0 $(PREFIX)/lib/libnfs.so
- mkdir -p $(PREFIX)/include/rpc
- cp -f rpcinc/* $(PREFIX)/include/rpc
- $(RPL) -e "libnfs.so.0" "libnfs.so\x00\x00" $(PREFIX)/lib/libnfs.so
+ rm -f $(PREFIX)/lib/libnfs.la $(PREFIX)/lib/libnfs.so $(PREFIX)/lib/libnfs.so.1
+ mv -f $(PREFIX)/lib/libnfs.so.1.0.5 $(PREFIX)/lib/libnfs.so
+ $(RPL) -e "libnfs.so.1" "libnfs.so\x00\x00" $(PREFIX)/lib/libnfs.so
-$(READELF) --dynamic $(PREFIX)/lib/libnfs.so | grep ibrary
touch $@
clean:
diff --git a/tools/android/depends/libnfs/libnfs_android.patch b/tools/android/depends/libnfs/libnfs_android.patch
deleted file mode 100644
index 4a084f1b19..0000000000
--- a/tools/android/depends/libnfs/libnfs_android.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- lib/libnfs-sync.c 2011-09-02 06:45:30.000000000 -0400
-+++ lib/libnfs-sync.c 2012-06-02 22:17:11.904404289 -0400
-@@ -25,7 +25,13 @@
- #include <strings.h>
- #include <sys/types.h>
- #include <sys/stat.h>
--#include <sys/statvfs.h>
-+#ifndef ANDROID
-+#include <sys/statvfs.h>
-+#else
-+#include <sys/vfs.h>
-+#define statvfs statfs
-+#define fstatvfs fstatfs
-+#endif
- #include <sys/ioctl.h>
- #include <unistd.h>
- #include <fcntl.h>
---- lib/libnfs.c 2012-06-02 22:17:23.324404282 -0400
-+++ lib/libnfs.c 2012-06-02 22:17:11.904404289 -0400
-@@ -27,7 +27,13 @@
- #include <errno.h>
- #include <sys/types.h>
- #include <sys/stat.h>
--#include <sys/statvfs.h>
-+#ifndef ANDROID
-+#include <sys/statvfs.h>
-+#else
-+#include <sys/vfs.h>
-+#define statvfs statfs
-+#define fstatvfs fstatfs
-+#endif
- #include <utime.h>
- #include <unistd.h>
- #include <fcntl.h>
-@@ -1919,10 +1925,6 @@
- svfs.f_bavail = res->FSSTAT3res_u.resok.abytes/4096;
- svfs.f_files = res->FSSTAT3res_u.resok.tfiles;
- svfs.f_ffree = res->FSSTAT3res_u.resok.ffiles;
-- svfs.f_favail = res->FSSTAT3res_u.resok.afiles;
-- svfs.f_fsid = 0;
-- svfs.f_flag = 0;
-- svfs.f_namemax = 256;
-
- data->cb(0, nfs, &svfs, data->private_data);
- free_nfs_cb_data(data);
diff --git a/tools/android/depends/libnfs/rpcinc/auth.h b/tools/android/depends/libnfs/rpcinc/auth.h
deleted file mode 100644
index 97a289c821..0000000000
--- a/tools/android/depends/libnfs/rpcinc/auth.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)auth.h 1.17 88/02/08 SMI
- * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC
- * $Id: auth.h,v 1.4 2004/11/25 19:41:19 emoy Exp $
- */
-
-/*
- * auth.h, Authentication interface.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * The data structures are completely opaque to the client. The client
- * is required to pass a AUTH * to routines that create rpc
- * "sessions".
- */
-
-#ifndef _RPC_AUTH_H
-#define _RPC_AUTH_H
-#include <sys/cdefs.h>
-
-#define MAX_AUTH_BYTES 400
-#define MAXNETNAMELEN 255 /* maximum length of network user's name */
-
-/*
- * Status returned from authentication check
- */
-enum auth_stat {
- AUTH_OK=0,
- /*
- * failed at remote end
- */
- AUTH_BADCRED=1, /* bogus credentials (seal broken) */
- AUTH_REJECTEDCRED=2, /* client should begin new session */
- AUTH_BADVERF=3, /* bogus verifier (seal broken) */
- AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */
- AUTH_TOOWEAK=5, /* rejected due to security reasons */
- /*
- * failed locally
- */
- AUTH_INVALIDRESP=6, /* bogus response verifier */
- AUTH_FAILED=7 /* some unknown reason */
-};
-
-/* 32-bit unsigned integers */
-#ifdef __LP64__
-typedef unsigned int u_int32;
-#else
-typedef unsigned long u_int32;
-#endif
-
-union des_block {
- struct {
- u_int32 high;
- u_int32 low;
- } key;
- char c[8];
-};
-typedef union des_block des_block;
-__BEGIN_DECLS
-extern bool_t xdr_des_block __P((XDR *, des_block *));
-__END_DECLS
-
-/*
- * Authentication info. Opaque to client.
- */
-struct opaque_auth {
- enum_t oa_flavor; /* flavor of auth */
- caddr_t oa_base; /* address of more auth stuff */
- unsigned int oa_length; /* not to exceed MAX_AUTH_BYTES */
-};
-
-
-/*
- * Auth handle, interface to client side authenticators.
- */
-struct AUTH{
- struct opaque_auth ah_cred;
- struct opaque_auth ah_verf;
- union des_block ah_key;
- struct auth_ops {
-#ifdef __cplusplus
- void (*ah_nextverf)(...);
- int (*ah_marshal)(...); /* nextverf & serialize */
- int (*ah_validate)(...); /* validate varifier */
- int (*ah_refresh)(...); /* refresh credentials */
- void (*ah_destroy)(...); /* destroy this structure */
-#else
- /* DO NOT REMOVE THE COMMENTED OUT ...: fixincludes needs to see them */
- void (*ah_nextverf)(/*...*/);
- int (*ah_marshal)(/*...*/); /* nextverf & serialize */
- int (*ah_validate)(/*...*/); /* validate varifier */
- int (*ah_refresh)(/*...*/); /* refresh credentials */
- void (*ah_destroy)(/*...*/); /* destroy this structure */
-#endif
- } *ah_ops;
- caddr_t ah_private;
-};
-typedef struct AUTH AUTH;
-
-
-/*
- * Authentication ops.
- * The ops and the auth handle provide the interface to the authenticators.
- *
- * AUTH *auth;
- * XDR *xdrs;
- * struct opaque_auth verf;
- */
-#define AUTH_NEXTVERF(auth) \
- ((*((auth)->ah_ops->ah_nextverf))(auth))
-#define auth_nextverf(auth) \
- ((*((auth)->ah_ops->ah_nextverf))(auth))
-
-#define AUTH_MARSHALL(auth, xdrs) \
- ((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
-#define auth_marshall(auth, xdrs) \
- ((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
-
-#define AUTH_VALIDATE(auth, verfp) \
- ((*((auth)->ah_ops->ah_validate))((auth), verfp))
-#define auth_validate(auth, verfp) \
- ((*((auth)->ah_ops->ah_validate))((auth), verfp))
-
-#define AUTH_REFRESH(auth) \
- ((*((auth)->ah_ops->ah_refresh))(auth))
-#define auth_refresh(auth) \
- ((*((auth)->ah_ops->ah_refresh))(auth))
-
-#define AUTH_DESTROY(auth) \
- ((*((auth)->ah_ops->ah_destroy))(auth))
-#define auth_destroy(auth) \
- ((*((auth)->ah_ops->ah_destroy))(auth))
-
-
-extern struct opaque_auth _null_auth;
-
-
-/*
- * These are the various implementations of client side authenticators.
- */
-
-/*
- * Unix style authentication
- * AUTH *authunix_create(machname, uid, gid, len, aup_gids)
- * char *machname;
- * int uid;
- * int gid;
- * int len;
- * int *aup_gids;
- */
-__BEGIN_DECLS
-extern AUTH *authunix_create __P((char *, int, int, int, int *));
-extern AUTH *authunix_create_default __P((void));
-extern AUTH *authnone_create __P((void));
-extern AUTH *authdes_create __P((char *, unsigned int,
- struct sockaddr_in *,
- des_block *));
-__END_DECLS
-
-#define AUTH_NONE 0 /* no authentication */
-#define AUTH_NULL 0 /* backward compatibility */
-#define AUTH_UNIX 1 /* unix style (uid, gids) */
-#define AUTH_SHORT 2 /* short hand unix style */
-#define AUTH_DES 3 /* des style (encrypted timestamps) */
-
-#endif /* !_RPC_AUTH_H */
diff --git a/tools/android/depends/libnfs/rpcinc/auth_unix.h b/tools/android/depends/libnfs/rpcinc/auth_unix.h
deleted file mode 100644
index 496defb79a..0000000000
--- a/tools/android/depends/libnfs/rpcinc/auth_unix.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)auth_unix.h 1.8 88/02/08 SMI
- * from: @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC
- * $Id: auth_unix.h,v 1.4 2004/10/28 21:58:21 emoy Exp $
- */
-
-/*
- * auth_unix.h, Protocol for UNIX style authentication parameters for RPC
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-/*
- * The system is very weak. The client uses no encryption for it
- * credentials and only sends null verifiers. The server sends backs
- * null verifiers or optionally a verifier that suggests a new short hand
- * for the credentials.
- */
-
-#ifndef _RPC_AUTH_UNIX_H
-#define _RPC_AUTH_UNIX_H
-#include <sys/cdefs.h>
-
-/* The machine name is part of a credential; it may not exceed 255 bytes */
-#define MAX_MACHINE_NAME 255
-
-/*
- * Unix style credentials.
- */
-struct authunix_parms {
-#ifdef __LP64__
- unsigned int aup_time;
-#else
- unsigned long aup_time;
-#endif
- char *aup_machname;
- int aup_uid;
- int aup_gid;
- unsigned int aup_len;
- int *aup_gids;
-};
-
-__BEGIN_DECLS
-extern bool_t xdr_authunix_parms __P((XDR *, struct authunix_parms *));
-__END_DECLS
-
-/*
- * If a response verifier has flavor AUTH_SHORT,
- * then the body of the response verifier encapsulates the following structure;
- * again it is serialized in the obvious fashion.
- */
-struct short_hand_verf {
- struct opaque_auth new_cred;
-};
-
-#endif /* !_RPC_AUTH_UNIX_H */
diff --git a/tools/android/depends/libnfs/rpcinc/clnt.h b/tools/android/depends/libnfs/rpcinc/clnt.h
deleted file mode 100644
index 4ed9b51bf3..0000000000
--- a/tools/android/depends/libnfs/rpcinc/clnt.h
+++ /dev/null
@@ -1,445 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)clnt.h 1.31 88/02/08 SMI
- * from: @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: clnt.h,v 1.4 2004/10/28 21:58:22 emoy Exp $
- */
-
-/*
- * clnt.h - Client side remote procedure call interface.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_CLNT_H_
-#define _RPC_CLNT_H_
-#include <sys/cdefs.h>
-
-/*
- * Rpc calls return an enum clnt_stat. This should be looked at more,
- * since each implementation is required to live with this (implementation
- * independent) list of errors.
- */
-
-/* Avoid collision with mach definition */
-#if defined(RPC_SUCCESS)
-#undef RPC_SUCCESS
-#endif
-
-enum clnt_stat {
- RPC_SUCCESS=0, /* call succeeded */
- /*
- * local errors
- */
- RPC_CANTENCODEARGS=1, /* can't encode arguments */
- RPC_CANTDECODERES=2, /* can't decode results */
- RPC_CANTSEND=3, /* failure in sending call */
- RPC_CANTRECV=4, /* failure in receiving result */
- RPC_TIMEDOUT=5, /* call timed out */
- /*
- * remote errors
- */
- RPC_VERSMISMATCH=6, /* rpc versions not compatible */
- RPC_AUTHERROR=7, /* authentication error */
- RPC_PROGUNAVAIL=8, /* program not available */
- RPC_PROGVERSMISMATCH=9, /* program version mismatched */
- RPC_PROCUNAVAIL=10, /* procedure unavailable */
- RPC_CANTDECODEARGS=11, /* decode arguments error */
- RPC_SYSTEMERROR=12, /* generic "other problem" */
-
- /*
- * callrpc & clnt_create errors
- */
- RPC_UNKNOWNHOST=13, /* unknown host name */
- RPC_UNKNOWNPROTO=17, /* unkown protocol */
-
- /*
- * _ create errors
- */
- RPC_PMAPFAILURE=14, /* the pmapper failed in its call */
- RPC_PROGNOTREGISTERED=15, /* remote program is not registered */
- /*
- * unspecified error
- */
- RPC_FAILED=16
-};
-
-
-/*
- * Error info.
- */
-struct rpc_err {
- enum clnt_stat re_status;
- union {
- int RE_errno; /* realated system error */
- enum auth_stat RE_why; /* why the auth error occurred */
- struct {
-#ifdef __LP64__
- unsigned int low; /* lowest verion supported */
- unsigned int high; /* highest verion supported */
-#else
- unsigned long low; /* lowest verion supported */
- unsigned long high; /* highest verion supported */
-#endif
- } RE_vers;
- struct { /* maybe meaningful if RPC_FAILED */
-#ifdef __LP64__
- int s1;
- int s2;
-#else
- long s1;
- long s2;
-#endif
- } RE_lb; /* life boot & debugging only */
- } ru;
-#define re_errno ru.RE_errno
-#define re_why ru.RE_why
-#define re_vers ru.RE_vers
-#define re_lb ru.RE_lb
-};
-
-
-/*
- * Client rpc handle.
- * Created by individual implementations, see e.g. rpc_udp.c.
- * Client is responsible for initializing auth, see e.g. auth_none.c.
- */
-typedef struct CLIENT CLIENT;
-struct CLIENT
-{
- AUTH *cl_auth; /* authenticator */
- struct clnt_ops {
-#ifdef __LP64__
- enum clnt_stat (*cl_call)(CLIENT *, unsigned int, xdrproc_t, void *, xdrproc_t, void *, struct timeval); /* call remote procedure */
-#else
- enum clnt_stat (*cl_call)(CLIENT *, unsigned long, xdrproc_t, void *, xdrproc_t, void *, struct timeval); /* call remote procedure */
-#endif
- void (*cl_abort)(void); /* abort a call */
- void (*cl_geterr)(CLIENT *, struct rpc_err *); /* get specific error code */
- bool_t (*cl_freeres)(CLIENT *, xdrproc_t, void *); /* frees results */
- void (*cl_destroy)(CLIENT *); /* destroy this structure */
- bool_t (*cl_control)(CLIENT *, int, char *); /* the ioctl() of rpc */
- } *cl_ops;
- caddr_t cl_private; /* private stuff */
-};
-
-/*
- * client side rpc interface ops
- *
- * Parameter types are:
- *
- */
-
-/*
- * enum clnt_stat
- * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout)
- * CLIENT *rh;
- * u_long proc;
- * xdrproc_t xargs;
- * caddr_t argsp;
- * xdrproc_t xres;
- * caddr_t resp;
- * struct timeval timeout;
- */
-#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \
- ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
-#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \
- ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
-
-/*
- * void
- * CLNT_ABORT(rh);
- * CLIENT *rh;
- */
-#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh))
-#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh))
-
-/*
- * struct rpc_err
- * CLNT_GETERR(rh);
- * CLIENT *rh;
- */
-#define CLNT_GETERR(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp))
-#define clnt_geterr(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp))
-
-
-/*
- * bool_t
- * CLNT_FREERES(rh, xres, resp);
- * CLIENT *rh;
- * xdrproc_t xres;
- * caddr_t resp;
- */
-#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
-#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
-
-/*
- * bool_t
- * CLNT_CONTROL(cl, request, info)
- * CLIENT *cl;
- * unsigned int request;
- * char *info;
- */
-#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
-#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
-
-/*
- * control operations that apply to both udp and tcp transports
- */
-#define CLSET_TIMEOUT 1 /* set timeout (timeval) */
-#define CLGET_TIMEOUT 2 /* get timeout (timeval) */
-#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */
-/*
- * udp only control operations
- */
-#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */
-#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */
-
-/*
- * void
- * CLNT_DESTROY(rh);
- * CLIENT *rh;
- */
-#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh))
-#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh))
-
-
-/*
- * RPCTEST is a test program which is accessable on every rpc
- * transport/port. It is used for testing, performance evaluation,
- * and network administration.
- */
-
-#ifdef __LP64__
-#define RPCTEST_PROGRAM ((unsigned int)1)
-#define RPCTEST_VERSION ((unsigned int)1)
-#define RPCTEST_NULL_PROC ((unsigned int)2)
-#define RPCTEST_NULL_BATCH_PROC ((unsigned int)3)
-#else
-#define RPCTEST_PROGRAM ((unsigned long)1)
-#define RPCTEST_VERSION ((unsigned long)1)
-#define RPCTEST_NULL_PROC ((unsigned long)2)
-#define RPCTEST_NULL_BATCH_PROC ((unsigned long)3)
-#endif
-
-/*
- * By convention, procedure 0 takes null arguments and returns them
- */
-
-#ifdef __LP64__
-#define NULLPROC ((unsigned int)0)
-#else
-#define NULLPROC ((unsigned long)0)
-#endif
-
-/*
- * Below are the client handle creation routines for the various
- * implementations of client side rpc. They can return NULL if a
- * creation failure occurs.
- */
-
-/*
- * Memory based rpc (for speed check and testing)
- * CLIENT *
- * clntraw_create(prog, vers)
- * u_long prog;
- * u_long vers;
- */
-__BEGIN_DECLS
-#ifdef __LP64__
-extern CLIENT *clntraw_create __P((unsigned int, unsigned int));
-#else
-extern CLIENT *clntraw_create __P((unsigned long, unsigned long));
-#endif
-__END_DECLS
-
-
-/*
- * Generic client creation routine. Supported protocols are "udp" and "tcp"
- * CLIENT *
- * clnt_create(host, prog, vers, prot);
- * char *host; -- hostname
- * u_long prog; -- program number
- * u_long vers; -- version number
- * char *prot; -- protocol
- */
-__BEGIN_DECLS
-#ifdef __LP64__
-extern CLIENT *clnt_create __P((char *, unsigned int, unsigned int, char *));
-#else
-extern CLIENT *clnt_create __P((char *, unsigned long, unsigned long, char *));
-#endif
-__END_DECLS
-
-
-/*
- * TCP based rpc
- * CLIENT *
- * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
- * struct sockaddr_in *raddr;
- * u_long prog;
- * u_long version;
- * register int *sockp;
- * unsigned int sendsz;
- * unsigned int recvsz;
- */
-__BEGIN_DECLS
-#ifdef __LP64__
-extern CLIENT *clnttcp_create __P((struct sockaddr_in *,
- unsigned int,
- unsigned int,
- int *,
- unsigned int,
- unsigned int));
-#else
-extern CLIENT *clnttcp_create __P((struct sockaddr_in *,
- unsigned long,
- unsigned long,
- int *,
- unsigned int,
- unsigned int));
-#endif
-__END_DECLS
-
-
-/*
- * UDP based rpc.
- * CLIENT *
- * clntudp_create(raddr, program, version, wait, sockp)
- * struct sockaddr_in *raddr;
- * u_long program;
- * u_long version;
- * struct timeval wait;
- * int *sockp;
- *
- * Same as above, but you specify max packet sizes.
- * CLIENT *
- * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
- * struct sockaddr_in *raddr;
- * u_long program;
- * u_long version;
- * struct timeval wait;
- * int *sockp;
- * unsigned int sendsz;
- * unsigned int recvsz;
- */
-__BEGIN_DECLS
-#ifdef __LP64__
-extern CLIENT *clntudp_create __P((struct sockaddr_in *,
- unsigned int,
- unsigned int,
- struct timeval,
- int *));
-extern CLIENT *clntudp_bufcreate __P((struct sockaddr_in *,
- unsigned int,
- unsigned int,
- struct timeval,
- int *,
- unsigned int,
- unsigned int));
-#else
-extern CLIENT *clntudp_create __P((struct sockaddr_in *,
- unsigned long,
- unsigned long,
- struct timeval,
- int *));
-extern CLIENT *clntudp_bufcreate __P((struct sockaddr_in *,
- unsigned long,
- unsigned long,
- struct timeval,
- int *,
- unsigned int,
- unsigned int));
-#endif
-__END_DECLS
-
-
-/*
- * Print why creation failed
- */
-__BEGIN_DECLS
-extern void clnt_pcreateerror __P((char *)); /* stderr */
-extern char *clnt_spcreateerror __P((char *)); /* string */
-__END_DECLS
-
-/*
- * Like clnt_perror(), but is more verbose in its output
- */
-__BEGIN_DECLS
-extern void clnt_perrno __P((enum clnt_stat)); /* stderr */
-extern char *clnt_sperrno __P((enum clnt_stat)); /* string */
-__END_DECLS
-
-/*
- * Print an English error message, given the client error code
- */
-__BEGIN_DECLS
-extern void clnt_perror __P((CLIENT *, char *)); /* stderr */
-extern char *clnt_sperror __P((CLIENT *, char *)); /* string */
-__END_DECLS
-
-
-/*
- * If a creation fails, the following allows the user to figure out why.
- */
-struct rpc_createerr {
- enum clnt_stat cf_stat;
- struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
-};
-
-extern struct rpc_createerr rpc_createerr;
-
-
-#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */
-#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */
-
-#endif /* !_RPC_CLNT_H */
diff --git a/tools/android/depends/libnfs/rpcinc/pmap_clnt.h b/tools/android/depends/libnfs/rpcinc/pmap_clnt.h
deleted file mode 100644
index c07a81902b..0000000000
--- a/tools/android/depends/libnfs/rpcinc/pmap_clnt.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI
- * from: @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: pmap_clnt.h,v 1.3 2004/10/28 21:58:22 emoy Exp $
- */
-
-/*
- * pmap_clnt.h
- * Supplies C routines to get to portmap services.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-/*
- * Usage:
- * success = pmap_set(program, version, protocol, port);
- * success = pmap_unset(program, version);
- * port = pmap_getport(address, program, version, protocol);
- * head = pmap_getmaps(address);
- * clnt_stat = pmap_rmtcall(address, program, version, procedure,
- * xdrargs, argsp, xdrres, resp, tout, port_ptr)
- * (works for udp only.)
- * clnt_stat = clnt_broadcast(program, version, procedure,
- * xdrargs, argsp, xdrres, resp, eachresult)
- * (like pmap_rmtcall, except the call is broadcasted to all
- * locally connected nets. For each valid response received,
- * the procedure eachresult is called. Its form is:
- * done = eachresult(resp, raddr)
- * bool_t done;
- * caddr_t resp;
- * struct sockaddr_in raddr;
- * where resp points to the results of the call and raddr is the
- * address if the responder to the broadcast.
- */
-
-#ifndef _RPC_PMAPCLNT_H
-#define _RPC_PMAPCLNT_H
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-#ifdef __LP64__
-extern bool_t pmap_set __P((unsigned int, unsigned int, int, int));
-extern bool_t pmap_unset __P((unsigned int, unsigned int));
-extern enum clnt_stat pmap_rmtcall __P((struct sockaddr_in *,
- unsigned int, unsigned int, unsigned int,
- xdrproc_t, caddr_t,
- xdrproc_t, caddr_t,
- struct timeval, unsigned int *));
-extern enum clnt_stat clnt_broadcast __P((unsigned int, unsigned int, unsigned int,
- xdrproc_t, char *,
- xdrproc_t, char *,
- bool_t (*)()));
-extern unsigned short pmap_getport __P((struct sockaddr_in *,
- unsigned int, unsigned int, unsigned int));
-#else
-extern bool_t pmap_set __P((unsigned long, unsigned long, int, int));
-extern bool_t pmap_unset __P((unsigned long, unsigned long));
-extern enum clnt_stat pmap_rmtcall __P((struct sockaddr_in *,
- unsigned long, unsigned long, unsigned long,
- xdrproc_t, caddr_t,
- xdrproc_t, caddr_t,
- struct timeval, unsigned long *));
-extern enum clnt_stat clnt_broadcast __P((unsigned long, unsigned long, unsigned long,
- xdrproc_t, char *,
- xdrproc_t, char *,
- bool_t (*)()));
-extern unsigned short pmap_getport __P((struct sockaddr_in *,
- unsigned long, unsigned long, unsigned int));
-#endif
-extern struct pmaplist *pmap_getmaps __P((struct sockaddr_in *));
-extern int getrpcport __P((char *, int, int, int));
-__END_DECLS
-
-#endif /* !_RPC_PMAPCLNT_H */
diff --git a/tools/android/depends/libnfs/rpcinc/pmap_prot.h b/tools/android/depends/libnfs/rpcinc/pmap_prot.h
deleted file mode 100644
index c5dc139e41..0000000000
--- a/tools/android/depends/libnfs/rpcinc/pmap_prot.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)pmap_prot.h 1.14 88/02/08 SMI
- * from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: pmap_prot.h,v 1.3 2004/10/28 21:58:22 emoy Exp $
- */
-
-/*
- * pmap_prot.h
- * Protocol for the local binder service, or pmap.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * The following procedures are supported by the protocol:
- *
- * PMAPPROC_NULL() returns ()
- * takes nothing, returns nothing
- *
- * PMAPPROC_SET(struct pmap) returns (bool_t)
- * TRUE is success, FALSE is failure. Registers the tuple
- * [prog, vers, prot, port].
- *
- * PMAPPROC_UNSET(struct pmap) returns (bool_t)
- * TRUE is success, FALSE is failure. Un-registers pair
- * [prog, vers]. prot and port are ignored.
- *
- * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
- * 0 is failure. Otherwise returns the port number where the pair
- * [prog, vers] is registered. It may lie!
- *
- * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
- *
- * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
- * RETURNS (port, string<>);
- * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
- * Calls the procedure on the local machine. If it is not registered,
- * this procedure is quite; ie it does not return error information!!!
- * This procedure only is supported on rpc/udp and calls via
- * rpc/udp. This routine only passes null authentication parameters.
- * This file has no interface to xdr routines for PMAPPROC_CALLIT.
- *
- * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
- */
-
-#ifndef _RPC_PMAPPROT_H
-#define _RPC_PMAPPROT_H
-#include <sys/cdefs.h>
-
-#define PMAPPORT ((unsigned short)111)
-#ifdef __LP64__
-#define PMAPPROG ((unsigned int)100000)
-#define PMAPVERS ((unsigned int)2)
-#define PMAPVERS_PROTO ((unsigned int)2)
-#define PMAPVERS_ORIG ((unsigned int)1)
-#define PMAPPROC_NULL ((unsigned int)0)
-#define PMAPPROC_SET ((unsigned int)1)
-#define PMAPPROC_UNSET ((unsigned int)2)
-#define PMAPPROC_GETPORT ((unsigned int)3)
-#define PMAPPROC_DUMP ((unsigned int)4)
-#define PMAPPROC_CALLIT ((unsigned int)5)
-#else
-#define PMAPPROG ((unsigned long)100000)
-#define PMAPVERS ((unsigned long)2)
-#define PMAPVERS_PROTO ((unsigned long)2)
-#define PMAPVERS_ORIG ((unsigned long)1)
-#define PMAPPROC_NULL ((unsigned long)0)
-#define PMAPPROC_SET ((unsigned long)1)
-#define PMAPPROC_UNSET ((unsigned long)2)
-#define PMAPPROC_GETPORT ((unsigned long)3)
-#define PMAPPROC_DUMP ((unsigned long)4)
-#define PMAPPROC_CALLIT ((unsigned long)5)
-#endif
-
-struct pmap {
-#ifdef __LP64__
- unsigned int pm_prog;
- unsigned int pm_vers;
- unsigned int pm_prot;
- unsigned int pm_port;
-#else
- long unsigned pm_prog;
- long unsigned pm_vers;
- long unsigned pm_prot;
- long unsigned pm_port;
-#endif
-};
-
-struct pmaplist {
- struct pmap pml_map;
- struct pmaplist *pml_next;
-};
-
-__BEGIN_DECLS
-extern bool_t xdr_pmap __P((XDR *, struct pmap *));
-extern bool_t xdr_pmaplist __P((XDR *, struct pmaplist **));
-__END_DECLS
-
-#endif /* !_RPC_PMAPPROT_H */
diff --git a/tools/android/depends/libnfs/rpcinc/pmap_rmt.h b/tools/android/depends/libnfs/rpcinc/pmap_rmt.h
deleted file mode 100644
index 9ffbd1cb45..0000000000
--- a/tools/android/depends/libnfs/rpcinc/pmap_rmt.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)pmap_rmt.h 1.2 88/02/08 SMI
- * from: @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: pmap_rmt.h,v 1.3 2004/10/28 21:58:23 emoy Exp $
- */
-
-/*
- * Structures and XDR routines for parameters to and replies from
- * the portmapper remote-call-service.
- *
- * Copyright (C) 1986, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_PMAPRMT_H
-#define _RPC_PMAPRMT_H
-#include <sys/cdefs.h>
-
-struct rmtcallargs {
-#ifdef __LP64__
- unsigned int prog, vers, proc, arglen;
-#else
- unsigned long prog, vers, proc, arglen;
-#endif
- caddr_t args_ptr;
- xdrproc_t xdr_args;
-};
-
-struct rmtcallres {
-#ifdef __LP64__
- unsigned int *port_ptr;
- unsigned int resultslen;
-#else
- unsigned long *port_ptr;
- unsigned long resultslen;
-#endif
- caddr_t results_ptr;
- xdrproc_t xdr_results;
-};
-
-__BEGIN_DECLS
-extern bool_t xdr_rmtcall_args __P((XDR *, struct rmtcallargs *));
-extern bool_t xdr_rmtcallres __P((XDR *, struct rmtcallres *));
-__END_DECLS
-
-#endif /* !_RPC_PMAPRMT_H */
diff --git a/tools/android/depends/libnfs/rpcinc/rpc.h b/tools/android/depends/libnfs/rpcinc/rpc.h
deleted file mode 100644
index da89dff563..0000000000
--- a/tools/android/depends/libnfs/rpcinc/rpc.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)rpc.h 1.9 88/02/08 SMI
- * from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC
- * $Id: rpc.h,v 1.2 1999/10/14 21:56:53 wsanchez Exp $
- */
-
-/*
- * rpc.h, Just includes the billions of rpc header files necessary to
- * do remote procedure calling.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-#ifndef _RPC_RPC_H
-#define _RPC_RPC_H
-
-#include <rpc/types.h> /* some typedefs */
-#include <netinet/in.h>
-
-/* external data representation interfaces */
-#include <rpc/xdr.h> /* generic (de)serializer */
-
-/* Client side only authentication */
-#include <rpc/auth.h> /* generic authenticator (client side) */
-
-/* Client side (mostly) remote procedure call */
-#include <rpc/clnt.h> /* generic rpc stuff */
-
-/* semi-private protocol headers */
-#include <rpc/rpc_msg.h> /* protocol for rpc messages */
-#include <rpc/auth_unix.h> /* protocol for unix style cred */
-/*
- * Uncomment-out the next line if you are building the rpc library with
- * DES Authentication (see the README file in the secure_rpc/ directory).
- */
-/*#include <rpc/auth_des.h> protocol for des style cred */
-
-/* Server side only remote procedure callee */
-#include <rpc/svc.h> /* service manager and multiplexer */
-#include <rpc/svc_auth.h> /* service side authenticator */
-
-#include <netdb.h>
-
-#endif /* !_RPC_RPC_H */
diff --git a/tools/android/depends/libnfs/rpcinc/rpc_msg.h b/tools/android/depends/libnfs/rpcinc/rpc_msg.h
deleted file mode 100644
index ec2d929c61..0000000000
--- a/tools/android/depends/libnfs/rpcinc/rpc_msg.h
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)rpc_msg.h 1.7 86/07/16 SMI
- * from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: rpc_msg.h,v 1.3 2004/10/28 21:58:24 emoy Exp $
- */
-
-/*
- * rpc_msg.h
- * rpc message definition
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_RPCMSG_H
-#define _RPC_RPCMSG_H
-
-#ifdef __LP64__
-#define RPC_MSG_VERSION ((unsigned int) 2)
-#else
-#define RPC_MSG_VERSION ((unsigned long) 2)
-#endif
-#define RPC_SERVICE_PORT ((unsigned short) 2048)
-
-/*
- * Bottom up definition of an rpc message.
- * NOTE: call and reply use the same overall stuct but
- * different parts of unions within it.
- */
-
-enum msg_type {
- CALL=0,
- REPLY=1
-};
-
-enum reply_stat {
- MSG_ACCEPTED=0,
- MSG_DENIED=1
-};
-
-enum accept_stat {
- SUCCESS=0,
- PROG_UNAVAIL=1,
- PROG_MISMATCH=2,
- PROC_UNAVAIL=3,
- GARBAGE_ARGS=4,
- SYSTEM_ERR=5
-};
-
-enum reject_stat {
- RPC_MISMATCH=0,
- AUTH_ERROR=1
-};
-
-/*
- * Reply part of an rpc exchange
- */
-
-/*
- * Reply to an rpc request that was accepted by the server.
- * Note: there could be an error even though the request was
- * accepted.
- */
-struct accepted_reply {
- struct opaque_auth ar_verf;
- enum accept_stat ar_stat;
- union {
- struct {
-#ifdef __LP64__
- unsigned int low;
- unsigned int high;
-#else
- unsigned long low;
- unsigned long high;
-#endif
- } AR_versions;
- struct {
- caddr_t where;
- xdrproc_t proc;
- } AR_results;
- /* and many other null cases */
- } ru;
-#define ar_results ru.AR_results
-#define ar_vers ru.AR_versions
-};
-
-/*
- * Reply to an rpc request that was rejected by the server.
- */
-struct rejected_reply {
- enum reject_stat rj_stat;
- union {
- struct {
-#ifdef __LP64__
- unsigned int low;
- unsigned int high;
-#else
- unsigned long low;
- unsigned long high;
-#endif
- } RJ_versions;
- enum auth_stat RJ_why; /* why authentication did not work */
- } ru;
-#define rj_vers ru.RJ_versions
-#define rj_why ru.RJ_why
-};
-
-/*
- * Body of a reply to an rpc request.
- */
-struct reply_body {
- enum reply_stat rp_stat;
- union {
- struct accepted_reply RP_ar;
- struct rejected_reply RP_dr;
- } ru;
-#define rp_acpt ru.RP_ar
-#define rp_rjct ru.RP_dr
-};
-
-/*
- * Body of an rpc request call.
- */
-struct call_body {
-#ifdef __LP64__
- unsigned int cb_rpcvers; /* must be equal to two */
- unsigned int cb_prog;
- unsigned int cb_vers;
- unsigned int cb_proc;
-#else
- unsigned long cb_rpcvers; /* must be equal to two */
- unsigned long cb_prog;
- unsigned long cb_vers;
- unsigned long cb_proc;
-#endif
- struct opaque_auth cb_cred;
- struct opaque_auth cb_verf; /* protocol specific - provided by client */
-};
-
-/*
- * The rpc message
- */
-struct rpc_msg {
-#ifdef __LP64__
- unsigned int rm_xid;
-#else
- unsigned long rm_xid;
-#endif
- enum msg_type rm_direction;
- union {
- struct call_body RM_cmb;
- struct reply_body RM_rmb;
- } ru;
-#define rm_call ru.RM_cmb
-#define rm_reply ru.RM_rmb
-};
-#define acpted_rply ru.RM_rmb.ru.RP_ar
-#define rjcted_rply ru.RM_rmb.ru.RP_dr
-
-__BEGIN_DECLS
-/*
- * XDR routine to handle a rpc message.
- * xdr_callmsg(xdrs, cmsg)
- * XDR *xdrs;
- * struct rpc_msg *cmsg;
- */
-extern bool_t xdr_callmsg __P((XDR *, struct rpc_msg *));
-
-/*
- * XDR routine to pre-serialize the static part of a rpc message.
- * xdr_callhdr(xdrs, cmsg)
- * XDR *xdrs;
- * struct rpc_msg *cmsg;
- */
-extern bool_t xdr_callhdr __P((XDR *, struct rpc_msg *));
-
-/*
- * XDR routine to handle a rpc reply.
- * xdr_replymsg(xdrs, rmsg)
- * XDR *xdrs;
- * struct rpc_msg *rmsg;
- */
-extern bool_t xdr_replymsg __P((XDR *, struct rpc_msg *));
-
-/*
- * Fills in the error part of a reply message.
- * _seterr_reply(msg, error)
- * struct rpc_msg *msg;
- * struct rpc_err *error;
- */
-extern void _seterr_reply __P((struct rpc_msg *, struct rpc_err *));
-__END_DECLS
-
-#endif /* !_RPC_RPCMSG_H */
diff --git a/tools/android/depends/libnfs/rpcinc/svc.h b/tools/android/depends/libnfs/rpcinc/svc.h
deleted file mode 100644
index d671045f17..0000000000
--- a/tools/android/depends/libnfs/rpcinc/svc.h
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)svc.h 1.20 88/02/08 SMI
- * from: @(#)svc.h 2.2 88/07/29 4.0 RPCSRC
- * $Id: svc.h,v 1.4 2004/11/25 19:41:19 emoy Exp $
- */
-
-/*
- * svc.h, Server-side remote procedure call interface.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_SVC_H
-#define _RPC_SVC_H
-#include <sys/cdefs.h>
-
-/*
- * This interface must manage two items concerning remote procedure calling:
- *
- * 1) An arbitrary number of transport connections upon which rpc requests
- * are received. The two most notable transports are TCP and UDP; they are
- * created and registered by routines in svc_tcp.c and svc_udp.c, respectively;
- * they in turn call xprt_register and xprt_unregister.
- *
- * 2) An arbitrary number of locally registered services. Services are
- * described by the following four data: program number, version number,
- * "service dispatch" function, a transport handle, and a boolean that
- * indicates whether or not the exported program should be registered with a
- * local binder service; if true the program's number and version and the
- * port number from the transport handle are registered with the binder.
- * These data are registered with the rpc svc system via svc_register.
- *
- * A service's dispatch function is called whenever an rpc request comes in
- * on a transport. The request's program and version numbers must match
- * those of the registered service. The dispatch function is passed two
- * parameters, struct svc_req * and SVCXPRT *, defined below.
- */
-
-enum xprt_stat {
- XPRT_DIED,
- XPRT_MOREREQS,
- XPRT_IDLE
-};
-
-/*
- * Server side transport handle
- */
-typedef struct {
- int xp_sock;
- unsigned short xp_port; /* associated port number */
- struct xp_ops {
-#ifdef __cplusplus
- bool_t (*xp_recv)(...); /* receive incomming requests */
- enum xprt_stat (*xp_stat)(...); /* get transport status */
- bool_t (*xp_getargs)(...); /* get arguments */
- bool_t (*xp_reply)(...); /* send reply */
- bool_t (*xp_freeargs)(...);/* free mem allocated for args */
- void (*xp_destroy)(...); /* destroy this struct */
-#else
- /* DO NOT REMOVE THE COMMENTED OUT ...: fixincludes needs to see them */
- bool_t (*xp_recv)(/*...*/); /* receive incomming requests */
- enum xprt_stat (*xp_stat)(/*...*/); /* get transport status */
- bool_t (*xp_getargs)(/*...*/); /* get arguments */
- bool_t (*xp_reply)(/*...*/); /* send reply */
- bool_t (*xp_freeargs)(/*...*/);/* free mem allocated for args */
- void (*xp_destroy)(/*...*/); /* destroy this struct */
-#endif
- } *xp_ops;
- int xp_addrlen; /* length of remote address */
- struct sockaddr_in xp_raddr; /* remote address */
- struct opaque_auth xp_verf; /* raw response verifier */
- caddr_t xp_p1; /* private */
- caddr_t xp_p2; /* private */
-} SVCXPRT;
-
-/*
- * Approved way of getting address of caller
- */
-#define svc_getcaller(x) (&(x)->xp_raddr)
-
-/*
- * Operations defined on an SVCXPRT handle
- *
- * SVCXPRT *xprt;
- * struct rpc_msg *msg;
- * xdrproc_t xargs;
- * caddr_t argsp;
- */
-#define SVC_RECV(xprt, msg) \
- (*(xprt)->xp_ops->xp_recv)((xprt), (msg))
-#define svc_recv(xprt, msg) \
- (*(xprt)->xp_ops->xp_recv)((xprt), (msg))
-
-#define SVC_STAT(xprt) \
- (*(xprt)->xp_ops->xp_stat)(xprt)
-#define svc_stat(xprt) \
- (*(xprt)->xp_ops->xp_stat)(xprt)
-
-#define SVC_GETARGS(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
-#define svc_getargs(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
-
-#define SVC_REPLY(xprt, msg) \
- (*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
-#define svc_reply(xprt, msg) \
- (*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
-
-#define SVC_FREEARGS(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
-#define svc_freeargs(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
-
-#define SVC_DESTROY(xprt) \
- (*(xprt)->xp_ops->xp_destroy)(xprt)
-#define svc_destroy(xprt) \
- (*(xprt)->xp_ops->xp_destroy)(xprt)
-
-
-/*
- * Service request
- */
-struct svc_req {
-#ifdef __LP64__
- unsigned int rq_prog; /* service program number */
- unsigned int rq_vers; /* service protocol version */
- unsigned int rq_proc; /* the desired procedure */
-#else
- unsigned long rq_prog; /* service program number */
- unsigned long rq_vers; /* service protocol version */
- unsigned long rq_proc; /* the desired procedure */
-#endif
- struct opaque_auth rq_cred; /* raw creds from the wire */
- caddr_t rq_clntcred; /* read only cooked cred */
- SVCXPRT *rq_xprt; /* associated transport */
-};
-
-
-/*
- * Service registration
- *
- * svc_register(xprt, prog, vers, dispatch, protocol)
- * SVCXPRT *xprt;
- * u_long prog;
- * u_long vers;
- * void (*dispatch)(...); // fixincludes needs the ..., even in a comment
- * int protocol; like TCP or UDP, zero means do not register
- */
-__BEGIN_DECLS
-#ifdef __LP64__
-extern bool_t svc_register __P((SVCXPRT *, unsigned int, unsigned int, void (*)(), int));
-#else
-extern bool_t svc_register __P((SVCXPRT *, unsigned long, unsigned long, void (*)(), int));
-#endif
-__END_DECLS
-
-/*
- * Service un-registration
- *
- * svc_unregister(prog, vers)
- * u_long prog;
- * u_long vers;
- */
-__BEGIN_DECLS
-#ifdef __LP64__
-extern void svc_unregister __P((unsigned int, unsigned int));
-#else
-extern void svc_unregister __P((unsigned long, unsigned long));
-#endif
-__END_DECLS
-
-/*
- * Transport registration.
- *
- * xprt_register(xprt)
- * SVCXPRT *xprt;
- */
-__BEGIN_DECLS
-extern void xprt_register __P((SVCXPRT *));
-__END_DECLS
-
-/*
- * Transport un-register
- *
- * xprt_unregister(xprt)
- * SVCXPRT *xprt;
- */
-__BEGIN_DECLS
-extern void xprt_unregister __P((SVCXPRT *));
-__END_DECLS
-
-
-
-
-/*
- * When the service routine is called, it must first check to see if it
- * knows about the procedure; if not, it should call svcerr_noproc
- * and return. If so, it should deserialize its arguments via
- * SVC_GETARGS (defined above). If the deserialization does not work,
- * svcerr_decode should be called followed by a return. Successful
- * decoding of the arguments should be followed the execution of the
- * procedure's code and a call to svc_sendreply.
- *
- * Also, if the service refuses to execute the procedure due to too-
- * weak authentication parameters, svcerr_weakauth should be called.
- * Note: do not confuse access-control failure with weak authentication!
- *
- * NB: In pure implementations of rpc, the caller always waits for a reply
- * msg. This message is sent when svc_sendreply is called.
- * Therefore pure service implementations should always call
- * svc_sendreply even if the function logically returns void; use
- * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows
- * for the abuse of pure rpc via batched calling or pipelining. In the
- * case of a batched call, svc_sendreply should NOT be called since
- * this would send a return message, which is what batching tries to avoid.
- * It is the service/protocol writer's responsibility to know which calls are
- * batched and which are not. Warning: responding to batch calls may
- * deadlock the caller and server processes!
- */
-
-__BEGIN_DECLS
-extern bool_t svc_sendreply __P((SVCXPRT *, xdrproc_t, char *));
-extern void svcerr_decode __P((SVCXPRT *));
-extern void svcerr_weakauth __P((SVCXPRT *));
-extern void svcerr_noproc __P((SVCXPRT *));
-#ifdef __LP64__
-extern void svcerr_progvers __P((SVCXPRT *, unsigned int, unsigned int));
-#else
-extern void svcerr_progvers __P((SVCXPRT *, unsigned long, unsigned long));
-#endif
-extern void svcerr_auth __P((SVCXPRT *, enum auth_stat));
-extern void svcerr_noprog __P((SVCXPRT *));
-extern void svcerr_systemerr __P((SVCXPRT *));
-__END_DECLS
-
-/*
- * Lowest level dispatching -OR- who owns this process anyway.
- * Somebody has to wait for incoming requests and then call the correct
- * service routine. The routine svc_run does infinite waiting; i.e.,
- * svc_run never returns.
- * Since another (co-existant) package may wish to selectively wait for
- * incoming calls or other events outside of the rpc architecture, the
- * routine svc_getreq is provided. It must be passed readfds, the
- * "in-place" results of a select system call (see select, section 2).
- */
-
-/*
- * Global keeper of rpc service descriptors in use
- * dynamic; must be inspected before each call to select
- */
-#ifdef FD_SETSIZE
-extern fd_set svc_fdset;
-#define svc_fds svc_fdset.fds_bits[0] /* compatibility */
-#else
-extern int svc_fds;
-#endif /* def FD_SETSIZE */
-
-/*
- * a small program implemented by the svc_rpc implementation itself;
- * also see clnt.h for protocol numbers.
- */
-extern void rpctest_service();
-
-__BEGIN_DECLS
-extern void svc_getreq __P((int));
-extern void svc_getreqset __P((fd_set *));
-extern void svc_run __P((void));
-__END_DECLS
-
-/*
- * Socket to use on svcxxx_create call to get default socket
- */
-#define RPC_ANYSOCK -1
-
-/*
- * These are the existing service side transport implementations
- */
-
-/*
- * Memory based rpc for testing and timing.
- */
-__BEGIN_DECLS
-extern SVCXPRT *svcraw_create __P((void));
-__END_DECLS
-
-
-/*
- * Udp based rpc.
- */
-__BEGIN_DECLS
-extern SVCXPRT *svcudp_create __P((int));
-extern SVCXPRT *svcudp_bufcreate __P((int, unsigned int, unsigned int));
-__END_DECLS
-
-
-/*
- * Tcp based rpc.
- */
-__BEGIN_DECLS
-extern SVCXPRT *svctcp_create __P((int, unsigned int, unsigned int));
-__END_DECLS
-
-/*
- * Any open file descriptor based rpc.
- */
-__BEGIN_DECLS
-extern SVCXPRT *svcfd_create __P((int, u_int, u_int));
-__END_DECLS
-
-#endif /* !_RPC_SVC_H */
diff --git a/tools/android/depends/libnfs/rpcinc/svc_auth.h b/tools/android/depends/libnfs/rpcinc/svc_auth.h
deleted file mode 100644
index 3dc09591f2..0000000000
--- a/tools/android/depends/libnfs/rpcinc/svc_auth.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)svc_auth.h 1.6 86/07/16 SMI
- * from: @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: svc_auth.h,v 1.2 1999/10/14 21:56:54 wsanchez Exp $
- */
-
-/*
- * svc_auth.h, Service side of rpc authentication.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_SVCAUTH_H
-#define _RPC_SVCAUTH_H
-
-/*
- * Server side authenticator
- */
-__BEGIN_DECLS
-extern enum auth_stat _authenticate __P((struct svc_req *, struct rpc_msg *));
-__END_DECLS
-
-#endif /* !_RPC_SVCAUTH_H */
diff --git a/tools/android/depends/libnfs/rpcinc/types.h b/tools/android/depends/libnfs/rpcinc/types.h
deleted file mode 100644
index 0fe5adc1c0..0000000000
--- a/tools/android/depends/libnfs/rpcinc/types.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)types.h 1.18 87/07/24 SMI
- * from: @(#)types.h 2.3 88/08/15 4.0 RPCSRC
- * $Id: types.h,v 1.4 2003/10/16 22:15:15 majka Exp $
- */
-
-/*
- * Rpc additions to <sys/types.h>
- */
-#ifndef _RPC_TYPES_H
-#define _RPC_TYPES_H
-
-#define bool_t int
-#define enum_t int
-#define __dontcare__ -1
-
-#ifndef FALSE
-# define FALSE (0)
-#endif
-#ifndef TRUE
-# define TRUE (1)
-#endif
-
-#ifndef NULL
-#ifdef __GNUG__
-#define NULL __null
-#else /* ! __GNUG__ */
-#ifndef __cplusplus
-#define NULL ((void *)0)
-#else /* __cplusplus */
-#define NULL 0
-#endif /* ! __cplusplus */
-#endif /* __GNUG__ */
-#endif /* ! NULL */
-
-#define mem_alloc(bsize) calloc(1, bsize)
-#define mem_free(ptr, bsize) free(ptr)
-
-#ifndef makedev /* ie, we haven't already included it */
-#include <sys/types.h>
-#endif
-#include <sys/time.h>
-
-#ifdef __LP64__
-typedef int rpc_int;
-typedef unsigned int rpc_uint;
-#else
-typedef long rpc_int;
-typedef unsigned long rpc_uint;
-#endif
-
-#endif /* !_RPC_TYPES_H */
diff --git a/tools/android/depends/libnfs/rpcinc/xdr.h b/tools/android/depends/libnfs/rpcinc/xdr.h
deleted file mode 100644
index 60bc672407..0000000000
--- a/tools/android/depends/libnfs/rpcinc/xdr.h
+++ /dev/null
@@ -1,431 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
- * Reserved. This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.1 (the "License"). You may not use this file
- * except in compliance with the License. Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)xdr.h 1.19 87/04/22 SMI
- * from: @(#)xdr.h 2.2 88/07/29 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/xdr.h,v 1.23 2003/03/07 13:19:40 nectar Exp $
- */
-
-/*
- * xdr.h, External Data Representation Serialization Routines.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_XDR_H
-#define _RPC_XDR_H
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/select.h>
-#include <linux/coda.h>
-/*
- * XDR provides a conventional way for converting between C data
- * types and an external bit-string representation. Library supplied
- * routines provide for the conversion on built-in C data types. These
- * routines and utility routines defined here are used to help implement
- * a type encode/decode routine for each user-defined type.
- *
- * Each data type provides a single procedure which takes two arguments:
- *
- * bool_t
- * xdrproc(xdrs, argresp)
- * XDR *xdrs;
- * <type> *argresp;
- *
- * xdrs is an instance of a XDR handle, to which or from which the data
- * type is to be converted. argresp is a pointer to the structure to be
- * converted. The XDR handle contains an operation field which indicates
- * which of the operations (ENCODE, DECODE * or FREE) is to be performed.
- *
- * XDR_DECODE may allocate space if the pointer argresp is null. This
- * data can be freed with the XDR_FREE operation.
- *
- * We write only one procedure per data type to make it easy
- * to keep the encode and decode procedures for a data type consistent.
- * In many cases the same code performs all operations on a user defined type,
- * because all the hard work is done in the component type routines.
- * decode as a series of calls on the nested data types.
- */
-
-/*
- * Xdr operations. XDR_ENCODE causes the type to be encoded into the
- * stream. XDR_DECODE causes the type to be extracted from the stream.
- * XDR_FREE can be used to release the space allocated by an XDR_DECODE
- * request.
- */
-enum xdr_op {
- XDR_ENCODE=0,
- XDR_DECODE=1,
- XDR_FREE=2
-};
-/*
- * This is the number of bytes per unit of external data.
- */
-#define BYTES_PER_XDR_UNIT (4)
-#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \
- * BYTES_PER_XDR_UNIT)
-
-/*
- * The XDR handle.
- * Contains operation which is being applied to the stream,
- * an operations vector for the particular implementation (e.g. see xdr_mem.c),
- * and two private fields for the use of the particular implementation.
- */
-typedef struct __rpc_xdr {
- enum xdr_op x_op; /* operation; fast additional param */
- const struct xdr_ops {
-#ifdef __LP64__
- /* get an int from underlying stream */
- bool_t (*x_getlong)(struct __rpc_xdr *, int *);
- /* put an int to " */
- bool_t (*x_putlong)(struct __rpc_xdr *, const int *);
-#else
- /* get a long from underlying stream */
- bool_t (*x_getlong)(struct __rpc_xdr *, long *);
- /* put a long to " */
- bool_t (*x_putlong)(struct __rpc_xdr *, const long *);
-#endif
- /* get some bytes from " */
- bool_t (*x_getbytes)(struct __rpc_xdr *, char *, unsigned int);
- /* put some bytes to " */
- bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, unsigned int);
- /* returns bytes off from beginning */
- unsigned int (*x_getpostn)(struct __rpc_xdr *);
- /* lets you reposition the stream */
- bool_t (*x_setpostn)(struct __rpc_xdr *, unsigned int);
- /* buf quick ptr to buffered data */
- int32_t *(*x_inline)(struct __rpc_xdr *, unsigned int);
- /* free privates of this xdr_stream */
- void (*x_destroy)(struct __rpc_xdr *);
- bool_t (*x_control)(struct __rpc_xdr *, int, void *);
- } *x_ops;
- char * x_public; /* users' data */
- void * x_private; /* pointer to private data */
- char * x_base; /* private used for position info */
- unsigned int x_handy; /* extra private word */
-} XDR;
-
-/*
- * A xdrproc_t exists for each data type which is to be encoded or decoded.
- *
- * The second argument to the xdrproc_t is a pointer to an opaque pointer.
- * The opaque pointer generally points to a structure of the data type
- * to be decoded. If this pointer is 0, then the type routines should
- * allocate dynamic storage of the appropriate size and return it.
- */
-#ifdef _KERNEL
-typedef bool_t (*xdrproc_t)(XDR *, void *, unsigned int);
-#else
-/*
- * XXX can't actually prototype it, because some take three args!!!
- */
-typedef bool_t (*xdrproc_t)(XDR *, ...);
-#endif
-
-/*
- * Operations defined on a XDR handle
- *
- * XDR *xdrs;
- * long *longp;
- * char * addr;
- * unsigned int len;
- * unsigned int pos;
- */
-#define XDR_GETLONG(xdrs, longp) \
- (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
-#define xdr_getlong(xdrs, longp) \
- (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
-
-#define XDR_PUTLONG(xdrs, longp) \
- (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
-#define xdr_putlong(xdrs, longp) \
- (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
-
-
-#ifdef __LP64__
-static __inline int
-xdr_getint32(XDR *xdrs, int32_t *ip)
-{
- int32_t l;
-
- if (!xdr_getlong(xdrs, &l))
- return (FALSE);
- *ip = l;
- return (TRUE);
-}
-
-static __inline int
-xdr_putint32(XDR *xdrs, int32_t *ip)
-{
- int32_t l;
-
- l = *ip;
- return xdr_putlong(xdrs, &l);
-}
-#else
-static __inline int
-xdr_getint32(XDR *xdrs, int32_t *ip)
-{
- int32_t l;
-
- if (!xdr_getlong(xdrs, (long *)&l))
- return (FALSE);
- *ip = l;
- return (TRUE);
-}
-
-static __inline int
-xdr_putint32(XDR *xdrs, int32_t *ip)
-{
- int32_t l;
-
- l = *ip;
- return xdr_putlong(xdrs, (long *)&l);
-}
-#endif
-
-#define XDR_GETINT32(xdrs, int32p) xdr_getint32(xdrs, int32p)
-#define XDR_PUTINT32(xdrs, int32p) xdr_putint32(xdrs, int32p)
-
-#define XDR_GETBYTES(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
-#define xdr_getbytes(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
-
-#define XDR_PUTBYTES(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
-#define xdr_putbytes(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
-
-#define XDR_GETPOS(xdrs) \
- (*(xdrs)->x_ops->x_getpostn)(xdrs)
-#define xdr_getpos(xdrs) \
- (*(xdrs)->x_ops->x_getpostn)(xdrs)
-
-#define XDR_SETPOS(xdrs, pos) \
- (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
-#define xdr_setpos(xdrs, pos) \
- (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
-
-#define XDR_INLINE(xdrs, len) \
- (*(xdrs)->x_ops->x_inline)(xdrs, len)
-#define xdr_inline(xdrs, len) \
- (*(xdrs)->x_ops->x_inline)(xdrs, len)
-
-#define XDR_DESTROY(xdrs) \
- if ((xdrs)->x_ops->x_destroy) \
- (*(xdrs)->x_ops->x_destroy)(xdrs)
-#define xdr_destroy(xdrs) \
- if ((xdrs)->x_ops->x_destroy) \
- (*(xdrs)->x_ops->x_destroy)(xdrs)
-
-#define XDR_CONTROL(xdrs, req, op) \
- if ((xdrs)->x_ops->x_control) \
- (*(xdrs)->x_ops->x_control)(xdrs, req, op)
-#define xdr_control(xdrs, req, op) XDR_CONTROL(xdrs, req, op)
-
-/*
- * Solaris strips the '_t' from these types -- not sure why.
- * But, let's be compatible.
- */
-#define xdr_rpcvers(xdrs, versp) xdr_u_int32(xdrs, versp)
-#define xdr_rpcprog(xdrs, progp) xdr_u_int32(xdrs, progp)
-#define xdr_rpcproc(xdrs, procp) xdr_u_int32(xdrs, procp)
-#define xdr_rpcprot(xdrs, protp) xdr_u_int32(xdrs, protp)
-#define xdr_rpcport(xdrs, portp) xdr_u_int32(xdrs, portp)
-
-/*
- * Support struct for discriminated unions.
- * You create an array of xdrdiscrim structures, terminated with
- * an entry with a null procedure pointer. The xdr_union routine gets
- * the discriminant value and then searches the array of structures
- * for a matching value. If a match is found the associated xdr routine
- * is called to handle that part of the union. If there is
- * no match, then a default routine may be called.
- * If there is no match and no default routine it is an error.
- */
-#define NULL_xdrproc_t ((xdrproc_t)0)
-struct xdr_discrim {
- int value;
- xdrproc_t proc;
-};
-
-/*
- * In-line routines for fast encode/decode of primitive data types.
- * Caveat emptor: these use single memory cycles to get the
- * data from the underlying buffer, and will fail to operate
- * properly if the data is not aligned. The standard way to use these
- * is to say:
- * if ((buf = XDR_INLINE(xdrs, count)) == NULL)
- * return (FALSE);
- * <<< macro calls >>>
- * where ``count'' is the number of bytes of data occupied
- * by the primitive data types.
- *
- * N.B. and frozen for all time: each data type here uses 4 bytes
- * of external representation.
- */
-#define IXDR_GET_INT32(buf) ((int32_t)ntohl((u_int32_t)*(buf)++))
-#define IXDR_PUT_INT32(buf, v) (*(buf)++ =(int32_t)htonl((u_int32_t)v))
-#define IXDR_GET_U_INT32(buf) ((u_int32_t)IXDR_GET_INT32(buf))
-#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32((buf), ((int32_t)(v)))
-
-#ifdef __LP64__
-#define IXDR_GET_LONG(buf) (ntohl((u_int32_t)*(buf)++))
-#define IXDR_PUT_LONG(buf, v) (*(buf)++ = htonl((u_int32_t)v))
-#else
-#define IXDR_GET_LONG(buf) ((long)ntohl((u_int32_t)*(buf)++))
-#define IXDR_PUT_LONG(buf, v) (*(buf)++ =(int32_t)htonl((u_int32_t)v))
-#endif
-
-#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf))
-#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf))
-#ifdef __LP64__
-#define IXDR_GET_U_LONG(buf) ((unsigned int)IXDR_GET_LONG(buf))
-#else
-#define IXDR_GET_U_LONG(buf) ((unsigned long)IXDR_GET_LONG(buf))
-#endif
-#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf))
-#define IXDR_GET_U_SHORT(buf) ((unsigned short)IXDR_GET_LONG(buf))
-
-#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), (v))
-#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), (v))
-#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), (v))
-#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), (v))
-#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), (v))
-
-/*
- * These are the "generic" xdr routines.
- */
-__BEGIN_DECLS
-extern bool_t xdr_void(void);
-extern bool_t xdr_int(XDR *, int *);
-extern bool_t xdr_u_int(XDR *, unsigned int *);
-#ifdef __LP64__
-extern bool_t xdr_long(XDR *, int *);
-extern bool_t xdr_u_long(XDR *, unsigned int *);
-#else
-extern bool_t xdr_long(XDR *, long *);
-extern bool_t xdr_u_long(XDR *, unsigned long *);
-#endif
-extern bool_t xdr_short(XDR *, short *);
-extern bool_t xdr_u_short(XDR *, unsigned short *);
-extern bool_t xdr_int16_t(XDR *, int16_t *);
-extern bool_t xdr_u_int16_t(XDR *, u_int16_t *);
-extern bool_t xdr_int32_t(XDR *, int32_t *);
-extern bool_t xdr_u_int32_t(XDR *, u_int32_t *);
-extern bool_t xdr_int64_t(XDR *, int64_t *);
-extern bool_t xdr_u_int64_t(XDR *, u_int64_t *);
-extern bool_t xdr_bool(XDR *, bool_t *);
-extern bool_t xdr_enum(XDR *, enum_t *);
-extern bool_t xdr_array(XDR *, char **, unsigned int *, unsigned int, unsigned int, xdrproc_t);
-extern bool_t xdr_bytes(XDR *, char **, unsigned int *, unsigned int);
-extern bool_t xdr_opaque(XDR *, char *, unsigned int);
-extern bool_t xdr_string(XDR *, char **, unsigned int);
-extern bool_t xdr_union(XDR *, enum_t *, char *, const struct xdr_discrim *, xdrproc_t);
-extern bool_t xdr_char(XDR *, char *);
-extern bool_t xdr_u_char(XDR *, unsigned char *);
-extern bool_t xdr_vector(XDR *, char *, unsigned int, unsigned int, xdrproc_t);
-extern bool_t xdr_float(XDR *, float *);
-extern bool_t xdr_double(XDR *, double *);
-extern bool_t xdr_quadruple(XDR *, long double *);
-extern bool_t xdr_reference(XDR *, char **, unsigned int, xdrproc_t);
-extern bool_t xdr_pointer(XDR *, char **, unsigned int, xdrproc_t);
-extern bool_t xdr_wrapstring(XDR *, char **);
-extern void xdr_free(xdrproc_t, void *);
-extern bool_t xdr_hyper(XDR *, u_quad_t *);
-extern bool_t xdr_u_hyper(XDR *, u_quad_t *);
-extern bool_t xdr_longlong_t(XDR *, u_quad_t *);
-extern bool_t xdr_u_longlong_t(XDR *, u_quad_t *);
-__END_DECLS
-
-/*
- * Common opaque bytes objects used by many rpc protocols;
- * declared here due to commonality.
- */
-#define MAX_NETOBJ_SZ 1024
-struct netobj {
- unsigned int n_len;
- char *n_bytes;
-};
-typedef struct netobj netobj;
-extern bool_t xdr_netobj(XDR *, struct netobj *);
-
-/*
- * These are the public routines for the various implementations of
- * xdr streams.
- */
-__BEGIN_DECLS
-/* XDR using memory buffers */
-extern void xdrmem_create(XDR *, char *, unsigned int, enum xdr_op);
-
-/* XDR using stdio library */
-#ifdef _STDIO_H_
-extern void xdrstdio_create(XDR *, FILE *, enum xdr_op);
-#endif
-
-/* XDR pseudo records for tcp */
-extern void xdrrec_create(XDR *, unsigned int, unsigned int, void *,
- int (*)(void *, void *, int),
- int (*)(void *, void *, int));
-
-/* make end of xdr record */
-extern bool_t xdrrec_endofrecord(XDR *, int);
-
-/* move to beginning of next record */
-extern bool_t xdrrec_skiprecord(XDR *);
-
-/* true if no more input */
-extern bool_t xdrrec_eof(XDR *);
-extern unsigned int xdrrec_readbytes(XDR *, caddr_t, unsigned int);
-__END_DECLS
-
-#endif /* !_RPC_XDR_H */
diff --git a/tools/android/packaging/Makefile b/tools/android/packaging/Makefile
index f9227f5661..fbfeb35c31 100644
--- a/tools/android/packaging/Makefile
+++ b/tools/android/packaging/Makefile
@@ -5,7 +5,7 @@ OBJS = libcurl.so \
libafpclient.so \
libshairport.so libplist.so \
libxbogg.so libxbvorbis.so libxbvorbisfile.so libxbFLAC.so libxbmpeg2.so \
- libxbmpeg2convert.so
+ libxbmpeg2convert.so libnfs.so
PLATFORM_OBJS =
EXCLUDED_ADDONS = screensaver.rsxs.euphoria visualization.dxspectrum visualization.milkdrop visualization.projectm
diff --git a/tools/darwin/depends/libcec/Makefile b/tools/darwin/depends/libcec/Makefile
index 41d9b7ee72..3e84bffb0a 100644
--- a/tools/darwin/depends/libcec/Makefile
+++ b/tools/darwin/depends/libcec/Makefile
@@ -3,14 +3,14 @@ include ../config.site.mk
# lib name, version
LIBNAME=libcec
-VERSION=2.0.5-2
+VERSION=2.0.5-3
SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.gz
# configuration settings
CONFIGURE=./configure --prefix=$(PREFIX)
-LIBDYLIB=$(SOURCE)/src/lib/.libs/$(LIBNAME).1.dylib
+LIBDYLIB=$(SOURCE)/src/lib/.libs/$(LIBNAME).2.dylib
all: $(LIBDYLIB) .installed
@@ -34,6 +34,6 @@ $(LIBDYLIB): $(SOURCE)
clean:
rm -rf $(SOURCE) .installed
-distclean::
+distclean:
rm -rf $(SOURCE) .installed
diff --git a/xbmc/cores/omxplayer/OMXAudio.cpp b/xbmc/cores/omxplayer/OMXAudio.cpp
index d6b8e0ea90..5e6c0dfef5 100644
--- a/xbmc/cores/omxplayer/OMXAudio.cpp
+++ b/xbmc/cores/omxplayer/OMXAudio.cpp
@@ -96,15 +96,14 @@ COMXAudio::COMXAudio() :
m_BitsPerSample (0 ),
m_omx_clock (NULL ),
m_av_clock (NULL ),
- m_external_clock (false ),
m_first_frame (true ),
m_LostSync (true ),
m_SampleRate (0 ),
m_eEncoding (OMX_AUDIO_CodingPCM),
m_extradata (NULL ),
m_extrasize (0 ),
- m_omx_render (NULL ),
- m_last_pts (DVD_NOPTS_VALUE)
+ m_last_pts (DVD_NOPTS_VALUE),
+ m_omx_render (NULL )
{
m_vizBufferSize = m_vizRemapBufferSize = VIS_PACKET_SIZE * sizeof(float);
m_vizRemapBuffer = (uint8_t *)_aligned_malloc(m_vizRemapBufferSize,16);
@@ -113,8 +112,7 @@ COMXAudio::COMXAudio() :
COMXAudio::~COMXAudio()
{
- if(m_Initialized)
- Deinitialize();
+ Deinitialize();
_aligned_free(m_vizRemapBuffer);
_aligned_free(m_vizBuffer);
@@ -156,14 +154,27 @@ CAEChannelInfo COMXAudio::GetChannelLayout(AEAudioFormat format)
bool COMXAudio::Initialize(AEAudioFormat format, std::string& device, OMXClock *clock, CDVDStreamInfo &hints, bool bUsePassthrough, bool bUseHWDecode)
{
+ Deinitialize();
+
+ if(!m_dllAvUtil.Load())
+ return false;
+
m_HWDecode = bUseHWDecode;
m_Passthrough = bUsePassthrough;
m_format = format;
+ if(m_format.m_channelLayout.Count() == 0)
+ return false;
+
if(hints.samplerate == 0)
return false;
+ m_av_clock = clock;
+
+ if(!m_av_clock)
+ return false;
+
/* passthrough overwrites hw decode */
if(m_Passthrough)
{
@@ -176,8 +187,6 @@ bool COMXAudio::Initialize(AEAudioFormat format, std::string& device, OMXClock *
}
SetCodingType(format.m_dataFormat);
- SetClock(clock);
-
if(hints.extrasize > 0 && hints.extradata != NULL)
{
m_extrasize = hints.extrasize;
@@ -185,46 +194,7 @@ bool COMXAudio::Initialize(AEAudioFormat format, std::string& device, OMXClock *
memcpy(m_extradata, hints.extradata, hints.extrasize);
}
- return Initialize(format, device);
-}
-
-bool COMXAudio::Initialize(AEAudioFormat format, std::string& device)
-{
- if(m_Initialized)
- Deinitialize();
-
- m_format = format;
-
- if(m_format.m_channelLayout.Count() == 0)
- return false;
-
- if(!m_dllAvUtil.Load())
- return false;
-
- if(m_av_clock == NULL)
- {
- /* no external clock set. generate one */
- m_external_clock = false;
-
- m_av_clock = new OMXClock();
-
- if(!m_av_clock->OMXInitialize(false, true))
- {
- delete m_av_clock;
- m_av_clock = NULL;
- CLog::Log(LOGERROR, "COMXAudio::Initialize error creating av clock\n");
- return false;
- }
- }
-
- m_omx_clock = m_av_clock->GetOMXClock();
-
- /*
- m_Passthrough = false;
-
- if(OMX_IS_RAW(m_format.m_dataFormat))
- m_Passthrough =true;
- */
+ m_omx_clock = m_av_clock->GetOMXClock();
m_drc = 0;
@@ -342,7 +312,9 @@ bool COMXAudio::Initialize(AEAudioFormat format, std::string& device)
std::string componentName = "";
componentName = "OMX.broadcom.audio_render";
- m_omx_render = new COMXCoreComponent();
+
+ if(!m_omx_render)
+ m_omx_render = new COMXCoreComponent();
if(!m_omx_render)
{
CLog::Log(LOGERROR, "COMXAudio::Initialize error allocate OMX.broadcom.audio_render\n");
@@ -441,16 +413,6 @@ bool COMXAudio::Initialize(AEAudioFormat format, std::string& device)
return false;
}
- if(!m_external_clock)
- {
- omx_err = m_omx_clock->SetStateForComponent(OMX_StateExecuting);
- if (omx_err != OMX_ErrorNone)
- {
- CLog::Log(LOGERROR, "COMXAudio::Initialize m_omx_clock.SetStateForComponent\n");
- return false;
- }
- }
-
omx_err = m_omx_decoder.AllocInputBuffers();
if(omx_err != OMX_ErrorNone)
{
@@ -575,6 +537,10 @@ bool COMXAudio::Initialize(AEAudioFormat format, std::string& device)
}
}
+ /* return on decoder error so m_Initialized stays false */
+ if(m_omx_decoder.BadState())
+ return false;
+
m_Initialized = true;
m_first_frame = true;
m_last_pts = DVD_NOPTS_VALUE;
@@ -585,10 +551,8 @@ bool COMXAudio::Initialize(AEAudioFormat format, std::string& device)
(int)m_pcm_output.nBitPerSample, (int)m_pcm_output.nSamplingRate, (int)m_pcm_output.nChannels, m_BufferLen, m_BytesPerSec);
CLog::Log(LOGDEBUG, "COMXAudio::Initialize Input bps %d samplerate %d channels %d buffer size %d bytes per second %d",
(int)m_pcm_input.nBitPerSample, (int)m_pcm_input.nSamplingRate, (int)m_pcm_input.nChannels, m_BufferLen, m_BytesPerSec);
- CLog::Log(LOGDEBUG, "COMXAudio::Initialize device %s passthrough %d hwdecode %d external clock %d",
- device.c_str(), m_Passthrough, m_HWDecode, m_external_clock);
-
- m_av_clock->OMXStateExecute(false);
+ CLog::Log(LOGDEBUG, "COMXAudio::Initialize device %s passthrough %d hwdecode %d",
+ device.c_str(), m_Passthrough, m_HWDecode);
return true;
}
@@ -596,17 +560,8 @@ bool COMXAudio::Initialize(AEAudioFormat format, std::string& device)
//***********************************************************************************************
bool COMXAudio::Deinitialize()
{
- if(!m_Initialized)
- return true;
-
CSingleLock lock (m_critSection);
- if(m_av_clock && !m_external_clock)
- {
- m_av_clock->Lock();
- m_av_clock->OMXStop(false);
- }
-
m_omx_tunnel_decoder.Flush();
if(!m_Passthrough)
m_omx_tunnel_mixer.Flush();
@@ -614,12 +569,21 @@ bool COMXAudio::Deinitialize()
m_omx_tunnel_clock.Deestablish();
if(!m_Passthrough)
- m_omx_tunnel_mixer.Deestablish();
+ {
+ // workaround for the strange BCM mixer component
+ if(m_omx_mixer.GetState() == OMX_StateExecuting)
+ m_omx_mixer.SetStateForComponent(OMX_StatePause);
+ if(m_omx_mixer.GetState() != OMX_StateIdle)
+ m_omx_mixer.SetStateForComponent(OMX_StateIdle);
+ m_omx_mixer.DisableAllPorts();
+ m_omx_tunnel_mixer.Deestablish(true);
+ }
m_omx_tunnel_decoder.Deestablish();
m_omx_decoder.FlushInput();
- m_omx_render->Deinitialize();
+ if(m_omx_render)
+ m_omx_render->Deinitialize();
if(!m_Passthrough)
m_omx_mixer.Deinitialize();
m_omx_decoder.Deinitialize();
@@ -627,14 +591,6 @@ bool COMXAudio::Deinitialize()
m_BytesPerSec = 0;
m_BufferLen = 0;
- if(m_av_clock && !m_external_clock)
- {
- m_av_clock->OMXReset(false);
- m_av_clock->UnLock();
- delete m_av_clock;
- m_external_clock = false;
- }
-
m_omx_clock = NULL;
m_av_clock = NULL;
@@ -852,7 +808,7 @@ unsigned int COMXAudio::AddPackets(const void* data, unsigned int len, double dt
m_last_pts = pts;
- CLog::Log(LOGDEBUG, "ADec : setStartTime %f\n", (float)val / DVD_TIME_BASE);
+ CLog::Log(LOGDEBUG, "COMXAudio::Decode ADec : setStartTime %f\n", (float)val / DVD_TIME_BASE);
m_av_clock->AudioStart(false);
}
else
@@ -1209,6 +1165,8 @@ void COMXAudio::WaitCompletion()
nTimeOut -= 50;
}
+ m_omx_render->ResetEos();
+
return;
}
@@ -1217,16 +1175,6 @@ void COMXAudio::SwitchChannels(int iAudioStream, bool bAudioOnAllSpeakers)
return ;
}
-bool COMXAudio::SetClock(OMXClock *clock)
-{
- if(m_av_clock != NULL)
- return false;
-
- m_av_clock = clock;
- m_external_clock = true;
- return true;
-}
-
void COMXAudio::SetCodingType(AEDataFormat dataFormat)
{
switch(dataFormat)
diff --git a/xbmc/cores/omxplayer/OMXAudio.h b/xbmc/cores/omxplayer/OMXAudio.h
index 66c6f92414..d812e0a8b8 100644
--- a/xbmc/cores/omxplayer/OMXAudio.h
+++ b/xbmc/cores/omxplayer/OMXAudio.h
@@ -61,7 +61,6 @@ public:
float GetCacheTotal();
COMXAudio();
bool Initialize(AEAudioFormat format, std::string& device, OMXClock *clock, CDVDStreamInfo &hints, bool bUsePassthrough, bool bUseHWDecode);
- bool Initialize(AEAudioFormat format, std::string& device);
~COMXAudio();
unsigned int AddPackets(const void* data, unsigned int len);
@@ -84,7 +83,6 @@ public:
void Process();
- bool SetClock(OMXClock *clock);
void SetCodingType(AEDataFormat dataFormat);
static bool CanHWDecode(CodecID codec);
@@ -95,6 +93,8 @@ public:
unsigned int SyncDTS(BYTE* pData, unsigned int iSize);
unsigned int SyncAC3(BYTE* pData, unsigned int iSize);
+ bool BadState() { return !m_Initialized; };
+
private:
IAudioCallback* m_pCallback;
bool m_Initialized;
@@ -111,7 +111,6 @@ private:
unsigned int m_BitsPerSample;
COMXCoreComponent *m_omx_clock;
OMXClock *m_av_clock;
- bool m_external_clock;
bool m_first_frame;
bool m_LostSync;
int m_SampleRate;
diff --git a/xbmc/cores/omxplayer/OMXImage.cpp b/xbmc/cores/omxplayer/OMXImage.cpp
index 76082cdbff..04076d78e4 100644
--- a/xbmc/cores/omxplayer/OMXImage.cpp
+++ b/xbmc/cores/omxplayer/OMXImage.cpp
@@ -830,6 +830,9 @@ bool COMXImage::Decode(unsigned width, unsigned height)
m_omx_tunnel_decode.Deestablish();
+ if(m_omx_decoder.BadState())
+ return false;
+
return true;
}
@@ -1007,6 +1010,9 @@ bool COMXImage::Encode(unsigned char *buffer, int size, unsigned width, unsigned
return false;
}
+ if(m_omx_encoder.BadState())
+ return false;
+
return true;
}
diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp
index 887f4ae406..c1deafe0a6 100644
--- a/xbmc/cores/omxplayer/OMXPlayer.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayer.cpp
@@ -571,19 +571,6 @@ retry:
if (!m_pInputStream->Open(m_filename.c_str(), m_mimetype))
{
- if(m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD))
- {
- CLog::Log(LOGERROR, "COMXPlayer::OpenInputStream - failed to open [%s] as DVD ISO, trying Bluray", m_filename.c_str());
- m_mimetype = "bluray/iso";
- filename = m_filename;
- filename = filename + "/BDMV/index.bdmv";
- int title = (int)m_item.GetProperty("BlurayStartingTitle").asInteger();
- if( title )
- filename.AppendFormat("?title=%d",title);
-
- m_filename = filename;
- goto retry;
- }
CLog::Log(LOGERROR, "COMXPlayer::OpenInputStream - error opening [%s]", m_filename.c_str());
return false;
}
@@ -597,6 +584,7 @@ retry:
// find any available external subtitles for non dvd files
if (!m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)
+ && !m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER)
&& !m_pInputStream->IsStreamType(DVDSTREAM_TYPE_TV)
&& !m_pInputStream->IsStreamType(DVDSTREAM_TYPE_HTSP))
{
@@ -633,7 +621,7 @@ retry:
SetAVDelay(g_settings.m_currentVideoSettings.m_AudioDelay);
SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
m_av_clock.Reset();
- m_av_clock.OMXReset();
+ //m_av_clock.OMXReset();
m_dvd.Clear();
m_iChannelEntryTimeOut = 0;
@@ -756,8 +744,8 @@ void COMXPlayer::OpenDefaultStreams(bool reset)
CloseTeletextStream(true);
*/
- m_av_clock.OMXStop();
- m_av_clock.OMXReset();
+ //m_av_clock.OMXStop();
+ //m_av_clock.OMXReset();
}
bool COMXPlayer::ReadPacket(DemuxPacket*& packet, CDemuxStream*& stream)
@@ -942,6 +930,9 @@ bool COMXPlayer::WaitForPausedThumbJobs(int timeout_ms)
void COMXPlayer::Process()
{
+ bool bOmxWaitVideo = false;
+ bool bOmxWaitAudio = false;
+
//bool bAEStopped = false;
if(!m_av_clock.OMXInitialize(false, false))
@@ -952,8 +943,8 @@ void COMXPlayer::Process()
if(g_guiSettings.GetBool("videoplayer.adjustrefreshrate"))
m_av_clock.HDMIClockSync();
- m_av_clock.OMXStateExecute();
- m_av_clock.OMXStart();
+ //m_av_clock.OMXStateExecute();
+ //m_av_clock.OMXStart();
//CLog::Log(LOGDEBUG, "COMXPlayer: Thread started");
@@ -1144,6 +1135,13 @@ void COMXPlayer::Process()
// update application with our state
UpdateApplication(1000);
+ // OMX emergency exit
+ if(HasAudio() && m_player_audio.BadState())
+ {
+ m_bAbortRequest = true;
+ break;
+ }
+
if (CheckDelayedChannelEntry())
continue;
@@ -1155,9 +1153,9 @@ void COMXPlayer::Process()
continue;
}
- // always yield to players if they have data
- if((m_player_audio.HasData() || m_CurrentAudio.id < 0)
- && (m_player_video.HasData() || m_CurrentVideo.id < 0))
+ // always yield to players if they have data levels > 50 percent
+ if((m_player_audio.GetLevel() > 50 || m_CurrentAudio.id < 0)
+ && (m_player_video.GetLevel() > 50 || m_CurrentVideo.id < 0))
Sleep(0);
DemuxPacket* pPacket = NULL;
@@ -1215,12 +1213,27 @@ void COMXPlayer::Process()
Sleep(100);
continue;
}
+ else if (m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER))
+ {
+ CDVDInputStreamPVRManager* pStream = static_cast<CDVDInputStreamPVRManager*>(m_pInputStream);
+ if (pStream->IsEOF())
+ break;
+ Sleep(100);
+ continue;
+ }
+
// make sure we tell all players to finish it's data
if(m_CurrentAudio.inited)
+ {
m_player_audio.SendMessage (new CDVDMsg(CDVDMsg::GENERAL_EOF));
+ bOmxWaitAudio = true;
+ }
if(m_CurrentVideo.inited)
+ {
m_player_video.SendMessage (new CDVDMsg(CDVDMsg::GENERAL_EOF));
+ bOmxWaitVideo = true;
+ }
if(m_CurrentSubtitle.inited)
m_player_subtitle.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_EOF));
m_CurrentAudio.inited = false;
@@ -1242,12 +1255,12 @@ void COMXPlayer::Process()
}
// wait for omx components to finish
- if(HasVideo() && !m_player_video.IsEOS())
+ if(bOmxWaitVideo && !m_player_video.IsEOS())
{
Sleep(100);
continue;
}
- if(HasAudio() && !m_player_audio.IsEOS())
+ if(bOmxWaitAudio && !m_player_audio.IsEOS())
{
Sleep(100);
continue;
@@ -3617,7 +3630,7 @@ bool COMXPlayer::GetCurrentSubtitle(CStdString& strSubtitle)
if (m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD))
return false;
- double pts = m_av_clock.OMXMediaTime();
+ double pts = m_av_clock.OMXMediaTime(false);
m_player_subtitle.GetCurrentSubtitle(strSubtitle, pts - m_player_video.GetSubtitleDelay());
diff --git a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp
index bfd199e66e..fbafe2ca7a 100644
--- a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp
@@ -62,8 +62,7 @@ public:
CDVDStreamInfo m_hints;
};
-OMXPlayerAudio::OMXPlayerAudio(OMXClock *av_clock,
- CDVDMessageQueue& parent)
+OMXPlayerAudio::OMXPlayerAudio(OMXClock *av_clock, CDVDMessageQueue& parent)
: CThread("COMXPlayerAudio")
, m_messageQueue("audio")
, m_messageParent(parent)
@@ -79,11 +78,12 @@ OMXPlayerAudio::OMXPlayerAudio(OMXClock *av_clock,
m_DecoderOpen = false;
m_freq = CurrentHostFrequency();
m_send_eos = false;
+ m_bad_state = false;
m_hints_current.Clear();
m_av_clock->SetMasterClock(false);
- m_messageQueue.SetMaxDataSize(3 * 1024 * 1024);
+ m_messageQueue.SetMaxDataSize(6 * 1024 * 1024);
m_messageQueue.SetMaxTimeSize(8.0);
}
@@ -100,6 +100,8 @@ bool OMXPlayerAudio::OpenStream(CDVDStreamInfo &hints)
if(!m_DllBcmHost.Load())
return false;
+ m_bad_state = false;
+
COMXAudioCodecOMX *codec = new COMXAudioCodecOMX();
if(!codec || !codec->Open(hints))
@@ -323,15 +325,35 @@ bool OMXPlayerAudio::CodecChange()
return false;
}
+void OMXPlayerAudio::HandlePlayspeed(bool bDropPacket)
+{
+ if(!bDropPacket && m_speed == DVD_PLAYSPEED_NORMAL && m_av_clock->HasVideo())
+ {
+ if(GetDelay() < 0.1f && !m_av_clock->OMXAudioBuffer())
+ {
+ clock_gettime(CLOCK_REALTIME, &m_starttime);
+ m_av_clock->OMXAudioBufferStart();
+ }
+ else if(GetDelay() > (AUDIO_BUFFER_SECONDS * 0.75f) && m_av_clock->OMXAudioBuffer())
+ {
+ m_av_clock->OMXAudioBufferStop();
+ }
+ else if(m_av_clock->OMXAudioBuffer())
+ {
+ clock_gettime(CLOCK_REALTIME, &m_endtime);
+ if((m_endtime.tv_sec - m_starttime.tv_sec) > 1)
+ {
+ m_av_clock->OMXAudioBufferStop();
+ }
+ }
+ }
+}
+
bool OMXPlayerAudio::Decode(DemuxPacket *pkt, bool bDropPacket)
{
- if(!pkt)
+ if(!pkt || m_bad_state || !m_pAudioCodec)
return false;
- /* last decoder reinit went wrong */
- if(!m_pAudioCodec)
- return true;
-
if(pkt->dts != DVD_NOPTS_VALUE)
m_audioClock = pkt->dts;
@@ -364,8 +386,6 @@ bool OMXPlayerAudio::Decode(DemuxPacket *pkt, bool bDropPacket)
if(CodecChange())
{
- CloseDecoder();
-
m_DecoderOpen = OpenDecoder();
if(!m_DecoderOpen)
return false;
@@ -373,6 +393,7 @@ bool OMXPlayerAudio::Decode(DemuxPacket *pkt, bool bDropPacket)
while(!m_bStop)
{
+ HandlePlayspeed(bDropPacket);
if(m_flush)
{
m_flush = false;
@@ -414,8 +435,6 @@ bool OMXPlayerAudio::Decode(DemuxPacket *pkt, bool bDropPacket)
{
if(CodecChange())
{
- CloseDecoder();
-
m_DecoderOpen = OpenDecoder();
if(!m_DecoderOpen)
return false;
@@ -423,6 +442,8 @@ bool OMXPlayerAudio::Decode(DemuxPacket *pkt, bool bDropPacket)
while(!m_bStop)
{
+ HandlePlayspeed(bDropPacket);
+
if(m_flush)
{
m_flush = false;
@@ -465,27 +486,6 @@ bool OMXPlayerAudio::Decode(DemuxPacket *pkt, bool bDropPacket)
m_messageParent.Put(new CDVDMsgInt(CDVDMsg::PLAYER_STARTED, DVDPLAYER_AUDIO));
}
- if(!bDropPacket && m_speed == DVD_PLAYSPEED_NORMAL && m_av_clock->HasVideo())
- {
- if(GetDelay() < 0.1f && !m_av_clock->OMXAudioBuffer())
- {
- clock_gettime(CLOCK_REALTIME, &m_starttime);
- m_av_clock->OMXAudioBufferStart();
- }
- else if(GetDelay() > (AUDIO_BUFFER_SECONDS * 0.75f) && m_av_clock->OMXAudioBuffer())
- {
- m_av_clock->OMXAudioBufferStop();
- }
- else if(m_av_clock->OMXAudioBuffer())
- {
- clock_gettime(CLOCK_REALTIME, &m_endtime);
- if((m_endtime.tv_sec - m_starttime.tv_sec) > 1)
- {
- m_av_clock->OMXAudioBufferStop();
- }
- }
- }
-
return true;
}
@@ -554,6 +554,11 @@ void OMXPlayerAudio::Process()
{
if (m_pAudioCodec)
m_pAudioCodec->Reset();
+ m_av_clock->Lock();
+ m_av_clock->OMXStop(false);
+ m_omxAudio.Flush();
+ m_av_clock->OMXReset(false);
+ m_av_clock->UnLock();
m_started = false;
}
else if (pMsg->IsType(CDVDMsg::GENERAL_FLUSH))
@@ -713,10 +718,15 @@ bool OMXPlayerAudio::OpenDecoder()
m_passthrough = false;
m_hw_decode = false;
- m_omxAudio.SetClock(m_av_clock);
+ bool bSendParent = false;
- m_av_clock->Lock();
- m_av_clock->OMXStop(false);
+ if(m_DecoderOpen)
+ {
+ WaitCompletion();
+ m_omxAudio.Deinitialize();
+ m_DecoderOpen = false;
+ bSendParent = true;
+ }
/* setup audi format for audio render */
m_format.m_sampleRate = m_hints.samplerate;
@@ -731,9 +741,13 @@ bool OMXPlayerAudio::OpenDecoder()
else
device = "local";
+ m_av_clock->Lock();
+ m_av_clock->OMXStop(false);
+
bool bAudioRenderOpen = m_omxAudio.Initialize(m_format, device, m_av_clock, m_hints, m_passthrough, m_hw_decode);
m_codec_name = "";
+ m_bad_state = !bAudioRenderOpen;
if(!bAudioRenderOpen)
{
@@ -746,10 +760,19 @@ bool OMXPlayerAudio::OpenDecoder()
m_codec_name.c_str(), m_nChannels, m_hints.samplerate, m_hints.bitspersample);
}
+ m_av_clock->OMXStateExecute(false);
m_av_clock->HasAudio(bAudioRenderOpen);
m_av_clock->OMXReset(false);
m_av_clock->UnLock();
+ m_started = false;
+
+ // TODO : Send FLUSH to parent, only if we had a valid open codec.
+ // this is just a workaround to get the omx video decoder happy again
+ // This situation happens, for example where we have in the stream an audio codec change
+ if(bSendParent)
+ m_messageParent.Put(new CDVDMsg(CDVDMsg::GENERAL_FLUSH));
+
return bAudioRenderOpen;
}
@@ -757,8 +780,8 @@ void OMXPlayerAudio::CloseDecoder()
{
m_av_clock->Lock();
m_av_clock->OMXStop(false);
- m_av_clock->HasAudio(false);
m_omxAudio.Deinitialize();
+ m_av_clock->HasAudio(false);
m_av_clock->OMXReset(false);
m_av_clock->UnLock();
@@ -777,7 +800,7 @@ double OMXPlayerAudio::GetCacheTime()
void OMXPlayerAudio::WaitCompletion()
{
- if(!m_send_eos)
+ if(!m_send_eos && !m_bad_state)
m_omxAudio.WaitCompletion();
m_send_eos = true;
}
diff --git a/xbmc/cores/omxplayer/OMXPlayerAudio.h b/xbmc/cores/omxplayer/OMXPlayerAudio.h
index ce2f3ee0c8..97607d784d 100644
--- a/xbmc/cores/omxplayer/OMXPlayerAudio.h
+++ b/xbmc/cores/omxplayer/OMXPlayerAudio.h
@@ -89,10 +89,13 @@ protected:
DllBcmHost m_DllBcmHost;
bool m_send_eos;
+ bool m_bad_state;
virtual void OnStartup();
virtual void OnExit();
virtual void Process();
+
+ void HandlePlayspeed(bool bDropPacket);
private:
public:
OMXPlayerAudio(OMXClock *av_clock, CDVDMessageQueue& parent);
@@ -126,5 +129,7 @@ public:
void SetSpeed(int iSpeed);
int GetAudioBitrate();
std::string GetPlayerInfo();
+
+ bool BadState() { return m_bad_state; }
};
#endif
diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
index 4da86c7b9c..318e133ac9 100644
--- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
@@ -96,7 +96,7 @@ OMXPlayerVideo::OMXPlayerVideo(OMXClock *av_clock,
m_autosync = 1;
m_fForcedAspectRatio = 0.0f;
m_send_eos = false;
- m_messageQueue.SetMaxDataSize(10 * 1024 * 1024);
+ m_messageQueue.SetMaxDataSize(40 * 1024 * 1024);
m_messageQueue.SetMaxTimeSize(8.0);
RESOLUTION res = g_graphicsContext.GetVideoResolution();
@@ -195,8 +195,8 @@ bool OMXPlayerVideo::CloseStream(bool bWaitForBuffers)
m_av_clock->Lock();
m_av_clock->OMXStop(false);
- m_av_clock->HasVideo(false);
m_omxVideo.Close();
+ m_av_clock->HasVideo(false);
m_av_clock->OMXReset(false);
m_av_clock->UnLock();
@@ -714,6 +714,7 @@ bool OMXPlayerVideo::OpenDecoder()
// use aspect in stream always
m_fForcedAspectRatio = m_hints.aspect;
+
m_av_clock->Lock();
m_av_clock->OMXStop(false);
@@ -743,9 +744,11 @@ bool OMXPlayerVideo::OpenDecoder()
m_av_clock->SetRefreshRate(m_fFrameRate);
}
+ m_av_clock->OMXStateExecute(false);
m_av_clock->HasVideo(bVideoDecoderOpen);
m_av_clock->OMXReset(false);
m_av_clock->UnLock();
+
return bVideoDecoderOpen;
}
diff --git a/xbmc/cores/omxplayer/OMXVideo.cpp b/xbmc/cores/omxplayer/OMXVideo.cpp
index f911dc57a2..6de0ee9ba9 100644
--- a/xbmc/cores/omxplayer/OMXVideo.cpp
+++ b/xbmc/cores/omxplayer/OMXVideo.cpp
@@ -87,8 +87,7 @@ COMXVideo::COMXVideo()
COMXVideo::~COMXVideo()
{
- if (m_is_open)
- Close();
+ Close();
}
bool COMXVideo::SendDecoderConfig()
@@ -145,8 +144,7 @@ bool COMXVideo::NaluFormatStartCodes(enum CodecID codec, uint8_t *in_extradata,
bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, bool deinterlace, bool hdmi_clock_sync)
{
- if(m_is_open)
- Close();
+ Close();
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
std::string decoder_name;
@@ -638,13 +636,14 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, bool deinterlace, b
*/
+ if(m_omx_decoder.BadState())
+ return false;
+
CLog::Log(LOGDEBUG,
"%s::%s - decoder_component(0x%p), input_port(0x%x), output_port(0x%x) deinterlace %d hdmiclocksync %d\n",
CLASSNAME, __func__, m_omx_decoder.GetComponent(), m_omx_decoder.GetInputPort(), m_omx_decoder.GetOutputPort(),
m_deinterlace, m_hdmi_clock_sync);
- m_av_clock->OMXStateExecute(false);
-
m_first_frame = true;
return true;
}
@@ -688,6 +687,7 @@ void COMXVideo::Close()
m_video_codec_name = "";
m_deinterlace = false;
m_first_frame = true;
+ m_av_clock = NULL;
}
void COMXVideo::SetDropState(bool bDrop)
@@ -712,11 +712,11 @@ int COMXVideo::Decode(uint8_t *pData, int iSize, double dts, double pts)
if( m_drop_state )
return true;
- if (pData || iSize > 0)
- {
- unsigned int demuxer_bytes = (unsigned int)iSize;
- uint8_t *demuxer_content = pData;
+ unsigned int demuxer_bytes = (unsigned int)iSize;
+ uint8_t *demuxer_content = pData;
+ if (demuxer_content && demuxer_bytes > 0)
+ {
while(demuxer_bytes)
{
// 500ms timeout
@@ -745,7 +745,7 @@ int COMXVideo::Decode(uint8_t *pData, int iSize, double dts, double pts)
if(m_av_clock->VideoStart())
{
omx_buffer->nFlags = OMX_BUFFERFLAG_STARTTIME;
- CLog::Log(LOGDEBUG, "VDec : setStartTime %f\n", (float)val / DVD_TIME_BASE);
+ CLog::Log(LOGDEBUG, "OMXVideo::Decode VDec : setStartTime %f\n", (float)val / DVD_TIME_BASE);
m_av_clock->VideoStart(false);
}
else
@@ -1000,5 +1000,7 @@ void COMXVideo::WaitCompletion()
nTimeOut -= 50;
}
+ m_omx_render.ResetEos();
+
return;
}
diff --git a/xbmc/cores/omxplayer/OMXVideo.h b/xbmc/cores/omxplayer/OMXVideo.h
index 87efc36832..80207f0a23 100644
--- a/xbmc/cores/omxplayer/OMXVideo.h
+++ b/xbmc/cores/omxplayer/OMXVideo.h
@@ -59,6 +59,7 @@ public:
void SetVideoRect(const CRect& SrcRect, const CRect& DestRect);
int GetInputBufferSize();
void WaitCompletion();
+ bool BadState() { return m_omx_decoder.BadState(); };
protected:
// Video format
bool m_drop_state;
diff --git a/xbmc/epg/Epg.cpp b/xbmc/epg/Epg.cpp
index 353f968b9b..5f90a12d67 100644
--- a/xbmc/epg/Epg.cpp
+++ b/xbmc/epg/Epg.cpp
@@ -773,7 +773,7 @@ const CStdString &CEpg::ConvertGenreIdToString(int iID, int iSubID)
iLabelId = (iSubID <= 3) ? 19660 + iSubID : 19660;
break;
case EPG_EVENT_CONTENTMASK_USERDEFINED:
- iLabelId = (iSubID <= 3) ? 19676 + iSubID : 19676;
+ iLabelId = (iSubID <= 8) ? 19676 + iSubID : 19676;
break;
default:
break;
@@ -901,3 +901,11 @@ bool CEpg::NeedsSave(void) const
CSingleLock lock(m_critSection);
return !m_changedTags.empty() || !m_deletedTags.empty() || m_bChanged;
}
+
+bool CEpg::IsValid(void) const
+{
+ CSingleLock lock(m_critSection);
+ if (ScraperName() == "client")
+ return Channel().get() != NULL;
+ return true;
+}
diff --git a/xbmc/epg/Epg.h b/xbmc/epg/Epg.h
index b22206351e..55e4d72d2c 100644
--- a/xbmc/epg/Epg.h
+++ b/xbmc/epg/Epg.h
@@ -299,6 +299,11 @@ namespace EPG
size_t Size(void) const;
bool NeedsSave(void) const;
+
+ /*!
+ * @return True when this EPG is valid and can be updated, false otherwise
+ */
+ bool IsValid(void) const;
protected:
CEpg(void);
diff --git a/xbmc/epg/EpgContainer.cpp b/xbmc/epg/EpgContainer.cpp
index 3e8c84b454..43a2df04c5 100644
--- a/xbmc/epg/EpgContainer.cpp
+++ b/xbmc/epg/EpgContainer.cpp
@@ -382,6 +382,7 @@ bool CEpgContainer::DeleteEpg(const CEpg &epg, bool bDeleteFromDatabase /* = fal
if (it == m_epgs.end())
return false;
+ CLog::Log(LOGDEBUG, "deleting EPG table %s (%d)", epg.Name().c_str(), epg.EpgID());
if (bDeleteFromDatabase && !m_bIgnoreDbForClient && m_database.IsOpen())
m_database.Delete(*it->second);
@@ -490,6 +491,8 @@ bool CEpgContainer::UpdateEPG(bool bOnlyPending /* = false */)
return false;
}
+ vector<CEpg*> invalidTables;
+
/* load or update all EPG tables */
CEpg *epg;
unsigned int iCounter(0);
@@ -509,9 +512,14 @@ bool CEpgContainer::UpdateEPG(bool bOnlyPending /* = false */)
UpdateProgressDialog(++iCounter, m_epgs.size(), epg->Name());
if ((!bOnlyPending || epg->UpdatePending()) && epg->Update(start, end, m_iUpdateTime, bOnlyPending))
- ++iUpdatedTables;
+ iUpdatedTables++;
+ else if (!epg->IsValid())
+ invalidTables.push_back(epg);
}
+ for (vector<CEpg*>::iterator it = invalidTables.begin(); it != invalidTables.end(); it++)
+ DeleteEpg(**it, true);
+
if (bInterrupted)
{
/* the update has been interrupted. try again later */
diff --git a/xbmc/epg/EpgDatabase.cpp b/xbmc/epg/EpgDatabase.cpp
index 97854ed305..65a598486b 100644
--- a/xbmc/epg/EpgDatabase.cpp
+++ b/xbmc/epg/EpgDatabase.cpp
@@ -160,26 +160,19 @@ bool CEpgDatabase::DeleteEpg(void)
return bReturn;
}
-bool CEpgDatabase::Delete(const CEpg &table, const time_t start /* = 0 */, const time_t end /* = 0 */)
+bool CEpgDatabase::Delete(const CEpg &table)
{
/* invalid channel */
if (table.EpgID() <= 0)
{
- CLog::Log(LOGERROR, "EpgDB - %s - invalid channel id: %d",
- __FUNCTION__, table.EpgID());
+ CLog::Log(LOGERROR, "EpgDB - %s - invalid channel id: %d", __FUNCTION__, table.EpgID());
return false;
}
CStdString strWhereClause;
strWhereClause = FormatSQL("idEpg = %u", table.EpgID());
- if (start != 0)
- strWhereClause.append(FormatSQL(" AND iStartTime >= %u", start).c_str());
-
- if (end != 0)
- strWhereClause.append(FormatSQL(" AND iEndTime <= %u", end).c_str());
-
- return DeleteValues("epgtags", strWhereClause);
+ return DeleteValues("epg", strWhereClause);
}
bool CEpgDatabase::DeleteOldEpgEntries(void)
diff --git a/xbmc/epg/EpgDatabase.h b/xbmc/epg/EpgDatabase.h
index 77d930460b..1360989a29 100644
--- a/xbmc/epg/EpgDatabase.h
+++ b/xbmc/epg/EpgDatabase.h
@@ -71,13 +71,11 @@ namespace EPG
virtual bool DeleteEpg(void);
/*!
- * @brief Erase all EPG entries for a table.
- * @param table The table to remove the EPG entries for.
- * @param start Remove entries after this time if set.
- * @param end Remove entries before this time if set.
- * @return True if the entries were removed successfully, false otherwise.
+ * @brief Delete an EPG table.
+ * @param table The table to remove.
+ * @return True if the table was removed successfully, false otherwise.
*/
- virtual bool Delete(const CEpg &table, const time_t start = 0, const time_t end = 0);
+ virtual bool Delete(const CEpg &table);
/*!
* @brief Erase all EPG entries older than 1 day.
diff --git a/xbmc/linux/OMXClock.cpp b/xbmc/linux/OMXClock.cpp
index 525081e9f7..c3c991c0fd 100644
--- a/xbmc/linux/OMXClock.cpp
+++ b/xbmc/linux/OMXClock.cpp
@@ -282,17 +282,27 @@ void OMXClock::OMXSetClockPorts(OMX_TIME_CONFIG_CLOCKSTATETYPE *clock)
if(!clock)
return;
+ clock->nWaitMask = 0;
+
if(m_has_audio)
{
m_audio_start = true;
clock->nWaitMask |= OMX_CLOCKPORT0;
}
+ else
+ {
+ m_audio_start = false;
+ }
if(m_has_video)
{
m_video_start = true;
clock->nWaitMask |= OMX_CLOCKPORT1;
}
+ else
+ {
+ m_video_start = false;
+ }
}
bool OMXClock::OMXSetReferenceClock(bool lock /* = true */)
@@ -343,6 +353,9 @@ bool OMXClock::OMXInitialize(bool has_video, bool has_audio)
if(!m_omx_clock.Initialize((const std::string)componentName, OMX_IndexParamOtherInit))
return false;
+ m_omx_clock.DisableAllPorts();
+
+ /*
if(!OMXSetReferenceClock(false))
return false;
@@ -354,6 +367,7 @@ bool OMXClock::OMXInitialize(bool has_video, bool has_audio)
omx_err = m_omx_clock.SetConfig(OMX_IndexConfigTimeClockState, &clock);
if(omx_err != OMX_ErrorNone)
CLog::Log(LOGWARNING, "OMXClock::OMXInitialize setting OMX_IndexConfigTimeClockState\n");
+ */
return true;
}
@@ -608,8 +622,6 @@ bool OMXClock::OMXReset(bool lock /* = true */)
if(lock)
Lock();
- CLog::Log(LOGDEBUG, "OMXClock::OMXReset 0x%08x\n", m_omx_clock.GetState());
-
m_audio_buffer = false;
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
@@ -623,6 +635,15 @@ bool OMXClock::OMXReset(bool lock /* = true */)
OMX_TIME_CONFIG_CLOCKSTATETYPE clock;
OMX_INIT_STRUCTURE(clock);
+ omx_err = m_omx_clock.GetConfig(OMX_IndexConfigTimeClockState, &clock);
+ if(omx_err != OMX_ErrorNone)
+ {
+ CLog::Log(LOGERROR, "OMXClock::OMXReset error getting OMX_IndexConfigTimeClockState\n");
+ if(lock)
+ UnLock();
+ return false;
+ }
+
clock.eState = OMX_TIME_ClockStateWaitingForStartTime;
//clock.nOffset = ToOMXTime(-1000LL * 200);
@@ -640,6 +661,9 @@ bool OMXClock::OMXReset(bool lock /* = true */)
}
}
+ CLog::Log(LOGDEBUG, "OMXClock::OMXReset audio / video : %d / %d start audio / video : %d / %d wait mask %d\n",
+ m_has_audio, m_has_video, m_audio_start, m_video_start, clock.nWaitMask);
+
if(lock)
UnLock();
diff --git a/xbmc/linux/OMXCore.cpp b/xbmc/linux/OMXCore.cpp
index 43a22356b1..1a2539adc7 100644
--- a/xbmc/linux/OMXCore.cpp
+++ b/xbmc/linux/OMXCore.cpp
@@ -63,8 +63,13 @@ COMXCoreTunel::COMXCoreTunel()
m_src_port = 0;
m_dst_port = 0;
m_portSettingsChanged = false;
+ m_tunnel_set = false;
m_DllOMX = new DllOMX();
- m_DllOMXOpen = m_DllOMX->Load();
+
+ if(m_DllOMX)
+ m_DllOMXOpen = m_DllOMX->Load();
+ else
+ m_DllOMXOpen = false;
pthread_mutex_init(&m_lock, NULL);
}
@@ -98,12 +103,14 @@ void COMXCoreTunel::Initialize(COMXCoreComponent *src_component, unsigned int sr
m_dst_port = dst_port;
}
-OMX_ERRORTYPE COMXCoreTunel::Flush()
+bool COMXCoreTunel::IsInitialized()
{
- if(!m_DllOMXOpen)
- return OMX_ErrorUndefined;
+ return m_tunnel_set;
+}
- if(!m_src_component || !m_dst_component)
+OMX_ERRORTYPE COMXCoreTunel::Flush()
+{
+ if(!m_DllOMXOpen || !m_src_component || !m_dst_component || !m_tunnel_set || !IsInitialized())
return OMX_ErrorUndefined;
Lock();
@@ -111,7 +118,7 @@ OMX_ERRORTYPE COMXCoreTunel::Flush()
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
if(m_src_component->GetComponent())
{
- omx_err = OMX_SendCommand(m_src_component->GetComponent(), OMX_CommandFlush, m_src_port, NULL);
+ omx_err = m_src_component->SendCommand(OMX_CommandFlush, m_src_port, NULL);
if(omx_err != OMX_ErrorNone && omx_err != OMX_ErrorSameState)
{
CLog::Log(LOGERROR, "COMXCoreTunel::Flush - Error flush port %d on component %s omx_err(0x%08x)",
@@ -121,7 +128,7 @@ OMX_ERRORTYPE COMXCoreTunel::Flush()
if(m_dst_component->GetComponent())
{
- omx_err = OMX_SendCommand(m_dst_component->GetComponent(), OMX_CommandFlush, m_dst_port, NULL);
+ omx_err = m_dst_component->SendCommand(OMX_CommandFlush, m_dst_port, NULL);
if(omx_err != OMX_ErrorNone && omx_err != OMX_ErrorSameState)
{
CLog::Log(LOGERROR, "COMXCoreTunel::Flush - Error flush port %d on component %s omx_err(0x%08x)",
@@ -145,7 +152,7 @@ OMX_ERRORTYPE COMXCoreTunel::Deestablish(bool noWait)
if(!m_DllOMXOpen)
return OMX_ErrorUndefined;
- if(!m_src_component || !m_dst_component)
+ if(!m_src_component || !m_dst_component || !IsInitialized())
return OMX_ErrorUndefined;
Lock();
@@ -195,12 +202,14 @@ OMX_ERRORTYPE COMXCoreTunel::Deestablish(bool noWait)
}
}
+ m_tunnel_set = false;
+
UnLock();
return OMX_ErrorNone;
}
-OMX_ERRORTYPE COMXCoreTunel::Establish(bool portSettingsChanged)
+OMX_ERRORTYPE COMXCoreTunel::Establish(bool portSettingsChanged, bool enable_ports /* = true */)
{
if(!m_DllOMXOpen)
return OMX_ErrorUndefined;
@@ -276,7 +285,9 @@ OMX_ERRORTYPE COMXCoreTunel::Establish(bool portSettingsChanged)
return OMX_ErrorUndefined;
}
- if(m_src_component->GetComponent())
+ m_tunnel_set = true;
+
+ if(m_src_component->GetComponent() && enable_ports)
{
omx_err = m_src_component->EnablePort(m_src_port, false);
if(omx_err != OMX_ErrorNone)
@@ -288,7 +299,7 @@ OMX_ERRORTYPE COMXCoreTunel::Establish(bool portSettingsChanged)
}
}
- if(m_dst_component->GetComponent())
+ if(m_dst_component->GetComponent() && enable_ports)
{
omx_err = m_dst_component->EnablePort(m_dst_port, false);
if(omx_err != OMX_ErrorNone)
@@ -300,17 +311,17 @@ OMX_ERRORTYPE COMXCoreTunel::Establish(bool portSettingsChanged)
}
}
- if(m_dst_component->GetComponent())
+ if(m_dst_component->GetComponent() && enable_ports)
{
- if(m_dst_component->GetState() == OMX_StateLoaded)
+ omx_err = m_dst_component->WaitForCommand(OMX_CommandPortEnable, m_dst_port);
+ if(omx_err != OMX_ErrorNone)
{
- omx_err = m_dst_component->WaitForCommand(OMX_CommandPortEnable, m_dst_port);
- if(omx_err != OMX_ErrorNone)
- {
- UnLock();
- return omx_err;
- }
+ UnLock();
+ return omx_err;
+ }
+ if(m_dst_component->GetState() == OMX_StateLoaded)
+ {
omx_err = m_dst_component->SetStateForComponent(OMX_StateIdle);
if(omx_err != OMX_ErrorNone)
{
@@ -320,18 +331,9 @@ OMX_ERRORTYPE COMXCoreTunel::Establish(bool portSettingsChanged)
return omx_err;
}
}
- else
- {
- omx_err = m_dst_component->WaitForCommand(OMX_CommandPortEnable, m_dst_port);
- if(omx_err != OMX_ErrorNone)
- {
- UnLock();
- return omx_err;
- }
- }
}
- if(m_src_component->GetComponent())
+ if(m_src_component->GetComponent() && enable_ports)
{
omx_err = m_src_component->WaitForCommand(OMX_CommandPortEnable, m_src_port);
if(omx_err != OMX_ErrorNone)
@@ -365,15 +367,16 @@ COMXCoreComponent::COMXCoreComponent()
m_output_buffer_count = 0;
m_flush_input = false;
m_flush_output = false;
+ m_resource_error = false;
m_eos = false;
m_exit = false;
- m_DllOMXOpen = false;
pthread_mutex_init(&m_omx_input_mutex, NULL);
pthread_mutex_init(&m_omx_output_mutex, NULL);
pthread_mutex_init(&m_omx_event_mutex, NULL);
+ pthread_mutex_init(&m_omx_eos_mutex, NULL);
pthread_cond_init(&m_input_buffer_cond, NULL);
pthread_cond_init(&m_output_buffer_cond, NULL);
pthread_cond_init(&m_omx_event_cond, NULL);
@@ -383,22 +386,30 @@ COMXCoreComponent::COMXCoreComponent()
m_DllOMX = new DllOMX();
+ if(m_DllOMX)
+ m_DllOMXOpen = m_DllOMX->Load();
+ else
+ m_DllOMXOpen = false;
+
pthread_mutex_init(&m_lock, NULL);
}
COMXCoreComponent::~COMXCoreComponent()
{
- Deinitialize();
+ Deinitialize(true);
pthread_mutex_destroy(&m_omx_input_mutex);
pthread_mutex_destroy(&m_omx_output_mutex);
pthread_mutex_destroy(&m_omx_event_mutex);
+ pthread_mutex_destroy(&m_omx_eos_mutex);
pthread_cond_destroy(&m_input_buffer_cond);
pthread_cond_destroy(&m_output_buffer_cond);
pthread_cond_destroy(&m_omx_event_cond);
pthread_mutex_destroy(&m_lock);
+ if(m_DllOMXOpen)
+ m_DllOMX->Unload();
delete m_DllOMX;
}
@@ -414,6 +425,9 @@ void COMXCoreComponent::UnLock()
void COMXCoreComponent::TransitionToStateLoaded()
{
+ if(!m_handle)
+ return;
+
if(GetState() == OMX_StateExecuting)
SetStateForComponent(OMX_StatePause);
@@ -507,6 +521,9 @@ void COMXCoreComponent::FlushAll()
void COMXCoreComponent::FlushInput()
{
+ if(!m_handle)
+ return;
+
Lock();
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
@@ -525,6 +542,9 @@ void COMXCoreComponent::FlushInput()
void COMXCoreComponent::FlushOutput()
{
+ if(!m_handle)
+ return;
+
Lock();
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
@@ -843,16 +863,13 @@ OMX_ERRORTYPE COMXCoreComponent::FreeOutputBuffers()
OMX_ERRORTYPE COMXCoreComponent::DisableAllPorts()
{
+ if(!m_handle)
+ return OMX_ErrorUndefined;
+
Lock();
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
- if(!m_handle)
- {
- UnLock();
- return OMX_ErrorUndefined;
- }
-
OMX_INDEXTYPE idxTypes[] = {
OMX_IndexParamAudioInit,
OMX_IndexParamImageInit,
@@ -1077,18 +1094,14 @@ OMX_ERRORTYPE COMXCoreComponent::WaitForCommand(OMX_U32 command, OMX_U32 nData2,
OMX_ERRORTYPE COMXCoreComponent::SetStateForComponent(OMX_STATETYPE state)
{
+ if(!m_handle)
+ return OMX_ErrorUndefined;
+
Lock();
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
OMX_STATETYPE state_actual = OMX_StateMax;
- if(!m_handle)
- {
- UnLock();
- return OMX_ErrorUndefined;
- }
-
- OMX_GetState(m_handle, &state_actual);
if(state == state_actual)
{
UnLock();
@@ -1127,24 +1140,23 @@ OMX_ERRORTYPE COMXCoreComponent::SetStateForComponent(OMX_STATETYPE state)
OMX_STATETYPE COMXCoreComponent::GetState()
{
+ if(!m_handle)
+ return (OMX_STATETYPE)0;
+
Lock();
OMX_STATETYPE state;
- if(m_handle)
- {
- OMX_GetState(m_handle, &state);
- UnLock();
- return state;
- }
-
+ OMX_GetState(m_handle, &state);
UnLock();
-
- return (OMX_STATETYPE)0;
+ return state;
}
OMX_ERRORTYPE COMXCoreComponent::SetParameter(OMX_INDEXTYPE paramIndex, OMX_PTR paramStruct)
{
+ if(!m_handle)
+ return OMX_ErrorUndefined;
+
Lock();
OMX_ERRORTYPE omx_err;
@@ -1163,6 +1175,9 @@ OMX_ERRORTYPE COMXCoreComponent::SetParameter(OMX_INDEXTYPE paramIndex, OMX_PTR
OMX_ERRORTYPE COMXCoreComponent::GetParameter(OMX_INDEXTYPE paramIndex, OMX_PTR paramStruct)
{
+ if(!m_handle)
+ return OMX_ErrorUndefined;
+
Lock();
OMX_ERRORTYPE omx_err;
@@ -1181,6 +1196,9 @@ OMX_ERRORTYPE COMXCoreComponent::GetParameter(OMX_INDEXTYPE paramIndex, OMX_PTR
OMX_ERRORTYPE COMXCoreComponent::SetConfig(OMX_INDEXTYPE configIndex, OMX_PTR configStruct)
{
+ if(!m_handle)
+ return OMX_ErrorUndefined;
+
Lock();
OMX_ERRORTYPE omx_err;
@@ -1199,6 +1217,9 @@ OMX_ERRORTYPE COMXCoreComponent::SetConfig(OMX_INDEXTYPE configIndex, OMX_PTR co
OMX_ERRORTYPE COMXCoreComponent::GetConfig(OMX_INDEXTYPE configIndex, OMX_PTR configStruct)
{
+ if(!m_handle)
+ return OMX_ErrorUndefined;
+
Lock();
OMX_ERRORTYPE omx_err;
@@ -1217,6 +1238,9 @@ OMX_ERRORTYPE COMXCoreComponent::GetConfig(OMX_INDEXTYPE configIndex, OMX_PTR co
OMX_ERRORTYPE COMXCoreComponent::SendCommand(OMX_COMMANDTYPE cmd, OMX_U32 cmdParam, OMX_PTR cmdParamData)
{
+ if(!m_handle)
+ return OMX_ErrorUndefined;
+
Lock();
OMX_ERRORTYPE omx_err;
@@ -1235,6 +1259,9 @@ OMX_ERRORTYPE COMXCoreComponent::SendCommand(OMX_COMMANDTYPE cmd, OMX_U32 cmdPar
OMX_ERRORTYPE COMXCoreComponent::EnablePort(unsigned int port, bool wait)
{
+ if(!m_handle)
+ return OMX_ErrorUndefined;
+
Lock();
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
@@ -1276,6 +1303,9 @@ OMX_ERRORTYPE COMXCoreComponent::EnablePort(unsigned int port, bool wait)
OMX_ERRORTYPE COMXCoreComponent::DisablePort(unsigned int port, bool wait)
{
+ if(!m_handle)
+ return OMX_ErrorUndefined;
+
Lock();
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
@@ -1317,6 +1347,9 @@ OMX_ERRORTYPE COMXCoreComponent::DisablePort(unsigned int port, bool wait)
OMX_ERRORTYPE COMXCoreComponent::UseEGLImage(OMX_BUFFERHEADERTYPE** ppBufferHdr, OMX_U32 nPortIndex, OMX_PTR pAppPrivate, void* eglImage)
{
+ if(!m_handle)
+ return OMX_ErrorUndefined;
+
Lock();
OMX_ERRORTYPE omx_err;
@@ -1337,11 +1370,10 @@ bool COMXCoreComponent::Initialize( const std::string &component_name, OMX_INDEX
{
OMX_ERRORTYPE omx_err;
- if(!m_DllOMX->Load())
+ if(!m_DllOMXOpen)
return false;
- m_DllOMXOpen = true;
-
+ m_resource_error = false;
m_componentName = component_name;
m_callbacks.EventHandler = &COMXCoreComponent::DecoderEventHandlerCallback;
@@ -1349,13 +1381,19 @@ bool COMXCoreComponent::Initialize( const std::string &component_name, OMX_INDEX
m_callbacks.FillBufferDone = &COMXCoreComponent::DecoderFillBufferDoneCallback;
// Get video component handle setting up callbacks, component is in loaded state on return.
- omx_err = m_DllOMX->OMX_GetHandle(&m_handle, (char*)component_name.c_str(), this, &m_callbacks);
- if (omx_err != OMX_ErrorNone)
+ if(!m_handle)
{
- CLog::Log(LOGERROR, "COMXCoreComponent::Initialize - could not get component handle for %s omx_err(0x%08x)\n",
- component_name.c_str(), (int)omx_err);
- Deinitialize();
- return false;
+ omx_err = m_DllOMX->OMX_GetHandle(&m_handle, (char*)component_name.c_str(), this, &m_callbacks);
+ if (!m_handle || omx_err != OMX_ErrorNone)
+ {
+ CLog::Log(LOGERROR, "COMXCoreComponent::Initialize - could not get component handle for %s omx_err(0x%08x)\n",
+ component_name.c_str(), (int)omx_err);
+ Deinitialize(true);
+ return false;
+ }
+
+ CLog::Log(LOGDEBUG, "COMXCoreComponent::Initialize : %s handle 0x%08x dllopen : %d\n",
+ m_componentName.c_str(), m_handle, m_DllOMXOpen);
}
OMX_PORT_PARAM_TYPE port_param;
@@ -1397,21 +1435,29 @@ bool COMXCoreComponent::Initialize( const std::string &component_name, OMX_INDEX
return true;
}
-bool COMXCoreComponent::Deinitialize()
+bool COMXCoreComponent::IsInitialized()
{
- OMX_ERRORTYPE omx_err;
+ return (m_handle != NULL);
+}
- if(!m_DllOMXOpen)
- return false;
+void COMXCoreComponent::ResetEos()
+{
+ pthread_mutex_lock(&m_omx_eos_mutex);
+ m_eos = false;
+ pthread_mutex_unlock(&m_omx_eos_mutex);
+}
+
+bool COMXCoreComponent::Deinitialize(bool free_component /* = false */)
+{
+ OMX_ERRORTYPE omx_err;
m_exit = true;
m_flush_input = true;
m_flush_output = true;
- if(m_handle)
+ if(m_handle && m_DllOMXOpen)
{
-
FlushAll();
FreeOutputBuffers();
@@ -1419,24 +1465,25 @@ bool COMXCoreComponent::Deinitialize()
TransitionToStateLoaded();
- omx_err = m_DllOMX->OMX_FreeHandle(m_handle);
- if (omx_err != OMX_ErrorNone)
+ if(free_component)
{
- CLog::Log(LOGERROR, "COMXCoreComponent::Deinitialize - failed to free handle for component %s omx_err(0x%08x)",
- m_componentName.c_str(), omx_err);
- }
-
- m_handle = NULL;
-
+ CLog::Log(LOGDEBUG, "COMXCoreComponent::Deinitialize : %s handle 0x%08x dllopen : %d\n",
+ m_componentName.c_str(), m_handle, m_DllOMXOpen);
+ omx_err = m_DllOMX->OMX_FreeHandle(m_handle);
+ if (omx_err != OMX_ErrorNone)
+ {
+ CLog::Log(LOGERROR, "COMXCoreComponent::Deinitialize - failed to free handle for component %s omx_err(0x%08x)",
+ m_componentName.c_str(), omx_err);
+ }
+ m_handle = NULL;
+
+ m_input_port = 0;
+ m_output_port = 0;
+ m_componentName = "";
+ m_resource_error = false;
+ }
}
- m_DllOMXOpen = false;
- m_DllOMX->Unload();
-
- m_input_port = 0;
- m_output_port = 0;
- m_componentName = "";
-
return true;
}
@@ -1614,7 +1661,11 @@ OMX_ERRORTYPE COMXCoreComponent::DecoderEventHandler(
CLog::Log(LOGDEBUG, "%s::%s %s - OMX_EventBufferFlag(input)\n", CLASSNAME, __func__, ctx->GetName().c_str());
#endif
if(nData2 & OMX_BUFFERFLAG_EOS)
+ {
+ pthread_mutex_lock(&ctx->m_omx_eos_mutex);
ctx->m_eos = true;
+ pthread_mutex_unlock(&ctx->m_omx_eos_mutex);
+ }
break;
case OMX_EventPortSettingsChanged:
#if defined(OMX_DEBUG_EVENTHANDLER)
@@ -1639,6 +1690,7 @@ OMX_ERRORTYPE COMXCoreComponent::DecoderEventHandler(
break;
case OMX_ErrorInsufficientResources:
CLog::Log(LOGERROR, "%s::%s %s - OMX_ErrorInsufficientResources, insufficient resources\n", CLASSNAME, __func__, ctx->GetName().c_str());
+ ctx->m_resource_error = true;
break;
case OMX_ErrorFormatNotDetected:
CLog::Log(LOGERROR, "%s::%s %s - OMX_ErrorFormatNotDetected, cannot parse input stream\n", CLASSNAME, __func__, ctx->GetName().c_str());
diff --git a/xbmc/linux/OMXCore.h b/xbmc/linux/OMXCore.h
index c8bbc06918..2ce7cde73f 100644
--- a/xbmc/linux/OMXCore.h
+++ b/xbmc/linux/OMXCore.h
@@ -71,9 +71,10 @@ public:
~COMXCoreTunel();
void Initialize(COMXCoreComponent *src_component, unsigned int src_port, COMXCoreComponent *dst_component, unsigned int dst_port);
+ bool IsInitialized();
OMX_ERRORTYPE Flush();
OMX_ERRORTYPE Deestablish(bool noWait = false);
- OMX_ERRORTYPE Establish(bool portSettingsChanged);
+ OMX_ERRORTYPE Establish(bool portSettingsChanged, bool enable_ports = true);
private:
pthread_mutex_t m_lock;
bool m_portSettingsChanged;
@@ -85,6 +86,7 @@ private:
bool m_DllOMXOpen;
void Lock();
void UnLock();
+ bool m_tunnel_set;
};
class COMXCoreComponent
@@ -115,7 +117,8 @@ public:
OMX_ERRORTYPE UseEGLImage(OMX_BUFFERHEADERTYPE** ppBufferHdr, OMX_U32 nPortIndex, OMX_PTR pAppPrivate, void* eglImage);
bool Initialize( const std::string &component_name, OMX_INDEXTYPE index);
- bool Deinitialize();
+ bool IsInitialized();
+ bool Deinitialize(bool free_component = false);
// OMXCore Decoder delegate callback routines.
static OMX_ERRORTYPE DecoderEventHandlerCallback(OMX_HANDLETYPE hComponent, OMX_PTR pAppData,
@@ -159,6 +162,8 @@ public:
OMX_ERRORTYPE FreeOutputBuffers();
bool IsEOS() { return m_eos; };
+ bool BadState() { return m_resource_error; };
+ void ResetEos();
private:
OMX_HANDLETYPE m_handle;
@@ -166,6 +171,7 @@ private:
unsigned int m_output_port;
std::string m_componentName;
pthread_mutex_t m_omx_event_mutex;
+ pthread_mutex_t m_omx_eos_mutex;
pthread_mutex_t m_lock;
std::vector<omx_event> m_omx_events;
@@ -198,6 +204,7 @@ private:
bool m_eos;
bool m_flush_input;
bool m_flush_output;
+ bool m_resource_error;
void Lock();
void UnLock();
};