mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
Update for 'mad' mp3 decoder removal
https://bugzilla.gnome.org/show_bug.cgi?id=776140
This commit is contained in:
parent
b8344ea997
commit
24ee608947
7 changed files with 6 additions and 186 deletions
|
@ -26,7 +26,7 @@
|
|||
* <refsect2>
|
||||
* <title>Example launch line</title>
|
||||
* |[
|
||||
* gst-launch-1.0 -v filesrc location=/path/to/mkv ! matroskademux name=d ! queue ! mpegaudioparse ! mad ! audioconvert ! autoaudiosink d. ! queue ! h264parse ! avdec_h264 ! videoconvert ! r. d. ! queue ! "application/x-ass" ! assrender name=r ! videoconvert ! autovideosink
|
||||
* gst-launch-1.0 -v filesrc location=/path/to/mkv ! matroskademux name=d ! queue ! mpegaudioparse ! mpg123audiodec ! audioconvert ! autoaudiosink d. ! queue ! h264parse ! avdec_h264 ! videoconvert ! r. d. ! queue ! "application/x-ass" ! assrender name=r ! videoconvert ! autovideosink
|
||||
* ]| This pipeline demuxes a Matroska file with h.264 video, MP3 audio and embedded ASS subtitles and renders the subtitles on top of the video.
|
||||
* </refsect2>
|
||||
*/
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
* <refsect2>
|
||||
* <title>Example launch line</title>
|
||||
* |[ FIXME
|
||||
* gst-launch-1.0 -v filesrc location=/path/to/ts ! mpegtsdemux name=d ! queue ! mpegaudioparse ! mad ! audioconvert ! autoaudiosink \
|
||||
* d. ! queue ! mpeg2dec ! videoconvert ! r. \
|
||||
* gst-launch-1.0 -v filesrc location=/path/to/ts ! mpegtsdemux name=d ! queue ! mpegaudioparse ! mpg123audiodec ! audioconvert ! autoaudiosink \
|
||||
* d. ! queue ! mpegvideoparse ! mpeg2dec ! videoconvert ! r. \
|
||||
* d. ! queue ! "subpicture/x-dvb" ! dvbsuboverlay name=r ! videoconvert ! autovideosink
|
||||
* ]| This pipeline demuxes a MPEG-TS file with MPEG2 video, MP3 audio and embedded DVB subtitles and renders the subtitles on top of the video.
|
||||
* </refsect2>
|
||||
|
|
|
@ -8,11 +8,3 @@ libgstspeed_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
|||
libgstspeed_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
|
||||
|
||||
noinst_HEADERS = gstspeed.h
|
||||
|
||||
#if HAVE_GTK
|
||||
#noinst_PROGRAMS = demo-mp3
|
||||
#endif
|
||||
|
||||
#demo_mp3_SOURCES = demo-mp3.c
|
||||
#demo_mp3_CFLAGS = $(GTK_CFLAGS) $(GST_CFLAGS)
|
||||
#demo_mp3_LDFLAGS = $(GST_LIBS) $(GTK_LIBS)
|
||||
|
|
|
@ -1,123 +0,0 @@
|
|||
/*
|
||||
* GStreamer
|
||||
* Copyright (C) 2002 Andy Wingo <wingo at pobox dot com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gst/gst.h>
|
||||
|
||||
static GtkWidget *poslabel; /* NULL */
|
||||
|
||||
void
|
||||
set_speed (GtkAdjustment * adj, gpointer data)
|
||||
{
|
||||
GstElement *speed = GST_ELEMENT (data);
|
||||
|
||||
g_object_set (speed, "speed", adj->value, NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
time_tick_cb (GstElement * audiosink)
|
||||
{
|
||||
GstFormat format = GST_FORMAT_TIME;
|
||||
guint64 total, pos;
|
||||
|
||||
if (gst_element_query (audiosink, GST_QUERY_TOTAL, &format, &total)
|
||||
&& gst_element_query (audiosink, GST_QUERY_POSITION, &format, &pos)) {
|
||||
guint t_min, t_sec, p_min, p_sec;
|
||||
gchar *s;
|
||||
|
||||
t_min = (guint) (total / (GST_SECOND * 60));
|
||||
t_sec = (guint) ((total % (GST_SECOND * 60)) / GST_SECOND);
|
||||
p_min = (guint) (pos / (GST_SECOND * 60));
|
||||
p_sec = (guint) ((pos % (GST_SECOND * 60)) / GST_SECOND);
|
||||
|
||||
s = g_strdup_printf ("%u:%02u / %u:%02u", p_min, p_sec, t_min, t_sec);
|
||||
gtk_label_set_text (GTK_LABEL (poslabel), s);
|
||||
g_free (s);
|
||||
}
|
||||
|
||||
return TRUE; /* call again */
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GtkWidget *window, *vbox, *hscale, *button, *hbbox;
|
||||
GstElement *filesrc, *mad, *audioconvert, *speed, *audiosink, *pipeline;
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
if (argc != 2) {
|
||||
g_print ("usage: %s <your.mp3>\n", argv[0]);
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "delete-event", G_CALLBACK (gtk_main_quit), NULL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 400, 80);
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||
hscale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (1.0, 0.1, 4.0,
|
||||
0.1, 0.0, 0.0)));
|
||||
gtk_scale_set_digits (GTK_SCALE (hscale), 2);
|
||||
gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS);
|
||||
hbbox = gtk_hbutton_box_new ();
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_QUIT);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_container_add (GTK_CONTAINER (hbbox), button);
|
||||
poslabel = gtk_label_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), poslabel, FALSE, FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hscale, TRUE, TRUE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbbox, FALSE, FALSE, 6);
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
filesrc = gst_element_factory_make ("filesrc", "filesrc");
|
||||
mad = gst_element_factory_make ("mad", "mad");
|
||||
audioconvert = gst_element_factory_make ("audioconvert", "audioconvert0");
|
||||
speed = gst_element_factory_make ("speed", "speed");
|
||||
audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, "audiosink");
|
||||
|
||||
g_signal_connect (gtk_range_get_adjustment (GTK_RANGE (hscale)),
|
||||
"value_changed", G_CALLBACK (set_speed), speed);
|
||||
|
||||
pipeline = gst_pipeline_new ("app");
|
||||
gst_bin_add_many (GST_BIN (pipeline), filesrc, mad, audioconvert, speed,
|
||||
audiosink, NULL);
|
||||
gst_element_link_many (filesrc, mad, audioconvert, speed, audiosink, NULL);
|
||||
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
|
||||
|
||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
g_idle_add ((GSourceFunc) gst_bin_iterate, pipeline);
|
||||
g_timeout_add (200, (GSourceFunc) time_tick_cb, audiosink);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||
gst_object_unref (GST_OBJECT (pipeline));
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# automatic testing of some of the plugins using gstreamer-launch
|
||||
|
||||
MEDIA=/home/thomas/media
|
||||
GSTL=gstreamer-launch
|
||||
|
||||
run_file_test()
|
||||
# run a pipe between filesrc and fakesink to test a set of plugins
|
||||
# first argument is the test name
|
||||
# second argument is the filename to work on
|
||||
# third argument is the part between filesrc and fakesink
|
||||
{
|
||||
NAME=$1
|
||||
FILE=$2
|
||||
PIPE=$3
|
||||
|
||||
echo -n "Testing $NAME ... "
|
||||
COMMAND="$GSTL filesrc location=$MEDIA/$FILE ! $PIPE ! fakesink silent=true"
|
||||
$COMMAND > /dev/null 2> /dev/null
|
||||
if test $?; then PASSED="yes"; else PASSED="no"; fi
|
||||
if test "x$PASSED"="xyes"; then echo "passed."; else echo "failed"; fi
|
||||
}
|
||||
|
||||
run_file_test "mad" "south.mp3" "mad"
|
||||
run_file_test "mad/lame" "south.mp3" "mad ! lame"
|
||||
run_file_test "mad/lame/mad" "south.mp3" "mad ! lame ! mad"
|
||||
run_file_test "vorbisdec" "Brown\ Sugar128.ogg" "vorbisdec"
|
||||
run_file_test "vorbisdec/vorbisenc" "Brown\ Sugar128.ogg" "vorbisdec ! vorbisenc"
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
Gstreamer DVB Source
|
||||
|
||||
GstDvbSrc makes it possible to view Digital TV with gstreamer.
|
||||
|
||||
|
||||
Try:
|
||||
|
||||
gst-launch-1.0 dvbsrc frequency=11954 polarity=h symbol-rate=27500 pids=210:220
|
||||
! mpegtsdemux es-pids=210:220 name=demux ! queue ! mpeg2dec
|
||||
! xvimagesink demux. ! queue ! mad ! audioconvert ! autoaudiosink
|
||||
|
||||
|
||||
|
||||
|
||||
to view the German 3Sat telestation from the Astra 1 19.2E satellite.
|
||||
|
||||
DVB-C is untested, feedback is welcomed.
|
||||
|
||||
gstdvbtv is not yet ported to 0.10
|
|
@ -28,13 +28,13 @@
|
|||
* <refsect2>
|
||||
* <title>Example launch line</title>
|
||||
* |[
|
||||
* gst-launch-1.0 dvbsrc modulation="QAM 64" trans-mode=8k bandwidth=8 frequency=514000000 code-rate-lp=AUTO code-rate-hp=2/3 guard=4 hierarchy=0 ! mpegtsdemux name=demux ! queue max-size-buffers=0 max-size-time=0 ! mpeg2dec ! xvimagesink demux. ! queue max-size-buffers=0 max-size-time=0 ! mad ! alsasink
|
||||
* gst-launch-1.0 dvbsrc modulation="QAM 64" trans-mode=8k bandwidth=8 frequency=514000000 code-rate-lp=AUTO code-rate-hp=2/3 guard=4 hierarchy=0 ! mpegtsdemux name=demux ! queue max-size-buffers=0 max-size-time=0 ! mpegvideoparse ! mpegvideoparse ! mpeg2dec ! xvimagesink demux. ! queue max-size-buffers=0 max-size-time=0 ! mpegaudioparse ! mpg123audiodec ! audioconvert ! pulsesink
|
||||
* ]| Captures a full transport stream from DVB card 0 that is a DVB-T card at tuned frequency 514000000 Hz with other parameters as seen in the pipeline and renders the first TV program on the transport stream.
|
||||
* |[
|
||||
* gst-launch-1.0 dvbsrc modulation="QAM 64" trans-mode=8k bandwidth=8 frequency=514000000 code-rate-lp=AUTO code-rate-hp=2/3 guard=4 hierarchy=0 pids=100:256:257 ! mpegtsdemux name=demux ! queue max-size-buffers=0 max-size-time=0 ! mpeg2dec ! xvimagesink demux. ! queue max-size-buffers=0 max-size-time=0 ! mad ! alsasink
|
||||
* gst-launch-1.0 dvbsrc modulation="QAM 64" trans-mode=8k bandwidth=8 frequency=514000000 code-rate-lp=AUTO code-rate-hp=2/3 guard=4 hierarchy=0 pids=100:256:257 ! mpegtsdemux name=demux ! queue max-size-buffers=0 max-size-time=0 ! mpegvideoparse ! mpeg2dec ! xvimagesink demux. ! queue max-size-buffers=0 max-size-time=0 ! mpegaudioparse ! mpg123audiodec ! audioconvert ! pulsesink
|
||||
* ]| Captures and renders a transport stream from DVB card 0 that is a DVB-T card for a program at tuned frequency 514000000 Hz with PMT PID 100 and elementary stream PIDs of 256, 257 with other parameters as seen in the pipeline.
|
||||
* |[
|
||||
* gst-launch-1.0 dvbsrc polarity="h" frequency=11302000 symbol-rate=27500 diseqc-source=0 pids=50:102:103 ! mpegtsdemux name=demux ! queue max-size-buffers=0 max-size-time=0 ! mpeg2dec ! xvimagesink demux. ! queue max-size-buffers=0 max-size-time=0 ! mad ! alsasink
|
||||
* gst-launch-1.0 dvbsrc polarity="h" frequency=11302000 symbol-rate=27500 diseqc-source=0 pids=50:102:103 ! mpegtsdemux name=demux ! queue max-size-buffers=0 max-size-time=0 ! mpegvideoparse ! mpeg2dec ! xvimagesink demux. ! queue max-size-buffers=0 max-size-time=0 ! mpegaudioparse ! mpg123audiodec ! audioconvert ! pulsesink
|
||||
* ]| Captures and renders a transport stream from DVB card 0 that is a DVB-S card for a program at tuned frequency 11302000 kHz, symbol rate of 27500 kBd (kilo bauds) with PMT PID of 50 and elementary stream PIDs of 102 and 103.
|
||||
* |[
|
||||
* gst-launch-1.0 dvbsrc frequency=515142857 guard=16 trans-mode="8k" isdbt-layer-enabled=7 isdbt-partial-reception=1 isdbt-layera-fec="2/3" isdbt-layera-modulation="QPSK" isdbt-layera-segment-count=1 isdbt-layera-time-interleaving=4 isdbt-layerb-fec="3/4" isdbt-layerb-modulation="qam-64" isdbt-layerb-segment-count=12 isdbt-layerb-time-interleaving=2 isdbt-layerc-fec="1/2" isdbt-layerc-modulation="qam-64" isdbt-layerc-segment-count=0 isdbt-layerc-time-interleaving=0 delsys="isdb-t" ! tsdemux ! "video/x-h264" ! h264parse ! queue ! avdec_h264 ! videoconvert ! queue ! autovideosink
|
||||
|
|
Loading…
Reference in a new issue