Added the mpeg2dec MPEG1 and MPEG2 decoder.

Original commit message from CVS:
Added the mpeg2dec MPEG1 and MPEG2 decoder.
This commit is contained in:
Wim Taymans 2000-04-24 20:51:30 +00:00
parent bf356e3bc5
commit c81358367e
4 changed files with 12 additions and 9 deletions

View file

@ -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

View file

@ -54,9 +54,9 @@
#include <glib.h>
//#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

View file

@ -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);

View file

@ -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);