mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 09:41:07 +00:00
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.
This commit is contained in:
parent
f037c7a742
commit
d3fb1a8bd3
3 changed files with 10 additions and 6 deletions
|
@ -344,6 +344,7 @@ plugins/mpeg2/video/Makefile
|
||||||
plugins/mpeg2/mpeg2enc/Makefile
|
plugins/mpeg2/mpeg2enc/Makefile
|
||||||
plugins/mpeg1/Makefile
|
plugins/mpeg1/Makefile
|
||||||
plugins/mpeg1/mpeg_play/Makefile
|
plugins/mpeg1/mpeg_play/Makefile
|
||||||
|
plugins/mpeg1/mpegaudio/Makefile
|
||||||
plugins/mpeg1/parse/Makefile
|
plugins/mpeg1/parse/Makefile
|
||||||
plugins/mpeg1/system_encode/Makefile
|
plugins/mpeg1/system_encode/Makefile
|
||||||
plugins/mpeg1/mpeg1encoder/Makefile
|
plugins/mpeg1/mpeg1encoder/Makefile
|
||||||
|
|
|
@ -42,6 +42,7 @@ GstColorSpace *gst_colorspace_new(int width, int height, GstColorSpaceType srcsp
|
||||||
new->srcspace = srcspace;
|
new->srcspace = srcspace;
|
||||||
new->destspace = destspace;
|
new->destspace = destspace;
|
||||||
new->visual = destvisual;
|
new->visual = destvisual;
|
||||||
|
new->color_tables = NULL;
|
||||||
new->convert = NULL;
|
new->convert = NULL;
|
||||||
|
|
||||||
DEBUG("gst_colorspace: new\n");
|
DEBUG("gst_colorspace: new\n");
|
||||||
|
|
|
@ -27,19 +27,21 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
|
||||||
gst_plugin_load("ac3parse");
|
gst_plugin_load("ac3parse");
|
||||||
gst_plugin_load("ac3dec");
|
gst_plugin_load("ac3dec");
|
||||||
gst_plugin_load("audioscale");
|
gst_plugin_load("audioscale");
|
||||||
|
gst_plugin_load("mpegaudio");
|
||||||
// construct internal pipeline elements
|
// construct internal pipeline elements
|
||||||
parse_audio = gst_elementfactory_make("ac3parse","parse_audio");
|
parse_audio = gst_elementfactory_make("ac3parse","parse_audio");
|
||||||
g_return_if_fail(parse_audio != NULL);
|
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");
|
decode = gst_elementfactory_make("ac3dec","decode_audio");
|
||||||
g_return_if_fail(decode != NULL);
|
g_return_if_fail(decode != NULL);
|
||||||
audio_resample = gst_elementfactory_make("audioscale","audioscale");
|
audio_resample = gst_elementfactory_make("audioscale","audioscale");
|
||||||
g_return_if_fail(audio_resample != NULL);
|
g_return_if_fail(audio_resample != NULL);
|
||||||
gtk_object_set(GTK_OBJECT(audio_resample),"frequency", 44100, 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);
|
g_return_if_fail(audio_encode != NULL);
|
||||||
gtk_object_set(GTK_OBJECT(audio_encode),"command",
|
//gtk_object_set(GTK_OBJECT(audio_encode),"command", "lame -x - -", NULL);
|
||||||
"lame -x - -", NULL);
|
|
||||||
|
|
||||||
// create the thread and pack stuff into it
|
// create the thread and pack stuff into it
|
||||||
audio_thread = gst_thread_new("audio_thread");
|
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);
|
g_return_if_fail(decode_video != NULL);
|
||||||
videoscale = gst_elementfactory_make("videoscale","videoscale");
|
videoscale = gst_elementfactory_make("videoscale","videoscale");
|
||||||
g_return_if_fail(videoscale != NULL);
|
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");
|
median = gst_elementfactory_make("median","median");
|
||||||
g_return_if_fail(median != NULL);
|
g_return_if_fail(median != NULL);
|
||||||
gtk_object_set(GTK_OBJECT(median),"filtersize",9,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);
|
gtk_object_set(GTK_OBJECT(smooth),"tolerance",9,NULL);
|
||||||
encode = gst_elementfactory_make("mpeg2enc","encode");
|
encode = gst_elementfactory_make("mpeg2enc","encode");
|
||||||
g_return_if_fail(encode != NULL);
|
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");
|
//encode = gst_elementfactory_make("mpeg1encoder","encode");
|
||||||
//gtk_object_set(GTK_OBJECT(show),"width",640, "height", 480,NULL);
|
//gtk_object_set(GTK_OBJECT(show),"width",640, "height", 480,NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue