void Cinematic::New() { projectload = false; numbitmap = -1; numbitmapsuiv = -1; fx = -1; key = NULL; DeleteTrack(); DeleteAllBitmap(); DeleteAllSound(); AllocTrack(0, 100, 30.f); FillKeyTemp(&pos, angz, 0, -1, -1, INTERP_BEZIER, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 1.f, -1, 1, NULL, &posgrille, angzgrille, 1.f); AddKey(&KeyTemp, true, true, true); FillKeyTemp(&pos, angz, 100, -1, -1, INTERP_BEZIER, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 1.f, -1, 1, NULL, &posgrille, angzgrille, 1.f); AddKey(&KeyTemp, true, true, true); this->lightd = this->lightchoose = this->light; SetCurrFrame(GetStartFrame()); projectload = true; FlashBlancEnCours = false; }
/* Reinit */ void Cinematic::OneTimeSceneReInit() { m_camera.size = Anglef(160.f, 60.f, 60.f); m_camera.orgTrans.pos = Vec3f(900.f, -160.f, 4340.f); m_camera.angle = Anglef(3.f, 268.f, 0.f); m_camera.clip = Rect(LargeurRender, HauteurRender); m_camera.center = m_camera.clip.center(); m_camera.focal = 350.f; m_camera.bkgcolor = Color::none; m_camera.cdepth = 2500.f; numbitmap = -1; numbitmapsuiv = -1; fx = -1; changekey = true; idsound = -1; key = NULL; projectload = false; DeleteAllBitmap(); DeleteAllSound(); DeleteTrack(); FlashBlancEnCours = false; m_flIntensityRND = 0.f; }
void Routeman::DeleteAllTracks( void ) { ::wxBeginBusyCursor(); // Iterate on the RouteList wxRouteListNode *node = pRouteList->GetFirst(); while( node ) { Route *proute = node->GetData(); if( proute->m_bIsInLayer ) { node = node->GetNext(); continue; } if( proute->m_bIsTrack ) { pConfig->m_bIsImporting = true; pConfig->DeleteConfigRoute( proute ); DeleteTrack( proute ); node = pRouteList->GetFirst(); // Route pConfig->m_bIsImporting = false; } else node = node->GetNext(); } ::wxEndBusyCursor(); }
/* Reinit */ void Cinematic::OneTimeSceneReInit() { Camera.size = Anglef(160.f, 60.f, 60.f); Camera.pos.x = 900.f; Camera.pos.y = -160.f; Camera.pos.z = 4340.f; Camera.angle.a = 3.f; Camera.angle.b = 268.f; Camera.angle.g = 0.f; Camera.clip.left = 0; Camera.clip.top = 0; Camera.clip.right = LargeurRender; Camera.clip.bottom = HauteurRender; Camera.clipz0 = 0.f; Camera.clipz1 = 2.999f; Camera.centerx = LargeurRender / 2; Camera.centery = HauteurRender / 2; Camera.AddX = 320.f; Camera.AddY = 240.f; Camera.focal = 350.f; Camera.Zdiv = 3000.f; Camera.Zmul = 1.f / Camera.Zdiv; Camera.clip3D = 60; Camera.type = CAM_SUBJVIEW; Camera.bkgcolor = Color::none; numbitmap = -1; numbitmapsuiv = -1; fx = -1; changekey = true; idsound = -1; key = NULL; projectload = false; DeleteAllBitmap(); DeleteAllSound(); DeleteTrack(); FlashBlancEnCours = false; m_flIntensityRND = 0.f; }
void DelTracksChild(COMMAND_T* = NULL) { int iRet = MessageBox(g_hwndParent, __LOCALIZE("Delete track(s) children too?","sws_mbox"), __LOCALIZE("Delete track(s)","sws_mbox"), MB_YESNOCANCEL); if (iRet == IDCANCEL) return; if (iRet == IDYES) SelChildren(); for (int i = 1; i <= GetNumTracks(); i++) { MediaTrack* tr = CSurf_TrackFromID(i, false); if (*(int*)GetSetMediaTrackInfo(tr, "I_SELECTED", NULL)) { DeleteTrack(tr); i--; } } Undo_OnStateChangeEx(__LOCALIZE("Delete track(s)","sws_undo"), UNDO_STATE_TRACKCFG, -1); }
void MP4File::MakeIsmaCompliant(bool addIsmaComplianceSdp) { ProtectWriteOperation("MP4MakeIsmaCompliant"); if (m_useIsma) { // already done return; } m_useIsma = true; // find first audio and/or video tracks MP4TrackId audioTrackId = MP4_INVALID_TRACK_ID; try { audioTrackId = FindTrackId(0, MP4_AUDIO_TRACK_TYPE); } catch (MP4Error* e) { delete e; } MP4TrackId videoTrackId = MP4_INVALID_TRACK_ID; try { videoTrackId = FindTrackId(0, MP4_VIDEO_TRACK_TYPE); } catch (MP4Error* e) { delete e; } u_int64_t fileMsDuration = ConvertFromMovieDuration(GetDuration(), MP4_MSECS_TIME_SCALE); // delete any existing OD track if (m_odTrackId != MP4_INVALID_TRACK_ID) { DeleteTrack(m_odTrackId); } AddODTrack(); SetODProfileLevel(0xFF); if (audioTrackId != MP4_INVALID_TRACK_ID) { AddTrackToOd(audioTrackId); } if (videoTrackId != MP4_INVALID_TRACK_ID) { AddTrackToOd(videoTrackId); } // delete any existing scene track MP4TrackId sceneTrackId = MP4_INVALID_TRACK_ID; try { sceneTrackId = FindTrackId(0, MP4_SCENE_TRACK_TYPE); } catch (MP4Error *e) { delete e; } if (sceneTrackId != MP4_INVALID_TRACK_ID) { DeleteTrack(sceneTrackId); } // add scene track sceneTrackId = AddSceneTrack(); SetSceneProfileLevel(0xFF); SetGraphicsProfileLevel(0xFF); SetTrackIntegerProperty(sceneTrackId, "mdia.minf.stbl.stsd.mp4s.esds.decConfigDescr.objectTypeId", MP4SystemsV2ObjectType); SetTrackESConfiguration(sceneTrackId, BifsV2Config, sizeof(BifsV2Config)); u_int8_t* pBytes = NULL; u_int64_t numBytes = 0; // write OD Update Command CreateIsmaODUpdateCommandFromFileForFile( m_odTrackId, audioTrackId, videoTrackId, &pBytes, &numBytes); WriteSample(m_odTrackId, pBytes, numBytes, fileMsDuration); MP4Free(pBytes); pBytes = NULL; // write BIFS Scene Replace Command CreateIsmaSceneCommand( MP4_IS_VALID_TRACK_ID(audioTrackId), MP4_IS_VALID_TRACK_ID(videoTrackId), &pBytes, &numBytes); WriteSample(sceneTrackId, pBytes, numBytes, fileMsDuration); MP4Free(pBytes); pBytes = NULL; // add session level sdp CreateIsmaIodFromFile( m_odTrackId, sceneTrackId, audioTrackId, videoTrackId, &pBytes, &numBytes); char* iodBase64 = MP4ToBase64(pBytes, numBytes); char* sdpBuf = (char*)MP4Calloc(strlen(iodBase64) + 256); if (addIsmaComplianceSdp) { strcpy(sdpBuf, "a=isma-compliance:1,1.0,1\015\012"); } sprintf(&sdpBuf[strlen(sdpBuf)], "a=mpeg4-iod: \042data:application/mpeg4-iod;base64,%s\042\015\012", iodBase64); SetSessionSdp(sdpBuf); VERBOSE_ISMA(GetVerbosity(), printf("IOD SDP = %s\n", sdpBuf)); MP4Free(iodBase64); iodBase64 = NULL; MP4Free(pBytes); pBytes = NULL; MP4Free(sdpBuf); sdpBuf = NULL; }