From c81358367ebb961ae283f2ebbf97fa8daf14686d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 24 Apr 2000 20:51:30 +0000 Subject: [PATCH] Added the mpeg2dec MPEG1 and MPEG2 decoder. Original commit message from CVS: Added the mpeg2dec MPEG1 and MPEG2 decoder. --- configure.in | 1 + libs/getbits/gstgetbits_inl.h | 4 ++-- test/mp1parse.c | 2 ++ test/mpeg2parse.c | 14 +++++++------- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/configure.in b/configure.in index 217c77616d..b049621cd7 100644 --- a/configure.in +++ b/configure.in @@ -316,6 +316,7 @@ plugins/mpeg2/Makefile plugins/mpeg2/parse/Makefile plugins/mpeg2/ac3parse/Makefile plugins/mpeg2/ac3dec/Makefile +plugins/mpeg2/video/Makefile plugins/mpeg1/Makefile plugins/mpeg1/mpeg_play/Makefile plugins/mpeg1/parse/Makefile diff --git a/libs/getbits/gstgetbits_inl.h b/libs/getbits/gstgetbits_inl.h index 0005ee91d7..e8e67d76bb 100644 --- a/libs/getbits/gstgetbits_inl.h +++ b/libs/getbits/gstgetbits_inl.h @@ -54,9 +54,9 @@ #include -//#define DEBUG_ENABLED +//#define GETBITS_DEBUG_ENABLED -#ifdef DEBUG_ENABLED +#ifdef GETBITS_DEBUG_ENABLED #define debug2(format,args...) g_print(format,##args) #define debug(format,args...) g_print(format,##args), #else diff --git a/test/mp1parse.c b/test/mp1parse.c index c08f809ca5..6a7787a162 100644 --- a/test/mp1parse.c +++ b/test/mp1parse.c @@ -68,11 +68,13 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) { gst_plugin_load("mp1videoparse"); gst_plugin_load("mpeg_play"); + //gst_plugin_load("mpeg2play"); gst_plugin_load("videosink"); // construct internal pipeline elements parse_video = gst_elementfactory_make("mp1videoparse","parse_video"); g_return_if_fail(parse_video != NULL); decode_video = gst_elementfactory_make("mpeg_play","decode_video"); + //decode_video = gst_elementfactory_make("mpeg2play","decode_video"); g_return_if_fail(decode_video != NULL); show = gst_elementfactory_make("videosink","show"); g_return_if_fail(show != NULL); diff --git a/test/mpeg2parse.c b/test/mpeg2parse.c index 0ff098ff71..276cabdd9f 100644 --- a/test/mpeg2parse.c +++ b/test/mpeg2parse.c @@ -17,8 +17,8 @@ void mpeg2parse_newpad(GstElement *parser,GstPad *pad, GstElement *pipeline) { g_print("***** a new pad %s was created\n", gst_pad_get_name(pad)); // connect to audio pad - //if (0) { - if (strncmp(gst_pad_get_name(pad), "private_stream_1.0", 18) == 0) { + if (0) { + //if (strncmp(gst_pad_get_name(pad), "private_stream_1.0", 18) == 0) { gst_plugin_load("ac3parse"); gst_plugin_load("ac3dec"); // construct internal pipeline elements @@ -60,22 +60,22 @@ void mpeg2parse_newpad(GstElement *parser,GstPad *pad, GstElement *pipeline) { gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_RUNNING); g_print("setting to PLAYING state\n"); gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_PLAYING); - //} else if (strncmp(gst_pad_get_name(pad), "video_", 6) == 0) { - } else if (0) { + } else if (strncmp(gst_pad_get_name(pad), "video_", 6) == 0) { + //} else if (0) { gst_plugin_load("mp1videoparse"); - gst_plugin_load("mpeg_play"); + gst_plugin_load("mpeg2play"); gst_plugin_load("videosink"); // construct internal pipeline elements parse_video = gst_elementfactory_make("mp1videoparse","parse_video"); g_return_if_fail(parse_video != NULL); - decode_video = gst_elementfactory_make("mpeg_play","decode_video"); + decode_video = gst_elementfactory_make("mpeg2play","decode_video"); g_return_if_fail(decode_video != NULL); show = gst_elementfactory_make("videosink","show"); g_return_if_fail(show != NULL); //gtk_object_set(GTK_OBJECT(show),"width",640, "height", 480,NULL); - appwindow = gnome_app_new("MPEG1 player","MPEG1 player"); + appwindow = gnome_app_new("MPEG player","MPEG player"); gnome_app_set_contents(GNOME_APP(appwindow), gst_util_get_widget_arg(GTK_OBJECT(show),"widget")); gtk_widget_show_all(appwindow);