void TestDefaultSubpictureLanguage()
        {
            int     hr;
            IDvdCmd ppCmd;

            AllowPlay();
            hr = m_idc2.PlayChapterInTitle(1, 2, DvdCmdFlags.Flush | DvdCmdFlags.SendEvents, out ppCmd);
            DsError.ThrowExceptionForHR(hr);

            Thread.Sleep(500);

            hr = m_idc2.Stop();
            DsError.ThrowExceptionForHR(hr);

            hr = m_idc2.SelectDefaultSubpictureLanguage(1036, DvdSubPictureLangExt.NotSpecified);
            DsError.ThrowExceptionForHR(hr);
        }
Exemple #2
0
        /// <summary>
        /// Set the default languages before playback.
        /// </summary>
        private void SetDefaultLanguages()
        {
            VideoSettings settings = ServiceRegistration.Get <ISettingsManager>().Load <VideoSettings>();

            ServiceRegistration.Get <ILogger>().Info("DVDPlayer: SetDefaultLanguages");
            int    setError  = _dvdCtrl.SelectDefaultAudioLanguage(settings.PreferredAudioLanguage, DvdAudioLangExt.NotSpecified);
            string errorText = GetErrorText(setError);

            ServiceRegistration.Get <ILogger>().Info("DVDPlayer: Set default language to: {0}. {1}", settings.PreferredAudioLanguage, errorText);

            setError  = _dvdCtrl.SelectDefaultMenuLanguage(settings.PreferredMenuLanguage);
            errorText = GetErrorText(setError);
            ServiceRegistration.Get <ILogger>().Info("DVDPlayer: Set default menu language to:{0}. {1}", settings.PreferredMenuLanguage, errorText);

            setError  = _dvdCtrl.SelectDefaultSubpictureLanguage(settings.PreferredSubtitleLanguage, DvdSubPictureLangExt.NotSpecified);
            errorText = GetErrorText(setError);
            ServiceRegistration.Get <ILogger>().Info("DVDPlayer: Set default subtitle language:{0}. {1}", settings.PreferredSubtitleLanguage, errorText);

            _dvdCtrl.SetSubpictureState(settings.EnableSubtitles, DvdCmdFlags.None, out _cmdOption);
        }