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

Method NotifyLoading

mediaPlayer/player_notifier.cpp:443–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441 }
442
443 void PlayerNotifier::NotifyLoading(loading_event loadingEvent, int progress)
444 {
445 if (!mEnable) {
446 return;
447 }
448
449 player_event *event = nullptr;
450
451 if (loadingEvent == loading_event_start) {
452 if (mListener.LoadingStart) {
453 event = new player_event(mListener.LoadingStart);
454 }
455 } else if (loadingEvent == loading_event_end) {
456 if (mListener.LoadingEnd) {
457 event = new player_event(mListener.LoadingEnd);
458 }
459 } else {
460 if (mListener.LoadingProgress) {
461 event = new player_event(progress, mListener.LoadingProgress);
462 }
463 }
464
465 if (event == nullptr) {
466 return;
467 }
468
469 pushEvent(event);
470 }
471
472 void PlayerNotifier::pushEvent(player_event *event)
473 {

Callers 1

DoCheckBufferPassMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected