From d3fb1a8bd390e2d98a9a79e1b38db14aa8054412 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 16 Jun 2000 22:30:24 +0000 Subject: [PATCH] Added SCR and mux_rate calculations in the MPEG1 multiplexer. worked toward a unified putbits implementation Original commit message from CVS: Added SCR and mux_rate calculations in the MPEG1 multiplexer. worked toward a unified putbits implementation Added an MPEG audio layer 1&2 encoder. --- configure.in | 1 + libs/colorspace/gstcolorspace.c | 1 + test/mp2tomp1.c | 14 ++++++++------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index 2284d21c4a..942bd9aae3 100644 --- a/configure.in +++ b/configure.in @@ -344,6 +344,7 @@ plugins/mpeg2/video/Makefile plugins/mpeg2/mpeg2enc/Makefile plugins/mpeg1/Makefile plugins/mpeg1/mpeg_play/Makefile +plugins/mpeg1/mpegaudio/Makefile plugins/mpeg1/parse/Makefile plugins/mpeg1/system_encode/Makefile plugins/mpeg1/mpeg1encoder/Makefile diff --git a/libs/colorspace/gstcolorspace.c b/libs/colorspace/gstcolorspace.c index 058bc133e1..83b5705f35 100644 --- a/libs/colorspace/gstcolorspace.c +++ b/libs/colorspace/gstcolorspace.c @@ -42,6 +42,7 @@ GstColorSpace *gst_colorspace_new(int width, int height, GstColorSpaceType srcsp new->srcspace = srcspace; new->destspace = destspace; new->visual = destvisual; + new->color_tables = NULL; new->convert = NULL; DEBUG("gst_colorspace: new\n"); diff --git a/test/mp2tomp1.c b/test/mp2tomp1.c index 70e4bb729d..6db6c615fc 100644 --- a/test/mp2tomp1.c +++ b/test/mp2tomp1.c @@ -27,19 +27,21 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { gst_plugin_load("ac3parse"); gst_plugin_load("ac3dec"); gst_plugin_load("audioscale"); + gst_plugin_load("mpegaudio"); // construct internal pipeline elements parse_audio = gst_elementfactory_make("ac3parse","parse_audio"); g_return_if_fail(parse_audio != NULL); - gtk_object_set(GTK_OBJECT(parse_audio),"skip", 0, NULL); + gtk_object_set(GTK_OBJECT(parse_audio),"skip", 20, NULL); decode = gst_elementfactory_make("ac3dec","decode_audio"); g_return_if_fail(decode != NULL); audio_resample = gst_elementfactory_make("audioscale","audioscale"); g_return_if_fail(audio_resample != NULL); gtk_object_set(GTK_OBJECT(audio_resample),"frequency", 44100, NULL); - audio_encode = gst_elementfactory_make("pipefilter","audio_encode"); + + audio_encode = gst_elementfactory_make("mpegaudio","audio_encode"); + //audio_encode = gst_elementfactory_make("pipefilter","audio_encode"); g_return_if_fail(audio_encode != NULL); - gtk_object_set(GTK_OBJECT(audio_encode),"command", - "lame -x - -", NULL); + //gtk_object_set(GTK_OBJECT(audio_encode),"command", "lame -x - -", NULL); // create the thread and pack stuff into it audio_thread = gst_thread_new("audio_thread"); @@ -139,7 +141,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { g_return_if_fail(decode_video != NULL); videoscale = gst_elementfactory_make("videoscale","videoscale"); g_return_if_fail(videoscale != NULL); - gtk_object_set(GTK_OBJECT(videoscale),"width",352, "height", 240,NULL); + gtk_object_set(GTK_OBJECT(videoscale),"width",352, "height", 288,NULL); median = gst_elementfactory_make("median","median"); g_return_if_fail(median != NULL); gtk_object_set(GTK_OBJECT(median),"filtersize",9,NULL); @@ -149,7 +151,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) { gtk_object_set(GTK_OBJECT(smooth),"tolerance",9,NULL); encode = gst_elementfactory_make("mpeg2enc","encode"); g_return_if_fail(encode != NULL); - gtk_object_set(GTK_OBJECT(encode),"frames_per_second",29.97,NULL); + gtk_object_set(GTK_OBJECT(encode),"frames_per_second",25.0,NULL); //encode = gst_elementfactory_make("mpeg1encoder","encode"); //gtk_object_set(GTK_OBJECT(show),"width",640, "height", 480,NULL);