Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-astreamer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-apps-astreamer
Commits
7e9dba1a
Commit
7e9dba1a
authored
Mar 03, 2017
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Video class clean up: remove commented code, reorder debug output
parent
d8ae21c5
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
141 deletions
+86
-141
main.cpp
src/main.cpp
+1
-2
video.cpp
src/video.cpp
+77
-126
video.h
src/video.h
+8
-13
No files found.
src/main.cpp
View file @
7e9dba1a
...
...
@@ -73,8 +73,7 @@ int main(int argc, char *argv[]) {
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
;
cout
<<
"Start thread "
<<
i
<<
endl
;
streamers
[
i
]
=
new
Streamer
(
args
,
i
);
...
...
src/video.cpp
View file @
7e9dba1a
This diff is collapsed.
Click to expand it.
src/video.h
View file @
7e9dba1a
...
...
@@ -31,7 +31,7 @@ using namespace std;
#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
/
// structure to store current video description
/
** structure to store current video description */
struct
video_desc_t
{
bool
valid
;
int
width
;
...
...
@@ -52,7 +52,6 @@ public:
Video
(
int
port
,
Parameters
*
pars
);
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
);
void
fps
(
float
);
...
...
@@ -60,9 +59,9 @@ public:
void
Stop
(
void
);
Parameters
*
params
;
/// Using Video class to interface global camera parameters
bool
waitDaemonEnabled
(
int
daemonBit
);
// <0 - use default
bool
isDaemonEnabled
(
int
daemonBit
);
// <0 - use default
// Using Video class to interface global camera parameters
bool
waitDaemonEnabled
(
int
daemonBit
);
// <0 - use default
bool
isDaemonEnabled
(
int
daemonBit
);
// <0 - use default
protected
:
long
getFramePars
(
struct
interframe_params_t
*
frame_pars
,
long
before
,
long
ptr_before
=
0
);
...
...
@@ -74,7 +73,6 @@ protected:
int
f_quality
;
bool
qtables_include
;
unsigned
char
qtable
[
128
];
// struct timeval f_tv;
long
buffer_length
;
unsigned
long
*
buffer_ptr
;
unsigned
char
*
buffer_ptr_end
;
// pointer to the end of the buffer
...
...
@@ -84,7 +82,6 @@ protected:
int
lastDaemonBit
;
long
capture
(
void
);
// bool process(void);
long
process
(
void
);
unsigned
long
get_frame_len
(
unsigned
long
offset
);
void
get_frame_pars
(
void
*
frame_pars
,
unsigned
long
offset
);
...
...
@@ -93,14 +90,12 @@ protected:
long
v_t_sec
;
long
v_t_usec
;
int
v_frames
;
unsigned
long
used_width
;
///
frame width reported by Video::width(), used as the stream width
unsigned
long
used_height
;
/
// similar to above
float
used_fps
;
/
// similar to above
unsigned
long
used_width
;
//
frame width reported by Video::width(), used as the stream width
unsigned
long
used_height
;
// similar to above
float
used_fps
;
// similar to above
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_
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment