adding gst-run code and make it be used

Original commit message from CVS:
adding gst-run code and make it be used
This commit is contained in:
Thomas Vander Stichele 2004-02-11 12:46:55 +00:00
parent 63d268ca03
commit dbded475d0
14 changed files with 374 additions and 123 deletions

View file

@ -1,3 +1,30 @@
2004-02-11 Thomas Vander Stichele <thomas at apestaart dot org>
* tools/Makefile.am:
* tools/gst-complete.1:
* tools/gst-complete.1.in:
* tools/gst-compprep.1:
* tools/gst-compprep.1.in:
* tools/gst-feedback:
* tools/gst-feedback-0.6:
* tools/gst-feedback-0.6.1.in:
* tools/gst-feedback.1:
* tools/gst-feedback.1.in:
* tools/gst-inspect.1:
* tools/gst-inspect.1.in:
* tools/gst-launch.1:
* tools/gst-launch.1.in:
* tools/gst-md5sum.1:
* tools/gst-md5sum.1.in:
* tools/gst-register.1:
* tools/gst-register.1.in:
* tools/gst-typefind.1:
* tools/gst-typefind.1.in:
* tools/gst-xmllaunch.1:
* tools/gst-xmllaunch.1.in:
add gst-run code to frontend for versioned tools
generate man pages
2004-02-11 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac: bump nano to 1 for cvs

View file

