예제 #1
0
static gboolean dump_cb(gpointer *user_data)
{
    g_print("Dumping send transport agent pipeline!\n");

    if (video_source)
        write_dot_file("test_send-got_source-video-source", owr_media_source_get_dot_data(video_source), TRUE);
    if (video_renderer)
        write_dot_file("test_send-got_source-video-renderer", owr_media_renderer_get_dot_data(video_renderer), TRUE);
    if (audio_source)
        write_dot_file("test_send-got_source-audio-source", owr_media_source_get_dot_data(audio_source), TRUE);

    if (remote_video_source)
        write_dot_file("test_receive-got_remote_source-video-source", owr_media_source_get_dot_data(remote_video_source), TRUE);
    if (remote_video_renderer)
        write_dot_file("test_receive-got_remote_source-video-renderer", owr_media_renderer_get_dot_data(remote_video_renderer), TRUE);
    if (remote_audio_source)
        write_dot_file("test_receive-got_remote_source-audio-source", owr_media_source_get_dot_data(remote_audio_source), TRUE);
    if (remote_audio_renderer)
        write_dot_file("test_receive-got_remote_source-audio-renderer", owr_media_renderer_get_dot_data(remote_audio_renderer), TRUE);

    write_dot_file("test_send-got_source-transport_agent", owr_transport_agent_get_dot_data(send_transport_agent), TRUE);
    write_dot_file("test_receive-got_remote_source-transport_agent", owr_transport_agent_get_dot_data(recv_transport_agent), TRUE);

    return G_SOURCE_REMOVE;
}
예제 #2
0
gboolean dump_pipeline(gpointer user_data)
{
    g_print("Dumping pipelines\n");

    if (audio_source)
        write_dot_file("test_self_view-audio_source", owr_media_source_get_dot_data(audio_source), FALSE);
    if (audio_renderer)
        write_dot_file("test_self_view-audio_renderer", owr_media_renderer_get_dot_data(audio_renderer), FALSE);

    if (video_source)
        write_dot_file("test_self_view-video_source", owr_media_source_get_dot_data(video_source), FALSE);
    if (video_renderer)
        write_dot_file("test_self_view-video_renderer", owr_media_renderer_get_dot_data(video_renderer), FALSE);

    return FALSE;
}
예제 #3
0
int main(int argc, char **argv)
{
    GOptionContext *options;
    GError *error = NULL;
    gint success_count = 0;
    gint test_count = 0;

    options = g_option_context_new(NULL);
    g_option_context_add_main_entries(options, entries, NULL);
    if (!g_option_context_parse(options, &argc, &argv, &error)) {
        g_print("Failed to parse options: %s\n", error->message);
        return -2;
    }

    g_print("\n *** Starting data channel test ***\n\n");

    owr_init(NULL);
    owr_run_in_background();

    if (setup_transport_agents()) {
        success_count += run_prenegotiated_channel_test(TRUE); test_count++;
        success_count += run_requested_channel_test(TRUE); test_count++;
        success_count += run_requested_channel_test(FALSE); test_count++;
        success_count += run_prenegotiated_channel_test(FALSE); test_count++;

        g_print("\n%d / %d test were successful\n", success_count, test_count);

        g_print("Dumping transport agent pipelines!\n");

        write_dot_file("test_data_channel-left-transport_agent", owr_transport_agent_get_dot_data(left_transport_agent), TRUE);
        write_dot_file("test_data_channel-right-transport_agent", owr_transport_agent_get_dot_data(right_transport_agent), TRUE);

        return test_count - success_count;
    }

    g_print("\n *** Failed initial setup ***\n\n");
    return -1;
}