Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
a2a841fa
Commit
a2a841fa
authored
Jun 02, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add PageNumber field to Exif and use it as sensor port number storage
parent
97a0469d
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
303 additions
and
269 deletions
+303
-269
exif393.c
src/drivers/elphel/exif393.c
+53
-41
sensor_common.c
src/drivers/elphel/sensor_common.c
+222
-221
c313a.h
src/include/elphel/c313a.h
+1
-1
exifa.h
src/include/elphel/exifa.h
+27
-6
No files found.
src/drivers/elphel/exif393.c
View file @
a2a841fa
...
@@ -176,12 +176,24 @@ ssize_t minor_file_size(int minor) { //return current file size for different mi
...
@@ -176,12 +176,24 @@ ssize_t minor_file_size(int minor) { //return current file size for different mi
}
}
ssize_t
minor_max_size
(
int
minor
)
{
//return max file size for different minors
ssize_t
minor_max_size
(
int
minor
)
{
//return max file size for different minors
switch
(
minor
)
{
switch
(
minor
)
{
case
X3X3_EXIF_TEMPLATE
:
return
MAX_EXIF_SIZE
;
case
X3X3_EXIF_TEMPLATE
:
case
X3X3_EXIF_EXIF
:
return
MAX_EXIF_SIZE
*
(
MAX_EXIF_FRAMES
+
1
);
return
MAX_EXIF_SIZE
;
case
X3X3_EXIF_META
:
return
MAX_EXIF_SIZE
;
case
X3X3_EXIF_EXIF_CHN_0
:
case
X3X3_EXIF_METADIR
:
return
MAX_EXIF_FIELDS
*
sizeof
(
struct
exif_dir_table_t
);
case
X3X3_EXIF_EXIF_CHN_1
:
case
X3X3_EXIF_TIME
:
return
sizeof
(
struct
exif_time_t
);
case
X3X3_EXIF_EXIF_CHN_2
:
default:
return
0
;
case
X3X3_EXIF_EXIF_CHN_3
:
return
MAX_EXIF_SIZE
*
(
MAX_EXIF_FRAMES
+
1
);
case
X3X3_EXIF_META_CHN_0
:
case
X3X3_EXIF_META_CHN_1
:
case
X3X3_EXIF_META_CHN_2
:
case
X3X3_EXIF_META_CHN_3
:
return
MAX_EXIF_SIZE
;
case
X3X3_EXIF_METADIR
:
return
MAX_EXIF_FIELDS
*
sizeof
(
struct
exif_dir_table_t
);
case
X3X3_EXIF_TIME
:
return
sizeof
(
struct
exif_time_t
);
default:
return
0
;
}
}
}
}
void
exif_invalidate
(
void
)
{
// 393: OK, only invalidates all ayt once
void
exif_invalidate
(
void
)
{
// 393: OK, only invalidates all ayt once
...
@@ -231,6 +243,7 @@ int exif_rebuild_chn(int sensor_port, int frames) {
...
@@ -231,6 +243,7 @@ int exif_rebuild_chn(int sensor_port, int frames) {
return
-
1
;
return
-
1
;
}
}
memset
(
meta_buffer
,
0
,
aexif_meta_size
[
sensor_port
]
*
(
MAX_EXIF_FRAMES
+
1
));
memset
(
meta_buffer
,
0
,
aexif_meta_size
[
sensor_port
]
*
(
MAX_EXIF_FRAMES
+
1
));
ameta_buffer
[
sensor_port
]
=
meta_buffer
;
aexif_valid
[
sensor_port
]
=
1
;
aexif_valid
[
sensor_port
]
=
1
;
return
0
;
return
0
;
}
}
...
@@ -507,7 +520,6 @@ static loff_t exif_lseek (struct file * file, loff_t offset, int orig) {
...
@@ -507,7 +520,6 @@ static loff_t exif_lseek (struct file * file, loff_t offset, int orig) {
int
maxsize
=
minor_max_size
(
p
);
int
maxsize
=
minor_max_size
(
p
);
// int sensor_port;
// int sensor_port;
int
fp
;
int
fp
;
switch
(
orig
)
{
switch
(
orig
)
{
case
SEEK_SET
:
case
SEEK_SET
:
file
->
f_pos
=
offset
;
file
->
f_pos
=
offset
;
...
...
src/drivers/elphel/sensor_common.c
View file @
a2a841fa
This diff is collapsed.
Click to expand it.
src/include/elphel/c313a.h
View file @
a2a841fa
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*/
*/
#ifndef _ASM_CMOSCAM_H
#ifndef _ASM_CMOSCAM_H
#define _ASM_CMOSCAM_H
PARS_FRAMES
#define _ASM_CMOSCAM_H
#define SAFE_CHECK 1 // perform more verification on the paremeters
#define SAFE_CHECK 1 // perform more verification on the paremeters
//#define ELPHEL_DEBUG 0 //global debug on/off in multiple files
//#define ELPHEL_DEBUG 0 //global debug on/off in multiple files
//#define ELPHEL_DEBUG_STARTUP 000a4c00 ;
//#define ELPHEL_DEBUG_STARTUP 000a4c00 ;
...
...
src/include/elphel/exifa.h
View file @
a2a841fa
...
@@ -66,6 +66,8 @@ struct exif_dir_table_t {
...
@@ -66,6 +66,8 @@ struct exif_dir_table_t {
// hack, reusing field to keep it protected
// hack, reusing field to keep it protected
#define Exif_Image_IPTCNAA 0x083bb
#define Exif_Image_IPTCNAA 0x083bb
#define Exif_Image_FrameNumber 0x083bb
#define Exif_Image_FrameNumber 0x083bb
// used for sensor number
#define Exif_Image_PageNumber 0x00129
#define Exif_Image_ExifTag 0x08769
#define Exif_Image_ExifTag 0x08769
#define Exif_Image_GPSTag 0x08825
#define Exif_Image_GPSTag 0x08825
...
@@ -178,13 +180,32 @@ struct meta_CompassInfo_t {
...
@@ -178,13 +180,32 @@ struct meta_CompassInfo_t {
#define Exif_GPSInfo_CompassRoll_Index 0x12
#define Exif_GPSInfo_CompassRoll_Index 0x12
#define Exif_Image_FrameNumber_Index 0x13
#define Exif_Image_FrameNumber_Index 0x13
#define Exif_Image_Orientation_Index 0x14
#define Exif_Image_Orientation_Index 0x14
#define Exif_Photo_MakerNote_Index 0x15
#define Exif_Image_PageNumber_Index 0x15
#define Exif_Photo_MakerNote_Index 0x16
/// update ExifKmlNumber to be total number of *_Index entries
/// update ExifKmlNumber to be total number of *_Index entries
#define ExifKmlNumber Exif_Photo_MakerNote_Index+1
#define ExifKmlNumber Exif_Photo_MakerNote_Index+1
//#define EXIF_DEV_NAME "/dev/exif_exif"
#define EXIF_DEV_NAME "/dev/exif_exif"
#define EXIFDIR_DEV_NAME "/dev/exif_metadir"
#define EXIFDIR_DEV_NAME "/dev/exif_metadir"
#define EXIFMETA_DEV_NAME "/dev/exif_meta"
//#define EXIFMETA_DEV_NAME "/dev/exif_meta"
#endif
/**
* @brief This macro is used to construct file names in user space applications. Example
* of usage: <e>const char *exif_file_names[SENSOR_PORTS] = { EXIF_DEV_NAMES };</e>. Then the
* sensor port number can be used to access file name.
*/
#define EXIF_DEV_NAMES "/dev/exif_exif0", \
"/dev/exif_exif1", \
"/dev/exif_exif2", \
"/dev/exif_exif3"
/**
* @brief This macro is used to construct file names in user space applications. Example
* of usage: <e>const char *exifmeta_file_names[SENSOR_PORTS] = { EXIFMETA_DEV_NAMES };</e>. Then
* the sensor port number can be used to access file name.
*/
#define EXIFMETA_DEV_NAMES "/dev/exif_meta0", \
"/dev/exif_meta1", \
"/dev/exif_meta2", \
"/dev/exif_meta3"
#endif
/* _ASM_EXIF_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