1 #ifndef _avsnoop__hpp__included__
2 #define _avsnoop__hpp__included__
16 * Create new A/V snooper.
18 * throws std::bad_alloc: Not enough memory.
20 av_snooper() throw(std::bad_alloc
);
23 * Destroy A/V snooper. This will not call end method.
25 ~av_snooper() throw();
30 * parameter _frame: The frame to dump.
31 * parameter fps_n: Current fps numerator.
32 * parameter fps_d: Current fps denomerator.
33 * throws std::bad_alloc: Not enough memory.
34 * throws std::runtime_error: Error dumping frame.
36 virtual void frame(struct lcscreen
& _frame
, uint32_t fps_n
, uint32_t fps_d
) throw(std::bad_alloc
,
37 std::runtime_error
) = 0;
42 * parameter _frame: The frame to dump.
43 * parameter fps_n: Current fps numerator.
44 * parameter fps_d: Current fps denomerator.
45 * throws std::bad_alloc: Not enough memory.
47 static void frame(struct lcscreen
& _frame
, uint32_t fps_n
, uint32_t fps_d
, bool dummy
)
48 throw(std::bad_alloc
);
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 * throws std::bad_alloc: Not enough memory.
67 static void sample(short l
, short r
, bool dummy
) throw(std::bad_alloc
);
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 * throws std::bad_alloc: Not enough memory.
82 static void end(bool dummy
) throw(std::bad_alloc
);
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 * throws std::bad_alloc Not enough memory.
106 static void gameinfo(const std::string
& gamename
, const std::list
<std::pair
<std::string
, std::string
>>&
107 authors
, double gametime
, const std::string
& rerecords
, bool dummy
) throw(std::bad_alloc
);
110 * Send game info. This causes gameinfo method to be called on object this method is called on.
112 void send_gameinfo() throw();
115 * Is there dump in progress?
117 * returns: True if dump is in progress, false if not.
119 static bool dump_in_progress() throw();
122 * Notifier for dumps starting/ending.
124 class dump_notification
130 virtual ~dump_notification() throw();
134 virtual void dump_starting() throw();
138 virtual void dump_ending() throw();
144 * parameter notifier: New notifier to add.
146 static void add_dump_notifier(dump_notification
& notifier
) throw(std::bad_alloc
);
151 * parameter notifier: Existing notifier to remove.
153 static void remove_dump_notifier(dump_notification
& notifier
) throw();