Commit 7e9dba1a authored by Mikhail Karpenko's avatar Mikhail Karpenko

Video class clean up: remove commented code, reorder debug output

parent d8ae21c5
...@@ -73,8 +73,7 @@ int main(int argc, char *argv[]) { ...@@ -73,8 +73,7 @@ int main(int argc, char *argv[]) {
cerr << "|" << (*it).first << "| == |" << (*it).second << "|" << endl; cerr << "|" << (*it).first << "| == |" << (*it).second << "|" << endl;
} }
for (int i = 0; i < 1; i++) { for (int i = 0; i < SENSOR_PORTS; i++) {
// for (int i = 0; i < SENSOR_PORTS; i++) {
pthread_attr_t attr; pthread_attr_t attr;
cout << "Start thread " << i << endl; cout << "Start thread " << i << endl;
streamers[i] = new Streamer(args, i); streamers[i] = new Streamer(args, i);
......
This diff is collapsed.
...@@ -31,7 +31,7 @@ using namespace std; ...@@ -31,7 +31,7 @@ using namespace std;
#define FRAMES_AHEAD_FPS 3 /// number of frames ahead of current to write FPS limit #define FRAMES_AHEAD_FPS 3 /// number of frames ahead of current to write FPS limit
#define FRAMES_SKIP_FPS 3 /// number of frames to wait after target so circbuf will have at least 2 frames with new FPS for calculation #define FRAMES_SKIP_FPS 3 /// number of frames to wait after target so circbuf will have at least 2 frames with new FPS for calculation
/// structure to store current video description /** structure to store current video description */
struct video_desc_t { struct video_desc_t {
bool valid; bool valid;
int width; int width;
...@@ -52,7 +52,6 @@ public: ...@@ -52,7 +52,6 @@ public:
Video(int port, Parameters *pars); Video(int port, Parameters *pars);
virtual ~Video(void); virtual ~Video(void);
/// return description of the current frame - i.e. current video parameters
struct video_desc_t get_current_desc(bool with_fps = true); struct video_desc_t get_current_desc(bool with_fps = true);
void fps(float); void fps(float);
...@@ -60,9 +59,9 @@ public: ...@@ -60,9 +59,9 @@ public:
void Stop(void); void Stop(void);
Parameters *params; Parameters *params;
/// Using Video class to interface global camera parameters // Using Video class to interface global camera parameters
bool waitDaemonEnabled(int daemonBit); // <0 - use default bool waitDaemonEnabled(int daemonBit); // <0 - use default
bool isDaemonEnabled(int daemonBit); // <0 - use default bool isDaemonEnabled(int daemonBit); // <0 - use default
protected: protected:
long getFramePars(struct interframe_params_t * frame_pars, long before, long ptr_before = 0); long getFramePars(struct interframe_params_t * frame_pars, long before, long ptr_before = 0);
...@@ -74,7 +73,6 @@ protected: ...@@ -74,7 +73,6 @@ protected:
int f_quality; int f_quality;
bool qtables_include; bool qtables_include;
unsigned char qtable[128]; unsigned char qtable[128];
// struct timeval f_tv;
long buffer_length; long buffer_length;
unsigned long *buffer_ptr; unsigned long *buffer_ptr;
unsigned char *buffer_ptr_end; // pointer to the end of the buffer unsigned char *buffer_ptr_end; // pointer to the end of the buffer
...@@ -84,7 +82,6 @@ protected: ...@@ -84,7 +82,6 @@ protected:
int lastDaemonBit; int lastDaemonBit;
long capture(void); long capture(void);
// bool process(void);
long process(void); long process(void);
unsigned long get_frame_len(unsigned long offset); unsigned long get_frame_len(unsigned long offset);
void get_frame_pars(void *frame_pars, unsigned long offset); void get_frame_pars(void *frame_pars, unsigned long offset);
...@@ -93,14 +90,12 @@ protected: ...@@ -93,14 +90,12 @@ protected:
long v_t_sec; long v_t_sec;
long v_t_usec; long v_t_usec;
int v_frames; int v_frames;
unsigned long used_width; ///frame width reported by Video::width(), used as the stream width unsigned long used_width; // frame width reported by Video::width(), used as the stream width
unsigned long used_height; /// similar to above unsigned long used_height; // similar to above
float used_fps; /// similar to above float used_fps; // similar to above
int fps_scale; int fps_scale;
int fps_scale_c; // counter for fps_scale int fps_scale_c; // counter for fps_scale
}; };
//extern Video *video;
#endif // _VIDEO__H_ #endif // _VIDEO__H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment