MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / close

Method close

framework/codec/ActiveDecoder.cpp:47–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void ActiveDecoder::close()
48{
49#if AF_HAVE_PTHREAD
50 {
51 std::unique_lock<std::mutex> locker(mSleepMutex);
52 mRunning = false;
53 }
54 mSleepCondition.notify_one();
55
56 if (mDecodeThread) {
57 mDecodeThread->pause();
58 }
59
60#else
61 mRunning = false;
62#endif
63 close_decoder();
64#if AF_HAVE_PTHREAD
65
66 while (!mInputQueue.empty()) {
67 delete mInputQueue.front();
68 mInputQueue.pop();
69 }
70
71 while (!mOutputQueue.empty()) {
72 delete mOutputQueue.front();
73 mOutputQueue.pop();
74 }
75
76#endif
77}
78
79int ActiveDecoder::decode_func()
80{

Callers 6

mainFunction · 0.45
mainFunction · 0.45
muxThreadRunMethod · 0.45
TESTFunction · 0.45
test_demuxUrlFunction · 0.45
testFirstSeekFunction · 0.45

Calls 4

frontMethod · 0.80
pauseMethod · 0.65
emptyMethod · 0.45
popMethod · 0.45

Tested by 5

mainFunction · 0.36
mainFunction · 0.36
TESTFunction · 0.36
test_demuxUrlFunction · 0.36
testFirstSeekFunction · 0.36