protected void HandleBDEvent(BluRayAPI.BluRayEvent bdevent) { switch (bdevent.Event) { case BluRayAPI.BDEvents.AudioStream: BluRayPlayerBuilder.LogDebug("Audio changed to {0}", bdevent.Param); //if (bdevent.Param != 0xff) // CurrentAudioStream = bdevent.Param - 1; break; case BluRayAPI.BDEvents.PgText: BluRayPlayerBuilder.LogDebug("Subtitles available {0}", bdevent.Param); break; case BluRayAPI.BDEvents.PgTextStream: BluRayPlayerBuilder.LogDebug("Subtitle changed to {0}", bdevent.Param); //if (bdevent.Param != 0xfff) // CurrentSubtitleStream = bdevent.Param; break; case BluRayAPI.BDEvents.IgStream: BluRayPlayerBuilder.LogDebug("Interactive graphics available {0}", bdevent.Param); break; case BluRayAPI.BDEvents.Playlist: BluRayPlayerBuilder.LogDebug("Playlist changed to {0}", bdevent.Param); if (_forceTitle || (_currentTitle != (int)BluRayAPI.BluRayTitle.FirstPlay && _currentTitle != (int)BluRayAPI.BluRayTitle.TopMenu)) { EnumerateChapters(); } break; case BluRayAPI.BDEvents.Playitem: BluRayPlayerBuilder.LogDebug("Playitem changed to {0}", bdevent.Param); //if (menuState == BluRayAPI.MenuState.Root && chapters != null && _currentTitle != BLURAY_TITLE_FIRST_PLAY && _currentTitle != BLURAY_TITLE_TOP_MENU) // menuItems = MenuItems.All; UpdateMenuItems(); CurrentStreamInfo(); break; case BluRayAPI.BDEvents.Title: BluRayPlayerBuilder.LogDebug("Title changed to {0}", bdevent.Param); _currentTitle = bdevent.Param; _currentChapter = 0xffff; if (bdevent.Param == 1) { if (_menuState != BluRayAPI.MenuState.PopUp) { _menuState = BluRayAPI.MenuState.None; } } break; case BluRayAPI.BDEvents.Chapter: BluRayPlayerBuilder.LogDebug("Chapter changed to {0}", bdevent.Param); if (bdevent.Param != 0xffff) { _currentChapter = (uint)bdevent.Param - 1; } break; case BluRayAPI.BDEvents.Popup: BluRayPlayerBuilder.LogDebug("Popup available {0}", bdevent.Param); _isPopupMenuAvailable = bdevent.Param == 1; UpdateMenuItems(); break; case BluRayAPI.BDEvents.Menu: BluRayPlayerBuilder.LogDebug("Menu visible {0}", bdevent.Param); if (bdevent.Param == 1) { if (_menuState != BluRayAPI.MenuState.PopUp) { _menuState = BluRayAPI.MenuState.Root; } } else { _menuState = BluRayAPI.MenuState.None; } UpdateMenuItems(); break; case BluRayAPI.BDEvents.CustomEventMenuVisibility: //if (bdevent.Param == 1) //{ // BluRayPlayerBuilder.LogDebug("Toggle menu on"); //if (menuState == BluRayAPI.MenuState.PopUp) // menuItems = MenuItems.All; //else // menuItems = MenuItems.None; //_iMenuOffPendingCount = 0; //_bMenuOn = true; //} //else if (_iMenuOffPendingCount == 0) //{ // _iMenuOffPendingCount++; //} break; } }
protected void HandleBDEvent(BluRayAPI.BluRayEvent bdevent) { switch ((BluRayAPI.BDEvents)bdevent.Event) { case BluRayAPI.BDEvents.AudioStream: BluRayPlayerBuilder.LogDebug("Audio changed to {0}", bdevent.Param); //if (bdevent.Param != 0xff) // CurrentAudioStream = bdevent.Param - 1; break; case BluRayAPI.BDEvents.PgText: BluRayPlayerBuilder.LogDebug("Subtitles available {0}", bdevent.Param); break; case BluRayAPI.BDEvents.PgTextStream: BluRayPlayerBuilder.LogDebug("Subtitle changed to {0}", bdevent.Param); //if (bdevent.Param != 0xfff) // CurrentSubtitleStream = bdevent.Param; break; case BluRayAPI.BDEvents.IgStream: BluRayPlayerBuilder.LogDebug("Interactive graphics available {0}", bdevent.Param); break; case BluRayAPI.BDEvents.Playlist: BluRayPlayerBuilder.LogDebug("Playlist changed to {0}", bdevent.Param); if (_forceTitle || (_currentTitle != (int)BluRayAPI.BluRayTitle.FirstPlay && _currentTitle != (int)BluRayAPI.BluRayTitle.TopMenu)) EnumerateChapters(); break; case BluRayAPI.BDEvents.Playitem: BluRayPlayerBuilder.LogDebug("Playitem changed to {0}", bdevent.Param); //if (menuState == BluRayAPI.MenuState.Root && chapters != null && _currentTitle != BLURAY_TITLE_FIRST_PLAY && _currentTitle != BLURAY_TITLE_TOP_MENU) // menuItems = MenuItems.All; break; case BluRayAPI.BDEvents.Title: BluRayPlayerBuilder.LogDebug("Title changed to {0}", bdevent.Param); _currentTitle = bdevent.Param; _currentChapter = 0xffff; switch ((BluRayAPI.BluRayTitle)bdevent.Param) { case BluRayAPI.BluRayTitle.TopMenu: case BluRayAPI.BluRayTitle.FirstPlay: if (!_forceTitle) { //menuItems = MenuItems.None; _menuState = BluRayAPI.MenuState.Root; } break; default: _menuState = BluRayAPI.MenuState.None; break; } break; case BluRayAPI.BDEvents.Chapter: BluRayPlayerBuilder.LogDebug("Chapter changed to {0}", bdevent.Param); if (bdevent.Param != 0xffff) _currentChapter = (uint)bdevent.Param - 1; break; case BluRayAPI.BDEvents.CustomEventMenuVisibility: //if (bdevent.Param == 1) //{ // BluRayPlayerBuilder.LogDebug("Toggle menu on"); //if (menuState == BluRayAPI.MenuState.PopUp) // menuItems = MenuItems.All; //else // menuItems = MenuItems.None; //_iMenuOffPendingCount = 0; //_bMenuOn = true; //} //else if (_iMenuOffPendingCount == 0) //{ // _iMenuOffPendingCount++; //} break; } }