MCPcopy Create free account
hub / github.com/Warzone2100/warzone2100 / seq_Shutdown

Function seq_Shutdown

lib/sequence/sequence.cpp:1029–1078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1027}
1028
1029void seq_Shutdown()
1030{
1031 /* tear it all down */
1032 debug(LOG_VIDEO, "seq_Shutdown");
1033
1034 if (!videoplaying)
1035 {
1036 debug(LOG_VIDEO, "movie is not playing");
1037 return;
1038 }
1039 videoGfx = nullptr;
1040
1041 if (vorbis_p)
1042 {
1043 ogg_stream_clear(&videodata.vo);
1044 vorbis_block_clear(&videodata.vb);
1045 vorbis_dsp_clear(&videodata.vd);
1046 vorbis_comment_clear(&videodata.vc);
1047 vorbis_info_clear(&videodata.vi);
1048
1049 alDeleteSources(1, &audiodata.source);
1050 alDeleteBuffers(1, &audiodata.buffer1);
1051 alDeleteBuffers(1, &audiodata.buffer2);
1052
1053 audio_close();
1054 }
1055
1056 if (theora_p)
1057 {
1058 ogg_stream_clear(&videodata.to);
1059 theora_clear(&videodata.td);
1060 theora_comment_clear(&videodata.tc);
1061 theora_info_clear(&videodata.ti);
1062 deallocateVideoFrame();
1063 }
1064
1065 ogg_sync_clear(&videodata.oy);
1066
1067 inVideoProvider.reset();
1068
1069 videoplaying = false;
1070 seq_setScanlinesDisabled(false);
1071 Timer_stop();
1072
1073 audioTime = 0;
1074 sampletimeOffset = last_time = timer_expire = timer_started = 0;
1075 basetime = -1;
1076
1077 debug(LOG_VIDEO, " **** frames = %d dropped = %d ****", frames, dropped);
1078}
1079
1080int seq_GetFrameNumber()
1081{

Callers 7

seq_PlayFunction · 0.85
seq_UpdateFunction · 0.85
seq_RenderVideoToBufferFunction · 0.85
seqPlayOrQueueFetchFunction · 0.85
seqReleaseAllFunction · 0.85
seq_StopFullScreenVideoFunction · 0.85

Calls 5

audio_closeFunction · 0.85
deallocateVideoFrameFunction · 0.85
seq_setScanlinesDisabledFunction · 0.85
Timer_stopFunction · 0.85
resetMethod · 0.45

Tested by

no test coverage detected