@ -1,63 +1,133 @@
### assemble a list of programs we want to build and install
if GST_DISABLE_REGISTRY
GST_REGISTRY_SRC =
GST_REGISTRY_SRC_V =
else
GST_REGISTRY_SRC = gst-register
GST_REGISTRY_SRC_V = gst-register-@GST_MAJORMINOR@
endif
if GST_DISABLE_LOADSAVE
GST_LOADSAVE_SRC =
GST_LOADSAVE_SRC_V =
else
GST_LOADSAVE_SRC = gst-compprep gst-xmllaunch gst-complete
GST_LOADSAVE_SRC = gst-complete gst-compprep gst-xmllaunch
GST_LOADSAVE_SRC_V = \
gst-complete-@GST_MAJORMINOR@ \
gst-compprep-@GST_MAJORMINOR@ \
gst-xmllaunch-@GST_MAJORMINOR@
endif
bin_PROGRAMS = gst-launch \
$(GST_REGISTRY_SRC) \
gst-inspect \
gst-typefind \
$(GST_LOADSAVE_SRC) \
gst-md5sum
GST_OTHER_SRC = \
gst-feedback \
gst-inspect \
gst-launch \
gst-md5sum \
gst-typefind \
gst-xmlinspect
GST_OTHER_SRC_V = \
gst-inspect-@GST_MAJORMINOR@ \
gst-launch-@GST_MAJORMINOR@ \
gst-md5sum-@GST_MAJORMINOR@ \
gst-typefind-@GST_MAJORMINOR@ \
gst-xmlinspect-@GST_MAJORMINOR@
bin_SCRIPTS = gst-feedback
man_MANS = gst-launch.1 gst-md5sum.1 gst-register.1 gst-inspect.1 \
gst-complete.1 gst-compprep.1 gst-xmllaunch.1 \
gst-feedback.1 gst-typefind.1
gst_launch_LDADD = $(GST_LIBS) #-lefence
gst_launch_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\"
gst_md5sum_LDADD = $(GST_LIBS) #-lefence
gst_md5sum_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\"
gst_typefind_LDADD = $(GST_LIBS) #-lefence
gst_typefind_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\"
### so all of the programs we want to build
bin_PROGRAMS = \
$(GST_REGISTRY_SRC) $(GST_REGISTRY_SRC_V) \
$(GST_LOADSAVE_SRC) $(GST_LOADSAVE_SRC_V) \
$(GST_OTHER_SRC) $(GST_OTHER_SRC_V)
bin_SCRIPTS = gst-feedback-@GST_MAJORMINOR@
# make sure each versioned tool has the right source file
if !GST_DISABLE_REGISTRY
gst_register_LDADD = $(GST_LIBS)
gst_register_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\"
gst_register_@GST_MAJORMINOR@_SOURCES = gst-register.c
endif
gst_inspect_LDADD = $(GST_LIBS) ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
gst_inspect_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\"
gst_complete_LDADD = $(GST_LIBS)
gst_complete_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\"
if !GST_DISABLE_LOADSAVE
gst_compprep_LDADD = $(GST_LIBS)
gst_compprep_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\"
gst_complete_@GST_MAJORMINOR@_SOURCES = gst-complete.c
gst_compprep_@GST_MAJORMINOR@_SOURCES = gst-compprep.c
gst_xmllaunch_@GST_MAJORMINOR@_SOURCES = gst-launch.c
endif
gst_inspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c
gst_launch_@GST_MAJORMINOR@_SOURCES = gst-launch.c
gst_md5sum_@GST_MAJORMINOR@_SOURCES = gst-md5sum.c
gst_typefind_@GST_MAJORMINOR@_SOURCES = gst-typefind.c
gst_xmlinspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c
gst_xmllaunch_SOURCES = gst-launch.c
gst_xmllaunch_LDADD = $(GST_LIBS)
gst_xmllaunch_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\"
# make sure each unversioned tool comes from gst-run.c
if !GST_DISABLE_REGISTRY
gst_register_SOURCES = gst-run.c
endif
if !GST_DISABLE_LOADSAVE
gst_complete_SOURCES = gst-run.c
gst_compprep_SOURCES = gst-run.c
gst_xmllaunch_SOURCES = gst-run.c
endif
gst_feedback_SOURCES = gst-run.c
gst_inspect_SOURCES = gst-run.c
gst_launch_SOURCES = gst-run.c
gst_md5sum_SOURCES = gst-run.c
gst_typefind_SOURCES = gst-run.c
gst_xmlinspect_SOURCES = gst-run.c
# set correct compile and link flags for all, as well as for specific
AM_CFLAGS = $(GST_CFLAGS)
AM_LDFLAGS = $(GST_LIBS)
gst_inspect_@GST_MAJORMINOR@_LDADD = ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
gst_xmlinspect_@GST_MAJORMINOR@_LDADD = ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
### man pages we want to install
if GST_DISABLE_REGISTRY
GST_REGISTRY_MAN = gst-register-@GST_MAJORMINOR@.1
else
GST_REGISTRY_MAN=
endif
EXTRA_DIST = $(man_MANS) gst-feedback
if GST_DISABLE_LOADSAVE
GST_LOADSAVE_MAN = \
gst-complete-@GST_MAJORMINOR@.1 \
gst-compprep-@GST_MAJORMINOR@.1 \
gst-xmllaunch-@GST_MAJORMINOR@.1
else
GST_LOADSAVE_MAN=
endif
GST_OTHER_MAN = \
gst-feedback-@GST_MAJORMINOR@.1 \
gst-inspect-@GST_MAJORMINOR@.1 \
gst-launch-@GST_MAJORMINOR@.1 \
gst-md5sum-@GST_MAJORMINOR@.1 \
gst-typefind-@GST_MAJORMINOR@.1
# gst-xmlinspect-@GST_MAJORMINOR@.1
manpages = $(GST_REGISTRY_MAN) $(GST_LOADSAVE_MAN) $(GST_OTHER_MAN)
CLEANFILES = $(manpages)
man_MANS = $(manpages)
EXTRA_DIST = \
gst-complete.1.in \
gst-compprep.1.in \
gst-feedback.1.in \
gst-inspect.1.in \
gst-launch.1.in \
gst-md5sum.1.in \
gst-register.1.in \
gst-typefind.1.in \
gst-xmllaunch.1.in \
gst-feedback-@GST_MAJORMINOR@
%-@GST_MAJORMINOR@.1: %.1.in
sed \
-e s,gst-complete,gst-complete-@GST_MAJORMINOR@,g \
-e s,gst-compprep,gst-compprep-@GST_MAJORMINOR@,g \
-e s,gst-feedback,gst-feedback-@GST_MAJORMINOR@,g \
-e s,gst-inspect,gst-inspect-@GST_MAJORMINOR@,g \
-e s,gst-launch,gst-launch-@GST_MAJORMINOR@,g \
-e s,gst-md5sum,gst-md5sum-@GST_MAJORMINOR@,g \
-e s,gst-register,gst-register-@GST_MAJORMINOR@,g \
-e s,gst-typefind,gst-typefind-@GST_MAJORMINOR@,g \
-e s,gst-xmllaunch,gst-xmllaunch-@GST_MAJORMINOR@,g \
$< >$@

View file

