Пример #1
0
static void
gst_multipart_set_property (GObject * object, guint prop_id,
                            const GValue * value, GParamSpec * pspec)
{
    GstMultipartDemux *filter;

    g_return_if_fail (GST_IS_MULTIPART_DEMUX (object));
    filter = GST_MULTIPART_DEMUX (object);

    switch (prop_id) {
    case PROP_BOUNDARY:
        /* Not really that usefull anymore as we can reliably autoscan */
        g_free (filter->boundary);
        filter->boundary = g_value_dup_string (value);
        if (filter->boundary != NULL) {
            filter->boundary_len = strlen (filter->boundary);
        }
        break;
    case PROP_AUTOSCAN:
        filter->autoscan = g_value_get_boolean (value);
        break;
    case PROP_SINGLE_STREAM:
        filter->singleStream = g_value_get_boolean (value);
        break;
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
        break;
    }
}
Пример #2
0
static void
gst_multipart_get_property (GObject * object, guint prop_id,
    GValue * value, GParamSpec * pspec)
{
  GstMultipartDemux *filter;

  g_return_if_fail (GST_IS_MULTIPART_DEMUX (object));
  filter = GST_MULTIPART_DEMUX (object);

  switch (prop_id) {
    case PROP_BOUNDARY:
      g_value_set_string (value, filter->boundary);
      break;
    case PROP_AUTOSCAN:
      g_value_set_boolean (value, filter->autoscan);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }
}