Re: [Banshee-List] Proposal: Mono.Media
- From: Adam <jeepfreak2002 gmail com>
- To: banshee-list gnome org
- Cc: Aaron Bockover <aaron abock org>
- Subject: Re: [Banshee-List] Proposal: Mono.Media
- Date: Sun, 16 Dec 2007 01:34:43 -0500
Dude. I am so glad that there are people with brains like you in this world working on topics like these... I spend 1/2 half on my time asleep on the subway, and the other 1/2 trying to figure out how to get into the pants of the girl across from me. I am forever grateful for you contributions, though. I'm gonna go play a CD in Banshee, and keep my fingers crossed. Wish me luck.
jeepfreak
On Dec 15, 2007 9:36 PM, Scott Peterson <
lunchtimemama gmail com> wrote:
Since the Banshee MediaEngine backend is being refactored soon to subsume libbanshee, I propose that this system be abstracted into a non-Banshee-specific library for audio/visual media: Mono.Media. The conspicuous absence of any media functionality in the Base Class Library* means that there is no unified .NET media framework between platforms: Windows developers usually call DirectShow through the .NET/COM bridge, Linux developers must roll their own solution (like Banshee), and so on. With an MIT licensed library which intelligently chooses a backend based on the platform, available components, and input file, any CLI program can easily provide rich media functionality. Here's is a rough outline for the library which I came up with in five minutes on the subway:
namespace Mono.Media {
public class AudioPlayer
public class AudioTranscoder
public class VideoPlayer
public class VideoTranscoder
public enum VolumeScale {
Linear,
Logarithmic
}
...
}
namespace Mono.Media.Backends {
public interface IAudioPlayerBackend
public interface IAudioTranscoderBackend
public interface IVideoPlayerBackend
public interface IVideoTranscoderBackend
public class GstreamerBackend : IAudioPlayerBackend, IAudioTranscoderBackend, IVideoPlayerBackend, IVideoTranscoderBackend
public class HelixBackend : IAudioPlayerBackend, IVideoPlayerBackend
public class QuicktimeBackend : IAudioPlayerBackend,
IAudioTranscoderBackend, IVideoPlayerBackend, IVideoTranscoderBackend
public class DirectShowBackend : IAudioPlayerBackend, IVideoPlayerBackend
...
}
As an example, the AudioPlayer class might look a little like this:
public class AudioPlayer {
public AudioPlayer()
public AudioPlayer(IAudioPlayerBackend preferred_backend)
public void Open(string uri)
public bool TryOpen(string uri)
public void Play()
public void Pause()
public void Close()
public uint Position { get; set; }
public double Volume { get; set; }
public VolumeScale VolumeScale { get; set; }
public IAudioPlayerBackend Backend { get; }
public IAudioPlayerBackend PreferredBackend { get; set; }
public event EventHandler Played
public event EventHandler Paused
public event EventHandler Stopped
}
And an example use of the API might look like this:
AudioPlayer player = new AudioPlayer();
if(player.TryOpen("/home/scott/Music/still_alive.mp3")) {
player.Play();
}
What do people think?
* While WPF (and by extension, Silverlight) has audio/visual capabilities, it does not have a full compliment of tools, such as transcoding. It also require the
3.5 framework.
--
Scott.
_______________________________________________
Banshee-list mailing list
Banshee-list gnome org
http://mail.gnome.org/mailman/listinfo/banshee-list
--
DISCLAIMER:
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, and disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]