@ -1,84 +1,117 @@
#!/bin/sh
# this script provides feedback for GStreamer debugging
# the user can run this and provide the GStreamer developers with information
# about their system
#! /bin/sh
command_output ()
{
echo "+++ $1"
$1
}
# gst-feedback - temporary wrapper script for .libs/gst-feedback
# Generated by ltmain.sh - GNU libtool 1.5 (1.1220.2.1 2003/04/14 22:48:00)
#
# The gst-feedback program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.
echo "GStreamer feedback script."
echo "Please attach the output of this script to your bug reports."
echo "Bug reports should go into Gnome's bugzilla (http://bugzilla.gnome.org)"
echo
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed='/bin/sed -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
echo "+ SYSTEM INFORMATION"
command_output "uname -a"
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
if test "${CDPATH+set}" = set; then CDPATH=:; export CDPATH; fi
if test -f /etc/redhat-release; then
echo "+++ distribution: Red Hat"
cat /etc/redhat-release
relink_command="(cd /home/thomas/gst/0.6/gstreamer/tools; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; PATH=\"/home/thomas/gst/0.6/gstreamer/tools:/home/thomas/gst/0.6/gst-plugins/tools:/home/thomas/gst/0.6/gst-editor/src:/home/thomas/gst/0.6/gst-player/src:/home/thomas/gst/0.6/prefix/bin:/home/thomas/prefix/bin:/usr/kerberos/bin:/usr/lib/ccache/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thomas/bin:/usr/java/j2re1.4.1_02/bin\"; export PATH; gcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -Wall -DGST_DISABLE_DEPRECATED -g -I../libs -I../include -g -O2 -pthread -Wl,--export-dynamic -o \$progdir/\$file gst-run.o ../gst/.libs/libgstreamer-0.6.so /usr/lib/libxml2.so -lpthread -lz -lm -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -ldl -lglib-2.0 /usr/lib/libpopt.so -Wl,--rpath -Wl,/home/thomas/gst/0.6/gstreamer/gst/.libs -Wl,--rpath -Wl,/home/thomas/gst/cvs/prefix/lib)"
# This environment variable determines our operation mode.
if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
# install mode needs the following variable:
notinst_deplibs=' ../gst/libgstreamer-0.6.la'
else
# When we are sourced in execute mode, $file and $echo are already set.
if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
echo="echo"
file="$0"
# Make sure echo works.
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
# Yippee, $echo works!
:
else
# Restart under the correct shell, and then maybe $echo will work.
exec /bin/sh "$0" --no-reexec ${1+"$@"}
fi
fi
# Find the directory that this script lives in.
thisdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
test "x$thisdir" = "x$file" && thisdir=.
# Follow symbolic links until we get to the real thisdir.
file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'`
while test -n "$file"; do
destdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
# If there was a directory component, then change thisdir.
if test "x$destdir" != "x$file"; then
case "$destdir" in
[\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;;
*) thisdir="$thisdir/$destdir" ;;
esac
fi
file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'`
done
# Try to get the absolute directory name.
absdir=`cd "$thisdir" && pwd`
test -n "$absdir" && thisdir="$absdir"
program=lt-'gst-feedback'
progdir="$thisdir/.libs"
if test ! -f "$progdir/$program" || \
{ file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \
test "X$file" != "X$progdir/$program"; }; then
file="$$-$program"
if test ! -d "$progdir"; then
mkdir "$progdir"
else
rm -f "$progdir/$file"
fi
# relink executable if necessary
if test -n "$relink_command"; then
if relink_command_output=`eval $relink_command 2>&1`; then :
else
echo "$relink_command_output" >&2
rm -f "$progdir/$file"
exit 1
fi
fi
mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null ||
{ rm -f "$progdir/$program";
mv -f "$progdir/$file" "$progdir/$program"; }
rm -f "$progdir/$file"
fi
if test -f "$progdir/$program"; then
if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
# Run the actual program with our arguments.
exec $progdir/$program ${1+"$@"}
$echo "$0: cannot exec $program ${1+"$@"}"
exit 1
fi
else
# The program doesn't exist.
$echo "$0: error: $progdir/$program does not exist" 1>&2
$echo "This script is just a wrapper for $program." 1>&2
echo "See the libtool documentation for more information." 1>&2
exit 1
fi
fi
if test -f /etc/debian_version; then
echo "+++ distribution: Debian"
cat /etc/debian_version
fi
command_output "cat /etc/issue"
echo
echo "+ USER INFORMATION"
command_output "id"
echo
echo "+ PKG-CONFIG INFORMATION"
command_output "pkg-config --version"
command_output "pkg-config gstreamer --modversion"
command_output "pkg-config gstreamer --cflags"
command_output "pkg-config gstreamer --libs"
command_output "pkg-config gstreamer-libs --modversion"
command_output "pkg-config gstreamer-libs --cflags"
command_output "pkg-config gstreamer-libs --libs"
echo
echo "+ GSTREAMER INFORMATION"
command_output "which gst-register"
command_output "gst-inspect"
command_output "gst-inspect fakesrc"
command_output "gst-inspect fakesink"
command_output "gst-launch fakesrc num_buffers=5 ! fakesink"
echo "++ looking for gstreamer libraries in common locations"
for dirs in /usr/lib /usr/local/lib /home; do
if test -d $dirs; then
find $dirs -name libgstreamer* | grep so
fi
done
echo "++ looking for gstreamer headers in common locations"
for dirs in /usr/include /usr/local/include /home; do
if test -d $dirs; then
find $dirs -name gst.h
fi
done
echo "+ GSTREAMER PLUG-INS INFORMATION"
command_output "gst-inspect volume"
echo "++ looking for gstreamer volume plugin in common locations"
for dirs in /usr/lib /usr/local/lib /home; do
if test -d $dirs; then
find $dirs -name libgstvolume* | grep so
fi
done
echo "++ looking for gstreamer headers in common locations"
for dirs in /usr/include /usr/local/include /home; do
if test -d $dirs; then
find $dirs -name audio.h
fi
done

