void driver_device::device_start() { // reschedule ourselves to be last for (device_t &test : device_iterator(*this)) if (&test != this && !test.started()) throw device_missing_dependencies(); // call the game-specific init m_system->driver_init(*this); // finish image devices init process machine().image().postdevice_init(); // start the various pieces driver_start(); if (!m_callbacks[CB_MACHINE_START].isnull()) m_callbacks[CB_MACHINE_START](); else machine_start(); if (!m_callbacks[CB_SOUND_START].isnull()) m_callbacks[CB_SOUND_START](); else sound_start(); if (!m_callbacks[CB_VIDEO_START].isnull()) m_callbacks[CB_VIDEO_START](); else video_start(); // save generic states save_item(NAME(m_flip_screen_x)); save_item(NAME(m_flip_screen_y)); }
void toggle_video_button_callback(GtkWidget *check_button_video, gpointer data) { if (tryb_wysylania == 0) { if (video_running == FALSE) { video_start(); /* wywołuje funkcję audio_receive z opóźnieniem w milisekundach */ //g_timeout_add(100, audio_receive, NULL); video_running = TRUE; } else { video_stop(); video_running = FALSE; } } if (tryb_wysylania == 1) { if (video_running == FALSE) { // PhoneUAV - enable camera //wyslij_dwustan_TCP(12, 1); video_running = TRUE; //FIXME //push_item(statusbar, GINT_TO_POINTER(context_id), "podgląd włączony"); } else { // PhoneUAV - disable camera //wyslij_dwustan_TCP(12, 0); video_running = FALSE; //FIXME //push_item(statusbar, GINT_TO_POINTER(context_id), "podgląd wyłączony"); } } }
VIDEO_START_MEMBER(tsamurai_state,vsgongf) { m_foreground = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tsamurai_state::get_vsgongf_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32); save_item(NAME(m_vsgongf_color)); video_start(); }
// This function configures the RK86 screen emulation on VGA. // Input: // size_x, size_y - the screen dimentions in RK86 characters void rk86_video_configure_screen(int size_x, int size_y) { int const vga_hres = size_x * char_width; int const vga_vres = size_y * (char_height + char_height_gap); video_start(vga_hres, vga_vres); rk86_video_init_cursor_timer(); // We keep the screen dimentions for further retrieval. screen_size_x = size_x; screen_size_y = size_y; }
VIDEO_START_MEMBER(tsamurai_state, tsamurai) { m_background = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tsamurai_state::get_bg_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32); m_foreground = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tsamurai_state::get_fg_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32); m_background->set_transparent_pen(0); m_foreground->set_transparent_pen(0); save_item(NAME(m_bgcolor)); video_start(); }
void action_show_video(string fname, bool windowed, bool loop) { // Initialize the COM library. HRESULT hr = CoInitialize(NULL); if (FAILED(hr)) { MessageBox(NULL, "Failed to initialize COM library.", "ERROR", MB_ICONERROR | MB_OK); return; } int vid = video_add(fname); video_set_scale(vid, true); video_set_fullscreen(vid, windowed); video_start(vid, loop); CoUninitialize(); }
void driver_device::device_start() { // bind our legacy callbacks for (int index = 0; index < ARRAY_LENGTH(m_legacy_callbacks); index++) if (m_legacy_callbacks[index] != NULL) m_callbacks[index] = driver_callback_delegate(m_legacy_callbacks[index], "legacy_callback", &machine()); // reschedule ourselves to be last device_iterator iter(*this); for (device_t *test = iter.first(); test != NULL; test = iter.next()) if (test != this && !test->started()) throw device_missing_dependencies(); // call the game-specific init if (m_system->driver_init != NULL) (*m_system->driver_init)(machine()); // finish image devices init process image_postdevice_init(machine()); // call palette_init if present if (!m_callbacks[CB_PALETTE_INIT].isnull()) m_callbacks[CB_PALETTE_INIT](); else palette_init(); // start the various pieces driver_start(); if (!m_callbacks[CB_MACHINE_START].isnull()) m_callbacks[CB_MACHINE_START](); else machine_start(); if (!m_callbacks[CB_SOUND_START].isnull()) m_callbacks[CB_SOUND_START](); else sound_start(); if (!m_callbacks[CB_VIDEO_START].isnull()) m_callbacks[CB_VIDEO_START](); else video_start(); // save generic states save_item(NAME(m_flip_screen_x)); save_item(NAME(m_flip_screen_y)); }
void driver_device::device_start() { // reschedule ourselves to be last device_iterator iter(*this); for (device_t *test = iter.first(); test != nullptr; test = iter.next()) if (test != this && !test->started()) throw device_missing_dependencies(); // call the game-specific init if (m_system->driver_init != nullptr) (*m_system->driver_init)(machine()); // finish image devices init process machine().image().postdevice_init(); // start the various pieces driver_start(); if (!m_callbacks[CB_MACHINE_START].isnull()) m_callbacks[CB_MACHINE_START](); else machine_start(); if (!m_callbacks[CB_SOUND_START].isnull()) m_callbacks[CB_SOUND_START](); else sound_start(); if (!m_callbacks[CB_VIDEO_START].isnull()) m_callbacks[CB_VIDEO_START](); else video_start(); // save generic states save_item(NAME(m_latch_clear_value)); save_item(NAME(m_latched_value)); save_item(NAME(m_flip_screen_x)); save_item(NAME(m_flip_screen_y)); }
void driver_device::device_start() { // reschedule ourselves to be last if (next() != NULL) throw device_missing_dependencies(); // call the game-specific init if (m_system->driver_init != NULL) (*m_system->driver_init)(machine()); // finish image devices init process image_postdevice_init(machine()); // call palette_init if present if (m_palette_init != NULL) (*m_palette_init)(machine(), machine().region("proms")->base()); // start the various pieces driver_start(); machine_start(); sound_start(); video_start(); }
int main(int argc, char *argv[]) { /* int argi; for (argi=1; argi < argc; argi++) {printf("parameter: %s\n", argv[argi]);} */ gst_init(&argc, &argv); gtk_init(&argc, &argv); start_GUI(); g_signal_connect(G_OBJECT(drawing_area), "draw", G_CALLBACK(on_draw_event), NULL); g_signal_connect(main_window, "destroy", G_CALLBACK(gtk_main_quit), NULL); g_signal_connect(main_window, "key_press_event", G_CALLBACK(klawisz), 1); g_signal_connect(main_window, "key_release_event", G_CALLBACK(klawisz), 0); g_signal_connect(servocontroller_enable_button, "clicked", G_CALLBACK(toggle_servocontroller), TRUE); g_signal_connect(servocontroller_disable_button, "clicked", G_CALLBACK(toggle_servocontroller), FALSE); g_signal_connect(check_button_regulator, "clicked", G_CALLBACK(toggle_ESC_callback), NULL); g_signal_connect(record_start_button, "clicked", G_CALLBACK(switch_Recording), NULL); g_signal_connect(record_stop_button, "clicked", G_CALLBACK(switch_Recording), NULL); g_signal_connect(check_button_video, "clicked", G_CALLBACK(toggle_video_button_callback), NULL); g_signal_connect_swapped(G_OBJECT(main_window), "destroy", G_CALLBACK(zamknij), NULL); switch (tryb_wysylania) { case 1: g_signal_connect(reconnect_button, "clicked", G_CALLBACK(open_TCP_socket), NULL); break; default: //TODO: close socket, reopen socket break; } /* wczytuje wartości zmiennych z pliku config.cfg */ open_config(argv[1]); /* distinguishes between USB and Bluetooth connection */ //TODO: https://linux.die.net/man/8/udevadm if (0 == access("/dev/input/by-id/usb-Sony_Computer_Entertainment_Wireless_Controller-joystick", 0)) { g_print("Joystick file exists - USB mapping\n"); gtk_progress_bar_set_text(progress3, "touchpad X:"); gtk_progress_bar_set_text(progress4, "touchpad Y:"); gtk_progress_bar_set_text(progress5, "axis 8:"); } else if (access("/dev/input/by-id/usb-Microsoft_Controller_0000000000000000000000000000-joystick", 0) == 0) { g_print("Xbox One controller - USB mapping\n"); button[2] = 3; // "triangle" - "Y" button[3] = 2; // "square" - "X" button[8] = 6; // share - view button[9] = 7; // options - menu button[10] = 8; // PlayStation - Xbox button[11] = 9; // left stick press button[12] = 10; // right stick press } else { g_print("Joystick file doesn't exist - Bluetooth mapping\n"); axis[6] = 6; axis[7] = 7; axis[9] = 9; axis[10] = 10; axis[11] = 11; gtk_progress_bar_set_text(progress3, "gyro X?"); gtk_progress_bar_set_text(progress4, "gyro Y?"); gtk_progress_bar_set_text(progress5, "gyro Z?"); } /* wyświetla wszystkie elementy okna */ gtk_widget_show_all(main_window); // UDP if (tryb_wysylania == 0) { open_UDP_socket(); video_start(); video_receive(); } // TCP if (tryb_wysylania == 1) { // connect on startup open_TCP_socket(); /* wysyła pakiet z numerem kamery i adresem IP na jaki ma być streamingowany obraz z kamery */ introduce_yourself_TCP(); } // UDP, old if (tryb_wysylania == 2) { open_UDP_socket(); /* wysyła pakiet z numerem kamery i adresem IP na jaki ma być streamowany obraz z kamery */ video_start(); /* rozpoczyna wyświetlanie obrazu */ video_receive(); } /* uruchamia "audio_receive" z opóźnieniem 100 milisekund (właściwie co 100 milisekund) wymaga tego specyfika protokołu TCP */ g_timeout_add(100, audio_receive, NULL); /* FIXME: są problemy z dźwiękiem, chyba chodzi o synchronizację dźwięku z obrazem */ /* wykrywanie joysticka przy starcie programu */ wykryj_joystick(); /* hides one of fullscreen buttons and recording stop button */ if (isFullscreen) { gtk_widget_hide(fullscreen_enable_button); gtk_window_fullscreen(GTK_WINDOW(main_window)); } else { gtk_widget_hide(fullscreen_disable_button); /* gtk_window_unfullscreen(GTK_WINDOW(main_window)); */ } gtk_widget_hide(servocontroller_enable_button); gtk_widget_hide(record_stop_button); gtk_main(); /* Out of the main loop, clean up nicely */ g_print("Stopping playback\n"); gst_element_set_state(pipeline, GST_STATE_NULL); g_print("Deleting pipeline\n"); gst_object_unref(GST_OBJECT(pipeline)); return 0; }
static void call_stream_start(struct call *call, bool active) { const struct sdp_format *sc; int err; /* Audio Stream */ sc = sdp_media_rformat(stream_sdpmedia(audio_strm(call->audio)), NULL); if (sc) { struct aucodec *ac = sc->data; if (ac) { err = audio_encoder_set(call->audio, sc->data, sc->pt, sc->params); err |= audio_decoder_set(call->audio, sc->data, sc->pt, sc->params); if (!err) { err = audio_start(call->audio); } if (err) { warning("call: audio stream error: %m\n", err); } } else { info("call: no common audio-codecs..\n"); } } else { info("call: audio stream is disabled..\n"); } #ifdef USE_VIDEO /* Video Stream */ sc = sdp_media_rformat(stream_sdpmedia(video_strm(call->video)), NULL); if (sc) { err = video_encoder_set(call->video, sc->data, sc->pt, sc->params); err |= video_decoder_set(call->video, sc->data, sc->pt, sc->rparams); if (!err) { err = video_start(call->video, call->peer_uri); } if (err) { warning("call: video stream error: %m\n", err); } } else if (call->video) { info("call: video stream is disabled..\n"); } if (call->bfcp) { err = bfcp_start(call->bfcp); if (err) { warning("call: could not start BFCP: %m\n", err); } } #endif if (active) { struct le *le; tmr_cancel(&call->tmr_inv); call->time_start = time(NULL); FOREACH_STREAM { stream_reset(le->data); } } }
static VIDEO_START(draco) { video_start(machine, DRACO_PAGERAM_SIZE); }
static VIDEO_START(cidelsa) { video_start(machine, CIDELSA_PAGERAM_SIZE); }
VIDEO_START_MEMBER(timeplt_state,psurge) { video_start(); m_video_enable = 1; //psurge doesn't seem to have the video enable }
int dtvideo_start (void *video_priv) { dtvideo_context_t *vctx = (dtvideo_context_t *) video_priv; return video_start (vctx); }