tools/: Remove gst-md5sum and man page (the md5sink element required was removed ages ago)

Original commit message from CVS:
* tools/Makefile.am:
* tools/gst-md5sum.1.in:
* tools/gst-md5sum.c:
Remove gst-md5sum and man page (the md5sink element
required was removed ages ago)
This commit is contained in:
Tim-Philipp Müller 2006-03-21 14:41:58 +00:00
parent 1f1dfef0dc
commit 779842dbb3
4 changed files with 11 additions and 185 deletions

View file

@ -1,3 +1,11 @@
2006-03-21 Tim-Philipp Müller <tim at centricular dot net>
* tools/Makefile.am:
* tools/gst-md5sum.1.in:
* tools/gst-md5sum.c:
Remove gst-md5sum and man page (the md5sink element
required was removed ages ago)
2006-03-21 Tim-Philipp Müller <tim at centricular dot net>
* gst/gststructure.c: (gst_structure_id_set_value):

View file

@ -13,10 +13,8 @@ if GST_DISABLE_PARSE
GST_PARSE_SRC =
GST_PARSE_SRC_V =
else
GST_PARSE_SRC = gst-launch gst-md5sum
GST_PARSE_SRC_V = \
gst-launch-@GST_MAJORMINOR@ \
gst-md5sum-@GST_MAJORMINOR@
GST_PARSE_SRC = gst-launch
GST_PARSE_SRC_V = gst-launch-@GST_MAJORMINOR@
endif
@ -48,9 +46,6 @@ if !GST_DISABLE_PARSE
gst_launch_@GST_MAJORMINOR@_SOURCES = gst-launch.c
gst_launch_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
gst_launch_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
gst_md5sum_@GST_MAJORMINOR@_SOURCES = gst-md5sum.c
gst_md5sum_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
gst_md5sum_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
endif
gst_inspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c
@ -74,7 +69,6 @@ endif
if !GST_DISABLE_PARSE
gst_launch_SOURCES = gst-run.c
gst_md5sum_SOURCES = gst-run.c
endif
gst_feedback_SOURCES = gst-run.c
@ -100,8 +94,7 @@ if GST_DISABLE_PARSE
GST_PARSE_MAN=
else
GST_PARSE_MAN = \
gst-launch-@GST_MAJORMINOR@.1 \
gst-md5sum-@GST_MAJORMINOR@.1
gst-launch-@GST_MAJORMINOR@.1
endif
@ -124,7 +117,6 @@ EXTRA_DIST = \
gst-feedback.1.in \
gst-inspect.1.in \
gst-launch.1.in \
gst-md5sum.1.in \
gst-typefind.1.in \
gst-xmlinspect.1.in \
gst-xmllaunch.1.in \
@ -135,7 +127,6 @@ EXTRA_DIST = \
-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-typefind,gst-typefind-@GST_MAJORMINOR@,g \
-e s,gst-xmlinspect,gst-xmlinspect-@GST_MAJORMINOR@,g \
-e s,gst-xmllaunch,gst-xmllaunch-@GST_MAJORMINOR@,g \

View file

