static void
mpegts_pmt_stream_info_class_init (MpegTsPmtStreamInfoClass * klass)
{
  GObjectClass *gobject_klass = (GObjectClass *) klass;

  gobject_klass->set_property = mpegts_pmt_stream_info_set_property;
  gobject_klass->get_property = mpegts_pmt_stream_info_get_property;
  gobject_klass->finalize = mpegts_pmt_stream_info_finalize;

  g_object_class_install_property (gobject_klass, PROP_PID,
      g_param_spec_uint ("pid", "PID carrying this stream",
          "PID which carries this stream", 1, G_MAXUINT16, 1,
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (gobject_klass, PROP_LANGUAGES,
      g_param_spec_value_array ("languages", "Languages of this stream",
          "Value array of the languages of this stream",
          g_param_spec_string ("language", "language", "language", "",
              G_PARAM_READABLE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_klass, PROP_STREAM_TYPE,
      g_param_spec_uint ("stream-type",
          "Stream type", "Stream type", 0, G_MAXUINT8, 0,
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_klass, PROP_DESCRIPTORS,
      g_param_spec_value_array ("descriptors",
          "Descriptors",
          "Value array of strings containing stream descriptors",
          g_param_spec_boxed ("descriptor",
              "descriptor",
              "", G_TYPE_GSTRING, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
}
static void
gst_audio_iir_filter_class_init (GstAudioIIRFilterClass * klass)
{
  GObjectClass *gobject_class = (GObjectClass *) klass;
  GstElementClass *gstelement_class = (GstElementClass *) klass;
  GstAudioFilterClass *filter_class = (GstAudioFilterClass *) klass;

  GST_DEBUG_CATEGORY_INIT (gst_audio_iir_filter_debug, "audioiirfilter", 0,
      "Generic audio IIR filter plugin");

  gobject_class->set_property = gst_audio_iir_filter_set_property;
  gobject_class->get_property = gst_audio_iir_filter_get_property;
  gobject_class->finalize = gst_audio_iir_filter_finalize;

  g_object_class_install_property (gobject_class, PROP_A,
      g_param_spec_value_array ("a", "A",
          "Filter coefficients (denominator of transfer function)",
          g_param_spec_double ("Coefficient", "Filter Coefficient",
              "Filter coefficient", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (gobject_class, PROP_B,
      g_param_spec_value_array ("b", "B",
          "Filter coefficients (numerator of transfer function)",
          g_param_spec_double ("Coefficient", "Filter Coefficient",
              "Filter coefficient", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  filter_class->setup = GST_DEBUG_FUNCPTR (gst_audio_iir_filter_setup);

  /**
   * GstAudioIIRFilter::rate-changed:
   * @filter: the filter on which the signal is emitted
   * @rate: the new sampling rate
   *
   * Will be emitted when the sampling rate changes. The callbacks
   * will be called from the streaming thread and processing will
   * stop until the event is handled.
   */
  gst_audio_iir_filter_signals[SIGNAL_RATE_CHANGED] =
      g_signal_new ("rate-changed", G_TYPE_FROM_CLASS (klass),
      G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstAudioIIRFilterClass, rate_changed),
      NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_INT);

  gst_element_class_set_static_metadata (gstelement_class,
      "Audio IIR filter", "Filter/Effect/Audio",
      "Generic audio IIR filter with custom filter kernel",
      "Sebastian Dröge <*****@*****.**>");
}
Exemple #3
0
/* Stream tag */
static void
gst_cmml_tag_stream_class_init (GstCmmlTagStreamClass * stream_class)
{
  GObjectClass *klass = G_OBJECT_CLASS (stream_class);

  klass->set_property = gst_cmml_tag_stream_set_property;
  klass->get_property = gst_cmml_tag_stream_get_property;
  klass->finalize = gst_cmml_tag_stream_finalize;

  g_object_class_install_property (klass, GST_CMML_TAG_STREAM_TIMEBASE,
      g_param_spec_string ("base-time",
          "Base time",
          "Playback time (in seconds) of the first data packet",
          "0", G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_STREAM_UTC,
      g_param_spec_string ("calendar-base-time",
          "Calendar base time",
          "Date and wall-clock time (expressed as UTC time in the format "
          "YYYYMMDDTHHMMSS.sssZ) associated with the base-time",
          NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_STREAM_IMPORTS,
      g_param_spec_value_array ("input-streams",
          "Input streams",
          "List of input streams that compose this bitstream",
          NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_value_register_transform_func (G_TYPE_STRING, GST_TYPE_CMML_TAG_STREAM,
      gst_cmml_tag_stream_value_from_string_value);
}
Exemple #4
0
/* Head tag */
static void
gst_cmml_tag_head_class_init (GstCmmlTagHeadClass * head_class)
{
  GObjectClass *klass = G_OBJECT_CLASS (head_class);

  klass->set_property = gst_cmml_tag_head_set_property;
  klass->get_property = gst_cmml_tag_head_get_property;
  klass->finalize = gst_cmml_tag_head_finalize;

  g_object_class_install_property (klass, GST_CMML_TAG_HEAD_TITLE,
      g_param_spec_string ("title",
          "Title",
          "Title of the bitstream",
          NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_HEAD_BASE,
      g_param_spec_string ("base-uri",
          "Base URI",
          "Base URI of the bitstream. All relative URIs are relative to this",
          NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_HEAD_META,
      g_param_spec_value_array ("meta",
          "Meta annotations",
          "Meta annotations for the complete Annodex bitstream",
          NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_value_register_transform_func (G_TYPE_STRING, GST_TYPE_CMML_TAG_HEAD,
      gst_cmml_tag_head_value_from_string_value);
}
static void
atk_relation_class_init (AtkRelationClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);

  parent_class = g_type_class_peek_parent (klass);
  
  gobject_class->finalize = atk_relation_finalize;
  gobject_class->set_property = atk_relation_set_property;
  gobject_class->get_property = atk_relation_get_property;

  g_object_class_install_property (gobject_class,
                                   PROP_RELATION_TYPE,
                                   g_param_spec_enum ("relation_type",
                                                      "Relation Type",
                                                      "The type of the relation",
                                                      ATK_TYPE_RELATION_TYPE,
                                                      ATK_RELATION_NULL,
                                                      G_PARAM_READWRITE));
  g_object_class_install_property (gobject_class,
                                   PROP_TARGET,
                                   g_param_spec_value_array ("target",
                                                             "Target",
                                                             "An array of the targets for the relation",
                                                             NULL,

                                                             G_PARAM_READWRITE));
}
static void
gst_perspective_class_init (GstPerspectiveClass * klass)
{
  GObjectClass *gobject_class;
  GstElementClass *gstelement_class;
  GstGeometricTransformClass *gstgt_class;

  gobject_class = (GObjectClass *) klass;
  gstelement_class = (GstElementClass *) klass;
  gstgt_class = (GstGeometricTransformClass *) klass;

  gst_element_class_set_static_metadata (gstelement_class,
      "perspective",
      "Transform/Effect/Video",
      "Apply a 2D perspective transform",
      "Antonio Ospite <*****@*****.**>");

  gobject_class->set_property = gst_perspective_set_property;
  gobject_class->get_property = gst_perspective_get_property;

  g_object_class_install_property (gobject_class, PROP_MATRIX,
      g_param_spec_value_array ("matrix",
          "Matrix",
          "Matrix of dimension 3x3 to use in the 2D transform, passed as an array of 9 elements in row-major order",
          g_param_spec_double ("Element",
              "Transformation matrix element",
              "Element of the transformation matrix",
              -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  gstgt_class->map_func = perspective_map;
}
static void
mpegts_pmt_info_class_init (MpegTsPmtInfoClass * klass)
{
  GObjectClass *gobject_klass = (GObjectClass *) klass;

  gobject_klass->finalize = mpegts_pmt_info_finalize;
  gobject_klass->set_property = mpegts_pmt_info_set_property;
  gobject_klass->get_property = mpegts_pmt_info_get_property;

  g_object_class_install_property (gobject_klass, PROP_PROGRAM_NO,
      g_param_spec_uint ("program-number", "Program Number",
          "Program Number for this program", 0, G_MAXUINT16, 1,
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_klass, PROP_PCR_PID,
      g_param_spec_uint ("pcr-pid", "PID carrying the PCR for this program",
          "PID which carries the PCR for this program", 1, G_MAXUINT16, 1,
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_klass, PROP_STREAMINFO,
      g_param_spec_value_array ("stream-info",
          "GValueArray containing GObjects with properties",
          "Array of GObjects containing information about the program streams",
          g_param_spec_object ("flu-pmt-streaminfo", "FluPMTStreamInfo",
              "Fluendo TS Demuxer PMT Stream info object",
              MPEGTS_TYPE_PMT_STREAM_INFO,
              G_PARAM_READABLE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_klass, PROP_VERSION_NO,
      g_param_spec_uint ("version-number", "Version Number",
          "Version number of this program information", 0, G_MAXUINT8, 1,
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_klass, PROP_DESCRIPTORS,
      g_param_spec_value_array ("descriptors",
          "Descriptors",
          "Value array of strings containing program descriptors",
          g_param_spec_boxed ("descriptor",
              "descriptor",
              "", G_TYPE_GSTRING, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
}
static void
gst_theora_parse_class_init (GstTheoraParseClass * klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);

  gobject_class->dispose = theora_parse_dispose;

#if 0
  gobject_class->get_property = theora_parse_get_property;
  gobject_class->set_property = theora_parse_set_property;

  /**
   * GstTheoraParse:sychronization-points
   *
   * An array of (granuletime, buffertime) pairs
   *
   * Since: 0.10.10
   */
  g_object_class_install_property (gobject_class, PROP_SYNCHRONIZATION_POINTS,
      g_param_spec_value_array ("synchronization-points",
          "Synchronization points",
          "An array of (granuletime, buffertime) pairs",
          g_param_spec_uint64 ("time", "Time",
              "Time (either granuletime or buffertime)", 0, G_MAXUINT64, 0,
              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
#endif

  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&theora_parse_src_factory));
  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&theora_parse_sink_factory));
  gst_element_class_set_static_metadata (gstelement_class,
      "Theora video parser", "Codec/Parser/Video",
      "parse raw theora streams", "Andy Wingo <*****@*****.**>");

  gstelement_class->change_state = theora_parse_change_state;

  GST_DEBUG_CATEGORY_INIT (theoraparse_debug, "theoraparse", 0,
      "Theora parser");
}
static void
bonobo_selector_class_init (BonoboSelectorClass *klass)
{
	GObjectClass *object_class;
	
	object_class = (GObjectClass *) klass;
	object_class->finalize = bonobo_selector_finalize;
	
	object_class->set_property = bonobo_selector_set_property;
	object_class->get_property = bonobo_selector_get_property;

	bonobo_selector_signals [OK] =
		g_signal_new ("ok",
			      G_TYPE_FROM_CLASS (object_class),
			      G_SIGNAL_RUN_LAST,
			      G_STRUCT_OFFSET (BonoboSelectorClass, ok),
			      NULL, NULL,
			      g_cclosure_marshal_VOID__VOID,
			      G_TYPE_NONE, 0);
	
	bonobo_selector_signals [CANCEL] =
		g_signal_new ("cancel",
			      G_TYPE_FROM_CLASS (object_class),
			      G_SIGNAL_RUN_LAST,
			      G_STRUCT_OFFSET (BonoboSelectorClass, cancel),
			      NULL, NULL,
			      g_cclosure_marshal_VOID__VOID,
			      G_TYPE_NONE, 0);
		
	/* properties: */	
   	g_object_class_install_property (object_class,
				 PROP_INTERFACES,
				 g_param_spec_value_array ("interfaces_required",
							   _("Interfaces required"),
							   _("A NULL-terminated array of interfaces which a server must support in order to be listed in the selector. Defaults to \"IDL:Bonobo/Embeddable:1.0\" if no interfaces are listed"),
							   g_param_spec_string ("interface-required-entry",
										_("Interface required entry"),
										_("One of the interfaces that's required"),
										NULL,
										G_PARAM_READWRITE),
							   G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}
static void
gst_audio_fir_filter_class_init (GstAudioFIRFilterClass * klass)
{
  GObjectClass *gobject_class = (GObjectClass *) klass;
  GstAudioFilterClass *filter_class = (GstAudioFilterClass *) klass;

  gobject_class->set_property = gst_audio_fir_filter_set_property;
  gobject_class->get_property = gst_audio_fir_filter_get_property;
  gobject_class->finalize = gst_audio_fir_filter_finalize;

  g_object_class_install_property (gobject_class, PROP_KERNEL,
      g_param_spec_value_array ("kernel", "Filter Kernel",
          "Filter kernel for the FIR filter",
          g_param_spec_double ("Element", "Filter Kernel Element",
              "Element of the filter kernel", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (gobject_class, PROP_LATENCY,
      g_param_spec_uint64 ("latency", "Latecy",
          "Filter latency in samples",
          0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  filter_class->setup = GST_DEBUG_FUNCPTR (gst_audio_fir_filter_setup);

  /**
   * GstAudioFIRFilter::rate-changed:
   * @filter: the filter on which the signal is emitted
   * @rate: the new sampling rate
   *
   * Will be emitted when the sampling rate changes. The callbacks
   * will be called from the streaming thread and processing will
   * stop until the event is handled.
   */
  gst_audio_fir_filter_signals[SIGNAL_RATE_CHANGED] =
      g_signal_new ("rate-changed", G_TYPE_FROM_CLASS (klass),
      G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstAudioFIRFilterClass, rate_changed),
      NULL, NULL, gst_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
}
Exemple #11
0
static void
mame_gui_prefs_class_init (MameGuiPrefsClass *klass)
{
	
	
	GObjectClass *object_class = G_OBJECT_CLASS (klass);
	
	object_class->set_property = mame_gui_prefs_set_property;
	object_class->get_property = mame_gui_prefs_get_property;
	object_class->finalize = mame_gui_prefs_finalize;

	/* UI preferences */
	g_object_class_install_property (object_class,
					 PROP_UI_WIDTH,
					 g_param_spec_int ("ui-width", "Window Width", "Width of the main window", 0, 2000, 800, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_UI_HEIGHT,
					 g_param_spec_int ("ui-height", "Window Height", "Height of the main window", 0, 2000, 600, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_SHOW_TOOLBAR,
					 g_param_spec_boolean ("show-toolbar", "Show Toolbar", "Show the main toolbar", TRUE, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_SHOW_STATUSBAR,
					 g_param_spec_boolean ("show-statusbar", "Show Statusbar", "Show the statusbar", TRUE, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_SHOW_FILTERLIST,
					 g_param_spec_boolean ("show-filterlist", "Show Filter List", "Show the filters", TRUE, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_SHOW_SCREENSHOT,
					 g_param_spec_boolean ("show-screenshot", "Show Sidebar", "Show the screenshot sidebar", TRUE, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_CURRENT_ROMFILTER,
					 g_param_spec_int ("current-rom-filter", "Current ROM filter", "Current ROM filter", 0, 2, 0, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_CURRENT_MODE,
					 g_param_spec_int ("current-mode", "Current Mode", "Current Mode", LIST, DETAILS, DETAILS, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_PREVIOUS_MODE,
					 g_param_spec_int ("previous-mode", "Previous Mode", "Previous Mode", LIST, DETAILS, LIST, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_COLS_SHOWN,
					 g_param_spec_value_array ("cols-shown", "Columns Shown", "Which Columns Are Shown or Hidden", NULL, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_COLS_WIDTH,
					 g_param_spec_value_array ("cols-width", "Column Width", "Width of Each Column", NULL, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_SORT_COL,
					 g_param_spec_int ("sort-col", "Sort Column", "Sort column", 0, NUMBER_COLUMN, GAMENAME, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_SORT_COL_DIR,
					 g_param_spec_int ("sort-col-direction", "Sort Column Direction", "Direction in which column data is sorted", GTK_SORT_ASCENDING, GTK_SORT_DESCENDING, GTK_SORT_ASCENDING, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_XPOS_FILTERS,
					 g_param_spec_int ("xpos-filters", "Filters Xpos", "X position of the filters hpaned", 0, 1000, 150, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_XPOS_GAMELIST,
					 g_param_spec_int ("xpos-gamelist", "Gamelist Xpos", "X position of the gamelist hpaned", 0, 1000, 500, G_PARAM_READWRITE));
	
	/* Startup preferences */
	g_object_class_install_property (object_class,
					 PROP_GAMECHECK,
					 g_param_spec_boolean ("gamecheck", "Game Check", "Check for games on startup", TRUE, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_VERSIONCHECK,
					 g_param_spec_boolean ("versioncheck", "Version Check", "Check for new version on startup", TRUE, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_USEXMAMEOPTIONS,
					 g_param_spec_boolean ("usexmameoptions", "Use MAME Options", "Use MAME options, rather than those set in GMAMEUI", FALSE, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_PREFERCUSTOMICONS,
					 g_param_spec_boolean ("prefercustomicons", "Prefer custom icons", "Prefer custom icons over status icons", FALSE, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_USEJOYINGUI,
					 g_param_spec_boolean ("usejoyingui", "Use Joystick in GUI", "Use the joystick to navigate in GMAMEUI", 0, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_JOYSTICKNAME,
					 g_param_spec_string ("joystick-name", "Joystick Name", "Device name of the joystick", "/dev/js0", G_PARAM_READWRITE));
	
	/* Miscellaneous preferences */
	g_object_class_install_property (object_class,
					 PROP_THEPREFIX,
					 g_param_spec_boolean ("theprefix", "Display 'The'", "Display 'The' as a prefix in the gamelist", TRUE, G_PARAM_READWRITE));

	g_object_class_install_property (object_class,
					 PROP_CURRENT_ROM,
					 g_param_spec_string ("current-rom", "Current Rom", "The currently selected ROM", NULL, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_CURRENT_EXECUTABLE,
					 g_param_spec_string ("current-executable", "Current executable", "The currently selected MAME executable", NULL, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_EXECUTABLE_PATHS,
					 g_param_spec_value_array ("executable-paths", "Executable Paths", "Paths to the MAME executables", NULL, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_ROM_PATHS,
					 g_param_spec_value_array ("rom-paths", "ROM Paths", "Directories containing MAME ROMs", NULL, G_PARAM_READWRITE));
	g_object_class_install_property (object_class,
					 PROP_SAMPLE_PATHS,
					 g_param_spec_value_array ("sample-paths", "Sample Paths", "Directories containing MAME samples", NULL, G_PARAM_READWRITE));
	
	/* Directory preferences */
	int i;  /* Used for walking the directory_prefs struct array */
	for (i = 0; i < NUM_DIRS; i++) {
		/*GMAMEUI_DEBUG ("Installing new property %s with id %d", directory_prefs[i].name, directory_prefs[i].prop_id);*/
		g_object_class_install_property (object_class,
						 directory_prefs[i].prop_id,
						 g_param_spec_string (directory_prefs[i].name, "", "", directory_prefs[i].default_dir, G_PARAM_READWRITE));
	}

	/* Signal emitted when a column is toggled */
	signals[GUI_PREFS_COL_TOGGLED] = g_signal_new ("col-toggled",
						     G_OBJECT_CLASS_TYPE (object_class),
						     G_SIGNAL_RUN_LAST,
						     G_STRUCT_OFFSET (MameGuiPrefsClass, col_toggled),
						     NULL, NULL,     /* Accumulator and accumulator data */
						     gmameui_marshaller_VOID__POINTER,
						     G_TYPE_NONE,    /* Return type */
						     1, G_TYPE_INT);

	/* Signal emitted when the prefix is toggled */
	signals[GUI_PREFS_THEPREFIX_TOGGLED] = g_signal_new ("theprefix-toggled",
						     G_OBJECT_CLASS_TYPE (object_class),
						     G_SIGNAL_RUN_LAST,
						     G_STRUCT_OFFSET (MameGuiPrefsClass, theprefix_toggled),
						     NULL, NULL,     /* Accumulator and accumulator data */
						     gmameui_marshaller_VOID__BOOLEAN,
						     G_TYPE_NONE,    /* Return type */
						     1, G_TYPE_BOOLEAN);

	/* Signal emitted when custom icon preference is toggled */
	signals[GUI_PREFS_PREFERCUSTOMICONS_TOGGLED] = g_signal_new ("prefercustomicons-toggled",
						     G_OBJECT_CLASS_TYPE (object_class),
						     G_SIGNAL_RUN_LAST,
						     G_STRUCT_OFFSET (MameGuiPrefsClass, prefercustomicons_toggled),
						     NULL, NULL,     /* Accumulator and accumulator data */
						     gmameui_marshaller_VOID__BOOLEAN,
						     G_TYPE_NONE,    /* Return type */
						     1, G_TYPE_BOOLEAN);
}
static void
gst_audio_parse_class_init (GstAudioParseClass * klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
  GstRawParseClass *rp_class = GST_RAW_PARSE_CLASS (klass);
  GstCaps *caps;

  gobject_class->set_property = gst_audio_parse_set_property;
  gobject_class->get_property = gst_audio_parse_get_property;
  gobject_class->finalize = gst_audio_parse_finalize;

  rp_class->get_caps = gst_audio_parse_get_caps;

  g_object_class_install_property (gobject_class, PROP_FORMAT,
      g_param_spec_enum ("format", "Format",
          "Format of audio samples in raw stream", GST_AUDIO_PARSE_FORMAT,
          GST_AUDIO_PARSE_FORMAT_RAW,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_class, PROP_RAW_FORMAT,
      g_param_spec_enum ("raw-format", "Raw Format",
          "Format of audio samples in raw stream", GST_TYPE_AUDIO_FORMAT,
          GST_AUDIO_FORMAT_S16, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_class, PROP_RATE,
      g_param_spec_int ("rate", "Rate", "Rate of audio samples in raw stream",
          1, INT_MAX, 44100, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_class, PROP_CHANNELS,
      g_param_spec_int ("channels", "Channels",
          "Number of channels in raw stream", 1, 64, 2,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_class, PROP_INTERLEAVED,
      g_param_spec_boolean ("interleaved", "Interleaved Layout",
          "True if audio has interleaved layout", TRUE,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_class, PROP_CHANNEL_POSITIONS,
      g_param_spec_value_array ("channel-positions", "Channel positions",
          "Channel positions used on the output",
          g_param_spec_enum ("channel-position", "Channel position",
              "Channel position of the n-th input",
              GST_TYPE_AUDIO_CHANNEL_POSITION,
              GST_AUDIO_CHANNEL_POSITION_NONE,
              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_class, PROP_USE_SINK_CAPS,
      g_param_spec_boolean ("use-sink-caps", "Use sink caps",
          "Use the sink caps for the format, only performing timestamping",
          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  gst_element_class_set_metadata (gstelement_class, "Audio Parse",
      "Filter/Audio",
      "Converts stream into audio frames",
      "Sebastian Dröge <*****@*****.**>");

  caps = gst_caps_from_string (GST_AUDIO_CAPS_MAKE (GST_AUDIO_FORMATS_ALL)
      ", layout = (string) { interleaved, non-interleaved }; "
      "audio/x-alaw, rate=(int)[1,MAX], channels=(int)[1,MAX]; "
      "audio/x-mulaw, rate=(int)[1,MAX], channels=(int)[1,MAX]");

  gst_raw_parse_class_set_src_pad_template (rp_class, caps);
  gst_raw_parse_class_set_multiple_frames_per_buffer (rp_class, TRUE);
  gst_caps_unref (caps);

  GST_DEBUG_CATEGORY_INIT (gst_audio_parse_debug, "audioparse", 0,
      "audioparse element");
}
static void
gst_raw_audio_parse_class_init (GstRawAudioParseClass * klass)
{
  GObjectClass *object_class;
  GstElementClass *element_class;
  GstBaseParseClass *baseparse_class;
  GstRawBaseParseClass *rawbaseparse_class;

  GST_DEBUG_CATEGORY_INIT (raw_audio_parse_debug, "rawaudioparse", 0,
      "rawaudioparse element");

  object_class = G_OBJECT_CLASS (klass);
  element_class = GST_ELEMENT_CLASS (klass);
  baseparse_class = GST_BASE_PARSE_CLASS (klass);
  rawbaseparse_class = GST_RAW_BASE_PARSE_CLASS (klass);

  gst_element_class_add_pad_template (element_class,
      gst_static_pad_template_get (&static_sink_template));
  gst_element_class_add_pad_template (element_class,
      gst_static_pad_template_get (&static_src_template));

  object_class->set_property =
      GST_DEBUG_FUNCPTR (gst_raw_audio_parse_set_property);
  object_class->get_property =
      GST_DEBUG_FUNCPTR (gst_raw_audio_parse_get_property);

  baseparse_class->stop = GST_DEBUG_FUNCPTR (gst_raw_audio_parse_stop);

  rawbaseparse_class->set_current_config =
      GST_DEBUG_FUNCPTR (gst_raw_audio_parse_set_current_config);
  rawbaseparse_class->get_current_config =
      GST_DEBUG_FUNCPTR (gst_raw_audio_parse_get_current_config);
  rawbaseparse_class->set_config_from_caps =
      GST_DEBUG_FUNCPTR (gst_raw_audio_parse_set_config_from_caps);
  rawbaseparse_class->get_caps_from_config =
      GST_DEBUG_FUNCPTR (gst_raw_audio_parse_get_caps_from_config);
  rawbaseparse_class->get_config_frame_size =
      GST_DEBUG_FUNCPTR (gst_raw_audio_parse_get_config_frame_size);
  rawbaseparse_class->is_config_ready =
      GST_DEBUG_FUNCPTR (gst_raw_audio_parse_is_config_ready);
  rawbaseparse_class->process = GST_DEBUG_FUNCPTR (gst_raw_audio_parse_process);
  rawbaseparse_class->is_unit_format_supported =
      GST_DEBUG_FUNCPTR (gst_raw_audio_parse_is_unit_format_supported);
  rawbaseparse_class->get_units_per_second =
      GST_DEBUG_FUNCPTR (gst_raw_audio_parse_get_units_per_second);

  g_object_class_install_property (object_class,
      PROP_FORMAT,
      g_param_spec_enum ("format",
          "Format",
          "Format of the raw audio stream",
          gst_raw_audio_parse_format_get_type (),
          GST_RAW_AUDIO_PARSE_FORMAT_PCM,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_PCM_FORMAT,
      g_param_spec_enum ("pcm-format",
          "PCM format",
          "Format of audio samples in PCM stream (ignored if format property is not set to pcm)",
          GST_TYPE_AUDIO_FORMAT,
          GST_RAW_AUDIO_PARSE_FORMAT_PCM,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_SAMPLE_RATE,
      g_param_spec_int ("sample-rate",
          "Sample rate",
          "Rate of audio samples in raw stream",
          1, INT_MAX,
          DEFAULT_SAMPLE_RATE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_NUM_CHANNELS,
      g_param_spec_int ("num-channels",
          "Number of channels",
          "Number of channels in raw stream",
          1, INT_MAX,
          DEFAULT_NUM_CHANNELS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_INTERLEAVED,
      g_param_spec_boolean ("interleaved",
          "Interleaved layout",
          "True if audio has interleaved layout",
          DEFAULT_INTERLEAVED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_CHANNEL_POSITIONS,
      g_param_spec_value_array ("channel-positions",
          "Channel positions",
          "Channel positions used on the output",
          g_param_spec_enum ("channel-position",
              "Channel position",
              "Channel position of the n-th input",
              GST_TYPE_AUDIO_CHANNEL_POSITION,
              GST_AUDIO_CHANNEL_POSITION_NONE,
              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );

  gst_element_class_set_static_metadata (element_class,
      "rawaudioparse",
      "Codec/Parser/Audio",
      "Converts unformatted data streams into timestamped raw audio frames",
      "Carlos Rafael Giani <*****@*****.**>");
}
static void
gst_interleave_class_init (GstInterleaveClass * klass)
{
  GstElementClass *gstelement_class;
  GObjectClass *gobject_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gstelement_class = GST_ELEMENT_CLASS (klass);

  GST_DEBUG_CATEGORY_INIT (gst_interleave_debug, "interleave", 0,
      "interleave element");

  gst_element_class_set_static_metadata (gstelement_class, "Audio interleaver",
      "Filter/Converter/Audio",
      "Folds many mono channels into one interleaved audio stream",
      "Andy Wingo <wingo at pobox.com>, "
      "Sebastian Dröge <*****@*****.**>");

  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&sink_template));
  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&src_template));

  /* Reference GstInterleavePad class to have the type registered from
   * a threadsafe context
   */
  g_type_class_ref (GST_TYPE_INTERLEAVE_PAD);

  gobject_class->finalize = gst_interleave_finalize;
  gobject_class->set_property = gst_interleave_set_property;
  gobject_class->get_property = gst_interleave_get_property;

  /**
   * GstInterleave:channel-positions
   * 
   * Channel positions: This property controls the channel positions
   * that are used on the src caps. The number of elements should be
   * the same as the number of sink pads and the array should contain
   * a valid list of channel positions. The n-th element of the array
   * is the position of the n-th sink pad.
   *
   * These channel positions will only be used if they're valid and the
   * number of elements is the same as the number of channels. If this
   * is not given a NONE layout will be used.
   *
   */
  g_object_class_install_property (gobject_class, PROP_CHANNEL_POSITIONS,
      g_param_spec_value_array ("channel-positions", "Channel positions",
          "Channel positions used on the output",
          g_param_spec_enum ("channel-position", "Channel position",
              "Channel position of the n-th input",
              GST_TYPE_AUDIO_CHANNEL_POSITION,
              GST_AUDIO_CHANNEL_POSITION_NONE,
              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GstInterleave:channel-positions-from-input
   * 
   * Channel positions from input: If this property is set to %TRUE the channel
   * positions will be taken from the input caps if valid channel positions for
   * the output can be constructed from them. If this is set to %TRUE setting the
   * channel-positions property overwrites this property again.
   *
   */
  g_object_class_install_property (gobject_class,
      PROP_CHANNEL_POSITIONS_FROM_INPUT,
      g_param_spec_boolean ("channel-positions-from-input",
          "Channel positions from input",
          "Take channel positions from the input", TRUE,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  gstelement_class->request_new_pad =
      GST_DEBUG_FUNCPTR (gst_interleave_request_new_pad);
  gstelement_class->release_pad =
      GST_DEBUG_FUNCPTR (gst_interleave_release_pad);
  gstelement_class->change_state =
      GST_DEBUG_FUNCPTR (gst_interleave_change_state);
}
static void
gst_raw_video_parse_class_init (GstRawVideoParseClass * klass)
{
  GObjectClass *object_class;
  GstElementClass *element_class;
  GstBaseParseClass *baseparse_class;
  GstRawBaseParseClass *rawbaseparse_class;

  GST_DEBUG_CATEGORY_INIT (raw_video_parse_debug, "rawvideoparse", 0,
      "rawvideoparse element");

  object_class = G_OBJECT_CLASS (klass);
  element_class = GST_ELEMENT_CLASS (klass);
  baseparse_class = GST_BASE_PARSE_CLASS (klass);
  rawbaseparse_class = GST_RAW_BASE_PARSE_CLASS (klass);

  gst_element_class_add_pad_template (element_class,
      gst_static_pad_template_get (&static_sink_template));
  gst_element_class_add_pad_template (element_class,
      gst_static_pad_template_get (&static_src_template));

  object_class->set_property =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_set_property);
  object_class->get_property =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_property);

  baseparse_class->stop = GST_DEBUG_FUNCPTR (gst_raw_video_parse_stop);

  rawbaseparse_class->set_current_config =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_set_current_config);
  rawbaseparse_class->get_current_config =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_current_config);
  rawbaseparse_class->set_config_from_caps =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_set_config_from_caps);
  rawbaseparse_class->get_caps_from_config =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_caps_from_config);
  rawbaseparse_class->get_config_frame_size =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_config_frame_size);
  rawbaseparse_class->get_max_frames_per_buffer =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_max_frames_per_buffer);
  rawbaseparse_class->is_config_ready =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_is_config_ready);
  rawbaseparse_class->process = GST_DEBUG_FUNCPTR (gst_raw_video_parse_process);
  rawbaseparse_class->is_unit_format_supported =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_is_unit_format_supported);
  rawbaseparse_class->get_units_per_second =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_units_per_second);
  rawbaseparse_class->get_overhead_size =
      GST_DEBUG_FUNCPTR (gst_raw_video_parse_get_overhead_size);

  g_object_class_install_property (object_class,
      PROP_WIDTH,
      g_param_spec_int ("width",
          "Width",
          "Width of frames in raw stream",
          0, G_MAXINT, DEFAULT_WIDTH,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_HEIGHT,
      g_param_spec_int ("height",
          "Height",
          "Height of frames in raw stream",
          0, G_MAXINT,
          DEFAULT_HEIGHT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_FORMAT,
      g_param_spec_enum ("format",
          "Format",
          "Format of frames in raw stream",
          GST_TYPE_VIDEO_FORMAT,
          DEFAULT_FORMAT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_FRAMERATE,
      gst_param_spec_fraction ("framerate",
          "Frame rate",
          "Rate of frames in raw stream",
          0, 1, G_MAXINT, 1,
          DEFAULT_FRAMERATE_N, DEFAULT_FRAMERATE_D,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_PIXEL_ASPECT_RATIO,
      gst_param_spec_fraction ("pixel-aspect-ratio",
          "Pixel aspect ratio",
          "Pixel aspect ratio of frames in raw stream",
          1, 100, 100, 1,
          DEFAULT_PIXEL_ASPECT_RATIO_N, DEFAULT_PIXEL_ASPECT_RATIO_D,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_INTERLACED,
      g_param_spec_boolean ("interlaced",
          "Interlaced flag",
          "True if frames in raw stream are interlaced",
          DEFAULT_INTERLACED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_TOP_FIELD_FIRST,
      g_param_spec_boolean ("top-field-first",
          "Top field first",
          "True if top field in frames in raw stream come first (not used if frames aren't interlaced)",
          DEFAULT_INTERLACED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_PLANE_STRIDES,
      g_param_spec_value_array ("plane-strides",
          "Plane strides",
          "Strides of the planets in bytes",
          g_param_spec_uint ("plane-stride",
              "Plane stride",
              "Stride of the n-th plane in bytes (0 = stride equals width*bytes-per-pixel)",
              0, G_MAXUINT,
              0,
              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_PLANE_OFFSETS,
      g_param_spec_value_array ("plane-offsets",
          "Plane offsets",
          "Offsets of the planets in bytes",
          g_param_spec_uint ("plane-offset",
              "Plane offset",
              "Offset of the n-th plane in bytes",
              0, G_MAXUINT,
              0,
              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );
  g_object_class_install_property (object_class,
      PROP_FRAME_STRIDE,
      g_param_spec_uint ("frame-stride",
          "Frame stride",
          "Stride between whole frames (0 = frames are tightly packed together)",
          0, G_MAXUINT,
          DEFAULT_FRAME_STRIDE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
      );

  gst_element_class_set_static_metadata (element_class,
      "rawvideoparse",
      "Codec/Parser/Video",
      "Converts unformatted data streams into timestamped raw video frames",
      "Carlos Rafael Giani <*****@*****.**>");
}
static void
gst_pocketsphinx_class_init(GstPocketSphinxClass * klass)
{
    GObjectClass *gobject_class;

    gobject_class =(GObjectClass *) klass;

    gobject_class->set_property = gst_pocketsphinx_set_property;
    gobject_class->get_property = gst_pocketsphinx_get_property;
    gobject_class->finalize = GST_DEBUG_FUNCPTR(gst_pocketsphinx_finalize);

    /* TODO: We will bridge cmd_ln.h properties to GObject
     * properties here somehow eventually. */
    g_object_class_install_property
        (gobject_class, PROP_HMM_DIR,
         g_param_spec_string("hmm", "HMM Directory",
                             "Directory containing acoustic model parameters",
                             NULL,
                             G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_LM_FILE,
         g_param_spec_string("lm", "LM File",
                             "Language model file",
                             NULL,
                             G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_LMCTL_FILE,
         g_param_spec_string("lmctl", "LM Control File",
                             "Language model control file (for class LMs)",
                             NULL,
                             G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_LM_NAME,
         g_param_spec_string("lmname", "LM Name",
                             "Language model name (to select LMs from lmctl)",
                             NULL,
                             G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_FSG_FILE,
         g_param_spec_string("fsg", "FSG File",
                             "Finite state grammar file",
                             NULL,
                             G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_FSG_MODEL,
         g_param_spec_pointer("fsg_model", "FSG Model",
                              "Finite state grammar object (fsg_model_t *)",
                              G_PARAM_WRITABLE));
    g_object_class_install_property
        (gobject_class, PROP_DICT_FILE,
         g_param_spec_string("dict", "Dictionary File",
                             "Dictionary File",
                             NULL,
                             G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_MLLR_FILE,
         g_param_spec_string("mllr", "MLLR file",
                             "MLLR file",
                             NULL,
                             G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_FWDFLAT,
         g_param_spec_boolean("fwdflat", "Flat Lexicon Search",
                              "Enable Flat Lexicon Search",
                              FALSE,
                              G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_BESTPATH,
         g_param_spec_boolean("bestpath", "Graph Search",
                              "Enable Graph Search",
                              FALSE,
                              G_PARAM_READWRITE));

    g_object_class_install_property
        (gobject_class, PROP_LATDIR,
         g_param_spec_string("latdir", "Lattice Directory",
                             "Output Directory for Lattices",
                             NULL,
                             G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_LATTICE,
         g_param_spec_boxed("lattice", "Word Lattice",
                            "Word lattice object for most recent result",
                            PS_LATTICE_TYPE,
                            G_PARAM_READABLE));
    g_object_class_install_property
        (gobject_class, PROP_NBEST,
         g_param_spec_value_array("nbest", "N-best results",
                          "N-best results",
                          g_param_spec_string("nbest-hyp", "N-best hyp",
                            "N-best hyp",
                            NULL,
                            G_PARAM_READABLE),
                          G_PARAM_READABLE));  
    g_object_class_install_property
        (gobject_class, PROP_NBEST_SIZE,
         g_param_spec_int("nbest_size", "Size of N-best list",
                          "Number of hypothesis in the N-best list",
                          1, 1000, 10,
                          G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_MAXHMMPF,
         g_param_spec_int("maxhmmpf", "Maximum HMMs per frame",
                          "Maximum number of HMMs searched per frame",
                          1, 100000, 1000,
                          G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_MAXWPF,
         g_param_spec_int("maxwpf", "Maximum words per frame",
                          "Maximum number of words searched per frame",
                          1, 100000, 10,
                          G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_BEAM,
         g_param_spec_float("beam", "Beam width applied to every frame in Viterbi search",
                          "Beam width applied to every frame in Viterbi search",
                          -1, 1, 1e-48,
                          G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_PBEAM,
         g_param_spec_float("pbeam", "Beam width applied to phone transitions",
                          "Beam width applied to phone transitions",
                          -1, 1, 1e-48,
                          G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_WBEAM,
         g_param_spec_float("wbeam", "Beam width applied to word exits",
                          "Beam width applied to phone transitions",
                          -1, 1, 7e-29,
                          G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_DSRATIO,
         g_param_spec_int("dsratio", "Frame downsampling ratio",
                          "Evaluate acoustic model every N frames",
                          1, 10, 1,
                          G_PARAM_READWRITE));
    g_object_class_install_property
        (gobject_class, PROP_DECODER,
         g_param_spec_boxed("decoder", "Decoder object",
                            "The underlying decoder",
                            PS_DECODER_TYPE,
                            G_PARAM_READABLE));
    g_object_class_install_property
        (gobject_class, PROP_CONFIGURED,
         g_param_spec_boolean("configured", "Finalize configuration",
                              "Set this to finalize configuration",
                              FALSE,
                              G_PARAM_READWRITE));

    gst_pocketsphinx_signals[SIGNAL_PARTIAL_RESULT] = 
        g_signal_new("partial_result",
                     G_TYPE_FROM_CLASS(klass),
                     G_SIGNAL_RUN_LAST,
                     G_STRUCT_OFFSET(GstPocketSphinxClass, partial_result),
                     NULL, NULL,
                     ps_marshal_VOID__STRING_STRING,
                     G_TYPE_NONE,
                     2, G_TYPE_STRING, G_TYPE_STRING
            );

    gst_pocketsphinx_signals[SIGNAL_RESULT] = 
        g_signal_new("result",
                     G_TYPE_FROM_CLASS(klass),
                     G_SIGNAL_RUN_LAST,
                     G_STRUCT_OFFSET(GstPocketSphinxClass, result),
                     NULL, NULL,
                     ps_marshal_VOID__STRING_STRING,
                     G_TYPE_NONE,
                     2, G_TYPE_STRING, G_TYPE_STRING
            );

    GST_DEBUG_CATEGORY_INIT(pocketsphinx_debug, "pocketsphinx", 0,
                            "Automatic Speech Recognition");
}
Exemple #17
0
/* Photography class initialization stuff */
static void
gst_photography_iface_class_init (gpointer g_class)
{
  /* create interface signals and properties here. */

  /* White balance */
  g_object_interface_install_property (g_class,
      g_param_spec_enum (GST_PHOTOGRAPHY_PROP_WB_MODE,
          "White balance mode property",
          "White balance affects the color temperature of the photo",
          GST_TYPE_PHOTOGRAPHY_WHITE_BALANCE_MODE,
          GST_PHOTOGRAPHY_WB_MODE_AUTO,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /* Color tone */
  g_object_interface_install_property (g_class,
      g_param_spec_enum (GST_PHOTOGRAPHY_PROP_COLOR_TONE,
          "Color tone mode property",
          "Color tone setting changes color shading in the photo",
          GST_TYPE_PHOTOGRAPHY_COLOR_TONE_MODE,
          GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /* Scene mode */
  g_object_interface_install_property (g_class,
      g_param_spec_enum (GST_PHOTOGRAPHY_PROP_SCENE_MODE,
          "Scene mode property",
          "Scene mode works as a preset for different photo shooting mode settings",
          GST_TYPE_PHOTOGRAPHY_SCENE_MODE,
          GST_PHOTOGRAPHY_SCENE_MODE_AUTO,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /* Flash mode */
  g_object_interface_install_property (g_class,
      g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FLASH_MODE,
          "Flash mode property",
          "Flash mode defines how the flash light should be used",
          GST_TYPE_PHOTOGRAPHY_FLASH_MODE,
          GST_PHOTOGRAPHY_FLASH_MODE_AUTO,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /* Flicker reduction mode */
  g_object_interface_install_property (g_class,
      g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FLICKER_MODE,
          "Flicker reduction mode property",
          "Flicker reduction mode defines a line frequency for flickering prevention",
          GST_TYPE_PHOTOGRAPHY_FLICKER_REDUCTION_MODE,
          GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /* Focus mode */
  g_object_interface_install_property (g_class,
      g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FOCUS_MODE,
          "Focus mode property",
          "Focus mode defines the range of focal lengths to use in autofocus search",
          GST_TYPE_PHOTOGRAPHY_FOCUS_MODE,
          GST_PHOTOGRAPHY_FOCUS_MODE_AUTO,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /* Capabilities */
  g_object_interface_install_property (g_class,
      g_param_spec_ulong (GST_PHOTOGRAPHY_PROP_CAPABILITIES,
          "Photo capabilities bitmask",
          "Tells the photo capabilities of the device",
          0, G_MAXULONG, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  /* EV_compensation */
  g_object_interface_install_property (g_class,
      g_param_spec_float (GST_PHOTOGRAPHY_PROP_EV_COMP,
          "EV compensation property",
          "EV compensation affects the brightness of the image",
          -2.5, 2.5, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /* ISO value */
  g_object_interface_install_property (g_class,
      g_param_spec_uint (GST_PHOTOGRAPHY_PROP_ISO_SPEED,
          "ISO speed property",
          "ISO speed defines the light sensitivity (0 = auto)",
          0, 6400, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /* Aperture */
  g_object_interface_install_property (g_class,
      g_param_spec_uint (GST_PHOTOGRAPHY_PROP_APERTURE,
          "Aperture property",
          "Aperture defines the size of lens opening  (0 = auto)",
          0, G_MAXUINT8, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /* Exposure */
  g_object_interface_install_property (g_class,
      g_param_spec_uint (GST_PHOTOGRAPHY_PROP_EXPOSURE_TIME,
          "Exposure time in milliseconds",
          "Exposure time defines how long the shutter will stay open (0 = auto)",
          0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GstPhotography:image-capture-supported-caps:
   *
   * Query caps that describe supported formats for image capture. Sometimes
   * element may support different formats for image capture than for video
   * streaming.
   */
  g_object_interface_install_property (g_class,
      g_param_spec_boxed (GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS,
          "Image capture supported caps",
          "Caps describing supported image capture formats", GST_TYPE_CAPS,
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  /**
   * GstPhotography:image-preview-supported-caps:
   *
   * Query caps that describe supported formats for preview image. Sometimes
   * element may support different formats for preview image than for video
   * streaming.
   */
  g_object_interface_install_property (g_class,
      g_param_spec_boxed (GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS,
          "Image preview supported caps",
          "Caps describing supported image preview formats", GST_TYPE_CAPS,
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  /* Zoom */
  g_object_interface_install_property (g_class,
      g_param_spec_float (GST_PHOTOGRAPHY_PROP_ZOOM,
          "Zoom property",
          "How much the resulted image will be zoomed",
          1.0f, 10.0f, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GstPhotography:color-temperature:
   *
   * Color temperature parameter for manual white balance.
   * Control color temperature in Kelvin units.
   */
  g_object_interface_install_property (g_class,
      g_param_spec_uint (GST_PHOTOGRAPHY_PROP_COLOR_TEMPERATURE,
          "Color temperature in Kelvin units",
          "Color temperature in Kelvin units for manual white balance",
          0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GstPhotography:white-point:
   *
   * White point parameter for manual white balance.
   * Describes the color "white" as raw values.
   *
   * FIXME: check and document correct representation for white point
   */
  g_object_interface_install_property (g_class,
      g_param_spec_value_array (GST_PHOTOGRAPHY_PROP_WHITE_POINT,
          "White point",
          "Describe color white as raw values",
          g_param_spec_uint ("raw-value", "Raw value",
              "Raw value", 0, G_MAXUINT, 0,
              G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GstPhotography:analog-gain:
   *
   * Linear multiplicative value how much amplification is applied to the signal
   * before A-D conversion.
   */
  g_object_interface_install_property (g_class,
      g_param_spec_float (GST_PHOTOGRAPHY_PROP_ANALOG_GAIN,
          "Analog gain applied to the sensor",
          "Analog gain applied to the sensor",
          1.0f, G_MAXFLOAT, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GstPhotography:lens-focus:
   *
   * Manual changing of lens focus in diopter units.
   * Inteded use with GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL focus mode, otherwise
   * to be ignored.
   *
   */
  g_object_interface_install_property (g_class,
      g_param_spec_float (GST_PHOTOGRAPHY_PROP_LENS_FOCUS,
          "Manual lens focus",
          "Focus point in diopter units",
          0.0f, G_MAXFLOAT, 0.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GstPhotography:min-exposure-time:
   *
   * Minimum exposure time for automatic exposure mode.
   */
  g_object_interface_install_property (g_class,
      g_param_spec_uint (GST_PHOTOGRAPHY_PROP_MIN_EXPOSURE_TIME,
          "Minimum exposure time",
          "Minimum exposure time for automatic exposure mode",
          0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * GstPhotography:max-exposure-time:
   *
   * Maximum exposure time for automatic exposure mode.
   */
  g_object_interface_install_property (g_class,
      g_param_spec_uint (GST_PHOTOGRAPHY_PROP_MAX_EXPOSURE_TIME,
          "Maximum exposure time",
          "Maximum exposure time for automatic exposure mode",
          0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /* Noise Reduction, Bayer an YCC noise reduction are enabled by default */
  g_object_interface_install_property (g_class,
      g_param_spec_flags (GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION,
          "Noise Reduction settings",
          "Which noise reduction modes are enabled (0 = disabled)",
          GST_TYPE_PHOTOGRAPHY_NOISE_REDUCTION,
          0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
Exemple #18
0
/* Clip tag */
static void
gst_cmml_tag_clip_class_init (GstCmmlTagClipClass * clip_class)
{
  GObjectClass *klass = G_OBJECT_CLASS (clip_class);

  klass->set_property = gst_cmml_tag_clip_set_property;
  klass->get_property = gst_cmml_tag_clip_get_property;
  klass->finalize = gst_cmml_tag_clip_finalize;

  g_object_class_install_property (klass, GST_CMML_TAG_CLIP_EMPTY,
      g_param_spec_boolean ("empty",
          "Empty clip flag",
          "An empty clip only marks the end of the previous clip",
          TRUE,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_CLIP_ID,
      g_param_spec_string ("id",
          "Clip id",
          "Id of the clip", NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_CLIP_TRACK,
      g_param_spec_string ("track",
          "Track number",
          "The track this clip belongs to",
          "default",
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_CLIP_START_TIME,
      g_param_spec_uint64 ("start-time",
          "Start time",
          "The start time (in seconds) of the clip",
          0, G_MAXUINT64, GST_CLOCK_TIME_NONE,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_CLIP_END_TIME,
      g_param_spec_uint64 ("end-time",
          "End time",
          "The end time (in seconds) of the clip (only set if extract-mode=true)",
          0, G_MAXUINT64, GST_CLOCK_TIME_NONE,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_CLIP_ANCHOR_HREF,
      g_param_spec_string ("anchor-uri",
          "Anchor URI",
          "The location of a Web resource closely connected to the clip",
          NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_CLIP_ANCHOR_TEXT,
      g_param_spec_string ("anchor-text",
          "Anchor text",
          "A short description of the resource pointed by anchor-uri",
          NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_CLIP_IMG_SRC,
      g_param_spec_string ("img-uri",
          "Image URI",
          "The URI of a representative image for the clip",
          NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_CLIP_IMG_ALT,
      g_param_spec_string ("img-alt",
          "Image alternative text",
          "Alternative text to be displayed instead of the image "
          "specified in img-uri", NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_CLIP_DESC_TEXT,
      g_param_spec_string ("description",
          "Description",
          "A textual description of the content of the clip",
          NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (klass, GST_CMML_TAG_CLIP_META,
      g_param_spec_value_array ("meta",
          "Meta annotations",
          "Meta annotations for the clip",
          NULL,
          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));

  g_value_register_transform_func (G_TYPE_STRING, GST_TYPE_CMML_TAG_CLIP,
      gst_cmml_tag_clip_value_from_string_value);
}
Exemple #19
0
static void
uca_pco_camera_class_init(UcaPcoCameraClass *klass)
{
    GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
    gobject_class->set_property = uca_pco_camera_set_property;
    gobject_class->get_property = uca_pco_camera_get_property;
    gobject_class->finalize = uca_pco_camera_finalize;

    UcaCameraClass *camera_class = UCA_CAMERA_CLASS(klass);
    camera_class->start_recording = uca_pco_camera_start_recording;
    camera_class->stop_recording = uca_pco_camera_stop_recording;
    camera_class->start_readout = uca_pco_camera_start_readout;
    camera_class->stop_readout = uca_pco_camera_stop_readout;
    camera_class->trigger = uca_pco_camera_trigger;
    camera_class->grab = uca_pco_camera_grab;

    for (guint i = 0; base_overrideables[i] != 0; i++)
        g_object_class_override_property(gobject_class, base_overrideables[i], uca_camera_props[base_overrideables[i]]);

    /**
     * UcaPcoCamera:sensor-extended:
     *
     * Activate larger sensor area that contains surrounding pixels for dark
     * references and dummies. Use #UcaPcoCamera:sensor-width-extended and
     * #UcaPcoCamera:sensor-height-extended to query the resolution of the
     * larger area.
     */
    pco_properties[PROP_SENSOR_EXTENDED] =
        g_param_spec_boolean("sensor-extended",
            "Use extended sensor format",
            "Use extended sensor format",
            FALSE, G_PARAM_READWRITE);

    pco_properties[PROP_SENSOR_WIDTH_EXTENDED] =
        g_param_spec_uint("sensor-width-extended",
            "Width of extended sensor",
            "Width of the extended sensor in pixels",
            1, G_MAXUINT, 1,
            G_PARAM_READABLE);

    pco_properties[PROP_SENSOR_HEIGHT_EXTENDED] =
        g_param_spec_uint("sensor-height-extended",
            "Height of extended sensor",
            "Height of the extended sensor in pixels",
            1, G_MAXUINT, 1,
            G_PARAM_READABLE);

    /**
     * UcaPcoCamera:sensor-pixelrate:
     *
     * Read and write the pixel rate or clock of the sensor in terms of Hertz.
     * Make sure to query the possible pixel rates through the
     * #UcaPcoCamera:sensor-pixelrates property. Any other value will be
     * rejected by the camera.
     */
    pco_properties[PROP_SENSOR_PIXELRATE] =
        g_param_spec_uint("sensor-pixelrate",
            "Pixel rate",
            "Pixel rate",
            1, G_MAXUINT, 1,
            G_PARAM_READWRITE);

    pco_properties[PROP_SENSOR_PIXELRATES] =
        g_param_spec_value_array("sensor-pixelrates",
            "Array of possible sensor pixel rates",
            "Array of possible sensor pixel rates",
            pco_properties[PROP_SENSOR_PIXELRATE],
            G_PARAM_READABLE);

    pco_properties[PROP_NAME] =
        g_param_spec_string("name",
            "Name of the camera",
            "Name of the camera",
            "", G_PARAM_READABLE);

    pco_properties[PROP_SENSOR_TEMPERATURE] =
        g_param_spec_double("sensor-temperature",
            "Temperature of the sensor",
            "Temperature of the sensor in degree Celsius",
            -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
            G_PARAM_READABLE);

    pco_properties[PROP_HAS_DOUBLE_IMAGE_MODE] =
        g_param_spec_boolean("has-double-image-mode",
            "Is double image mode supported by this model",
            "Is double image mode supported by this model",
            FALSE, G_PARAM_READABLE);

    pco_properties[PROP_DOUBLE_IMAGE_MODE] =
        g_param_spec_boolean("double-image-mode",
            "Use double image mode",
            "Use double image mode",
            FALSE, G_PARAM_READWRITE);

    pco_properties[PROP_OFFSET_MODE] =
        g_param_spec_boolean("offset-mode",
            "Use offset mode",
            "Use offset mode",
            FALSE, G_PARAM_READWRITE);

    pco_properties[PROP_RECORD_MODE] =
        g_param_spec_enum("record-mode",
            "Record mode",
            "Record mode",
            UCA_TYPE_PCO_CAMERA_RECORD_MODE, UCA_PCO_CAMERA_RECORD_MODE_SEQUENCE,
            G_PARAM_READWRITE);

    pco_properties[PROP_STORAGE_MODE] =
        g_param_spec_enum("storage-mode",
            "Storage mode",
            "Storage mode",
            UCA_TYPE_PCO_CAMERA_STORAGE_MODE, UCA_PCO_CAMERA_STORAGE_MODE_FIFO_BUFFER,
            G_PARAM_READWRITE);

    pco_properties[PROP_ACQUIRE_MODE] =
        g_param_spec_enum("acquire-mode",
            "Acquire mode",
            "Acquire mode",
            UCA_TYPE_PCO_CAMERA_ACQUIRE_MODE, UCA_PCO_CAMERA_ACQUIRE_MODE_AUTO,
            G_PARAM_READWRITE);

    pco_properties[PROP_NOISE_FILTER] =
        g_param_spec_boolean("noise-filter",
            "Noise filter",
            "Noise filter",
            FALSE, G_PARAM_READWRITE);

    /**
     * UcaPcoCamera:cooling-point:
     *
     * The value range is set arbitrarily, because we are not yet connected to
     * the camera and just don't know the cooling range. We override these
     * values in #uca_pco_camera_new().
     */
    pco_properties[PROP_COOLING_POINT] =
        g_param_spec_int("cooling-point",
            "Cooling point of the camera",
            "Cooling point of the camera in degree celsius",
            0, 10, 5, G_PARAM_READWRITE);

    pco_properties[PROP_COOLING_POINT_MIN] =
        g_param_spec_int("cooling-point-min",
            "Minimum cooling point",
            "Minimum cooling point in degree celsius",
            G_MININT, G_MAXINT, 0, G_PARAM_READABLE);

    pco_properties[PROP_COOLING_POINT_MAX] =
        g_param_spec_int("cooling-point-max",
            "Maximum cooling point",
            "Maximum cooling point in degree celsius",
            G_MININT, G_MAXINT, 0, G_PARAM_READABLE);

    pco_properties[PROP_COOLING_POINT_DEFAULT] =
        g_param_spec_int("cooling-point-default",
            "Default cooling point",
            "Default cooling point in degree celsius",
            G_MININT, G_MAXINT, 0, G_PARAM_READABLE);

    pco_properties[PROP_SENSOR_ADCS] =
        g_param_spec_uint("sensor-adcs",
            "Number of ADCs to use",
            "Number of ADCs to use",
            1, 2, 1,
            G_PARAM_READWRITE);

    pco_properties[PROP_SENSOR_MAX_ADCS] =
        g_param_spec_uint("sensor-max-adcs",
            "Maximum number of ADCs",
            "Maximum number of ADCs that can be set with \"sensor-adcs\"",
            1, G_MAXUINT, 1,
            G_PARAM_READABLE);

    pco_properties[PROP_TIMESTAMP_MODE] =
        g_param_spec_enum("timestamp-mode",
            "Timestamp mode",
            "Timestamp mode",
            UCA_TYPE_PCO_CAMERA_TIMESTAMP, UCA_PCO_CAMERA_TIMESTAMP_NONE,
            G_PARAM_READWRITE);

    for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++)
        g_object_class_install_property(gobject_class, id, pco_properties[id]);

    g_type_class_add_private(klass, sizeof(UcaPcoCameraPrivate));
}