[vlc-commits] atsc_a65: add gps time to epoch helper

Francois Cartegnie git at videolan.org
Wed Feb 10 10:38:55 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Feb  5 14:56:13 2016 +0100| [910e577de179cd58b37dce056d644e2e02520838] | committer: Francois Cartegnie

atsc_a65: add gps time to epoch helper

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=910e577de179cd58b37dce056d644e2e02520838
---

 modules/codec/atsc_a65.h |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/codec/atsc_a65.h b/modules/codec/atsc_a65.h
index c4866f8..828c106 100644
--- a/modules/codec/atsc_a65.h
+++ b/modules/codec/atsc_a65.h
@@ -19,6 +19,8 @@
 #ifndef VLC_ATSC_A65_H
 #define VLC_ATSC_A65_H
 
+#define GPS_UTC_EPOCH_OFFSET 315964800
+
 typedef struct atsc_a65_handle_t atsc_a65_handle_t;
 
 atsc_a65_handle_t *atsc_a65_handle_New( const char *psz_lang );
@@ -26,4 +28,9 @@ void atsc_a65_handle_Release( atsc_a65_handle_t * );
 
 char * atsc_a65_Decode_multiple_string( atsc_a65_handle_t *, const uint8_t *, size_t );
 
+static inline time_t atsc_a65_GPSTimeToEpoch( time_t i_seconds, time_t i_gpstoepoch_leaptime_offset )
+{
+    return i_seconds + GPS_UTC_EPOCH_OFFSET - i_gpstoepoch_leaptime_offset;
+}
+
 #endif



More information about the vlc-commits mailing list