void OnPlayBackStarted(g_Player.MediaType type, string filename) { if (PlayBackOpIsOfConcern(type, filename)) { LogPlayBackOp("started", filename); } }
private void OnPlayBackStopped(g_Player.MediaType type, int stoptime, string filename) { if (type == g_Player.MediaType.Music || type == g_Player.MediaType.Radio) { SongStoppedHandler(); } }
private void DoOnEnded(g_Player.MediaType type, string filename) { if (type == g_Player.MediaType.Music || type == g_Player.MediaType.Radio) { GUIPropertyManager.RemovePlayerProperties(); } }
/// <summary> /// Mediaportal playback started /// </summary> /// <param name="type"></param> /// <param name="filename"></param> void g_Player_PlayBackStarted(g_Player.MediaType type, string filename) { LogMessage("Playback started!", LogType.Debug); SendStatus(); socketServer.SendNowPlayingToAllClients(); StartNowPlayingUpdateThread(); }
public void OnPlayBackStopped(g_Player.MediaType type, int timeMovieStopped, string filename) { if (GUIGraphicsContext.IsFullScreenVideo) { GUIGraphicsContext.IsFullScreenVideo = false; } }
private void OnPlayBackEnded(g_Player.MediaType type, string filename) { try { if (!initialized || handlingEvent) { return; } handlingEvent = true; if (Core.MusicBox.CurrentSong != null && filename == Core.MusicBox.CurrentSong.AudioURL) { logger.Debug("Playback ended for current Pandora song."); setWorkingAnimationStatus(true); PlayNextTrack(true); setWorkingAnimationStatus(false); } } catch (Exception ex) { GracefullyFail(ex); } finally { handlingEvent = false; } }
/// <summary> /// Handles the g_Player.PlayBackStarted event /// </summary> public void OnVideoStarted(g_Player.MediaType type, string s) { // do not handle e.g. visualization window, last.fm player, etc if (type == g_Player.MediaType.Music) { isPlaying = false; return; } if (currentSettings.disableForVideo && (type != g_Player.MediaType.TV)) { isPlaying = false; return; } if (currentSettings.disableLBForVideo && (type != g_Player.MediaType.TV)) { disableLBGlobally = true; } else { disableLBGlobally = currentSettings.DisableLBGlobaly; } if (currentSettings.verboseLog) { Log.Debug("ViewModeSwitcher: On Video Started"); } LastSwitchedGeometry = GUIGraphicsContext.ARType; isVideoReceived = false; isPlaying = true; }
private void DoOnStarted(g_Player.MediaType type, string filename) { Log.Debug("GUIMusicPlayingNow: g_Player_PlayBackStarted for {0}", filename); ImagePathContainer.Clear(); CurrentTrackFileName = filename; GetTrackTags(); CurrentThumbFileName = GUIMusicBaseWindow.GetCoverArt(false, CurrentTrackFileName, CurrentTrackTag); if (string.IsNullOrEmpty(CurrentThumbFileName)) // no LOCAL Thumb found because user has bad settings -> check if there is a folder.jpg in the share { CurrentThumbFileName = Util.Utils.GetFolderThumb(CurrentTrackFileName); if (!Util.Utils.FileExistsInCache(CurrentThumbFileName)) { CurrentThumbFileName = string.Empty; } } if (!string.IsNullOrEmpty(CurrentThumbFileName)) { // let us test if there is a larger cover art image string strLarge = Util.Utils.ConvertToLargeCoverArt(CurrentThumbFileName); if (Util.Utils.FileExistsInCache(strLarge)) { CurrentThumbFileName = strLarge; } AddImageToImagePathContainer(CurrentThumbFileName); } UpdateImagePathContainer(); UpdateTrackInfo(); }
private void g_Player_PlayBackEnded(g_Player.MediaType type, string filename) { if (ReShowTrailerMenu && (OnlinePlayer.CurrentFileName == filename || LocalPlayer.CurrentFileName == filename)) { SearchForTrailers(CurrentMediaItem); } }
private void SetGuiPropertiesUpdate(g_Player.MediaType type, string filename) { if (PlayBackOpIsOfConcern(type, filename)) { SetGUIProperties(false); } }
static void g_Player_PlayBackStopped(g_Player.MediaType type, int stoptime, string filename) { if (type == g_Player.MediaType.TV) { SetNewChannel(-1); } }
public void OnPlayBackEnded(g_Player.MediaType type, string filename) { if (GUIGraphicsContext.IsFullScreenVideo) { GUIGraphicsContext.IsFullScreenVideo = false; } }
public void OnVideoStopped(g_Player.MediaType type, int i, string s) { if (DebugMode) { Logger.Debug("Action is Stop"); } SetLevelForPlayback(GetCurrentMediaType(), "Stop"); }
public void OnVideoEnded(g_Player.MediaType type, string s) { if (DebugMode) { Logger.Debug("Action is End"); } SetLevelForPlayback(type.ToString(), "End"); }
/// <summary> /// Handle event fired by MP player. /// Playback has changed; this event signifies that the existing item has been changed /// this could be because that song has ended and playback has moved to next item in playlist /// or could be because user has skipped tracks /// </summary> /// <param name="type">MediaType of item that was playing</param> /// <param name="stoptime">Number of seconds item has played for when it stopped</param> /// <param name="filename">filename of item that was playing</param> private void OnPlayBackChanged(g_Player.MediaType type, int stoptime, string filename) { if (type != g_Player.MediaType.Music || !Util.Utils.IsLastFMStream(filename)) { return; } DoOnChanged(); }
void g_Player_PlayBackStopped(g_Player.MediaType type, int stoptime, string filename) { if (previewVidPlaying && filename == previewVidFilename) { previewVidPlaying = false; GUIPropertyManager.SetProperty("#Emulators2.PreviewVideo.playing", "no"); } }
private void OnPlayBackStarted(g_Player.MediaType type, string filename) { if (!ControlsInitialized || type != g_Player.MediaType.Music) { return; } GUIGraphicsContext.form.Invoke(new PlaybackChangedDelegate(DoOnStarted), new object[] { type, filename }); }
public IPlayer Create(string filename, g_Player.MediaType type) { // hack to get around the MP 1.3 Alpha bug with non http URLs /*if (filename != PreparedUrl) * throw new OnlineVideosException("Cannot play a different url than this PlayerFactory was created with!"); * else*/ return(PreparedPlayer); }
/// <summary> /// Handles the g_Player.PlayBackStopped event /// </summary> /// <param name="type"></param> /// <param name="i"></param> /// <param name="s"></param> public void OnVideoStopped(g_Player.MediaType type, int i, string s) { // do not handle e.g. visualization window, last.fm player, etc if (type == g_Player.MediaType.Video || type == g_Player.MediaType.TV) { subTitleType = eSubTitle.None; Task.Factory.StartNew(() => ProcessingVideoStop(type)); } }
void OnPlayBackStarted(g_Player.MediaType type, string filename) { if (PlayBackOpIsOfConcern(type, filename)) { LogPlayBackOp("started", filename); // really stupid, you have to wait until the player itself sets the properties (a few seconds) and after that set them PlayPropertyUpdater.RunWorkerAsync(false); } }
/// <summary> /// Handle event fired by MP player. /// Playback has stopped; user has pressed stop mid way through a track /// </summary> /// <param name="type">MediaType of track that was stopped</param> /// <param name="stoptime">Number of seconds item has played for before it was stopped</param> /// <param name="filename">filename of item that was stopped</param> private static void OnPlayBackStopped(g_Player.MediaType type, int stoptime, string filename) { if (type != g_Player.MediaType.Music) { return; } DoOnChangedOrStopped(stoptime, filename); }
private void OnPlayBackStarted(g_Player.MediaType type, string filename) { if (type != g_Player.MediaType.Music && type != g_Player.MediaType.Radio) { return; } GUIGraphicsContext.form.BeginInvoke(new PlaybackChangedDelegate(DoOnStarted), new object[] { type, filename }); }
private void DoOnStarted(g_Player.MediaType type, string filename) { Log.Debug("GUIMusicPlayingNow: g_Player_PlayBackStarted for {0}", filename); ImagePathContainer.Clear(); CurrentTrackFileName = filename; GetTrackTags(); if (g_Player.IsRadio) { string strLogo = GUIPropertyManager.GetProperty("#Play.Current.Thumb"); if (!string.IsNullOrEmpty(strLogo)) { CurrentThumbFileName = strLogo; } else { CurrentThumbFileName = string.Empty; } } else { CurrentThumbFileName = GUIMusicBaseWindow.GetCoverArt(false, CurrentTrackFileName, CurrentTrackTag); } if (string.IsNullOrEmpty(CurrentThumbFileName)) // no LOCAL Thumb found because user has bad settings -> check if there is a folder.jpg in the share { CurrentThumbFileName = Util.Utils.GetFolderThumb(CurrentTrackFileName); if (!Util.Utils.FileExistsInCache(CurrentThumbFileName)) { CurrentThumbFileName = string.Empty; } } if (!string.IsNullOrEmpty(CurrentThumbFileName)) { // let us test if there is a larger cover art image string strLarge = Util.Utils.ConvertToLargeCoverArt(CurrentThumbFileName); if (Util.Utils.FileExistsInCache(strLarge)) { CurrentThumbFileName = strLarge; } AddImageToImagePathContainer(CurrentThumbFileName); } UpdateImagePathContainer(); UpdateTrackInfo(); // Do last.fm updates if (g_Player.IsMusic && _lookupSimilarTracks && g_Player.CurrentPosition >= 10.0 && lstSimilarTracks.Count == 0) { Log.Debug("GUIMusicPlayingNow: Do Last.FM lookup for similar tracks"); UpdateSimilarTracks(CurrentTrackFileName); } }
void g_Player_PlayBackStartedFromGUI(g_Player.MediaType type, string filename) { if (g_Player.IsVideo) { g_Player.ShowFullScreenWindow(); } else if (_setting.JumpNowPlaying) { GUIWindowManager.ActivateWindow(25652); } }
bool PlayBackOpWasOfConcern(g_Player.MediaType type, string filename) { if (string.IsNullOrEmpty(filename)) { return(false); } return(m_previousEpisode != null && type == g_Player.MediaType.Video && m_previousEpisode[DBEpisode.cFilename] == filename); }
void g_Player_PlayBackStopped(g_Player.MediaType type, int stoptime, string filename) { try { g_Player.Release(); g_Player.PlayBackStopped -= g_Player_PlayBackStopped; ClearLabels("NowPlaying"); } catch { } }
private void DoOnStarted(g_Player.MediaType type, string filename) { var isInternetStream = Util.Utils.IsAVStream(filename); MusicTag tag; if (string.IsNullOrEmpty(filename)) { return; } // last.fm radio sets properties manually therefore do not overwrite them. if (Util.Utils.IsLastFMStream(filename)) { return; } // Radio Properties are set already in Play routine if (g_Player.IsRadio) { return; } // When Playing an Internet Stream, via BASS, skin properties are set during the Play method in BassAudio.cs if (BassMusicPlayer.IsDefaultMusicPlayer && isInternetStream) { return; } else { tag = GetTag(filename); } SetCurrentSkinProperties(tag, filename); if (isInternetStream) { SetNextSkinProperties(null, string.Empty); return; } // Show Information of Next File in Playlist string nextFilename = playlistPlayer.GetNext(); if (nextFilename == string.Empty) { SetNextSkinProperties(null, string.Empty); return; } tag = GetTag(nextFilename); SetNextSkinProperties(tag, nextFilename); }
public IPlayer Create(string fileName, g_Player.MediaType type) { Log.Info("Using Anime Player Factory"); Uri uri = new Uri(fileName); if (uri.Scheme.StartsWith("rtmp") || uri.Scheme.StartsWith("http") || uri.Scheme == "sop" || uri.Scheme == "mms") { Log.Info("Using Anime Player"); return(new Player()); } return(_original.Create(fileName, type)); }
protected void g_Player_PlayBackStarted(g_Player.MediaType type, string filename) { // Log.Debug("_currentItem is assigned: " + (_currentItem != null).ToString()); // Log.Debug("_nowPlaying is assigned: " + (_nowPlaying != null).ToString()); // Log.Debug("_station is assigned: " + (_station != null).ToString()); // Log.Debug("g_player FILE 1: " + g_Player.CurrentFile); // Log.Debug("_currentFileName 2: " + _currentFileName); // Log.Debug("*** g_Player_PlayBackStarted: "+PlayGuidId); if (_currentItem == null || _nowPlaying == null || _station == null) { return; } if (g_Player.CurrentFile == _currentFileName || string.IsNullOrEmpty(g_Player.CurrentFile)) { Settings.NowPlaying = _nowPlaying.Clone(); Settings.NowPlayingStation = _station.Clone(); if (_show != null) { Settings.NowPlayingShow = _show.Clone(); } else { Settings.NowPlayingShow = null; } PlayGuidId = _station.GuideId; GUIPropertyManager.SetProperty("#Play.Current.Thumb", DownloadStationLogo(_currentItem)); // GUIPropertyManager.SetProperty("#RadioTime.Play.Station", _nowPlaying.Name); // GUIPropertyManager.SetProperty("#RadioTime.Play.Station", _station.Name + " " + _station.Frequency + " " + _station.Band);); GUIPropertyManager.SetProperty("#RadioTime.Play.Station", _station.Name + " " + _station.Frequency + (!string.IsNullOrEmpty(_station.Name) && !string.IsNullOrEmpty(_station.Band) && _station.Name.IndexOf(_station.Band) < 0 ? " " + _station.Band : "")); // GUIPropertyManager.SetProperty("#RadioTime.Play.StationLogo", GetStationLogoFileName(nowPlaying.Image)); GUIPropertyManager.SetProperty("#RadioTime.Play.Description", _station.Description); GUIPropertyManager.SetProperty("#RadioTime.Play.Station.Description", _station.Description); GUIPropertyManager.SetProperty("#RadioTime.Play.Slogan", _station.Slogan); GUIPropertyManager.SetProperty("#RadioTime.Play.Language", _station.Language); GUIPropertyManager.SetProperty("#RadioTime.Play.GuidId", PlayGuidId); // UpdateProps(); // GUIPropertyManager.SetProperty("#RadioTime.Play.Image", DownloadStationLogo(_currentItem)); // doAdditionalStuffOnStarted(); // ClearInternalVariables(); } }
/// <summary> /// Handles the g_Player.PlayBackStarted event /// </summary> public void OnVideoStarted(g_Player.MediaType type, string s) { // do not handle e.g. visualization window, last.fm player, etc if (type == g_Player.MediaType.Video || type == g_Player.MediaType.TV) { _currentName = s; var isNetwork = IsNetworkVideo(s); subTitleType = isNetwork ? eSubTitle.None : DetectSubtitleType(s); if (!isNetwork || bAnalyzeNetworkStream) { Task.Factory.StartNew(() => Analyze3DFormatVideo(type)); } } }
public VideoPlayerVMR7() { // Init LAV Splitter using (Settings xmlreader = new MPSettings()) { try { streamLAVSelection = xmlreader.GetValueAsBool("movieplayer", "streamlavselection", false); } catch (Exception) { } } _mediaType = g_Player.MediaType.Video; }
public VideoPlayerVMR7(g_Player.MediaType type) { _mediaType = type; }
public VideoPlayerVMR7() { _mediaType = g_Player.MediaType.Video; }
public RTSPPlayer(g_Player.MediaType mediaType) { _mediaType = mediaType; }
public RTSPPlayer() { _mediaType = g_Player.MediaType.TV; }
public BaseTSReaderPlayer() { _mediaType = g_Player.MediaType.Video; _videoFormat = new VideoStreamFormat(); }
public BaseTSReaderPlayer(g_Player.MediaType type) { _isRadio = false; if (type == g_Player.MediaType.Radio) { _isRadio = true; } _mediaType = type; _videoFormat = new VideoStreamFormat(); }