Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
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
videolan
vlc-gpu
Commits
a790ccc6
Commit
a790ccc6
authored
Dec 16, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for vmsplice() since Middle Ages libc didn't have it
parent
5d00d361
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
configure.ac
configure.ac
+1
-1
modules/stream_filter/decomp.c
modules/stream_filter/decomp.c
+7
-7
No files found.
configure.ac
View file @
a790ccc6
...
@@ -492,7 +492,7 @@ dnl Check for system libs needed
...
@@ -492,7 +492,7 @@ dnl Check for system libs needed
need_libc=false
need_libc=false
dnl Check for usual libc functions
dnl Check for usual libc functions
AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid_r memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv posix_fadvise posix_madvise uselocale])
AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid_r memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv posix_fadvise posix_madvise uselocale
vmsplice
])
AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)])
AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)])
...
...
modules/stream_filter/decomp.c
View file @
a790ccc6
...
@@ -31,13 +31,13 @@
...
@@ -31,13 +31,13 @@
#include <spawn.h>
#include <spawn.h>
#include <sys/wait.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <sys/ioctl.h>
#if
def __linux__
#if
defined (__linux__) && defined (HAVE_VMSPLICE)
# include <sys/uio.h>
# include <sys/uio.h>
# include <sys/mman.h>
# include <sys/mman.h>
#else
# undef HAVE_VMSPLICE
#endif
#endif
#include <assert.h>
static
int
OpenGzip
(
vlc_object_t
*
);
static
int
OpenGzip
(
vlc_object_t
*
);
static
int
OpenBzip2
(
vlc_object_t
*
);
static
int
OpenBzip2
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
...
@@ -82,7 +82,7 @@ static void *Thread (void *data)
...
@@ -82,7 +82,7 @@ static void *Thread (void *data)
{
{
stream_t
*
stream
=
data
;
stream_t
*
stream
=
data
;
stream_sys_t
*
p_sys
=
stream
->
p_sys
;
stream_sys_t
*
p_sys
=
stream
->
p_sys
;
#ifdef
__linux__
#ifdef
HAVE_VMSPLICE
ssize_t
page_mask
=
sysconf
(
_SC_PAGE_SIZE
)
-
1
;
ssize_t
page_mask
=
sysconf
(
_SC_PAGE_SIZE
)
-
1
;
#endif
#endif
int
fd
=
p_sys
->
write_fd
;
int
fd
=
p_sys
->
write_fd
;
...
@@ -92,7 +92,7 @@ static void *Thread (void *data)
...
@@ -92,7 +92,7 @@ static void *Thread (void *data)
{
{
ssize_t
len
;
ssize_t
len
;
int
canc
=
vlc_savecancel
();
int
canc
=
vlc_savecancel
();
#ifdef
__linux__
#ifdef
HAVE_VMSPLICE
unsigned
char
*
buf
=
mmap
(
NULL
,
bufsize
,
PROT_READ
|
PROT_WRITE
,
unsigned
char
*
buf
=
mmap
(
NULL
,
bufsize
,
PROT_READ
|
PROT_WRITE
,
MAP_PRIVATE
|
MAP_ANONYMOUS
,
-
1
,
0
);
MAP_PRIVATE
|
MAP_ANONYMOUS
,
-
1
,
0
);
vlc_cleanup_push
(
cleanup_mmap
,
buf
);
vlc_cleanup_push
(
cleanup_mmap
,
buf
);
...
@@ -106,7 +106,7 @@ static void *Thread (void *data)
...
@@ -106,7 +106,7 @@ static void *Thread (void *data)
for
(
ssize_t
i
=
0
,
j
;
i
<
len
;
i
+=
j
)
for
(
ssize_t
i
=
0
,
j
;
i
<
len
;
i
+=
j
)
{
{
#ifdef
__linux__
#ifdef
HAVE_VMSPLICE
if
((
len
-
i
)
<=
page_mask
)
/* incomplete last page */
if
((
len
-
i
)
<=
page_mask
)
/* incomplete last page */
j
=
write
(
fd
,
buf
+
i
,
len
-
i
);
j
=
write
(
fd
,
buf
+
i
,
len
-
i
);
else
else
...
@@ -126,7 +126,7 @@ static void *Thread (void *data)
...
@@ -126,7 +126,7 @@ static void *Thread (void *data)
break
;
break
;
}
}
}
}
#ifdef
__linux__
#ifdef
HAVE_VMSPLICE
vlc_cleanup_run
();
/* munmap (buf, bufsize) */
vlc_cleanup_run
();
/* munmap (buf, bufsize) */
#endif
#endif
}
}
...
...
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