Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
19868f14
Commit
19868f14
authored
Oct 03, 2001
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Added an endianness check for cross-compilations.
* We now check for sys/times.h.
parent
f46ba5d4
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
442 additions
and
319 deletions
+442
-319
configure
configure
+345
-289
configure.in
configure.in
+71
-14
include/defs.h.in
include/defs.h.in
+4
-1
src/input/input.c
src/input/input.c
+7
-5
src/video_decoder/video_parser.c
src/video_decoder/video_parser.c
+7
-5
src/video_output/video_output.c
src/video_output/video_output.c
+8
-5
No files found.
configure
View file @
19868f14
This diff is collapsed.
Click to expand it.
configure.in
View file @
19868f14
...
...
@@ -33,11 +33,68 @@ AC_PROG_RANLIB
dnl AM_PROG_LIBTOOL
AC_PROG_INSTALL
dnl Check for endianness
dnl if we cross compile for win32, we don't need to test it.
dnl quick and udly hack. Gonna search the way to do it better.
if eval "test $CC = gcc"; then
AC_C_BIGENDIAN
dnl
dnl Endianness check, with a special test for cross-compilation
dnl
if test x${cross_compiling} != xyes; then
AC_C_BIGENDIAN
else
dnl We are crosscompiling, give the user the opportunity to specify
dnl --with-words=big or --with-words=little ; otherwise, try to guess
AC_ARG_WITH(words,
[ --with-words=endianness Set endianness (big or little)])
case "x$withval" in
xbig)
ac_cv_c_bigendian=yes
;;
xlittle)
ac_cv_c_bigendian=no
;;
*)
dnl Try to guess endianness by matching patterns on a compiled
dnl binary, by looking for an ASCII or EBCDIC string
ac_cv_c_bigendian=unknown
AC_MSG_CHECKING(what the byte order looks to be)[
cat >conftest.c <<EOF
short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
void _a(void) { char*s = (char*)am; s = (char *)ai; }
short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
void _e(void) { char*s = (char*)em; s = (char*)ei; }
int main(void) { _a(); _e(); return 0; }
EOF
]
if test -f conftest.c
then
if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
&& test -f conftest.o
then
if test `grep -l BIGenDianSyS conftest.o`
then
AC_MSG_RESULT("big endian")
ac_cv_c_bigendian=yes
fi
if test `grep -l LiTTleEnDian conftest.o`
then
AC_MSG_RESULT("little endian")
ac_cv_c_bigendian=no
fi
fi
fi
if test $ac_cv_c_bigendian = xunknown
then
AC_MSG_ERROR([Could not guess endianness, please use --with-words])
fi
dnl Now we know what to use for endianness, just put it in the header
if test $ac_cv_c_bigendian = yes
then
cat >> confdefs.h <<\EOF
#define WORDS_BIGENDIAN 1
EOF
fi
;;
esac
fi
dnl Check for system libs needed
...
...
@@ -106,7 +163,7 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[
dnl Check for headers
AC_CHECK_HEADERS(stddef.h getopt.h strings.h)
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/time.h)
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/time.h
sys/times.h
)
AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
AC_CHECK_HEADERS(dlfcn.h image.h)
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
...
...
include/defs.h.in
View file @
19868f14
/* include/defs.h.in. Generated automatically from configure.in by autoheader. */
/* include/defs.h.in. Generated automatically from configure.in by autoheader
2.13
. */
/* Define to empty if the keyword does not work. */
#undef const
...
...
@@ -160,6 +160,9 @@
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define if you have the <sys/times.h> header file. */
#undef HAVE_SYS_TIMES_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
...
...
src/input/input.c
View file @
19868f14
...
...
@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.1
39 2001/10/03 12:58:57 massiot
Exp $
* $Id: input.c,v 1.1
40 2001/10/03 13:14:05 sam
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -57,8 +57,8 @@
# include <sys/socket.h>
#endif
#if
ndef WIN32
#include <sys/times.h>
#if
def HAVE_SYS_TIMES_H
#
include <sys/times.h>
#endif
#include "config.h"
...
...
@@ -498,17 +498,19 @@ static void EndThread( input_thread_t * p_input )
if
(
p_main
->
b_stats
)
{
#ifdef HAVE_SYS_TIMES_H
/* Display statistics */
#ifndef WIN32
struct
tms
cpu_usage
;
times
(
&
cpu_usage
);
intf_StatMsg
(
"input stats: %d loops consuming user: %d, system: %d"
,
p_input
->
c_loops
,
cpu_usage
.
tms_utime
,
cpu_usage
.
tms_stime
);
#else
intf_StatMsg
(
"input stats: %d loops"
,
p_input
->
c_loops
);
#endif
input_DumpStream
(
p_input
);
#endif
}
/* Free all ES and destroy all decoder threads */
...
...
src/video_decoder/video_parser.c
View file @
19868f14
...
...
@@ -2,7 +2,7 @@
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_parser.c,v 1.
7 2001/10/03 03:32:05 xav
Exp $
* $Id: video_parser.c,v 1.
8 2001/10/03 13:14:05 sam
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
...
...
@@ -36,8 +36,8 @@
#include <errno.h>
#include <string.h>
#if
ndef WIN32
#include <sys/times.h>
#if
def HAVE_SYS_TIMES_H
#
include <sys/times.h>
#endif
#include "config.h"
...
...
@@ -318,15 +318,18 @@ static void EndThread( vpar_thread_t *p_vpar )
if
(
p_main
->
b_stats
)
{
#ifndef WIN32
#ifdef HAVE_SYS_TIMES_H
struct
tms
cpu_usage
;
times
(
&
cpu_usage
);
#endif
intf_StatMsg
(
"vpar stats: %d loops among %d sequence(s)"
,
p_vpar
->
c_loops
,
p_vpar
->
c_sequences
);
#ifdef HAVE_SYS_TIMES_H
intf_StatMsg
(
"vpar stats: cpu usage (user: %d, system: %d)"
,
cpu_usage
.
tms_utime
,
cpu_usage
.
tms_stime
);
#endif
intf_StatMsg
(
"vpar stats: Read %d frames/fields (I %d/P %d/B %d)"
,
p_vpar
->
pc_pictures
[
I_CODING_TYPE
]
...
...
@@ -359,7 +362,6 @@ static void EndThread( vpar_thread_t *p_vpar )
S
.
i_scalable_mode
?
"scalable"
:
"non-scalable"
,
S
.
i_matrix_coefficients
);
#undef S
#endif
}
/* Dispose of matrices if they have been allocated. */
...
...
src/video_output/video_output.c
View file @
19868f14
...
...
@@ -5,7 +5,7 @@
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: video_output.c,v 1.14
2 2001/10/03 03:32:05 xav
Exp $
* $Id: video_output.c,v 1.14
3 2001/10/03 13:14:05 sam
Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
...
...
@@ -34,8 +34,8 @@
#include <stdio.h>
/* sprintf() */
#include <string.h>
/* strerror() */
#if
ndef WIN32
#include <sys/times.h>
#if
def HAVE_SYS_TIMES_H
#
include <sys/times.h>
#endif
#include "config.h"
...
...
@@ -1360,17 +1360,20 @@ static void EndThread( vout_thread_t *p_vout )
if
(
p_main
->
b_stats
)
{
#ifndef WIN32
#ifdef HAVE_SYS_TIMES_H
struct
tms
cpu_usage
;
times
(
&
cpu_usage
);
intf_StatMsg
(
"vout info: %d loops consuming user: %d, system: %d"
,
p_vout
->
c_loops
,
cpu_usage
.
tms_utime
,
cpu_usage
.
tms_stime
);
#else
intf_StatMsg
(
"vout info: %d loops"
,
p_vout
->
c_loops
);
#endif
intf_StatMsg
(
"vout info: %d pictures received, discarded %d"
,
p_vout
->
c_pictures
,
p_vout
->
c_late_pictures
);
intf_StatMsg
(
"vout info: average display jitter of %lld s"
,
p_vout
->
display_jitter
);
#endif
}
/* Destroy all remaining pictures and subpictures */
...
...
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