@ -1,61 +0,0 @@
.TH "GStreamer" "1" "September 2002"
.SH "NAME"
gst\-md5sum \- get an md5sum of a GStreamer pipeline through md5sink
.SH "SYNOPSIS"
\fBgst\-md5sum\fR \fI[OPTION...]\fR PARTIAL\-PIPELINE\-DESCRIPTION
.SH "DESCRIPTION"
.LP
\fIgst\-md5sum\fP generates MD5 checksums of the data generated by
a GStreamer pipeline.
In theory, running
gst-md5sum filesrc location=music.mp3
should print out the same checksum as
md5sum music.mp3
If the pipeline contains an md5sink element, gst-md5sum will query it
for the md5sum at the end of pipeline iteration.
If it doesn't contain an md5sink element, gst-md5sum will automatically
connect an md5sink to the right hand side of the given pipeline.
See the man page for gst\-launch or the GStreamer docuementation for
more information on how to create a PARTIAL\-PIPELINE\-DESCRIPTION.
.
.SH "OPTIONS"
.l
\fIgst\-md5sum\fP accepts the following options:
.TP 8
.B \-\-help
Print help synopsis and available FLAGS
.TP 8
.B \-v
Output verbose information
.TP 8
.B \-\-gst\-info\-mask=FLAGS
\fIGStreamer\fP info flags to set (list with \-\-help)
.TP 8
.B \-\-gst\-debug\-mask=FLAGS
\fIGStreamer\fP debugging flags to set (list with \-\-help)
.TP 8
.B \-\-gst\-mask=FLAGS
\fIGStreamer\fP info and debugging flags to set (list with \-\-help)
.TP 8
.B \-\-gst\-plugin\-spew
\fIGStreamer\fP info flags to set
Enable printout of errors while loading \fIGStreamer\fP plugins
.TP 8
.B \-\-gst\-plugin\-path=PATH
Add directories separated with ':' to the plugin search path
.
.SH "SEE ALSO"
.BR gst\-feedback (1),
.BR gst\-inspect (1),
.BR gst\-launch (1),
.BR gst\-typefind (1)
.SH "AUTHOR"
The GStreamer team at http://gstreamer.freedesktop.org/

View file

@ -1,112 +0,0 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <string.h>
#include <stdlib.h>
#include <gst/gst.h>
#include <locale.h>
/* blocking */
static gboolean
event_loop (GstElement * pipeline)
{
GstBus *bus;
GstMessage *message = NULL;
bus = gst_element_get_bus (GST_ELEMENT (pipeline));
while (TRUE) {
message = gst_bus_poll (bus, GST_MESSAGE_ANY, -1);
g_return_val_if_fail (message != NULL, TRUE);
switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_EOS:
gst_message_unref (message);
return FALSE;
case GST_MESSAGE_WARNING:
case GST_MESSAGE_ERROR:{
GError *gerror;
gchar *debug;
gst_message_parse_error (message, &gerror, &debug);
gst_message_unref (message);
gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
g_error_free (gerror);
g_free (debug);
return TRUE;
}
default:
gst_message_unref (message);
break;
}
}
g_assert_not_reached ();
return TRUE;
}
int
main (int argc, char *argv[])
{
GstElement *pipeline = NULL;
GError *error = NULL;
GstElement *md5sink;
gchar **argvn;
gchar *md5string = g_malloc0 (33);
free (malloc (8)); /* -lefence */
setlocale (LC_ALL, "");
gst_init (&argc, &argv);
argvn = g_new0 (char *, argc);
memcpy (argvn, argv + 1, sizeof (char *) * (argc - 1));
pipeline = (GstElement *) gst_parse_launchv ((const gchar **) argvn, &error);
if (!pipeline) {
if (error) {
g_warning ("pipeline could not be constructed: %s\n", error->message);
g_error_free (error);
} else
g_warning ("pipeline could not be constructed\n");
return 1;
}
md5sink = gst_bin_get_by_name (GST_BIN (pipeline), "md5sink0");
if (md5sink == NULL) {
g_print ("ERROR: pipeline has no element named md5sink0.\n");
g_print ("Did you forget to put an md5sink in the pipeline?\n");
return 1;
}
if (!pipeline) {
if (error) {
g_warning ("pipeline could not be constructed: %s\n", error->message);
g_error_free (error);
} else
g_warning ("pipeline could not be constructed\n");
return 1;
}
if (gst_element_set_state (pipeline,
GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS) {
g_warning ("pipeline doesn't want to play\n");
return 1;
}
event_loop (pipeline);
gst_element_set_state (pipeline, GST_STATE_NULL);
/* print out md5sink here */
md5sink = gst_bin_get_by_name (GST_BIN (pipeline), "md5sink0");
g_assert (md5sink);
g_object_get (G_OBJECT (md5sink), "md5", &md5string, NULL);
printf ("%s\n", md5string);
gst_object_unref (pipeline);
return 0;
}