fix slow motion play

replace cpuinfo.sh
clear v4l structures before using (vloopback)
This commit is contained in:
niels
2010-11-29 12:22:33 +01:00
parent 6ad1f51e96
commit 6dd1bcd55f
5 changed files with 37 additions and 12 deletions

View File

@@ -144,6 +144,9 @@ case "$pvendor" in
# synonym for 'k8' # synonym for 'k8'
proc=k8 proc=k8
;; ;;
16)
proc=barcelona
;;
*) proc=athlon-xp *) proc=athlon-xp
;; ;;
esac esac
@@ -162,7 +165,9 @@ case "$pvendor" in
fi fi
;; ;;
6) iproc=686 6) iproc=686
if test "$pmodel" -ge 15; then if test "$pmodel" -ge 23; then
proc=core2
elif test "$pmodel" -ge 15; then
proc=nocona proc=nocona
elif test "$pmodel" -ge 13; then elif test "$pmodel" -ge 13; then
proc=pentium-m proc=pentium-m
@@ -223,6 +228,11 @@ if test "$proc" = "k6"; then
fi fi
fi fi
# Seems some variants of gcc accept 'core2' instead of 'nocona'.
if test "$proc" = "core2"; then
do_cc -march=$proc $_opt_mcpu=$proc || proc=nocona
fi
if test "$proc" = "pentium4" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon"; then if test "$proc" = "pentium4" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon"; then
do_cc -march=$proc $_opt_mcpu=$proc || proc=i686 do_cc -march=$proc $_opt_mcpu=$proc || proc=i686
fi fi
@@ -239,7 +249,7 @@ if test "$proc" = "i386" ; then
do_cc -march=$proc $_opt_mcpu=$proc || proc=error do_cc -march=$proc $_opt_mcpu=$proc || proc=error
fi fi
if test "$proc" = "error" ; then if test "$proc" = "error" ; then
echo "Your $_cc does not even support \"i386\" for '-march' and $_opt_mcpu." echo "Your $CC does not even support \"i386\" for '-march' and $_opt_mcpu."
_mcpu="" _mcpu=""
_march="" _march=""
elif test "$proc" = "i586-i686"; then elif test "$proc" = "i586-i686"; then

View File

@@ -1,12 +1,12 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl AC_INIT dnl AC_INIT
AC_INIT([veejay],[1.5.6],[veejay-users@lists.sourceforge.net]) AC_INIT([veejay],[1.5.7],[veejay-users@lists.sourceforge.net])
AC_PREREQ(2.57) AC_PREREQ(2.57)
AC_CONFIG_SRCDIR([veejay/veejay.c]) AC_CONFIG_SRCDIR([veejay/veejay.c])
VEEJAY_MAJOR_VERSION=1 VEEJAY_MAJOR_VERSION=1
VEEJAY_MINOR_VERSION=5 VEEJAY_MINOR_VERSION=5
VEEJAY_MICRO_VERSION=6 VEEJAY_MICRO_VERSION=7
VEEJAY_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION VEEJAY_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION
VEEJAY_CODENAME="Veejay Classic - build $VEEJAY_MINOR_VERSION $VEEJAY_MICRO_VERSION" VEEJAY_CODENAME="Veejay Classic - build $VEEJAY_MINOR_VERSION $VEEJAY_MICRO_VERSION"
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])

View File

@@ -165,7 +165,9 @@ case "$pvendor" in
fi fi
;; ;;
6) iproc=686 6) iproc=686
if test "$pmodel" -ge 15; then if test "$pmodel" -ge 23; then
proc=core2
elif test "$pmodel" -ge 15; then
proc=nocona proc=nocona
elif test "$pmodel" -ge 13; then elif test "$pmodel" -ge 13; then
proc=pentium-m proc=pentium-m
@@ -226,6 +228,11 @@ if test "$proc" = "k6"; then
fi fi
fi fi
# Seems some variants of gcc accept 'core2' instead of 'nocona'.
if test "$proc" = "core2"; then
do_cc -march=$proc $_opt_mcpu=$proc || proc=nocona
fi
if test "$proc" = "pentium4" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon"; then if test "$proc" = "pentium4" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon"; then
do_cc -march=$proc $_opt_mcpu=$proc || proc=i686 do_cc -march=$proc $_opt_mcpu=$proc || proc=i686
fi fi
@@ -242,7 +249,7 @@ if test "$proc" = "i386" ; then
do_cc -march=$proc $_opt_mcpu=$proc || proc=error do_cc -march=$proc $_opt_mcpu=$proc || proc=error
fi fi
if test "$proc" = "error" ; then if test "$proc" = "error" ; then
echo "Your $CC does not even support \"i386\" for '-march' and $_opt_mcpu." #dont care , dont set
_mcpu="" _mcpu=""
_march="" _march=""
elif test "$proc" = "i586-i686"; then elif test "$proc" = "i586-i686"; then

View File

@@ -44,7 +44,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <errno.h>
#include <linux/videodev.h> #include <linux/videodev.h>
#include <libvjmem/vjmem.h> #include <libvjmem/vjmem.h>
#include <libvjmsg/vj-msg.h> #include <libvjmsg/vj-msg.h>
@@ -124,6 +124,9 @@ int vj_vloopback_start_pipe( void *vloop )
vj_vloopback_t *v = (vj_vloopback_t*) vloop; vj_vloopback_t *v = (vj_vloopback_t*) vloop;
memset( &win , 0 , sizeof(struct video_window));
memset( &caps, 0 , sizeof(struct video_capability));
memset( &pic, 0, sizeof(struct video_picture));
if(!v) return 0; if(!v) return 0;
if(v->mode != VLOOPBACK_PIPE) if(v->mode != VLOOPBACK_PIPE)
@@ -134,13 +137,13 @@ int vj_vloopback_start_pipe( void *vloop )
/* get capabilities */ /* get capabilities */
if( ioctl( v->fd, VIDIOCGCAP, &caps ) < 0 ) if( ioctl( v->fd, VIDIOCGCAP, &caps ) < 0 )
{ {
veejay_msg(VEEJAY_MSG_DEBUG, "Cant get video capabilities"); veejay_msg(VEEJAY_MSG_DEBUG, "Cant get video capabilities: %s", strerror(errno));
return 0; return 0;
} }
/* get picture */ /* get picture */
if( ioctl( v->fd, VIDIOCGPICT, &pic ) < 0 ) if( ioctl( v->fd, VIDIOCGPICT, &pic ) < 0 )
{ {
veejay_msg(VEEJAY_MSG_DEBUG, "Cant get video picture"); veejay_msg(VEEJAY_MSG_DEBUG, "Cant get video picture: %s", strerror(errno));
return 0; return 0;
} }
/* set palette */ /* set palette */

View File

@@ -2586,9 +2586,14 @@ static void veejay_playback_cycle(veejay_t * info)
#endif #endif
if( info->pause_render ) { if( info->pause_render ) {
int hti = settings->current_playback_speed ? 1:0;
if( hti == 0 )
hti = info->sfd ? 1: 0;
if( hti ) {
settings->buffer_entry[frame] = (settings->buffer_entry[frame]+1)%2; //@!
} else {
settings->buffer_entry[frame] = settings->current_frame_num; settings->buffer_entry[frame] = settings->current_frame_num;
if(info->sfd > 1 ) //@ kick the renderer or it wont see slowed frames }
settings->buffer_entry[frame]++;
} else { } else {
settings->buffer_entry[frame] = (settings->buffer_entry[frame] + 1 ) % 2; settings->buffer_entry[frame] = (settings->buffer_entry[frame] + 1 ) % 2;