VOGONS

Common searches


First post, by dada

User metadata
Rank Member
Rank
Member

Hi there. I'm planning on recording some things through an automated process. Would anyone happen to know if it's possible to activate recording any other way besides hitting the key combination? My plan is to play back and record some IT files, so I was thinking of generating a BAT script that includes a command to enable and disable video recording, but maybe anyone here knows a better approach. Thanks 😀

edit: looks like I'll be making a modification to the source 😀

Reply 1 of 3, by dada

User metadata
Rank Member
Rank
Member

In case anyone is interested, here's the patch I wrote for this.

/src/hardware/hardware.cpp

--- dosbox-svn/src/hardware/hardware.cpp	2014-09-02 23:38:17.000000000 +0200
+++ dosbox-svn-ms/src/hardware/hardware.cpp 2014-09-02 23:48:00.000000000 +0200
@@ -81,6 +81,7 @@
} capture;

FILE * OpenCaptureFile(const char * type,const char * ext) {
+
if(capturedir.empty()) {
LOG_MSG("Please specify a capture directory");
return 0;
@@ -160,7 +161,27 @@
#endif

#if (C_SSHOT)
-static void CAPTURE_VideoEvent(bool pressed) {
+void CAPTURE_VideoStart() {
+ if (CaptureState & CAPTURE_VIDEO) {
+ LOG_MSG("Already capturing video.");
+ } else {
+ CAPTURE_VideoEvent(true);
+ }
+}
+#endif
+
+#if (C_SSHOT)
+void CAPTURE_VideoStop() {
+ if (CaptureState & CAPTURE_VIDEO) {
+ CAPTURE_VideoEvent(true);
+ } else {
+ LOG_MSG("Not capturing video.");
+ }
+}
+#endif
+
+#if (C_SSHOT)
+void CAPTURE_VideoEvent(bool pressed) {
if (!pressed)
return;
if (CaptureState & CAPTURE_VIDEO) {

/src/misc/programs.cpp

--- dosbox-svn/src/misc/programs.cpp	2014-09-02 23:38:15.000000000 +0200
+++ dosbox-svn-ms/src/misc/programs.cpp 2014-09-02 23:25:25.000000000 +0200
@@ -31,6 +31,7 @@
#include "cross.h"
#include "control.h"
#include "shell.h"
+#include "hardware.h"

Bitu call_program;

@@ -279,7 +280,9 @@
void CONFIG::Run(void) {
static const char* const params[] = {
"-r", "-wcp", "-wcd", "-wc", "-writeconf", "-l", "-rmconf",
- "-h", "-help", "-?", "-axclear", "-axadd", "-axtype", "-get", "-set",
+ "-h", "-help", "-?", "-axclear", "-axadd", "-axtype",
+ "-recavistart", "-recavistop",
+ "-get", "-set",
"-writelang", "-wl", "-securemode", "" };
enum prs {
P_NOMATCH, P_NOPARAMS, // fixed return values for GetParameterFromList
@@ -288,6 +291,7 @@
P_LISTCONF, P_KILLCONF,
P_HELP, P_HELP2, P_HELP3,
P_AUTOEXEC_CLEAR, P_AUTOEXEC_ADD, P_AUTOEXEC_TYPE,
+ P_REC_AVI_START, P_REC_AVI_STOP,
P_GETPROP, P_SETPROP,
P_WRITELANG, P_WRITELANG2,
P_SECURE
@@ -526,6 +530,18 @@
WriteOut("\n%s",sec->data.c_str());
break;
}
+ case P_REC_AVI_START: {
+ CAPTURE_VideoStart();
+ //OpenCaptureFile("Video",".avi");
+ //LOG_MSG('a');
+ /* here's where i want avi */
+ /**/
+ break;
+ }
+ case P_REC_AVI_STOP: {
+ CAPTURE_VideoStop();
+ break;
+ }
case P_GETPROP: {
// "section property"
// "property"
@@ -784,6 +800,8 @@
"-axadd [line] adds a line to the autoexec section.\n"\
"-axtype prints the content of the autoexec section.\n"\
"-securemode switches to secure mode.\n"\
+ "-recavistart starts AVI recording.\n"\
+ "-recavistop stops AVI recording.\n"\
"-get \"section property\" returns the value of the property.\n"\
"-set \"section property=value\" sets the value." );
MSG_Add("PROGRAM_CONFIG_HLP_PROPHLP","Purpose of property \"%s\" (contained in section \"%s\"):\n%s\n\nPossible Values: %s\nDefault value: %s\nCurrent value: %s\n");

/include/hardware.h

--- dosbox-svn/include/hardware.h	2014-09-02 23:38:09.000000000 +0200
+++ dosbox-svn-ms/include/hardware.h 2014-09-02 23:27:36.000000000 +0200
@@ -50,5 +50,8 @@
#define CAPTURE_FLAG_DBLH 0x2
void CAPTURE_AddImage(Bitu width, Bitu height, Bitu bpp, Bitu pitch, Bitu flags, float fps, Bit8u * data, Bit8u * pal);
void CAPTURE_AddMidi(bool sysex, Bitu len, Bit8u * data);
+void CAPTURE_VideoEvent(bool pressed);
+void CAPTURE_VideoStart();
+void CAPTURE_VideoStop();

#endif

edit: on sourceforge: https://sourceforge.net/p/dosbox/patches/262/

Last edited by dada on 2014-09-03, 11:55. Edited 1 time in total.

Reply 3 of 3, by dada

User metadata
Rank Member
Rank
Member
jwt27 wrote:

I should have read this earlier. You could've also used Winamp with Disk Writer selected as output 😉

Well I don't just want to convert the files to audio, I would like to put them all on Youtube with output of the player itself as the video. 😀 So basically make a Youtube archive of the files.