static void owr_local_media_source_init(OwrLocalMediaSource *source) { OwrLocalMediaSourcePrivate *priv; source->priv = priv = OWR_LOCAL_MEDIA_SOURCE_GET_PRIVATE(source); priv->device_index = -1; priv->message_origin_bus_set = owr_message_origin_bus_set_new(); }
static void owr_uri_source_init(OwrURISource *source) { source->priv = OWR_URI_SOURCE_GET_PRIVATE(source); source->priv->stream_id = 0; source->priv->message_origin_bus_set = owr_message_origin_bus_set_new(); }
static void owr_window_registry_init(OwrWindowRegistry *window_registry) { OwrWindowRegistryPrivate *priv = window_registry->priv = OWR_WINDOW_REGISTRY_GET_PRIVATE(window_registry); priv->registry_hash_table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); priv->message_origin_bus_set = owr_message_origin_bus_set_new(); }
static void owr_data_channel_init(OwrDataChannel *data_channel) { OwrDataChannelPrivate *priv = data_channel->priv = OWR_DATA_CHANNEL_GET_PRIVATE(data_channel); priv->ordered = DEFAULT_ORDERED; priv->max_packet_life_time = DEFAULT_MAX_PACKETS_LIFE_TIME; priv->max_retransmits = DEFAULT_MAX_RETRANSMITS; priv->protocol = g_strdup(DEFAULT_PROTOCOL); priv->negotiated = DEFAULT_NEGOTIATED; priv->id = DEFAULT_ID; priv->label = g_strdup(DEFAULT_LABEL); priv->bytes_sent = 0; priv->message_origin_bus_set = owr_message_origin_bus_set_new(); }
static void owr_session_init(OwrSession *session) { OwrSessionPrivate *priv; session->priv = priv = OWR_SESSION_GET_PRIVATE(session); priv->dtls_client_mode = DEFAULT_DTLS_CLIENT_MODE; priv->dtls_certificate = g_strdup(DEFAULT_DTLS_CERTIFICATE); priv->dtls_key = g_strdup(DEFAULT_DTLS_KEY); priv->ice_state = DEFAULT_ICE_STATE; priv->rtp_ice_state = DEFAULT_ICE_STATE; priv->rtcp_ice_state = DEFAULT_ICE_STATE; priv->dtls_peer_certificate = NULL; priv->local_candidates = NULL; priv->remote_candidates = NULL; priv->forced_remote_candidates = NULL; priv->gathering_done = FALSE; priv->on_remote_candidate = NULL; priv->message_origin_bus_set = owr_message_origin_bus_set_new(); }
static void owr_media_renderer_init(OwrMediaRenderer *renderer) { OwrMediaRendererPrivate *priv; GstBus *bus; GSource *bus_source; gchar *bin_name; renderer->priv = priv = OWR_MEDIA_RENDERER_GET_PRIVATE(renderer); priv->media_type = DEFAULT_MEDIA_TYPE; priv->source = DEFAULT_SOURCE; priv->disabled = DEFAULT_DISABLED; priv->message_origin_bus_set = owr_message_origin_bus_set_new(); bin_name = g_strdup_printf("media-renderer-%u", g_atomic_int_add(&unique_bin_id, 1)); priv->pipeline = gst_pipeline_new(bin_name); gst_pipeline_use_clock(GST_PIPELINE(priv->pipeline), gst_system_clock_obtain()); gst_element_set_base_time(priv->pipeline, _owr_get_base_time()); gst_element_set_start_time(priv->pipeline, GST_CLOCK_TIME_NONE); g_free(bin_name); #ifdef OWR_DEBUG g_signal_connect(priv->pipeline, "deep-notify", G_CALLBACK(_owr_deep_notify), NULL); #endif priv->sink = NULL; priv->src = NULL; bus = gst_pipeline_get_bus(GST_PIPELINE(priv->pipeline)); bus_source = gst_bus_create_watch(bus); g_source_set_callback(bus_source, (GSourceFunc) bus_call, priv->pipeline, NULL); g_source_attach(bus_source, _owr_get_main_context()); g_source_unref(bus_source); g_mutex_init(&priv->media_renderer_lock); }
static void mock_origin_init(MockOrigin *mock) { mock->bus_set = owr_message_origin_bus_set_new(); }