[longomatch] Make the IPlayerController inherit from IPlayer
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Make the IPlayerController inherit from IPlayer
- Date: Tue, 31 Mar 2015 17:29:22 +0000 (UTC)
commit af1537b821fe1500429a82031f2860fb6ac5538c
Author: Jorge Zapata <jorgeluis zapata gmail com>
Date: Fri Mar 20 12:51:15 2015 +0100
Make the IPlayerController inherit from IPlayer
This way we can avoid too many APIs duplication
.../Interfaces/Multimedia/IPlayerController.cs | 8 +-
LongoMatch.Multimedia/PlayerController.cs | 119 ++++++++++++++++++-
2 files changed, 113 insertions(+), 14 deletions(-)
---
diff --git a/LongoMatch.Core/Interfaces/Multimedia/IPlayerController.cs
b/LongoMatch.Core/Interfaces/Multimedia/IPlayerController.cs
index be0f464..8c228cf 100644
--- a/LongoMatch.Core/Interfaces/Multimedia/IPlayerController.cs
+++ b/LongoMatch.Core/Interfaces/Multimedia/IPlayerController.cs
@@ -22,14 +22,8 @@ using LongoMatch.Core.Store.Playlists;
namespace LongoMatch.Core.Interfaces.Multimedia
{
- public interface IPlayerController
+ public interface IPlayerController : IPlayer
{
- /// <summary>
- /// Gets the player.
- /// </summary>
- /// <returns>The player.</returns>
- IPlayer Player { get; }
-
void LoadEvent (MediaFileSet file, TimelineEvent ev, Time seekTime, bool playing);
void LoadPlayListEvent (Playlist playlist, IPlaylistElement ev);
void UnloadCurrentEvent();
diff --git a/LongoMatch.Multimedia/PlayerController.cs b/LongoMatch.Multimedia/PlayerController.cs
index f55c086..febeccc 100644
--- a/LongoMatch.Multimedia/PlayerController.cs
+++ b/LongoMatch.Multimedia/PlayerController.cs
@@ -1,5 +1,5 @@
//
-// Copyright (C) 2015 jl
+// Copyright (C) 2015 FLUENDO S.A.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -19,10 +19,13 @@ using System;
using LongoMatch.Core.Interfaces.Multimedia;
using LongoMatch.Core.Store.Playlists;
using LongoMatch.Core.Interfaces;
+using LongoMatch.Core.Handlers;
+using System.Collections.Generic;
+using Image = LongoMatch.Core.Common.Image;
namespace LongoMatch.Core.Store
{
- public class PlayerController : IPlayerController
+ public class PlayerController : IPlayerController, IDisposable
{
IPlayer player;
@@ -31,19 +34,121 @@ namespace LongoMatch.Core.Store
player = Config.MultimediaToolkit.GetPlayer ();
}
- ~PlayerController ()
+ #region IDisposable implementation
+ public void Dispose ()
{
player.Dispose ();
}
+ #endregion
- #region IPlayerController implementation
- public IPlayer Player
- {
+ #region IPlayer implementation
+ public event ErrorHandler Error;
+ public event EosHandler Eos;
+ public event StateChangeHandler StateChange;
+ public event ReadyToSeekHandler ReadyToSeek;
+
+ public Time StreamLength {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Time CurrentTime {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public double Volume {
+ get {
+ throw new NotImplementedException ();
+ }
+
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Playing {
get {
- return player;
+ throw new NotImplementedException ();
}
}
+ public double Rate {
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public List<IntPtr> WindowHandles {
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public IntPtr WindowHandle {
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Open (List<string> mrls)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool Open (string mrl)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Play()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Pause()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Stop()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Close()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool Seek (Time time, bool accurate = false, bool synchronous = false)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool SeekToNextFrame()
+ {
+ throw new NotImplementedException ();
+ }
+ public bool SeekToPreviousFrame()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public Image GetCurrentFrame (int width=-1, int height=-1)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Expose ()
+ {
+ throw new NotImplementedException ();
+ }
+ #endregion
+
+ #region IPlayerController implementation
public void LoadEvent (MediaFileSet file, TimelineEvent ev, Time seekTime, bool playing)
{
throw new NotImplementedException ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]