Commit 5aea3da4 authored by Mikhail Karpenko's avatar Mikhail Karpenko

Update doxygen documentation

parent d28b8a87
This diff is collapsed.
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
/** /**
* @struct rawdev_buffer * @struct rawdev_buffer
* @brief Holds pointers related to raw device buffer operation * @brief Holds pointers related to raw device buffer operation
* @var rawdv_buffer::rawdev_fd * @var rawdev_buffer::rawdev_fd
* File descriptor of open raw device * File descriptor of open raw device
* @var rawdev_buffer::rawdev_path * @var rawdev_buffer::rawdev_path
* A string containing full path to raw device * A string containing full path to raw device
......
/*!*************************************************************************** /** @file camogm_jpeg.c
*! FILE NAME : camogm_jpeg.c * @brief Provides writing to series of individual JPEG files for camogm
*! DESCRIPTION: Provides writing to series of individual JPEG files for camogm * @copyright Copyright (C) 2016 Elphel, Inc.
*! Copyright (C) 2007 Elphel, Inc. *
*! -----------------------------------------------------------------------------** * @par <b>License</b>
*! This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
*! it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
*! the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
*! (at your option) any later version. * (at your option) any later version.
*! * This program is distributed in the hope that it will be useful,
*! This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
*! but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details.
*! GNU General Public License for more details. * You should have received a copy of the GNU General Public License
*! * along with this program. If not, see <http://www.gnu.org/licenses/>.
*! You should have received a copy of the GNU General Public License
*! along with this program. If not, see <http://www.gnu.org/licenses/>.
*! -----------------------------------------------------------------------------**
*!
*! $Log: camogm_jpeg.c,v $
*! Revision 1.2 2009/02/25 17:50:51 spectr_rain
*! removed deprecated dependency
*!
*! Revision 1.1.1.1 2008/11/27 20:04:01 elphel
*!
*!
*! Revision 1.3 2008/04/11 23:09:33 elphel
*! modified to handle kml generation
*!
*! Revision 1.2 2007/11/19 03:23:21 elphel
*! 7.1.5.5 Added support for *.mov files in camogm.
*!
*! Revision 1.1 2007/11/16 08:49:57 elphel
*! Initial release of camogm - program to record video/image to the camera hard drive (or other storage)
*!
*/ */
/** @brief This define is needed to use lseek64 and should be set before includes */
#define _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE
//!Not all are needed, just copied from the camogm.c //!Not all are needed, just copied from the camogm.c
...@@ -58,7 +39,7 @@ ...@@ -58,7 +39,7 @@
//#include <sys/ioctl.h> //#include <sys/ioctl.h>
//#include <c313a.h> //#include <c313a.h>
#include <asm/byteorder.h> //#include <asm/byteorder.h>
//#include <ogg/ogg.h> // has to be before ogmstreams.h //#include <ogg/ogg.h> // has to be before ogmstreams.h
//#include "ogmstreams.h" // move it to <>? //#include "ogmstreams.h" // move it to <>?
...@@ -119,17 +100,6 @@ int camogm_start_jpeg(camogm_state *state) ...@@ -119,17 +100,6 @@ int camogm_start_jpeg(camogm_state *state)
return 0; return 0;
} }
void dump_chunk(struct iovec *vec)
{
unsigned char *ptr = vec->iov_base;
for (int i = 0; i < vec->iov_len; i++) {
printf("0x%02x ", ptr[i]);
if (i % 15 == 0)
printf("\n");
}
}
/** /**
* @brief Write single JPEG frame * @brief Write single JPEG frame
* *
...@@ -154,12 +124,6 @@ int camogm_frame_jpeg(camogm_state *state) ...@@ -154,12 +124,6 @@ int camogm_frame_jpeg(camogm_state *state)
chunks_iovec[i].iov_len = state->packetchunks[i + 1].bytes; chunks_iovec[i].iov_len = state->packetchunks[i + 1].bytes;
l += chunks_iovec[i].iov_len; l += chunks_iovec[i].iov_len;
} }
printf("0 chunk dump:\n");
dump_chunk(&chunks_iovec[0]);
printf("1 chunk dump\n");
dump_chunk(&chunks_iovec[1]);
sprintf(state->path, "%s%010ld_%06ld.jpeg", state->path_prefix, state->this_frame_params[port].timestamp_sec, state->this_frame_params[port].timestamp_usec); sprintf(state->path, "%s%010ld_%06ld.jpeg", state->path_prefix, state->this_frame_params[port].timestamp_sec, state->this_frame_params[port].timestamp_usec);
if (((state->ivf = open(state->path, O_RDWR | O_CREAT, 0777))) < 0) { if (((state->ivf = open(state->path, O_RDWR | O_CREAT, 0777))) < 0) {
D0(fprintf(debug_file, "Error opening %s for writing, returned %d, errno=%d\n", state->path, state->ivf, errno)); D0(fprintf(debug_file, "Error opening %s for writing, returned %d, errno=%d\n", state->path, state->ivf, errno));
......
/** @file camogm_jpeg.h
* @brief Provides writing to series of individual JPEG files for camogm
* @copyright Copyright (C) 2016 Elphel, Inc.
*
* @par <b>License</b>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _CAMOGM_JPEG_H #ifndef _CAMOGM_JPEG_H
#define _CAMOGM_JPEG_H #define _CAMOGM_JPEG_H
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @brief Provides reading data written to raw device storage and saving the data to a device with file system. * @brief Provides reading data written to raw device storage and saving the data to a device with file system.
* @copyright Copyright (C) 2016 Elphel, Inc. * @copyright Copyright (C) 2016 Elphel, Inc.
* *
* <b>License:</b> * @par <b>License</b>
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** @brief This define is needed to used lseek64 and should be set before includes */ /** @brief This define is needed to use lseek64 and should be set before includes */
#define _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE
#include <stdio.h> #include <stdio.h>
...@@ -179,10 +179,6 @@ struct tiff_hdr { ...@@ -179,10 +179,6 @@ struct tiff_hdr {
* @brief This structure holds data associated with currently opened file. * @brief This structure holds data associated with currently opened file.
* @var file_opts::fh * @var file_opts::fh
* FILE pointer * FILE pointer
* @var file_opts::path_prefix
* Contains path to currently opened file
* @var file_opts::file_name
* Contains full path to file currently opened file
* @var file_opts::file_cntr * @var file_opts::file_cntr
* Indicates the number of files read from raw storage device * Indicates the number of files read from raw storage device
* @var file_opts::file_state * @var file_opts::file_state
...@@ -251,7 +247,7 @@ static int find_marker(const unsigned char * restrict buff_ptr, ssize_t buff_sz, ...@@ -251,7 +247,7 @@ static int find_marker(const unsigned char * restrict buff_ptr, ssize_t buff_sz,
* @param[in,out] ifd a pointer to a structure which should be converted * @param[in,out] ifd a pointer to a structure which should be converted
* @return None * @return None
*/ */
void ifd_byte_order(struct ifd_entry *ifd) static void ifd_byte_order(struct ifd_entry *ifd)
{ {
unsigned long offset; unsigned long offset;
...@@ -266,10 +262,10 @@ void ifd_byte_order(struct ifd_entry *ifd) ...@@ -266,10 +262,10 @@ void ifd_byte_order(struct ifd_entry *ifd)
/** /**
* @brief Convert byte order for all fields in #tiff_hdr structure * @brief Convert byte order for all fields in #tiff_hdr structure
* @param[in,out] ifd a pointer to a structure which should be converted * @param[in,out] hdr a pointer to a structure which should be converted
* @return None * @return None
*/ */
void hdr_byte_order(struct tiff_hdr *hdr) static void hdr_byte_order(struct tiff_hdr *hdr)
{ {
hdr->byte_order = __be16_to_cpu(hdr->byte_order); hdr->byte_order = __be16_to_cpu(hdr->byte_order);
hdr->mark = __be16_to_cpu(hdr->mark); hdr->mark = __be16_to_cpu(hdr->mark);
...@@ -285,7 +281,7 @@ void hdr_byte_order(struct tiff_hdr *hdr) ...@@ -285,7 +281,7 @@ void hdr_byte_order(struct tiff_hdr *hdr)
* @param[out] buff buffer for the string * @param[out] buff buffer for the string
* @return The number of bytes placed to the read buffer * @return The number of bytes placed to the read buffer
*/ */
size_t exif_get_text(camogm_state *state, struct ifd_entry *ifd, unsigned char *buff) static size_t exif_get_text(camogm_state *state, struct ifd_entry *ifd, unsigned char *buff)
{ {
size_t j = 0; size_t j = 0;
size_t sz = ifd->len * exif_data_fmt[ifd->format]; size_t sz = ifd->len * exif_data_fmt[ifd->format];
...@@ -314,7 +310,7 @@ size_t exif_get_text(camogm_state *state, struct ifd_entry *ifd, unsigned char * ...@@ -314,7 +310,7 @@ size_t exif_get_text(camogm_state *state, struct ifd_entry *ifd, unsigned char *
* *
* where NN is PageNumber; YYYY, MM and DD are year, month and date extracted from DateTimeOriginal * where NN is PageNumber; YYYY, MM and DD are year, month and date extracted from DateTimeOriginal
* field; HH, MM and SS are hours, minutes and seconds extracted from DateTimeOriginal field; UUUUUU is us * field; HH, MM and SS are hours, minutes and seconds extracted from DateTimeOriginal field; UUUUUU is us
* value extracted from SubSecTimeOriginal field. The function assumes that <e> name buffer is big enough * value extracted from SubSecTimeOriginal field. The function assumes that @e name buffer is big enough
* to hold the file name in the format shown above including the terminating null byte. * to hold the file name in the format shown above including the terminating null byte.
* @param[in] state a pointer to a structure containing current state * @param[in] state a pointer to a structure containing current state
* @param[out] name resulting file name * @param[out] name resulting file name
...@@ -410,7 +406,6 @@ static int make_fname(camogm_state *state, char *name) ...@@ -410,7 +406,6 @@ static int make_fname(camogm_state *state, char *name)
* @brief Create new file name string and open a file * @brief Create new file name string and open a file
* @param[in] f_op pointer to a structure holding information about currently opened file * @param[in] f_op pointer to a structure holding information about currently opened file
* @return \e FILE_OK if file was successfully opened and \e FILE_OPEN_ERR otherwise * @return \e FILE_OK if file was successfully opened and \e FILE_OPEN_ERR otherwise
* @todo retrieve time stamp and use it in file name
*/ */
static int start_new_file(struct file_opts *f_op) static int start_new_file(struct file_opts *f_op)
{ {
......
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