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/mpeg1/Makefile
|
||||
plugins/mpeg1/mpeg_play/Makefile
|
||||
plugins/mpeg1/mpegaudio/Makefile
|
||||
plugins/mpeg1/parse/Makefile
|
||||
plugins/mpeg1/system_encode/Makefile
|
||||
plugins/mpeg1/mpeg1encoder/Makefile
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue