Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Casanowow Life for love
VLC-Android
Commits
b34275c7
Commit
b34275c7
authored
Feb 20, 2012
by
Jean-Baptiste Kempf
Browse files
Update patches
parent
aeb6fb79
Changes
3
Hide whitespace changes
Inline
Side-by-side
patches/0001-Android-add-compatibility-pthread_cancel.patch
View file @
b34275c7
From
33122d01cb1b321b7058d1bb5dd3e13fc67671fb
Mon Sep 17 00:00:00 2001
From
abd4cefb85c74f747b0f6d674d3e39c189bd4b1c
Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-Philippe=20Andr=C3=A9?= <jpeg@videolan.org>
Date: Thu, 2 Jun 2011 15:15:57 +0200
Subject: [PATCH 1/
4
] Android: add compatibility pthread_cancel
Subject: [PATCH 1/
3
] Android: add compatibility pthread_cancel
Original-code: c1ee19f63a6c6773400e98a9265b0a7e49fd528c
7884ed8d407647a1523afb8be6a2859477d54fd7
...
...
@@ -320,10 +320,10 @@ index 0000000..8a39f5d
+ return ret;
+}
diff --git a/configure.ac b/configure.ac
index
391af84..0b979bc
100644
index
c5de680..5e6f9fe
100644
--- a/configure.ac
+++ b/configure.ac
@@ -4
69
,6 +4
69
,10 @@
if test "${SYS}" = "mingw32" ; then
@@ -4
83
,6 +4
83
,10 @@
if test "${SYS}" = "mingw32" ; then
CFLAGS="${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
fi
...
...
@@ -335,10 +335,10 @@ index 391af84..0b979bc 100644
dnl Buggy glibc prevention. Purposedly not cached.
dnl See sourceware.org bugs 5058 and 5443.
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 1
5ebb4c..16a460a
100644
index 1
6172f5..e13b1ab
100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -33
3
,4 +33
3
,29 @@
long nrand48 (unsigned short subi[3]);
@@ -33
0
,4 +33
0
,29 @@
long nrand48 (unsigned short subi[3]);
# undef HAVE_FORK /* Implementation of fork() is imperfect on OS/2 */
#endif
...
...
@@ -410,10 +410,10 @@ index ef2ecdc..441953c 100644
vlc_mutex_unlock (&lock);
}
diff --git a/src/posix/thread.c b/src/posix/thread.c
index 1
22e201..b8211e5
100644
index 1
d0d077..6cfe7a0
100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -1
53
,7 +1
53
,9 @@
void vlc_trace (const char *fn, const char *file, unsigned line)
@@ -1
46
,7 +1
46
,9 @@
void vlc_trace (const char *fn, const char *file, unsigned line)
static inline unsigned long vlc_threadid (void)
{
...
...
@@ -424,7 +424,7 @@ index 122e201..b8211e5 100644
/* glibc does not provide a call for this */
return syscall (SYS_gettid);
@@ -4
35
,7 +43
7
,11 @@
void vlc_cond_broadcast (vlc_cond_t *p_condvar)
@@ -4
28
,7 +43
0
,11 @@
void vlc_cond_broadcast (vlc_cond_t *p_condvar)
*/
void vlc_cond_wait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
{
...
...
@@ -436,7 +436,7 @@ index 122e201..b8211e5 100644
VLC_THREAD_ASSERT ("waiting on condition");
}
@@ -4
72
,7 +47
8
,12 @@
int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex,
@@ -4
65
,7 +47
1
,12 @@
int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex,
#endif
struct timespec ts = mtime_to_ts (deadline);
...
...
@@ -449,7 +449,7 @@ index 122e201..b8211e5 100644
if (val != ETIMEDOUT)
VLC_THREAD_ASSERT ("timed-waiting on condition");
return val;
@@ -5
11
,6 +5
22
,14 @@
void vlc_sem_destroy (vlc_sem_t *sem)
@@ -5
04
,6 +5
15
,14 @@
void vlc_sem_destroy (vlc_sem_t *sem)
val = errno;
#endif
...
...
@@ -464,7 +464,7 @@ index 122e201..b8211e5 100644
VLC_THREAD_ASSERT ("destroying semaphore");
}
@@ -74
1
,7 +7
60
,11 @@
static int vlc_clone_attr (vlc_thread_t *th, pthread_attr_t *attr,
@@ -7
3
4,7 +7
53
,11 @@
static int vlc_clone_attr (vlc_thread_t *th, pthread_attr_t *attr,
assert (ret == 0); /* fails iif VLC_STACKSIZE is invalid */
#endif
...
...
@@ -477,5 +477,5 @@ index 122e201..b8211e5 100644
pthread_attr_destroy (attr);
return ret;
--
1.7.
8.3
1.7.
9.1
patches/0002-Implement-rw_locks-needed-for-Android-2.2-and-below.patch
View file @
b34275c7
From
1b9b62e8bd39d752d867a2ad273b5e546dd001b8
Mon Sep 17 00:00:00 2001
From
699c382047607310a892e019ecf16dc2f4d55937
Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Duraffort?= <ivoire@videolan.org>
Date: Sun, 7 Nov 2010 19:11:51 +0100
Subject: [PATCH 2/
4
] Implement rw_locks, needed for Android 2.2 and below
Subject: [PATCH 2/
3
] Implement rw_locks, needed for Android 2.2 and below
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
---
...
...
@@ -45,10 +45,10 @@ index 7a6c6af..181f273 100644
typedef struct vlc_timer *vlc_timer_t;
diff --git a/src/posix/thread.c b/src/posix/thread.c
index
9d9c771..031dcc2
100644
index
6cfe7a0..5781a94
100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -57
9
,6 +57
9
,7 @@
void vlc_sem_wait (vlc_sem_t *sem)
@@ -57
4
,6 +57
4
,7 @@
void vlc_sem_wait (vlc_sem_t *sem)
VLC_THREAD_ASSERT ("locking semaphore");
}
...
...
@@ -56,7 +56,7 @@ index 9d9c771..031dcc2 100644
/**
* Initializes a read/write lock.
*/
@@ -6
23
,6 +6
24
,81 @@
void vlc_rwlock_unlock (vlc_rwlock_t *lock)
@@ -6
18
,6 +6
19
,81 @@
void vlc_rwlock_unlock (vlc_rwlock_t *lock)
int val = pthread_rwlock_unlock (lock);
VLC_THREAD_ASSERT ("releasing R/W lock");
}
...
...
@@ -139,5 +139,5 @@ index 9d9c771..031dcc2 100644
/**
* Allocates a thread-specific variable.
--
1.7.
8.4
1.7.
9.1
patches/0003-Contribs-add-an-option-to-optimize-a-bit-for-the-siz.patch
0 → 100644
View file @
b34275c7
From d74c51c6f7a3fa7a8df5e20bf71aabebd4342f42 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Thu, 9 Feb 2012 00:07:16 +0100
Subject: [PATCH 3/3] Contribs: add an option to optimize a bit for the size
Notably for libavcodec
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
---
contrib/bootstrap | 5 +++++
contrib/src/ffmpeg/rules.mak | 5 ++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/contrib/bootstrap b/contrib/bootstrap
index a4b5410..32db642 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -28,6 +28,7 @@
usage()
echo " --enable-FOO configure to build package FOO"
echo " --disable-disc configure to not build optical discs packages"
echo " --disable-sout configure to not build stream output packages"
+ echo " --enable-small optimize libraries for size with slight speed decrease [DANGEROUS]"
}
BUILD=
@@ -66,6 +67,9 @@
do
--disable-sout)
BUILD_ENCODERS=
;;
+ --enable-small)
+ ENABLE_SMALL=1
+ ;;
--disable-*)
PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}"
;;
@@ -161,6 +165,7 @@
check_android_sdk()
test -z "$PREFIX" || add_make "PREFIX := $PREFIX"
test -z "$BUILD_DISCS" || add_make_enabled "BUILD_DISCS"
test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
+test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL"
#
# Checks
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index e92c191..b57989e 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -32,7 +32,10 @@
FFMPEGCONF += --enable-libmp3lame --enable-libvpx
DEPS_ffmpeg += lame $(DEPS_lame) vpx $(DEPS_vpx)
else
FFMPEGCONF += --disable-encoders --disable-muxers
-# XXX: REVISIT --enable-small ?
+endif
+
+ifdef ENABLE_SMALL
+FFMPEGCONF += --enable-small --optflags=-O2
endif
# XXX: REVISIT
--
1.7.9.1
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment