Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
70919abc
Commit
70919abc
authored
Sep 10, 2012
by
Edward Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update threads patch, again
parent
90247486
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
25 deletions
+25
-25
compile.sh
compile.sh
+1
-1
patches/0001-android-threads-support.patch
patches/0001-android-threads-support.patch
+24
-24
No files found.
compile.sh
View file @
70919abc
...
...
@@ -88,7 +88,7 @@ export PLATFORM_SHORT_ARCH
export
PATH
=
${
ANDROID_NDK
}
/toolchains/
${
PATH_HOST
}
-
${
GCCVER
}
/prebuilt/
`
uname
|tr A-Z a-z
`
-x86
/bin:
${
PATH
}
# 1/ libvlc, libvlccore and its plugins
TESTED_HASH
=
63c78d4
TESTED_HASH
=
7a216cf
if
[
!
-d
"vlc"
]
;
then
echo
"VLC source not found, cloning"
git clone git://git.videolan.org/vlc.git vlc
...
...
patches/0001-android-threads-support.patch
View file @
70919abc
From
54572a6b6a895706cabd9ca77b2007fe3055f6f3
Mon Sep 17 00:00:00 2001
From
cd7c00d436350273366720bb3a4d99c1799a4d92
Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= <funman@videolan.org>
Date: Sat, 10 Mar 2012 04:54:23 -0500
Subject: [PATCH
1/5
] android: threads support
Subject: [PATCH] android: threads support
emulate pthread_cancel (based on win32 code)
TODO:
...
...
@@ -37,7 +37,7 @@ are 100% shared with linux so it'd be useless to have 2 copies.
4 files changed, 256 insertions(+), 28 deletions(-)
diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index
7fcbf25..a32375f
100644
index
4dd6335..01a8101
100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -42,6 +42,15 @@
...
...
@@ -102,10 +102,10 @@ index d053faa..52840e8 100644
vlc_mutex_unlock (&lock);
}
diff --git a/src/Makefile.am b/src/Makefile.am
index
9572480..40c71de
100644
index
8f9a237..a267412
100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -
198,6 +198
,7 @@
libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
@@ -
205,6 +205
,7 @@
libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
EXTRA_libvlccore_la_SOURCES = \
$(SOURCES_libvlc_darwin) \
$(SOURCES_libvlc_linux) \
...
...
@@ -113,7 +113,7 @@ index 9572480..40c71de 100644
$(SOURCES_libvlc_win32) \
$(SOURCES_libvlc_os2) \
$(SOURCES_libvlc_other) \
@@ -2
08,6 +209
,9 @@
EXTRA_libvlccore_la_SOURCES = \
@@ -2
15,6 +216
,9 @@
EXTRA_libvlccore_la_SOURCES = \
if HAVE_DARWIN
libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
else
...
...
@@ -123,7 +123,7 @@ index 9572480..40c71de 100644
if HAVE_LINUX
libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
else
@@ -2
26,6 +230
,7 @@
endif
@@ -2
33,6 +237
,7 @@
endif
endif
endif
endif
...
...
@@ -131,7 +131,7 @@ index 9572480..40c71de 100644
if BUILD_HTTPD
libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
endif
@@ -2
46,6 +251
,18 @@
SOURCES_libvlc_darwin = \
@@ -2
53,6 +258
,18 @@
SOURCES_libvlc_darwin = \
posix/rand.c \
$(NULL)
...
...
@@ -151,7 +151,7 @@ index 9572480..40c71de 100644
posix/dirs.c \
posix/filesystem.c \
diff --git a/src/posix/thread.c b/src/posix/thread.c
index
5da8805..965c516
100644
index
1fc2b67..4bdc7b5
100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -1,5 +1,5 @@
...
...
@@ -162,15 +162,15 @@ index 5da8805..965c516 100644
* Copyright (C) 1999-2009 VLC authors and VideoLAN
*
@@ -43,6 +43,8 @@
#include <pthread.h>
#include <sched.h>
#include <sys/time.h> /* gettimeofday() */
+# include <android/log.h>
+
#ifdef __linux__
# include <sys/syscall.h> /* SYS_gettid */
#endif
@@ -
73,6 +75
,17 @@
@@ -
68,6 +70
,17 @@
# define _POSIX_MONOTONIC_CLOCK (-1)
#endif
...
...
@@ -188,7 +188,7 @@ index 5da8805..965c516 100644
#if (_POSIX_TIMERS > 0)
static unsigned vlc_clock_prec;
@@ -14
6,10 +159
,11 @@
void vlc_trace (const char *fn, const char *file, unsigned line)
@@ -14
1,10 +154
,11 @@
void vlc_trace (const char *fn, const char *file, unsigned line)
static inline unsigned long vlc_threadid (void)
{
...
...
@@ -202,7 +202,7 @@ index 5da8805..965c516 100644
#else
union { pthread_t th; unsigned long int i; } v = { };
v.th = pthread_self ();
@@ -16
9,7 +183
,7 @@
vlc_thread_fatal (const char *action, int error,
@@ -16
2,7 +176
,7 @@
vlc_thread_fatal (const char *action, int error,
const char *function, const char *file, unsigned line)
{
int canc = vlc_savecancel ();
...
...
@@ -211,7 +211,7 @@ index 5da8805..965c516 100644
action, error, vlc_threadid ());
vlc_trace (function, file, line);
@@ -33
5,6 +349
,57 @@
void vlc_mutex_unlock (vlc_mutex_t *p_mutex)
@@ -33
2,6 +346
,57 @@
void vlc_mutex_unlock (vlc_mutex_t *p_mutex)
VLC_THREAD_ASSERT ("unlocking mutex");
}
...
...
@@ -269,7 +269,7 @@ index 5da8805..965c516 100644
/**
* Initializes a condition variable.
*/
@@ -42
8,7 +493
,22 @@
void vlc_cond_broadcast (vlc_cond_t *p_condvar)
@@ -42
5,7 +490
,22 @@
void vlc_cond_broadcast (vlc_cond_t *p_condvar)
*/
void vlc_cond_wait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
{
...
...
@@ -292,7 +292,7 @@ index 5da8805..965c516 100644
VLC_THREAD_ASSERT ("waiting on condition");
}
@@ -4
50,10 +530
,25 @@
void vlc_cond_wait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
@@ -4
47,10 +527
,25 @@
void vlc_cond_wait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex,
mtime_t deadline)
{
...
...
@@ -318,7 +318,7 @@ index 5da8805..965c516 100644
return val;
}
@@ -5
32,10 +627
,14 @@
void vlc_sem_wait (vlc_sem_t *sem)
@@ -5
29,10 +624
,14 @@
void vlc_sem_wait (vlc_sem_t *sem)
val = EINVAL;
#else
...
...
@@ -336,7 +336,7 @@ index 5da8805..965c516 100644
#endif
VLC_THREAD_ASSERT ("locking semaphore");
@@ -7
20,7 +819
,22 @@
static int vlc_clone_attr (vlc_thread_t *th, pthread_attr_t *attr,
@@ -7
19,7 +818
,22 @@
static int vlc_clone_attr (vlc_thread_t *th, pthread_attr_t *attr,
assert (ret == 0); /* fails iif VLC_STACKSIZE is invalid */
#endif
...
...
@@ -360,7 +360,7 @@ index 5da8805..965c516 100644
pthread_sigmask (SIG_SETMASK, &oldset, NULL);
pthread_attr_destroy (attr);
return ret;
@@ -76
1,8 +875
,14 @@
int vlc_clone (vlc_thread_t *th, void *(*entry) (void *), void *data,
@@ -76
0,8 +874
,14 @@
int vlc_clone (vlc_thread_t *th, void *(*entry) (void *), void *data,
*/
void vlc_join (vlc_thread_t handle, void **result)
{
...
...
@@ -376,7 +376,7 @@ index 5da8805..965c516 100644
}
/**
@@ -84
2,10 +962
,25 @@
int vlc_set_priority (vlc_thread_t th, int priority)
@@ -84
1,10 +961
,25 @@
int vlc_set_priority (vlc_thread_t th, int priority)
*/
void vlc_cancel (vlc_thread_t thread_id)
{
...
...
@@ -406,7 +406,7 @@ index 5da8805..965c516 100644
}
/**
@@ -85
8,11 +993
,13 @@
void vlc_cancel (vlc_thread_t thread_id)
@@ -85
7,11 +992
,13 @@
void vlc_cancel (vlc_thread_t thread_id)
*/
int vlc_savecancel (void)
{
...
...
@@ -424,7 +424,7 @@ index 5da8805..965c516 100644
}
/**
@@ -87
2,18 +1009
,19 @@
int vlc_savecancel (void)
@@ -87
1,18 +1008
,19 @@
int vlc_savecancel (void)
*/
void vlc_restorecancel (int state)
{
...
...
@@ -450,7 +450,7 @@ index 5da8805..965c516 100644
#endif
}
@@ -89
6,13 +1034
,48 @@
void vlc_restorecancel (int state)
@@ -89
5,13 +1033
,48 @@
void vlc_restorecancel (int state)
*/
void vlc_testcancel (void)
{
...
...
@@ -502,7 +502,7 @@ index 5da8805..965c516 100644
}
/**
@@ -97
9,8 +1152
,23 @@
void msleep (mtime_t delay)
@@ -97
8,8 +1151
,23 @@
void msleep (mtime_t delay)
while (clock_nanosleep (vlc_clock_id, 0, &ts, &ts) == EINTR);
#else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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