• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Playlists.PlayListPlayer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MediaPortal.Playlists.PlayListPlayer的典型用法代码示例。如果您正苦于以下问题:C# PlayListPlayer类的具体用法?C# PlayListPlayer怎么用?C# PlayListPlayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PlayListPlayer类属于MediaPortal.Playlists命名空间,在下文中一共展示了PlayListPlayer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetNextReturnsFileName

 public void GetNextReturnsFileName()
 {
   PlayListPlayer player = new PlayListPlayer();
   player.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC;
   PlayList playlist = player.GetPlaylist(PlayListType.PLAYLIST_MUSIC);
   PlayListItem item1 = new PlayListItem("apa", "c:\\apa.mp3");
   playlist.Add(item1);
   Assert.AreEqual("c:\\apa.mp3", player.GetNext());
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:PlayListPlayerTest.cs


示例2: InsertItemButNotStartPlayingGivesNull

 public void InsertItemButNotStartPlayingGivesNull()
 {
   PlayListPlayer player = new PlayListPlayer();
   player.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC;
   PlayList playlist = player.GetPlaylist(PlayListType.PLAYLIST_MUSIC);
   PlayListItem item1 = new PlayListItem();
   playlist.Add(item1);
   Assert.IsNull(player.GetCurrentItem());
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:PlayListPlayerTest.cs


示例3: GUIVideoBaseWindow

    public GUIVideoBaseWindow()
    {
      playlistPlayer = PlayListPlayer.SingletonPlayer;

      if (handler == null)
      {
        handler = new VideoViewHandler();
      }

      GUIWindowManager.OnNewAction += new OnActionHandler(OnNewAction);
    }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:11,代码来源:GUIVideoBaseWindow.cs


示例4: PlayMovesCurrentToItem

 public void PlayMovesCurrentToItem()
 {
   PlayListPlayer player = new PlayListPlayer();
   player.g_Player = this; //fake g_Player
   player.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC;
   PlayList playlist = player.GetPlaylist(PlayListType.PLAYLIST_MUSIC);
   PlayListItem item1 = new PlayListItem();
   playlist.Add(item1);
   player.PlayNext();
   Assert.AreEqual(item1, player.GetCurrentItem());
   Assert.IsTrue(hasPlayBeenCalled);
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:12,代码来源:PlayListPlayerTest.cs


示例5: GUIVideoOSD

 public GUIVideoOSD()
 {
   GetID = (int)Window.WINDOW_OSD;
   playlistPlayer = PlayListPlayer.SingletonPlayer;
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:5,代码来源:GUIVideoOSD.cs


示例6: GUISlideShow

 public GUISlideShow()
 {
   GetID = (int)Window.WINDOW_SLIDESHOW;
   playlistPlayer = PlayListPlayer.SingletonPlayer;
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:5,代码来源:GUISlideShow.cs


示例7: GUIVideoFullscreen

 public GUIVideoFullscreen()
 {
   GetID = (int)Window.WINDOW_FULLSCREEN_VIDEO;
   playlistPlayer = PlayListPlayer.SingletonPlayer;
 }
开发者ID:edterbak,项目名称:MediaPortal-1,代码行数:5,代码来源:GUIVideoFullscreen.cs


示例8: GUIMusicBaseWindow

    public GUIMusicBaseWindow()
    {
      if (m_database == null)
      {
        m_database = MusicDatabase.Instance;
      }

      playlistPlayer = PlayListPlayer.SingletonPlayer;

      playlistPlayer.PlaylistChanged += new PlayListPlayer.PlaylistChangedEventHandler(playlistPlayer_PlaylistChanged); 

      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        string playNowJumpTo = xmlreader.GetValueAsString("music", "playnowjumpto", "none");

        switch (playNowJumpTo)
        {
          case "none":
            PlayNowJumpTo = PlayNowJumpToType.None;
            break;

          case "nowPlayingAlways":
            PlayNowJumpTo = PlayNowJumpToType.NowPlayingAlways;
            break;

          case "nowPlayingMultipleItems":
            PlayNowJumpTo = PlayNowJumpToType.NowPlayingMultipleItems;
            break;

          case "currentPlaylistAlways":
            PlayNowJumpTo = PlayNowJumpToType.CurrentPlaylistAlways;
            break;

          case "currentPlaylistMultipleItems":
            PlayNowJumpTo = PlayNowJumpToType.CurrentPlaylistMultipleItems;
            break;

          case "fullscreenAlways":
            PlayNowJumpTo = PlayNowJumpToType.FullscreenIfVizEnabledAlways;
            break;

          case "fullscreenMultipleItems":
            PlayNowJumpTo = PlayNowJumpToType.FullscreenIfVizEnabledMultipleItems;
            break;

          default:
            PlayNowJumpTo = PlayNowJumpToType.None;
            break;
        }

        _autoShuffleOnLoad = xmlreader.GetValueAsBool("musicfiles", "autoshuffle", false);
      }

      UsingInternalMusicPlayer = BassMusicPlayer.IsDefaultMusicPlayer;
    }
开发者ID:nio22,项目名称:MediaPortal-1,代码行数:55,代码来源:GUIMusicBaseWindow.cs


示例9: Init

    /// <summary>
    /// Initialise The Viz Window
    /// </summary>
    private void Init()
    {
      InitializeComponent();
      CheckForIllegalCrossThreadCalls = false;
      PlaylistPlayer = PlayListPlayer.SingletonPlayer;

      g_Player.PlayBackStarted += new g_Player.StartedHandler(OnPlayBackStarted);
      Bass.InternetStreamSongChanged += new BassAudioEngine.InternetStreamSongChangedDelegate(InternetStreamSongChanged);

      //if (GUIGraphicsContext.form != null)
      //    GUIGraphicsContext.form.Resize += new EventHandler(OnAppFormResize);

      GUIGraphicsContext.OnNewAction += new OnActionHandler(OnNewAction);

      SetStyle(ControlStyles.DoubleBuffer, true);
      SetStyle(ControlStyles.AllPaintingInWmPaint, true);
      SetStyle(ControlStyles.UserPaint, true);

      TextStringFormat.Trimming = StringTrimming.Character;
      TextStringFormat.FormatFlags = StringFormatFlags.NoWrap | StringFormatFlags.NoClip | StringFormatFlags.FitBlackBox;

      LoadSettings();

      // Soundspectrum Graphics always show the cursor, so let's hide it here
      if (GUIGraphicsContext.Fullscreen && _autoHideMouse)
      {
        Cursor.Hide();
      }
    }
开发者ID:edalex86,项目名称:MediaPortal-1,代码行数:32,代码来源:VisualizationWindow.cs


示例10: GUIMusicFullscreen

 public GUIMusicFullscreen()
 {
   GetID = (int)Window.WINDOW_FULLSCREEN_MUSIC;
   playlistPlayer = PlayListPlayer.SingletonPlayer;
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:5,代码来源:GUIMusicFullscreen.cs


示例11: VideoHandler

        public VideoHandler()
        {
            playlistPlayer = MediaPortal.Playlists.PlayListPlayer.SingletonPlayer;

            // Check if External Player is being used
            MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"));
            m_bIsExternalPlayer = !xmlreader.GetValueAsBool("movieplayer", "internal", true);
            m_bIsExternalDVDPlayer = !xmlreader.GetValueAsBool("dvdplayer", "internal", true);
            
			// external player handlers
			Utils.OnStartExternal += new Utils.UtilEventHandler(onStartExternal);
			Utils.OnStopExternal += new Utils.UtilEventHandler(onStopExternal);

            g_Player.PlayBackStopped += new MediaPortal.Player.g_Player.StoppedHandler(OnPlayBackStopped);
            g_Player.PlayBackEnded += new MediaPortal.Player.g_Player.EndedHandler(OnPlayBackEnded);
            g_Player.PlayBackStarted += new MediaPortal.Player.g_Player.StartedHandler(OnPlayBackStarted);
            g_Player.PlayBackChanged += new g_Player.ChangedHandler(OnPlaybackChanged);
            PlayPropertyUpdater.WorkerSupportsCancellation = true;
            PlayPropertyUpdater.DoWork += new DoWorkEventHandler(SetPlayProperties_DoWork);
        }
开发者ID:barneh,项目名称:mptvseries,代码行数:20,代码来源:VideoHandler.cs


示例12: RenderVisualization

    public override int RenderVisualization()
    {
      try
      {
        if (VisualizationWindow == null || !VisualizationWindow.Visible || _visParam.VisHandle == 0)
        {
          return 0;
        }

        // Set Song information, so that the plugin can display it
        if (trackTag != null && Bass != null)
        {
          _playlistPlayer = PlayListPlayer.SingletonPlayer;
          PlayListItem curPlaylistItem = _playlistPlayer.GetCurrentItem();

          _mediaInfo.Position = (int)Bass.CurrentPosition;
          _mediaInfo.Duration = (int)Bass.Duration;
          _mediaInfo.PlaylistLen = 1;
          _mediaInfo.PlaylistPos = _playlistPlayer.CurrentPlaylistPos;
        }
        else
        {
          _mediaInfo.Position = 0;
          _mediaInfo.Duration = 0;
          _mediaInfo.PlaylistLen = 0;
          _mediaInfo.PlaylistPos = 0;
        }
        if (IsPreviewVisualization)
        {
          _mediaInfo.SongTitle = "Mediaportal Preview";
        }
        BassVis.BASSVIS_SetInfo(_visParam, _mediaInfo);

        if (RenderStarted)
        {
          return 1;
        }

        int stream = 0;

        if (Bass != null)
        {
          stream = (int)Bass.GetCurrentVizStream();
        }

        BassVis.BASSVIS_SetPlayState(_visParam, BASSVIS_PLAYSTATE.Play);
        RenderStarted = BassVis.BASSVIS_RenderChannel(_visParam, stream);
      }

      catch (Exception) {}

      return 1;
    }
开发者ID:doskabouter,项目名称:MediaPortal-1,代码行数:53,代码来源:WinampViz.cs


示例13: Init

 public override bool Init()
 {
   _playlistPlayer = PlayListPlayer.SingletonPlayer;
   g_Player.PlayBackEnded += OnPlayBackEnded;
   g_Player.PlayBackChanged += OnPlayBackChanged;
   g_Player.PlayBackStopped += OnPlayBackStopped;
   var mdb = MusicDatabase.Instance;
   var sessionKey = mdb.GetLastFMSK();
   var currentUser = mdb.GetLastFMUser();
   var a = new LastFMLibrary(sessionKey, currentUser); //TODO this is just making _SK get loaded.   No need to actual instansiate
   return Load(GUIGraphicsContext.GetThemedSkinDirectory(@"\lastFmRadio.xml"));
 }
开发者ID:robyf71,项目名称:MediaPortal-1,代码行数:12,代码来源:GUILastFMRadio.cs


示例14: D3D

    protected static Rectangle         _backupBounds;             // Bounds backup

    #endregion

    #region constructor

    /// <summary>
    /// Constructor
    /// </summary>
    protected D3D()
    {
      _firstTimeWindowDisplayed  = true;
      _firstTimeActivated       = true;
      MinimizeOnStartup         = false;
      MinimizeOnGuiExit         = false;
      MinimizeOnFocusLoss       = false;
      ShuttingDown              = false;
      AutoHideMouse             = true;
      MouseCursor               = true;
      Windowed                  = true;
      Volume                    = -1;
      AppActive                 = false;
      KeyPreview                = true;
      Frames                    = 0;
      FrameStatsLine1           = null;
      FrameStatsLine2           = null;
      Text                      = Resources.D3DApp_NotifyIcon_MediaPortal;
      PlaylistPlayer            = PlayListPlayer.SingletonPlayer;
      MouseTimeOutTimer         = DateTime.Now;
      _lastActiveWindow         = -1;
      IsVisible                 = true;
      IsDisplayTurnedOn         = true;
      IsInAwayMode              = false;
      IsUserPresent             = true;
      _lastMouseCursor          = !MouseCursor;
      _showCursorWhenFullscreen = false;
      _currentPlayListType      = PlayListType.PLAYLIST_NONE;
      _enumerationSettings      = new D3DEnumeration();
      _presentParams            = new PresentParameters();
      _renderTarget             = this;

      using (Settings xmlreader = new MPSettings())
      {
        _useExclusiveDirectXMode = xmlreader.GetValueAsBool("general", "exclusivemode", true);
        UseEnhancedVideoRenderer = xmlreader.GetValueAsBool("general", "useEVRenderer", false);
        _disableMouseEvents      = xmlreader.GetValueAsBool("remote", "CentareaJoystickMap", false);
        AutoHideTaskbar          = xmlreader.GetValueAsBool("general", "hidetaskbar", true);
        _alwaysOnTop             = xmlreader.GetValueAsBool("general", "alwaysontop", false);
        _reduceFrameRate         = xmlreader.GetValueAsBool("gui", "reduceframerate", false);
        _doNotWaitForVSync       = xmlreader.GetValueAsBool("debug", "donotwaitforvsync", false);
      }

      _useExclusiveDirectXMode = !UseEnhancedVideoRenderer && _useExclusiveDirectXMode;
      GUIGraphicsContext.IsVMR9Exclusive = _useExclusiveDirectXMode;
      GUIGraphicsContext.IsEvr = UseEnhancedVideoRenderer;
      
      InitializeComponent();
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:58,代码来源:D3D.cs


示例15: Init

    public override bool Init()
    {
      bool bResult = Load(GUIGraphicsContext.GetThemedSkinFile(@"\MyRadioLastFM.xml"));

      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        _configShowTrayIcon = xmlreader.GetValueAsBool("audioscrobbler", "showtrayicon", false);
        _configShowBallonTips = xmlreader.GetValueAsBool("audioscrobbler", "showballontips", false);
        _configDirectSkip = xmlreader.GetValueAsBool("audioscrobbler", "directskip", false);
        _configListEntryCount = xmlreader.GetValueAsInt("audioscrobbler", "listentrycount", 24);
        _configOneClickStart = xmlreader.GetValueAsBool("audioscrobbler", "oneclickstart", false);
      }

      PlaylistPlayer = PlayListPlayer.SingletonPlayer;
      LastFMStation = new StreamControl();
      InfoScrobbler = AudioscrobblerUtils.Instance;
      _usersTopArtists = new List<string>(_configListEntryCount);
      _usersOwnTags = new List<string>(_configListEntryCount);
      _usersFriends = new List<string>(_configListEntryCount);
      _radioTrackList = new List<Song>(5);
      _similarArtistCache = new List<string>(5);
      _trackTagsCache = new List<string>(5);
      _streamSong = new Song();
      _scrobbleUsers = new List<string>(1);

      if (_configShowTrayIcon)
      {
        InitTrayIcon();
      }

      g_Player.PlayBackStarted += new g_Player.StartedHandler(PlayBackStartedHandler);
      g_Player.PlayBackStopped += new g_Player.StoppedHandler(PlayBackStoppedHandler);
      g_Player.PlayBackEnded += new g_Player.EndedHandler(PlayBackEndedHandler);

      LastFMStation.RadioSettingsSuccess += new StreamControl.RadioSettingsLoaded(OnRadioSettingsSuccess);
      LastFMStation.RadioSettingsError += new StreamControl.RadioSettingsFailed(OnRadioSettingsError);
      this.PlaylistUpdateSuccess += new PlaylistUpdated(OnPlaylistUpdateSuccess);
      this.PlaylistUpdateError += new PlaylistEmpty(OnPlaylistUpdateError);

      return bResult;
    }
开发者ID:sekotin,项目名称:MediaPortal-1,代码行数:41,代码来源:GUIRadioLastFM.cs


示例16: GUIMusicOverlay

    public GUIMusicOverlay()
    {
      GetID = (int)Window.WINDOW_MUSIC_OVERLAY;
      playlistPlayer = PlayListPlayer.SingletonPlayer;
      _useBassEngine = BassMusicPlayer.IsDefaultMusicPlayer;
      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        _settingVisEnabled = xmlreader.GetValueAsBool("musicfiles", "doVisualisation", false) && _useBassEngine;
        _visualisationEnabled = _settingVisEnabled;
        _stripArtistPrefixes = xmlreader.GetValueAsBool("musicfiles", "stripartistprefixes", false);
        _playlistIsCurrent = xmlreader.GetValueAsBool("musicfiles", "playlistIsCurrent", true);
      }

      g_Player.PlayBackStarted += OnPlayBackStarted;
      g_Player.PlayBackEnded += OnPlayBackEnded;

      playlistPlayer.PlaylistChanged += OnPlaylistChanged;
    }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:18,代码来源:GUIMusicOverlay.cs


示例17: RenderVisualization

    public override int RenderVisualization()
    {
      try
      {
        if (VisualizationWindow == null || !VisualizationWindow.Visible || _visParam.VisHandle == 0)
        {
          return 0;
        }

        // Any is wrong with PlaybackStateChanged, if the songfile automatically changed
        // so i have create a new variable which fix this problem
        if (Bass != null)
        {
          if (Bass.CurrentFile != _OldCurrentFile && !Bass.IsRadio)
          {
            trackTag = TagReader.TagReader.ReadTag(Bass.CurrentFile);
            if (trackTag != null)
            {
              _songTitle = String.Format("{0} - {1}", trackTag.Artist, trackTag.Title);
              _OldCurrentFile = Bass.CurrentFile;
            }
            else
            {
              _songTitle = "   ";
            }
          }

          // Set Song information, so that the plugin can display it
          if (trackTag != null && !Bass.IsRadio)
          {
            _playlistPlayer = PlayListPlayer.SingletonPlayer;
            PlayListItem curPlaylistItem = _playlistPlayer.GetCurrentItem();

            MusicStream streams = Bass.GetCurrentStream();
            // Do not change this line many Plugins search for Songtitle with a number before.
            _mediaInfo.SongFile = Bass.CurrentFile;
            _mediaInfo.SongTitle = (_playlistPlayer.CurrentPlaylistPos + 1) + ". " + _songTitle;
            _mediaInfo.Position = (int)(1000 * Bass.CurrentPosition);
            _mediaInfo.Duration = (int)Bass.Duration;
            _mediaInfo.PlaylistLen = 1;
            _mediaInfo.PlaylistPos = _playlistPlayer.CurrentPlaylistPos;
          }
          else
          {
            if (Bass.IsRadio)
            {
              // Change TrackTag to StreamTag for Radio
              trackTag = Bass.GetStreamTags();
              if (trackTag != null)
              {
                // Artist and Title show better i think
                _songTitle = trackTag.Artist + ": " + trackTag.Title;
                _mediaInfo.SongTitle = _songTitle;
              }
              else
              {
                _songTitle = "   ";
              }
              _mediaInfo.Position = (int)(1000 * Bass.CurrentPosition);
            }
            else
            {
              _mediaInfo.Position = 0;
              _mediaInfo.Duration = 0;
              _mediaInfo.PlaylistLen = 0;
              _mediaInfo.PlaylistPos = 0;
            }
          }
        }

        if (IsPreviewVisualization)
        {
          _mediaInfo.SongTitle = "Mediaportal Preview";
        }
        BassVis.BASSVIS_SetInfo(_visParam, _mediaInfo);

        if (RenderStarted)
        {
          return 1;
        }

        int stream = 0;

        if (Bass != null)
        {
          stream = (int)Bass.GetCurrentVizStream();
        }

        // ckeck is playing
        int nReturn = BassVis.BASSVIS_SetPlayState(_visParam, BASSVIS_PLAYSTATE.IsPlaying);
        if (nReturn == Convert.ToInt32(BASSVIS_PLAYSTATE.Play) && (_visParam.VisHandle != 0))
        {
          // Do not Render without playing
          if (MusicPlayer.BASS.Config.MusicPlayer == AudioPlayer.WasApi)
          {
            RenderStarted = BassVis.BASSVIS_RenderChannel(_visParam, stream, true);
          }
          else
          {
          RenderStarted = BassVis.BASSVIS_RenderChannel(_visParam, stream, false);
//.........这里部分代码省略.........
开发者ID:edalex86,项目名称:MediaPortal-1,代码行数:101,代码来源:WinampViz.cs


示例18: MPlayerGUIPlugin

 /// <summary>
 /// Static Constructor for the Playlistplayer instance
 /// </summary>
 static MPlayerGUIPlugin()
 {
     PlaylistPlayer = PlayListPlayer.SingletonPlayer;
 }
开发者ID:MisterD81,项目名称:MyMPlayer,代码行数:7,代码来源:MPlayer_GUIPlugin.cs


示例19: MyFilmsDetail

 static MyFilmsDetail()
 {
   playlistPlayer = PlayListPlayer.SingletonPlayer;
 }
开发者ID:drtak34,项目名称:my-films,代码行数:4,代码来源:MyFilmsDetail.cs


示例20: GUIVideoFiles

 static GUIVideoFiles()
 {
   _playlistPlayer = PlayListPlayer.SingletonPlayer;
 }
开发者ID:gayancc,项目名称:MediaPortal-1,代码行数:4,代码来源:GUIVideoFiles.cs



注:本文中的MediaPortal.Playlists.PlayListPlayer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Database.DBMovieInfo类代码示例发布时间:2022-05-26
下一篇:
C# Playlists.PlayListItem类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap