Thanks, that was exactly what I needed. gst-instpect schroenc didn't provide 
any useful information, so I followed the try and error strategy.

It would be very good if the GStreamer schroenc plugin could provide this 
informations to, so you won't be annoyed with silly questions on your mailing 
list ;).

I would like to help you and to provide a patch that would add these 
informations to gst-inspect. After looking into the source code (from the 
ubuntu 1.0.1 package) I found the following:

There is a structure "SchroEncoderSetting" which seems to save the information 
about the parameters. It is found in "schroedinger/schroencoder.h"
[code]
struct _SchroEncoderSetting {
  char *name;
  SchroEncoderSettingTypeEnum type;

  double min;
  double max;
  double default_value;

  char **enum_list;
};
[/code]

The parameters are set up in "schroedinger/schroencoder.h" the following way:
[code]
static SchroEncoderSetting encoder_settings[] = {
  ENUM("rate_control", rate_control_list, 0),
  INT ("bitrate", 0, INT_MAX, 13824000),
  INT ("max_bitrate", 0, INT_MAX, 13824000),
  INT ("min_bitrate", 0, INT_MAX, 13824000),
  DOUB("noise_threshold", 0, 100.0, 25.0),
  //....
};
[/code]

In the gstreamer plugin the paramters are initialized in /gst/gstschroenc.c 
function "gst_schro_enc_class_init (GstSchroEncClass * klass)" in a way like 
this
[code]
g_object_class_install_property (gobject_class, i + 1,
            g_param_spec_boolean (setting->name, setting->name, setting->name,
              setting->default_value, G_PARAM_READWRITE));
[/code]

According to 
http://library.gnome.org/devel/gobject/unstable/gobject-Standard-Parameter-and-Value-Types.html#g-param-spec-boolean
 the third parameter the third argument of this function is the description 
that will be shown.
At the current state, it will just be the name of the parameter. Instead we 
should use the informations from Davids new list.

To be able to do that I would suggest the following changes:

1) add a new value named "description" to "_SchroEncoderSetting"
[code]
struct _SchroEncoderSetting {
  char *name;
  SchroEncoderSettingTypeEnum type;

  double min;
  double max;
  double default_value;

  char **enum_list;

  char* description;
};
[/code]

2) change the ENU, INT, DBL definition in schroencoder.c
[code]
#define ENUM(name,list,def, desc) \
  { name , SCHRO_ENCODER_SETTING_TYPE_ENUM, 0, ARRAY_SIZE(list)-1, def, list, 
desc }
#define INT(name,min,max,def, desc) \
  { name , SCHRO_ENCODER_SETTING_TYPE_INT, min, max, def, NULL, desc }
#define BOOL(name,def, desc) \
  { name , SCHRO_ENCODER_SETTING_TYPE_BOOLEAN, 0, 1, def, NULL, desc }
#define DOUB(name,min,max,def, desc) \
  { name , SCHRO_ENCODER_SETTING_TYPE_DOUBLE, min, max, def, NULL, desc }
[/code]

3) add the description to the parameter array
[code]
static SchroEncoderSetting encoder_settings[] = {
  ENUM("rate_control", rate_control_list, 0, "description of rate_control"),
//...
}

4) change the initialization of the parameters for GStreamer
[code]
g_object_class_install_property (gobject_class, i + 1,
            g_param_spec_boolean (setting->name, setting->name, 
setting->description,
              setting->default_value, G_PARAM_READWRITE));
[/code]

Problem:
I am not sure of this, but will changing the _SchroEncoderSetting structure 
lead to compatibilty problems?


So, are you willing to accept a patch that will implement good help 
informations for gst-inspect in GStreamer?


David Schleef <[EMAIL PROTECTED]> schrieb am 28.07.2008 06:51:07:
> On Tue, Jul 22, 2008 at 05:33:35PM +0200, Simon Wagner wrote:
> > Hello,
> > 
> > I am trying to benchmark Dirac against Theora. As source I am using the 
> > first few minutes of Elephants Dream.
> > 
> > I am trying to encode the video with the help of GStreamer and 
> > libschroedinger. At the moment, my encoding command looks like this:
> > 
> > 
> > #SMALLEST - produces 5,6 MB outputfile in rather bad quality, much worse 
> > than theora, but  2,4 MB smaller than theora
> > gst-launch multifilesrc location=raw_png_360/%05d.png index=1 \
> >   caps="image/png,framerate=30/1,pixel-aspect-ratio=1/1" ! \
> >   pngdec ! ffmpegcolorspace ! video/x-raw-yuv,format=\(fourcc\)I420 ! \
> >   schroenc \
> >   enable-phasecorr-estimation=true enable-hierarchical-estimation=false \
> >   rate-control=1 bitrate=500000 ! \
> >   oggmux ! progressreport ! filesink location=ed_dirac.ogg
> 
> I was about to respond "Why in the world are you using
> 'enable-phasecorr-estimation=true'?", but then I remembered that I
> hadn't ever written documentation on all this stuff, so it might be
> a good idea to write it before flaming.
> 
> So,
> 
>   http://diracvideo.org/wiki/index.php/Schroedinger_Encoder_Parameters
> 
> Writing it also cured me of the desire to flame.
> 
> 
> 
> dave...
> 
> 
_________________________________________________________________________
In 5 Schritten zur eigenen Homepage. Jetzt Domain sichern und gestalten! 
Nur 3,99 EUR/Monat! http://www.maildomain.web.de/?mc=021114


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Schrodinger-devel mailing list
Schrodinger-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/schrodinger-devel

Reply via email to