84
tools/gst-feedback-0.6 Executable file
View file

@ -0,0 +1,84 @@
#!/bin/sh
# this script provides feedback for GStreamer debugging
# the user can run this and provide the GStreamer developers with information
# about their system
command_output ()
{
echo "+++ $1"
$1
}
echo "GStreamer feedback script."
echo "Please attach the output of this script to your bug reports."
echo "Bug reports should go into Gnome's bugzilla (http://bugzilla.gnome.org)"
echo
echo "+ SYSTEM INFORMATION"
command_output "uname -a"
if test -f /etc/redhat-release; then
echo "+++ distribution: Red Hat"
cat /etc/redhat-release
fi
if test -f /etc/debian_version; then
echo "+++ distribution: Debian"
cat /etc/debian_version
fi
command_output "cat /etc/issue"
echo
echo "+ USER INFORMATION"
command_output "id"
echo
echo "+ PKG-CONFIG INFORMATION"
command_output "pkg-config --version"
command_output "pkg-config gstreamer --modversion"
command_output "pkg-config gstreamer --cflags"
command_output "pkg-config gstreamer --libs"
command_output "pkg-config gstreamer-libs --modversion"
command_output "pkg-config gstreamer-libs --cflags"
command_output "pkg-config gstreamer-libs --libs"
echo
echo "+ GSTREAMER INFORMATION"
command_output "which gst-register"
command_output "gst-inspect"
command_output "gst-inspect fakesrc"
command_output "gst-inspect fakesink"
command_output "gst-launch fakesrc num_buffers=5 ! fakesink"
echo "++ looking for gstreamer libraries in common locations"
for dirs in /usr/lib /usr/local/lib /home; do
if test -d $dirs; then
find $dirs -name libgstreamer* | grep so
fi
done
echo "++ looking for gstreamer headers in common locations"
for dirs in /usr/include /usr/local/include /home; do
if test -d $dirs; then
find $dirs -name gst.h
fi
done
echo "+ GSTREAMER PLUG-INS INFORMATION"
command_output "gst-inspect volume"
echo "++ looking for gstreamer volume plugin in common locations"
for dirs in /usr/lib /usr/local/lib /home; do
if test -d $dirs; then
find $dirs -name libgstvolume* | grep so
fi
done
echo "++ looking for gstreamer headers in common locations"
for dirs in /usr/include /usr/local/include /home; do
if test -d $dirs; then
find $dirs -name audio.h
fi
done

View file

@ -0,0 +1,37 @@
.TH GStreamer 1 "June 2002"
.SH NAME
gst\-feedback - generate debug info for GStreamer bug reports
.SH SYNOPSIS
.B gst-feedback-0.6
.SH DESCRIPTION
.PP
\fIgst\-feedback\fP is a utility that scans the system for various
information that is useful to GStreamer developers to help diagnose
user problem.
.PP
Depending on the type of bug report, it may be useful to attach the
output of \fIgst\-feeback\fP when you contact the developers.
.PP
NOTE: The current version of this script scans many dirs:
/usr/lib /usr/local/lib /home /usr/include /usr/local/include /home (again)
for various GStreamer installations. Depending on your system you may not
want to do this. Improvements to the script are welcome.
.SH USAGE
Generate the feedback information by running \fIgst\-feedback\fP:
.TP 8
.B gst\-feedback
.TP -8
Possibly redirect output and errors to a file:
.TP 8
.B gst\-feedback &> myfeedback
.SH WARNING
The \fIgst\-feedback\fP dumps a lot of information about a system, some
of which may be considered sensitive. If this is a concern, review the
information before posting to a public forum, such as the GStreamer bug
tracking system.
.SH SEE ALSO
.BR gst\-launch (1),
.BR gst\-register (1),
.BR gst\-inspect (1),
.SH AUTHOR
The GStreamer team at http://gstreamer.net/