diff --exclude='Makefile*' --exclude='*svn*' --exclude='*pro' --exclude='moc_*.cpp' -ru ../observable/mythplugins/mythmusic/mythmusic/aacdecoder.cpp mythplugins/mythmusic/mythmusic/aacdecoder.cpp
old
|
new
|
|
125 | 125 | memmove(output_buf, output_buf + sz, output_bytes); |
126 | 126 | output_at = output_bytes; |
127 | 127 | } else { |
128 | | mutex()->unlock(); |
| 128 | unlock(); |
129 | 129 | usleep(500); |
130 | | mutex()->lock(); |
| 130 | lock(); |
131 | 131 | done = user_stop; |
132 | 132 | } |
133 | 133 | |
… |
… |
|
440 | 440 | void aacDecoder::run() |
441 | 441 | { |
442 | 442 | |
443 | | mutex()->lock(); |
| 443 | lock(); |
444 | 444 | |
445 | 445 | if (!inited) |
446 | 446 | { |
447 | 447 | error("aacDecoder: run() called without being init'd"); |
448 | | mutex()->unlock(); |
| 448 | unlock(); |
449 | 449 | return; |
450 | 450 | } |
451 | 451 | |
… |
… |
|
453 | 453 | |
454 | 454 | stat = DecoderEvent::Decoding; |
455 | 455 | |
456 | | mutex()->unlock(); |
| 456 | unlock(); |
457 | 457 | |
458 | 458 | { |
459 | 459 | DecoderEvent e((DecoderEvent::Type) stat); |
… |
… |
|
470 | 470 | |
471 | 471 | while (!done && !finish && !user_stop) |
472 | 472 | { |
473 | | mutex()->lock(); |
| 473 | lock(); |
474 | 474 | |
475 | 475 | ++current_sample; |
476 | 476 | if (seekTime >= 0.0) |
… |
… |
|
587 | 587 | } |
588 | 588 | } |
589 | 589 | } |
590 | | mutex()->unlock(); |
| 590 | unlock(); |
591 | 591 | } |
592 | 592 | |
593 | 593 | flush(TRUE); |
594 | 594 | |
595 | | mutex()->lock(); |
| 595 | lock(); |
596 | 596 | |
597 | 597 | //cerr << "aacDecoder: completed decoding of " << filename << endl; |
598 | 598 | if (finish) |
… |
… |
|
604 | 604 | stat = DecoderEvent::Stopped; |
605 | 605 | } |
606 | 606 | |
607 | | mutex()->unlock(); |
| 607 | unlock(); |
608 | 608 | |
609 | 609 | { |
610 | 610 | DecoderEvent e((DecoderEvent::Type) stat); |
diff --exclude='Makefile*' --exclude='*svn*' --exclude='*pro' --exclude='moc_*.cpp' -ru ../observable/mythplugins/mythmusic/mythmusic/avfdecoder.cpp mythplugins/mythmusic/mythmusic/avfdecoder.cpp
old
|
new
|
|
105 | 105 | memmove(output_buf, output_buf + sz, output_bytes); |
106 | 106 | output_at = output_bytes; |
107 | 107 | } else { |
108 | | mutex()->unlock(); |
| 108 | unlock(); |
109 | 109 | usleep(500); |
110 | | mutex()->lock(); |
| 110 | lock(); |
111 | 111 | done = user_stop; |
112 | 112 | } |
113 | 113 | } |
… |
… |
|
227 | 227 | int mem_len; |
228 | 228 | char *s; |
229 | 229 | |
230 | | mutex()->lock(); |
| 230 | lock(); |
231 | 231 | |
232 | 232 | if (!inited) |
233 | 233 | { |
234 | | mutex()->unlock(); |
| 234 | unlock(); |
235 | 235 | return; |
236 | 236 | } |
237 | 237 | |
238 | 238 | stat = DecoderEvent::Decoding; |
239 | 239 | |
240 | | mutex()->unlock(); |
| 240 | unlock(); |
241 | 241 | |
242 | 242 | { |
243 | 243 | DecoderEvent e((DecoderEvent::Type) stat); |
… |
… |
|
247 | 247 | av_read_play(ic); |
248 | 248 | while (!done && !finish && !user_stop) |
249 | 249 | { |
250 | | mutex()->lock(); |
| 250 | lock(); |
251 | 251 | |
252 | 252 | // Look to see if user has requested a seek |
253 | 253 | if (seekTime >= 0.0) |
… |
… |
|
267 | 267 | if (av_read_frame(ic, pkt) < 0) |
268 | 268 | { |
269 | 269 | cerr << "avfdecoder.o: read frame failed" << endl; |
270 | | mutex()->unlock(); |
| 270 | unlock(); |
271 | 271 | finish = TRUE; |
272 | 272 | break; |
273 | 273 | } |
… |
… |
|
275 | 275 | // Get the pointer to the data and its length |
276 | 276 | ptr = pkt->data; |
277 | 277 | len = pkt->size; |
278 | | mutex()->unlock(); |
| 278 | unlock(); |
279 | 279 | |
280 | 280 | while (len > 0 && !done && !finish && !user_stop && seekTime <= 0.0) |
281 | 281 | { |
282 | | mutex()->lock(); |
| 282 | lock(); |
283 | 283 | // Decode the stream to the output codec |
284 | 284 | // Samples is the output buffer |
285 | 285 | // data_size is the size in bytes of the frame |
… |
… |
|
289 | 289 | ptr, len); |
290 | 290 | if (dec_len < 0) |
291 | 291 | { |
292 | | mutex()->unlock(); |
| 292 | unlock(); |
293 | 293 | break; |
294 | 294 | } |
295 | 295 | |
296 | 296 | s = (char *)samples; |
297 | | mutex()->unlock(); |
| 297 | unlock(); |
298 | 298 | |
299 | 299 | while (data_size > 0 && !done && !finish && !user_stop && |
300 | 300 | seekTime <= 0.0) |
301 | 301 | { |
302 | | mutex()->lock(); |
| 302 | lock(); |
303 | 303 | // Store and check the size |
304 | 304 | // It is possible the returned data is larger than |
305 | 305 | // the output buffer. If so, flush the buffer and |
… |
… |
|
326 | 326 | if (output()) |
327 | 327 | flush(); |
328 | 328 | |
329 | | mutex()->unlock(); |
| 329 | unlock(); |
330 | 330 | } |
331 | 331 | |
332 | | mutex()->lock(); |
| 332 | lock(); |
333 | 333 | flush(); |
334 | 334 | ptr += dec_len; |
335 | 335 | len -= dec_len; |
336 | | mutex()->unlock(); |
| 336 | unlock(); |
337 | 337 | } |
338 | 338 | av_free_packet(pkt); |
339 | 339 | } |
… |
… |
|
347 | 347 | else if (user_stop) |
348 | 348 | stat = DecoderEvent::Stopped; |
349 | 349 | |
350 | | // mutex()->unlock(); |
| 350 | // unlock(); |
351 | 351 | |
352 | 352 | { |
353 | 353 | DecoderEvent e((DecoderEvent::Type) stat); |
diff --exclude='Makefile*' --exclude='*svn*' --exclude='*pro' --exclude='moc_*.cpp' -ru ../observable/mythplugins/mythmusic/mythmusic/cddecoder.cpp mythplugins/mythmusic/mythmusic/cddecoder.cpp
old
|
new
|
|
77 | 77 | memmove(output_buf, output_buf + sz, output_bytes); |
78 | 78 | output_at = output_bytes; |
79 | 79 | } else { |
80 | | mutex()->unlock(); |
| 80 | unlock(); |
81 | 81 | usleep(500); |
82 | | mutex()->lock(); |
| 82 | lock(); |
83 | 83 | done = user_stop; |
84 | 84 | } |
85 | 85 | } |
… |
… |
|
174 | 174 | |
175 | 175 | void CdDecoder::run() |
176 | 176 | { |
177 | | mutex()->lock(); |
| 177 | lock(); |
178 | 178 | |
179 | 179 | if (! inited) { |
180 | | mutex()->unlock(); |
| 180 | unlock(); |
181 | 181 | |
182 | 182 | return; |
183 | 183 | } |
184 | 184 | |
185 | 185 | stat = DecoderEvent::Decoding; |
186 | 186 | |
187 | | mutex()->unlock(); |
| 187 | unlock(); |
188 | 188 | |
189 | 189 | { |
190 | 190 | DecoderEvent e((DecoderEvent::Type) stat); |
… |
… |
|
194 | 194 | int16_t *cdbuffer; |
195 | 195 | |
196 | 196 | while (! done && ! finish) { |
197 | | mutex()->lock(); |
| 197 | lock(); |
198 | 198 | // decode |
199 | 199 | |
200 | 200 | if (seekTime >= 0.0) { |
… |
… |
|
231 | 231 | } |
232 | 232 | } |
233 | 233 | |
234 | | mutex()->unlock(); |
| 234 | unlock(); |
235 | 235 | } |
236 | 236 | |
237 | | mutex()->lock(); |
| 237 | lock(); |
238 | 238 | |
239 | 239 | if (finish) |
240 | 240 | stat = DecoderEvent::Finished; |
241 | 241 | else if (user_stop) |
242 | 242 | stat = DecoderEvent::Stopped; |
243 | 243 | |
244 | | mutex()->unlock(); |
| 244 | unlock(); |
245 | 245 | |
246 | 246 | { |
247 | 247 | DecoderEvent e((DecoderEvent::Type) stat); |
diff --exclude='Makefile*' --exclude='*svn*' --exclude='*pro' --exclude='moc_*.cpp' -ru ../observable/mythplugins/mythmusic/mythmusic/decoder.cpp mythplugins/mythmusic/mythmusic/decoder.cpp
old
|
new
|
|
45 | 45 | |
46 | 46 | void Decoder::setInput(QIODevice *i) |
47 | 47 | { |
48 | | mutex()->lock(); |
| 48 | lock(); |
49 | 49 | in = i; |
50 | | mutex()->unlock(); |
| 50 | unlock(); |
51 | 51 | } |
52 | 52 | |
53 | 53 | void Decoder::setOutput(AudioOutput *o) |
54 | 54 | { |
55 | | mutex()->lock(); |
| 55 | lock(); |
56 | 56 | out = o; |
57 | | mutex()->unlock(); |
| 57 | unlock(); |
58 | 58 | } |
59 | 59 | |
60 | 60 | void Decoder::error(const QString &e) |
diff --exclude='Makefile*' --exclude='*svn*' --exclude='*pro' --exclude='moc_*.cpp' -ru ../observable/mythplugins/mythmusic/mythmusic/decoder.h mythplugins/mythmusic/mythmusic/decoder.h
old
|
new
|
|
65 | 65 | void setOutput(AudioOutput *); |
66 | 66 | void setFilename(const QString &newName) { filename = newName; } |
67 | 67 | |
68 | | QMutex *mutex() { return &mtx; } |
| 68 | virtual void lock(void) { return mtx.lock(); } |
| 69 | virtual void unlock(void) { return mtx.unlock(); } |
| 70 | virtual bool tryLock(void) { return mtx.tryLock(); } |
| 71 | virtual bool locked(void) { return mtx.locked(); } |
| 72 | |
69 | 73 | QWaitCondition *cond() { return &cnd; } |
70 | 74 | |
71 | 75 | void setBlockSize(unsigned int sz) { blksize = sz; } |
… |
… |
|
87 | 91 | |
88 | 92 | protected: |
89 | 93 | Decoder(DecoderFactory *, QIODevice *, AudioOutput *); |
90 | | |
| 94 | QMutex* getMutex(void) { return &mtx; } |
91 | 95 | void error(const QString &); |
92 | 96 | |
93 | 97 | QString filename; |
diff --exclude='Makefile*' --exclude='*svn*' --exclude='*pro' --exclude='moc_*.cpp' -ru ../observable/mythplugins/mythmusic/mythmusic/flacdecoder.cpp mythplugins/mythmusic/mythmusic/flacdecoder.cpp
old
|
new
|
|
213 | 213 | memmove(output_buf, output_buf + sz, output_bytes); |
214 | 214 | output_at = output_bytes; |
215 | 215 | } else { |
216 | | mutex()->unlock(); |
| 216 | unlock(); |
217 | 217 | usleep(500); |
218 | | mutex()->lock(); |
| 218 | lock(); |
219 | 219 | done = user_stop; |
220 | 220 | } |
221 | 221 | } |
… |
… |
|
245 | 245 | |
246 | 246 | if (! input()->isOpen()) { |
247 | 247 | if (! input()->open(IO_ReadOnly)) { |
248 | | error("FlacOgg: Failed to open input. Error " + |
| 248 | error("FlacDecoder: Failed to open input. Error " + |
249 | 249 | QString::number(input()->status()) + "."); |
250 | 250 | return FALSE; |
251 | 251 | } |
… |
… |
|
301 | 301 | |
302 | 302 | void FlacDecoder::run() |
303 | 303 | { |
304 | | mutex()->lock(); |
| 304 | lock(); |
305 | 305 | |
306 | 306 | if (! inited) { |
307 | | mutex()->unlock(); |
| 307 | unlock(); |
308 | 308 | |
309 | 309 | return; |
310 | 310 | } |
311 | 311 | |
312 | 312 | stat = DecoderEvent::Decoding; |
313 | 313 | |
314 | | mutex()->unlock(); |
| 314 | unlock(); |
315 | 315 | |
316 | 316 | { |
317 | 317 | DecoderEvent e((DecoderEvent::Type) stat); |
… |
… |
|
322 | 322 | FLAC__SeekableStreamDecoderState decoderstate; |
323 | 323 | |
324 | 324 | while (! done && ! finish) { |
325 | | mutex()->lock(); |
| 325 | lock(); |
326 | 326 | // decode |
327 | 327 | |
328 | 328 | if (seekTime >= 0.0) { |
… |
… |
|
355 | 355 | } |
356 | 356 | } |
357 | 357 | |
358 | | mutex()->unlock(); |
| 358 | unlock(); |
359 | 359 | } |
360 | 360 | |
361 | | mutex()->lock(); |
| 361 | lock(); |
362 | 362 | |
363 | 363 | if (finish) |
364 | 364 | stat = DecoderEvent::Finished; |
365 | 365 | else if (user_stop) |
366 | 366 | stat = DecoderEvent::Stopped; |
367 | 367 | |
368 | | mutex()->unlock(); |
| 368 | unlock(); |
369 | 369 | |
370 | 370 | { |
371 | 371 | DecoderEvent e((DecoderEvent::Type) stat); |
diff --exclude='Makefile*' --exclude='*svn*' --exclude='*pro' --exclude='moc_*.cpp' -ru ../observable/mythplugins/mythmusic/mythmusic/maddecoder.cpp mythplugins/mythmusic/mythmusic/maddecoder.cpp
old
|
new
|
|
305 | 305 | memmove(output_buf, output_buf + sz, output_bytes); |
306 | 306 | output_at = output_bytes; |
307 | 307 | } else { |
308 | | mutex()->unlock(); |
| 308 | unlock(); |
309 | 309 | usleep(500); |
310 | | mutex()->lock(); |
| 310 | lock(); |
311 | 311 | done = user_stop; |
312 | 312 | } |
313 | 313 | } |
… |
… |
|
316 | 316 | |
317 | 317 | void MadDecoder::run() |
318 | 318 | { |
319 | | mutex()->lock(); |
| 319 | lock(); |
320 | 320 | |
321 | 321 | if (! inited) { |
322 | | mutex()->unlock(); |
| 322 | unlock(); |
323 | 323 | return; |
324 | 324 | } |
325 | 325 | |
326 | 326 | stat = DecoderEvent::Decoding; |
327 | 327 | |
328 | | mutex()->unlock(); |
| 328 | unlock(); |
329 | 329 | |
330 | 330 | { |
331 | 331 | DecoderEvent e((DecoderEvent::Type) stat); |
… |
… |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | while (! done && ! finish && ! derror) { |
336 | | mutex()->lock(); |
| 336 | lock(); |
337 | 337 | |
338 | 338 | if (seekTime >= 0.0) { |
339 | 339 | long seek_pos = long(seekTime * input()->size() / totalTime); |
… |
… |
|
361 | 361 | eof = true; |
362 | 362 | } else if (len < 0) { |
363 | 363 | derror = true; |
| 364 | unlock(); |
364 | 365 | break; |
365 | 366 | } |
366 | 367 | |
… |
… |
|
373 | 374 | |
374 | 375 | seekTime = -1.; |
375 | 376 | |
376 | | mutex()->unlock(); |
| 377 | unlock(); |
377 | 378 | |
378 | 379 | while (! done && ! finish && ! derror) { |
379 | 380 | if (mad_frame_decode(&frame, &stream) == -1) { |
… |
… |
|
387 | 388 | continue; |
388 | 389 | } |
389 | 390 | |
390 | | mutex()->lock(); |
| 391 | lock(); |
391 | 392 | |
392 | 393 | if (seekTime >= 0.) { |
393 | | mutex()->unlock(); |
| 394 | unlock(); |
394 | 395 | break; |
395 | 396 | } |
396 | 397 | |
397 | 398 | mad_synth_frame(&synth, &frame); |
398 | 399 | madOutput(); |
399 | | mutex()->unlock(); |
| 400 | unlock(); |
400 | 401 | } |
401 | 402 | } |
402 | 403 | |
403 | | mutex()->lock(); |
| 404 | lock(); |
404 | 405 | |
405 | 406 | if (! user_stop && eof) { |
406 | 407 | flush(TRUE); |
… |
… |
|
419 | 420 | else if (user_stop) |
420 | 421 | stat = DecoderEvent::Stopped; |
421 | 422 | |
422 | | mutex()->unlock(); |
| 423 | unlock(); |
423 | 424 | |
424 | 425 | { |
425 | 426 | DecoderEvent e((DecoderEvent::Type) stat); |
diff --exclude='Makefile*' --exclude='*svn*' --exclude='*pro' --exclude='moc_*.cpp' -ru ../observable/mythplugins/mythmusic/mythmusic/playbackbox.h mythplugins/mythmusic/mythmusic/playbackbox.h
old
|
new
|
|
104 | 104 | void doUpdatePlaylist(QString whereClause); |
105 | 105 | void CycleVisualizer(void); |
106 | 106 | void updatePlaylistFromCD(void); |
107 | | void setTrackOnLCD (Metadata *mdata); |
| 107 | void setTrackOnLCD(Metadata *mdata); |
| 108 | void updateTrackInfo(Metadata *mdata); |
| 109 | void openOutputDevice(void); |
108 | 110 | void postUpdate(); |
109 | 111 | void playFirstTrack(); |
110 | 112 | |
diff --exclude='Makefile*' --exclude='*svn*' --exclude='*pro' --exclude='moc_*.cpp' -ru ../observable/mythplugins/mythmusic/mythmusic/streaminput.cpp mythplugins/mythmusic/mythmusic/streaminput.cpp
old
|
new
|
|
21 | 21 | void StreamInput::setup() |
22 | 22 | { |
23 | 23 | if (! url.isValid()) |
24 | | return; |
| 24 | return; |
25 | 25 | |
26 | 26 | QString protocol = url.protocol(); |
27 | 27 | QString host = url.host(); |
… |
… |
|
29 | 29 | int port = url.port(); |
30 | 30 | |
31 | 31 | if (protocol != "mqp" || host.isNull()) |
32 | | return; |
| 32 | return; |
33 | 33 | |
34 | 34 | if (port == -1) |
35 | | port = 42666; |
| 35 | port = 42666; |
36 | 36 | |
37 | 37 | request = ".song " + path.utf8() + "\r\n"; |
38 | 38 | |
… |
… |
|
45 | 45 | |
46 | 46 | sock->connectToHost(host, port); |
47 | 47 | |
48 | | while (stage != -1 && stage < 4) { |
49 | | qDebug("processing one event: stage %d %d %ld", |
50 | | stage, sock->canReadLine(), sock->bytesAvailable()); |
51 | | qApp->processOneEvent(); |
| 48 | while (stage != -1 && stage < 4) |
| 49 | { |
| 50 | qDebug("processing one event: stage %d %d %ld", |
| 51 | stage, sock->canReadLine(), sock->bytesAvailable()); |
| 52 | qApp->processOneEvent(); |
52 | 53 | } |
53 | 54 | |
54 | 55 | qDebug("disconnecting from socket"); |
… |
… |
|
57 | 58 | disconnect(sock, SIGNAL(connected()), this, SLOT(connected())); |
58 | 59 | disconnect(sock, SIGNAL(readyRead()), this, SLOT(readyread())); |
59 | 60 | |
60 | | if (stage == -1) { |
61 | | // some sort of error |
62 | | delete sock; |
63 | | sock = 0; |
| 61 | if (stage == -1) |
| 62 | { |
| 63 | // some sort of error |
| 64 | delete sock; |
| 65 | sock = 0; |
64 | 66 | } |
65 | 67 | } |
66 | 68 | |
… |
… |
|
85 | 87 | |
86 | 88 | void StreamInput::readyread() |
87 | 89 | { |
88 | | if (stage == 2) { |
89 | | qDebug("readyread... checking response"); |
90 | | |
91 | | if (! sock->canReadLine()) { |
92 | | stage = -1; |
93 | | qDebug("can't read line"); |
94 | | return; |
95 | | } |
96 | | |
97 | | QString line = sock->readLine(); |
98 | | if (line.isEmpty()) { |
99 | | stage = -1; |
100 | | qDebug("line is empty"); |
101 | | return; |
102 | | } |
103 | | |
104 | | if (line.left(5) != "*GOOD") { |
105 | | VERBOSE(VB_IMPORTANT, QString("server error response: %1") |
106 | | .arg(line)); |
107 | | stage = -1; |
108 | | return; |
109 | | } |
110 | | |
111 | | stage = 3; |
112 | | } else if (sock->bytesAvailable() > 65536 || sock->atEnd()) { |
113 | | stage = 4; |
| 90 | if (stage == 2) |
| 91 | { |
| 92 | qDebug("readyread... checking response"); |
| 93 | |
| 94 | if (! sock->canReadLine()) |
| 95 | { |
| 96 | stage = -1; |
| 97 | qDebug("can't read line"); |
| 98 | return; |
| 99 | } |
| 100 | |
| 101 | QString line = sock->readLine(); |
| 102 | if (line.isEmpty()) |
| 103 | { |
| 104 | stage = -1; |
| 105 | qDebug("line is empty"); |
| 106 | return; |
| 107 | } |
| 108 | |
| 109 | if (line.left(5) != "*GOOD") |
| 110 | { |
| 111 | VERBOSE(VB_IMPORTANT, QString("server error response: %1") |
| 112 | .arg(line)); |
| 113 | stage = -1; |
| 114 | return; |
| 115 | } |
| 116 | |
| 117 | stage = 3; |
| 118 | } |
| 119 | else if (sock->bytesAvailable() > 65536 || sock->atEnd()) |
| 120 | { |
| 121 | stage = 4; |
114 | 122 | } |
115 | 123 | } |
116 | 124 | |
diff --exclude='Makefile*' --exclude='*svn*' --exclude='*pro' --exclude='moc_*.cpp' -ru ../observable/mythplugins/mythmusic/mythmusic/vorbisdecoder.cpp mythplugins/mythmusic/mythmusic/vorbisdecoder.cpp
old
|
new
|
|
120 | 120 | memmove(output_buf, output_buf + sz, output_bytes); |
121 | 121 | output_at = output_bytes; |
122 | 122 | } else { |
123 | | mutex()->unlock(); |
| 123 | unlock(); |
124 | 124 | usleep(500); |
125 | | mutex()->lock(); |
| 125 | lock(); |
126 | 126 | done = user_stop; |
127 | 127 | } |
128 | 128 | } |
… |
… |
|
212 | 212 | |
213 | 213 | void VorbisDecoder::run() |
214 | 214 | { |
215 | | mutex()->lock(); |
| 215 | lock(); |
216 | 216 | |
217 | 217 | if (! inited) { |
218 | | mutex()->unlock(); |
| 218 | unlock(); |
219 | 219 | |
220 | 220 | return; |
221 | 221 | } |
222 | 222 | |
223 | 223 | stat = DecoderEvent::Decoding; |
224 | 224 | |
225 | | mutex()->unlock(); |
| 225 | unlock(); |
226 | 226 | |
227 | 227 | { |
228 | 228 | DecoderEvent e((DecoderEvent::Type) stat); |
… |
… |
|
232 | 232 | int section = 0; |
233 | 233 | |
234 | 234 | while (! done && ! finish) { |
235 | | mutex()->lock(); |
| 235 | lock(); |
236 | 236 | // decode |
237 | 237 | |
238 | 238 | if (seekTime >= 0.0) { |
… |
… |
|
273 | 273 | finish = TRUE; |
274 | 274 | } |
275 | 275 | |
276 | | mutex()->unlock(); |
| 276 | unlock(); |
277 | 277 | } |
278 | 278 | |
279 | | mutex()->lock(); |
| 279 | lock(); |
280 | 280 | |
281 | 281 | if (finish) |
282 | 282 | stat = DecoderEvent::Finished; |
283 | 283 | else if (user_stop) |
284 | 284 | stat = DecoderEvent::Stopped; |
285 | 285 | |
286 | | mutex()->unlock(); |
| 286 | unlock(); |
287 | 287 | |
288 | 288 | { |
289 | 289 | DecoderEvent e((DecoderEvent::Type) stat); |