void CodyCam::ReadyToRun() { fWindow = new VideoWindow(BRect(28, 28, 28, 28), (const char*) B_TRANSLATE_SYSTEM_NAME("CodyCam"), B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS, &fPort); _SetUpNodes(); ((VideoWindow*)fWindow)->ApplyControls(); }
void CodyCam::ReadyToRun() { fWindow = new VideoWindow( (const char*) B_TRANSLATE_SYSTEM_NAME("CodyCam"), B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS, &fPort); if (_SetUpNodes() != B_OK) fWindow->ToggleMenuOnOff(); ((VideoWindow*)fWindow)->ApplyControls(); }
status_t NodeManager::FormatChanged(BRect videoBounds, float videoFrameRate, color_space preferredVideoFormat, float audioFrameRate, uint32 audioChannels, uint32 enabledNodes, bool useOverlays, bool force) { TRACE("NodeManager::FormatChanged()\n"); if (!force && videoBounds == VideoBounds() && videoFrameRate == FramesPerSecond()) { TRACE(" -> reusing existing nodes\n"); // TODO: if enabledNodes would indicate that audio or video // is no longer needed, or, worse yet, suddenly needed when // it wasn't before, then we should not return here! PlaybackManager::Init(videoFrameRate, false, LoopMode(), IsLoopingEnabled(), Speed(), MODE_PLAYING_PAUSED_FORWARD, CurrentFrame()); return B_OK; } _StopNodes(); _TearDownNodes(); PlaybackManager::Init(videoFrameRate, true, LoopMode(), IsLoopingEnabled(), Speed(), MODE_PLAYING_PAUSED_FORWARD, CurrentFrame()); SetVideoBounds(videoBounds); status_t ret = _SetUpNodes(preferredVideoFormat, enabledNodes, useOverlays, audioFrameRate, audioChannels); if (ret == B_OK) _StartNodes(); else fprintf(stderr, "unable to setup nodes: %s\n", strerror(ret)); return ret; }