void CApplicationPlayer::ClosePlayerGapless(PLAYERCOREID newCore) { boost::shared_ptr<IPlayer> player = GetInternal(); if (!player) return; bool gaplessSupported = (m_eCurrentPlayer == EPC_DVDPLAYER || m_eCurrentPlayer == EPC_PAPLAYER); #if defined(HAS_OMXPLAYER) gaplessSupported = gaplessSupported || (m_eCurrentPlayer == EPC_OMXPLAYER); #endif gaplessSupported = gaplessSupported && (m_eCurrentPlayer == newCore); if (!gaplessSupported) { ClosePlayer(); } else { // XXX: we had to stop the previous playing item, it was done in dvdplayer::OpenFile. // but in paplayer::OpenFile, it sometimes just fade in without call CloseFile. // but if we do not stop it, we can not distingush callbacks from previous // item and current item, it will confused us then we can not make correct delay // callback after the starting state. CloseFile(true); } }
void CApplicationPlayer::ClosePlayerGapless(std::string &playername) { std::shared_ptr<IPlayer> player = GetInternal(); if (!player) return; bool gaplessSupported = player->m_type == "music" || player->m_type == "video"; gaplessSupported = gaplessSupported && (playername == player->m_name); if (!gaplessSupported) { ClosePlayer(); } else { if (player->m_type != "video") { // XXX: we had to stop the previous playing item, it was done in VideoPlayer::OpenFile. // but in paplayer::OpenFile, it sometimes just fade in without call CloseFile. // but if we do not stop it, we can not distinguish callbacks from previous // item and current item, it will confused us then we can not make correct delay // callback after the starting state. CloseFile(true); } } }
int PlayerController::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: playing(); break; case 1: stopped(); break; case 2: paused(); break; case 3: playerStarted((*reinterpret_cast< bool(*)>(_a[1]))); break; case 4: playerClosed(); break; case 5: changeTrackInfo((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 6: changePos((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break; case 7: passAlbumArt((*reinterpret_cast< CFbsBitmap*(*)>(_a[1]))); break; case 8: updateAlbumArt((*reinterpret_cast< int(*)>(_a[1]))); break; case 9: CheckPlayerState(); break; case 10: Tick(); break; case 11: Play(); break; case 12: Pause(); break; case 13: Next(); break; case 14: Previous(); break; case 15: SeekForward(); break; case 16: SeekBack(); break; case 17: StopSeeking(); break; case 18: AlbumArtSaved((*reinterpret_cast< CFbsBitmap*(*)>(_a[1]))); break; case 19: GoToNowPlaying(); break; case 20: ClosePlayer(); break; case 21: SeekToPos((*reinterpret_cast< int(*)>(_a[1]))); break; case 22: GetState(); break; default: ; } _id -= 23; } return _id; }
/*--------------------------------------------------------------------------*/ JNIEXPORT void JNICALL Java_grame_midishare_player_MidiPlayer_Close (JNIEnv * inEnv, jclass cl, jint ref){ ClosePlayer(ref); }