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

Update doxygen documentation

parent d28b8a87
Loading
Loading
Loading
Loading
+255 −255
Original line number Diff line number Diff line
@@ -427,7 +427,7 @@ EXTRACT_PACKAGE = NO
# included in the documentation.
# The default value is: NO.

EXTRACT_STATIC         = NO
EXTRACT_STATIC = YES

# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
# locally in source files will be included in the documentation. If set to NO,
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@
/**
 * @struct rawdev_buffer
 * @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
 * @var rawdev_buffer::rawdev_path
 * A string containing full path to raw device
+17 −53
Original line number Diff line number Diff line
/*!***************************************************************************
   *! FILE NAME  : camogm_jpeg.c
   *! DESCRIPTION: Provides writing to series of individual JPEG files for camogm
   *! Copyright (C) 2007 Elphel, Inc.
   *! -----------------------------------------------------------------------------**
   *!  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/>.
   *! -----------------------------------------------------------------------------**
   *!
   *!  $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)
   *!
/** @file camogm_jpeg.c
 * @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/>.
 */

/** @brief This define is needed to use lseek64 and should be set before includes */
#define _LARGEFILE64_SOURCE

//!Not all are needed, just copied from the camogm.c
@@ -58,7 +39,7 @@
//#include <sys/ioctl.h>

//#include <c313a.h>
#include <asm/byteorder.h>
//#include <asm/byteorder.h>

//#include <ogg/ogg.h>    // has to be before ogmstreams.h
//#include "ogmstreams.h" // move it to <>?
@@ -119,17 +100,6 @@ int camogm_start_jpeg(camogm_state *state)
	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
 *
@@ -154,12 +124,6 @@ int camogm_frame_jpeg(camogm_state *state)
			chunks_iovec[i].iov_len = state->packetchunks[i + 1].bytes;
			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);
		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));
+17 −0
Original line number Diff line number Diff line
/** @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
#define _CAMOGM_JPEG_H

+7 −12
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 * @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.
 *
 * <b>License:</b>
 * @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
@@ -15,7 +15,7 @@
 * 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

#include <stdio.h>
@@ -179,10 +179,6 @@ struct tiff_hdr {
 * @brief This structure holds data associated with currently opened file.
 * @var file_opts::fh
 * 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
 * Indicates the number of files read from raw storage device
 * @var file_opts::file_state
@@ -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
 * @return        None
 */
void ifd_byte_order(struct ifd_entry *ifd)
static void ifd_byte_order(struct ifd_entry *ifd)
{
	unsigned long offset;

@@ -266,10 +262,10 @@ void ifd_byte_order(struct ifd_entry *ifd)

/**
 * @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
 */
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->mark = __be16_to_cpu(hdr->mark);
@@ -285,7 +281,7 @@ void hdr_byte_order(struct tiff_hdr *hdr)
 * @param[out]  buff    buffer for the string
 * @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 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 *
 *
 * 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
 * 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.
 * @param[in]   state   a pointer to a structure containing current state
 * @param[out]  name    resulting file name
@@ -410,7 +406,6 @@ static int make_fname(camogm_state *state, char *name)
 * @brief Create new file name string and open a 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
 * @todo retrieve time stamp and use it in file name
 */
static int start_new_file(struct file_opts *f_op)
{