banshee r3643 - in trunk/banshee: . src/Backends/Banshee.GStreamer/Banshee.GStreamer src/Core/Banshee.Services/Banshee.MediaEngine
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3643 - in trunk/banshee: . src/Backends/Banshee.GStreamer/Banshee.GStreamer src/Core/Banshee.Services/Banshee.MediaEngine
- Date: Wed, 2 Apr 2008 01:21:04 +0100 (BST)
Author: abock
Date: Wed Apr 2 01:21:04 2008
New Revision: 3643
URL: http://svn.gnome.org/viewvc/banshee?rev=3643&view=rev
Log:
2008-04-01 Aaron Bockover <abock gnome org>
* src/Backends/Banshee.GStreamer/Banshee.GStreamer/AudioCdRipper.cs:
* src/Core/Banshee.Services/Banshee.MediaEngine/IAudioCdRipper.cs: More
stubbing, no real glory yet
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Backends/Banshee.GStreamer/Banshee.GStreamer/AudioCdRipper.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/IAudioCdRipper.cs
Modified: trunk/banshee/src/Backends/Banshee.GStreamer/Banshee.GStreamer/AudioCdRipper.cs
==============================================================================
--- trunk/banshee/src/Backends/Banshee.GStreamer/Banshee.GStreamer/AudioCdRipper.cs (original)
+++ trunk/banshee/src/Backends/Banshee.GStreamer/Banshee.GStreamer/AudioCdRipper.cs Wed Apr 2 01:21:04 2008
@@ -36,6 +36,9 @@
{
public class AudioCdRipper : IAudioCdRipper
{
+ public event AudioCdRipperProgressHandler Progress;
+ public event AudioCdRipperTrackFinishedHandler TrackFinished;
+
public void Begin ()
{
}
@@ -48,9 +51,25 @@
{
}
- public bool RipTrack (TrackInfo track, SafeUri outputUri)
+ public void RipTrack (TrackInfo track, SafeUri outputUri)
+ {
+ return;
+ }
+
+ protected virtual void OnProgress ()
+ {
+ AudioCdRipperProgressHandler handler = Progress;
+ if (handler != null) {
+ handler (this, new AudioCdRipperProgressArgs (null, TimeSpan.Zero, TimeSpan.Zero));
+ }
+ }
+
+ protected virtual void OnTrackFinished ()
{
- return false;
+ AudioCdRipperTrackFinishedHandler handler = TrackFinished;
+ if (handler != null) {
+ handler (this, new AudioCdRipperTrackFinishedArgs (null, null));
+ }
}
}
}
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/IAudioCdRipper.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/IAudioCdRipper.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/IAudioCdRipper.cs Wed Apr 2 01:21:04 2008
@@ -33,12 +33,62 @@
namespace Banshee.MediaEngine
{
+ public delegate void AudioCdRipperProgressHandler (object o, AudioCdRipperProgressArgs args);
+ public delegate void AudioCdRipperTrackFinishedHandler (object o, AudioCdRipperTrackFinishedArgs args);
+
public interface IAudioCdRipper
{
+ event AudioCdRipperProgressHandler Progress;
+ event AudioCdRipperTrackFinishedHandler TrackFinished;
+
void Begin ();
void Finish ();
void Cancel ();
- bool RipTrack (TrackInfo track, SafeUri outputUri);
+ void RipTrack (TrackInfo track, SafeUri outputUri);
+ }
+
+ public sealed class AudioCdRipperProgressArgs : EventArgs
+ {
+ public AudioCdRipperProgressArgs (TrackInfo track, TimeSpan encodedTime, TimeSpan totalTime)
+ {
+ this.track = track;
+ this.encoded_time = encodedTime;
+ this.total_time = totalTime;
+ }
+
+ private TimeSpan encoded_time;
+ public TimeSpan EncodedTime {
+ get { return encoded_time; }
+ }
+
+ private TimeSpan total_time;
+ public TimeSpan TotalTime {
+ get { return total_time; }
+ }
+
+ private TrackInfo track;
+ public TrackInfo Track {
+ get { return track; }
+ }
+ }
+
+ public sealed class AudioCdRipperTrackFinishedArgs : EventArgs
+ {
+ public AudioCdRipperTrackFinishedArgs (TrackInfo track, SafeUri uri)
+ {
+ this.track = track;
+ this.uri = uri;
+ }
+
+ private TrackInfo track;
+ public TrackInfo Track {
+ get { return track; }
+ }
+
+ private SafeUri uri;
+ public SafeUri Uri {
+ get { return uri; }
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]