Project Malmo  0.37.0
Classes | Public Member Functions | Friends | List of all members
malmo::MissionRecordSpec Struct Reference

Specifies the type of data that should be recorded from the mission. More...

#include <MissionRecordSpec.h>

Public Member Functions

 MissionRecordSpec ()
 Constructs an empty mission record specification, saying that nothing should be recorded.
 
 MissionRecordSpec (std::string destination)
 Constructs a mission record with a target file (e.g. More...
 
void setDestination (const std::string &destination)
 Specifies the destination for the recording.
 
void recordMP4 (int frames_per_second, int64_t bit_rate)
 Requests that video be recorded, for each video producer, at the specified quality. More...
 
void recordMP4 (TimestampedVideoFrame::FrameType type, int frames_per_second, int64_t bit_rate, bool drop_input_frames)
 Requests that video be recorded, for the specified video producer, at the specified quality. More...
 
void recordBitmaps (TimestampedVideoFrame::FrameType type)
 Requests that video be recorded, for the specified video producer, in individual bitmap frames. More...
 
void recordObservations ()
 Requests that observations be recorded.
 
void recordRewards ()
 Requests that rewards be recorded.
 
void recordCommands ()
 Requests that commands be recorded.
 
bool isRecording () const
 Are we recording anything?
 

Friends

class MissionRecord
 
std::ostream & operator<< (std::ostream &os, const MissionRecordSpec &msp)
 

Detailed Description

Specifies the type of data that should be recorded from the mission.

Constructor & Destructor Documentation

◆ MissionRecordSpec()

malmo::MissionRecordSpec::MissionRecordSpec ( std::string  destination)

Constructs a mission record with a target file (e.g.

'data.tgz'). By default, nothing is recorded. Use the other functions to specify what channels should be recorded. WARNING: You cannot re-use the instance of MissionRecordSpec - make a new one per call to AgentHost.startMission.

Parameters
destinationFilename to save to.

Member Function Documentation

◆ recordBitmaps()

void malmo::MissionRecordSpec::recordBitmaps ( TimestampedVideoFrame::FrameType  type)

Requests that video be recorded, for the specified video producer, in individual bitmap frames.

Bitmaps and MP4 cannot both be recorded for a given video producer; whichever is called last out of recordMP4 and recordBitmaps will take effect.

◆ recordMP4() [1/2]

void malmo::MissionRecordSpec::recordMP4 ( int  frames_per_second,
int64_t  bit_rate 
)

Requests that video be recorded, for each video producer, at the specified quality.

Ensure that the width of the video requested is divisible by 4, and the height of the video requested is divisible by 2. Bitmaps and MP4 cannot both be recorded for a given video producer; whichever is called last out of recordMP4 and recordBitmaps will take effect.

Parameters
frames_per_secondThe number of frames to record per second. e.g. 20.
bit_rateThe bit rate to record at. e.g. 400000 for 400kbps.

◆ recordMP4() [2/2]

void malmo::MissionRecordSpec::recordMP4 ( TimestampedVideoFrame::FrameType  type,
int  frames_per_second,
int64_t  bit_rate,
bool  drop_input_frames 
)

Requests that video be recorded, for the specified video producer, at the specified quality.

Ensure that the width of the video requested is divisible by 4, and the height of the video requested is divisible by 2.

Parameters
frames_per_secondThe number of frames to output per second. e.g. 24.
bit_rateThe bit rate to record at. e.g. 400000 for 400kbps.
drop_input_framesIf true, will drop input frames to match frames_per_second (default behaviour) - pass false to avoid losing data. Bitmaps and MP4 cannot both be recorded for a given video producer; whichever is called last out of recordMP4 and recordBitmaps will take effect.

The documentation for this struct was generated from the following file: