Add statusinformation for cutter thread via cStatus v2 (resend)
Commit Message
I don't know why this patch get it into vdr-1.3.45, but i hope it will
be in the next version.
Thanks,
Christian
Comments
Christian Gmeiner wrote:
> I don't know why this patch get it into vdr-1.3.45, but i hope it will
> be in the next version.
>
> Thanks,
> Christian
I assume you mean you don't know why this patch did *not* make
its way into VDR 1.3.45!?
Well, I didn't have too much time on the past few weekends, and
my main focus is currently on getting VDR stable, not adding new
features ;-)
Klaus
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Klaus Schmidinger wrote:
> Christian Gmeiner wrote:
>> I don't know why this patch get it into vdr-1.3.45, but i hope it will
>> be in the next version.
>>
>> Thanks,
>> Christian
>
> I assume you mean you don't know why this patch did *not* make
> its way into VDR 1.3.45!?
Jep.. thats what i wanted to write.. i am a bit tired
>
> Well, I didn't have too much time on the past few weekends, and
> my main focus is currently on getting VDR stable, not adding new
> features ;-)
Thats no problem :)
Christian
- --
Christian Gmeiner - student of computer science
http://dxr3plugin.sf.net
http://itb04.ath.cx
http://javamill.ath.cx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEJ5iCDwe2AbwGBA8RAiAAAJwNqMV/MfW1UpkOL2QGIGxNRGa0RACcCz7U
7Cf7CIenllVx8IULeDLYqXw=
=4Czg
-----END PGP SIGNATURE-----
@@ -12,6 +12,7 @@
#include "remux.h"
#include "thread.h"
#include "videodir.h"
+#include "status.h"
// --- cCuttingThread --------------------------------------------------------
@@ -189,6 +190,7 @@
error = false;
ended = false;
cRecording Recording(FileName);
+ filename = FileName;
const char *evn = Recording.PrefixFileName('%');
if (evn && RemoveVideoFile(evn) && MakeDirs(evn, true)) {
// XXX this can be removed once RenameVideoFile() follows symlinks (see videodir.c)
@@ -207,6 +209,7 @@
Recording.WriteInfo();
Recordings.AddByName(editedVersionName);
cuttingThread = new cCuttingThread(FileName, editedVersionName);
+ cStatus::MsgCutterRunning(true, filename);
return true;
}
}
@@ -227,6 +230,7 @@
RemoveVideoFile(editedVersionName); //XXX what if this file is currently being replayed?
Recordings.DelByName(editedVersionName);
}
+ cStatus::MsgCutterRunning(false, filename);
}
bool cCutter::Active(void)
@@ -18,6 +18,7 @@
static cCuttingThread *cuttingThread;
static bool error;
static bool ended;
+ static const char* filename;
public:
static bool Start(const char *FileName);
static void Stop(void);
@@ -112,3 +112,9 @@
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->OsdProgramme(PresentTime, PresentTitle, PresentSubtitle, FollowingTime, FollowingTitle, FollowingSubtitle);
}
+
+void cStatus::MsgCutterRunning(bool Running, const char *FileName)
+{
+ for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
+ sm->CutterRunning(Running, FileName);
+}
@@ -67,6 +67,8 @@
// The OSD displays the single line Text with the current channel information.
virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle) {}
// The OSD displays the given programme information.
+ virtual void CutterRunning(bool Running, const char *FileName) {}
+ // Inform if cutting process is running and what file it is processing.
public:
cStatus(void);
virtual ~cStatus();
@@ -86,6 +88,7 @@
static void MsgOsdTextItem(const char *Text, bool Scroll = false);
static void MsgOsdChannel(const char *Text);
static void MsgOsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle);
+ static void MsgCutterRunning(bool Running, const char *FileName);
};
#endif //__STATUS_H