1 #ifndef _avsnoop__hpp__included__
2 #define _avsnoop__hpp__included__
17 * Create new A/V snooper.
19 * throws std::bad_alloc: Not enough memory.
21 av_snooper() throw(std::bad_alloc
);
24 * Destroy A/V snooper. This will not call end method.
26 ~av_snooper() throw();
31 * parameter _frame: The frame to dump.
32 * parameter fps_n: Current fps numerator.
33 * parameter fps_d: Current fps denomerator.
34 * throws std::bad_alloc: Not enough memory.
35 * throws std::runtime_error: Error dumping frame.
37 virtual void frame(struct lcscreen
& _frame
, uint32_t fps_n
, uint32_t fps_d
, window
* win
, bool dummy
)
38 throw(std::bad_alloc
, std::runtime_error
) = 0;
43 * parameter _frame: The frame to dump.
44 * parameter fps_n: Current fps numerator.
45 * parameter fps_d: Current fps denomerator.
46 * parameter win: Graphics system handle.
48 static void frame(struct lcscreen
& _frame
, uint32_t fps_n
, uint32_t fps_d
, window
* win
) throw();
53 * parameter l: Left channel sample.
54 * parameter r: Right channel sample.
55 * throws std::bad_alloc: Not enough memory.
56 * throws std::runtime_error: Error dumping sample.
58 virtual void sample(short l
, short r
) throw(std::bad_alloc
, std::runtime_error
) = 0;
63 * parameter l: Left channel sample.
64 * parameter r: Right channel sample.
65 * parameter win: Graphics system handle.
67 static void sample(short l
, short r
, window
* win
) throw();
72 * throws std::bad_alloc: Not enough memory.
73 * throws std::runtime_error: Error dumping sample.
75 virtual void end() throw(std::bad_alloc
, std::runtime_error
) = 0;
80 * parameter win: Graphics system handle.
82 static void end(window
* win
) throw();
85 * Notify game information.
87 * parameter gamename: Name of the game.
88 * parameter authors: Authors of the run.
89 * parameter gametime: Game time.
90 * parameter rercords: Rerecord count.
91 * throws std::bad_alloc: Not enough memory.
92 * throws std::runtime_error: Error recording this info.
94 virtual void gameinfo(const std::string
& gamename
, const std::list
<std::pair
<std::string
, std::string
>>&
95 authors
, double gametime
, const std::string
& rerecords
) throw(std::bad_alloc
, std::runtime_error
) = 0;
98 * Notify game information.
100 * parameter gamename: Name of the game.
101 * parameter authors: Authors of the run.
102 * parameter gametime: Game time.
103 * parameter rercords: Rerecord count.
104 * parameter win: Graphics system handle.
105 * throws std::bad_alloc Not enough memory.
107 static void gameinfo(const std::string
& gamename
, const std::list
<std::pair
<std::string
, std::string
>>&
108 authors
, double gametime
, const std::string
& rerecords
, window
* win
) throw(std::bad_alloc
);
111 * Send game info. This causes gameinfo method to be called on object this method is called on.
113 void send_gameinfo() throw();
116 * Is there dump in progress?
118 * returns: True if dump is in progress, false if not.
120 static bool dump_in_progress() throw();
123 * Notifier for dumps starting/ending.
125 class dump_notification
131 virtual ~dump_notification() throw();
135 virtual void dump_starting() throw();
139 virtual void dump_ending() throw();
145 * parameter notifier: New notifier to add.
147 static void add_dump_notifier(dump_notification
& notifier
) throw(std::bad_alloc
);
152 * parameter notifier: Existing notifier to remove.
154 static void remove_dump_notifier(dump_notification
& notifier
) throw();