Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-camogm
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-camogm
Commits
e119b208
Commit
e119b208
authored
Jul 19, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor updates to doxygen documentation
parent
2f60099a
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
112 additions
and
115 deletions
+112
-115
Doxyfile
Doxyfile
+1
-1
camogm.c
camogm.c
+101
-100
camogm_jpeg.c
camogm_jpeg.c
+2
-2
camogm_mov.c
camogm_mov.c
+2
-2
camogm_ogm.c
camogm_ogm.c
+1
-1
camogm_read.c
camogm_read.c
+5
-9
No files found.
Doxyfile
View file @
e119b208
...
...
@@ -371,7 +371,7 @@ INLINE_GROUPED_CLASSES = NO
# Man pages) or section (for LaTeX and RTF).
# The default value is: NO.
INLINE_SIMPLE_STRUCTS =
NO
INLINE_SIMPLE_STRUCTS =
YES
# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
# enum is documented as struct, union, or enum with the name of the typedef. So
...
...
camogm.c
View file @
e119b208
This diff is collapsed.
Click to expand it.
camogm_jpeg.c
View file @
e119b208
...
...
@@ -53,12 +53,12 @@ int camogm_start_jpeg(camogm_state *state)
int
rslt
;
if
(
!
state
->
rawdev_op
)
{
strcpy
(
state
->
path
,
state
->
path_prefix
);
//!
make state->path a directory name (will be replaced when the frames will be written)
strcpy
(
state
->
path
,
state
->
path_prefix
);
//
make state->path a directory name (will be replaced when the frames will be written)
slash
=
strrchr
(
state
->
path
,
'/'
);
D2
(
fprintf
(
debug_file
,
"camogm_start_jpeg
\n
"
));
if
(
slash
)
{
D3
(
fprintf
(
debug_file
,
"Full path %s
\n
"
,
state
->
path
));
slash
[
0
]
=
'\0'
;
//!
truncate path to the directory name
slash
[
0
]
=
'\0'
;
//
truncate path to the directory name
D3
(
fprintf
(
debug_file
,
"directory path %s
\n
"
,
state
->
path
));
rslt
=
mkdir
(
state
->
path
,
0777
);
D3
(
fprintf
(
debug_file
,
"mkdir (%s, 0777) returned %d, errno=%d
\n
"
,
state
->
path
,
rslt
,
errno
));
...
...
camogm_mov.c
View file @
e119b208
...
...
@@ -311,7 +311,7 @@ int parse_special(void)
// a hack - invlude length'skip if data position (header size is known and there is a gap)
if
(
strcmp
(
str
,
"data_size"
)
==
0
)
{
gap
=
headerSize
-
lseek
(
ofd
,
0
,
SEEK_CUR
)
-
8
;
if
(
gap
>
0
)
{
//
!
it should be exactly 0 if there is no gap or >8 if there is
if
(
gap
>
0
)
{
//it should be exactly 0 if there is no gap or >8 if there is
D4
(
fprintf
(
debug_file
,
"Inserting a skip tag to compensate for a gap (%d bytes) between the header and the frame data
\n
"
,
gap
));
if
(
gap
<
8
)
{
D0
(
fprintf
(
debug_file
,
"not enough room to insret 'skip' tag - %d (need 8)
\n
"
,
gap
));
...
...
@@ -321,7 +321,7 @@ int parse_special(void)
putBigEndian
(
gap
,
4
);
D4
(
fprintf
(
debug_file
,
"writing string <%s>
\n
"
,
"skip"
));
write
(
ofd
,
"skip"
,
4
);
lseek
(
ofd
,
gap
-
8
,
SEEK_CUR
);
//
!
lseek over the gap and proceed as before
lseek
(
ofd
,
gap
-
8
,
SEEK_CUR
);
// lseek over the gap and proceed as before
}
if
(
sizes
!=
NULL
)
{
l
=
0
;
...
...
camogm_ogm.c
View file @
e119b208
...
...
@@ -178,7 +178,7 @@ int camogm_frame_ogm(camogm_state *state)
* @brief Finish OGM file operation
* @param[in] state a pointer to a structure containing current state
* @return 0 if file was saved successfully and negative error code otherwise
* @note
: z
ero packets are OK, use them to end file with "last" turned on
* @note
Z
ero packets are OK, use them to end file with "last" turned on
*/
int
camogm_end_ogm
(
camogm_state
*
state
)
{
...
...
camogm_read.c
View file @
e119b208
...
...
@@ -72,7 +72,7 @@
/** @brief The size of file search window. This window is memory mapped. */
#define SEARCH_SIZE_WINDOW ((uint64_t)4 * (uint64_t)1048576)
/** @brief Time window (in seconds) used for disk index search. Index within this window is considered a candidate */
#define SEARCH_TIME_WINDOW 60
0
#define SEARCH_TIME_WINDOW 60
/** @brief File starting marker on a raw device. It corresponds to SOI JPEG marker */
static
unsigned
char
elphelst
[]
=
{
0xff
,
0xd8
};
/** @brief File ending marker on a raw device. It corresponds to EOI JPEG marker */
...
...
@@ -253,7 +253,6 @@ void dump_index_dir(const struct disk_idir *idir)
{
struct
disk_index
*
ind
=
idir
->
head
;
printf
(
"Head pointer = 0x%p, tail pointer = 0x%p
\n
"
,
idir
->
head
,
idir
->
tail
);
while
(
ind
!=
NULL
)
{
fprintf
(
debug_file
,
INDEX_FORMAT_STR
,
ind
->
port
,
ind
->
rawtime
,
ind
->
usec
,
ind
->
f_offset
,
ind
->
f_size
);
...
...
@@ -993,7 +992,7 @@ static struct disk_index *find_disk_index(rawdev_buffer *rawdev, struct disk_idi
* @return None
* @warning The main processing loop of the function is enclosed in @e pthread_cleanup_push and @e pthread_cleanup_pop
* calls. The effect of use of normal @b return or @b break to prematurely leave this loop is undefined.
* @todo
p
rint unrecognized command to debug output file
* @todo
P
rint unrecognized command to debug output file
*/
void
*
reader
(
void
*
arg
)
{
...
...
@@ -1106,6 +1105,7 @@ void *reader(void *arg)
}
break
;
case
CMD_READ_FILE
:
// read single file by offset given
if
(
index_dir
.
size
>
0
)
{
struct
disk_index
indx
;
if
(
get_indx_args
(
cmd_ptr
,
&
indx
)
>
0
&&
...
...
@@ -1115,6 +1115,7 @@ void *reader(void *arg)
}
break
;
case
CMD_FIND_FILE
:
{
// find file by time stamp
struct
disk_index
indx
;
struct
disk_index
*
indx_ptr
=
NULL
;
if
(
get_timestamp_args
(
cmd_ptr
,
&
indx
)
>
0
)
{
...
...
@@ -1124,12 +1125,6 @@ void *reader(void *arg)
index_sparse
.
curr_indx
=
indx_ptr
;
}
else
{
indx_ptr
=
find_nearest_by_time
(
&
index_dir
,
indx
.
rawtime
);
/* debug code follows */
if
(
indx_ptr
!=
NULL
)
printf
(
"Index found in pre-built index directory: offset = 0x%llx
\n
"
,
indx_ptr
->
f_offset
);
else
printf
(
"Index NOT found in pre-built index directory. Probably it should be rebuilt
\n
"
);
/* end of debug code */
}
if
(
indx_ptr
!=
NULL
)
send_file
(
rawdev
,
indx_ptr
,
fd
);
...
...
@@ -1137,6 +1132,7 @@ void *reader(void *arg)
break
;
}
case
CMD_NEXT_FILE
:
{
// read next file after previously found file
struct
range
rng
;
struct
disk_index
*
new_indx
=
NULL
;
struct
disk_index
*
indx_ptr
=
NULL
;
...
...
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