diff --git a/mapillary_tools/video_data_extraction/extractors/gopro_parser.py b/mapillary_tools/video_data_extraction/extractors/gopro_parser.py index 77e488ad3..6fb115d5c 100644 --- a/mapillary_tools/video_data_extraction/extractors/gopro_parser.py +++ b/mapillary_tools/video_data_extraction/extractors/gopro_parser.py @@ -26,6 +26,12 @@ def extract_points(self) -> T.Sequence[geo.Point]: return [] def extract_make(self) -> T.Optional[str]: + model = self.extract_model() + if model: + return "GoPro" + + # make sure self.pointsFound is updated + _ = self.extract_points() # If no points were found, assume this is not a GoPro return "GoPro" if self.pointsFound else None diff --git a/mapillary_tools/video_data_extraction/extractors/gpx_parser.py b/mapillary_tools/video_data_extraction/extractors/gpx_parser.py index bfcdb2410..c37bee667 100644 --- a/mapillary_tools/video_data_extraction/extractors/gpx_parser.py +++ b/mapillary_tools/video_data_extraction/extractors/gpx_parser.py @@ -3,6 +3,7 @@ from ... import geo from ...geotag import geotag_images_from_gpx_file from .base_parser import BaseParser +from .generic_video_parser import GenericVideoParser class GpxParser(BaseParser): @@ -23,7 +24,9 @@ def extract_points(self) -> T.Sequence[geo.Point]: return points def extract_make(self) -> T.Optional[str]: - return None + parser = GenericVideoParser(self.videoPath, self.options, self.parserOptions) + return parser.extract_make() def extract_model(self) -> T.Optional[str]: - return None + parser = GenericVideoParser(self.videoPath, self.options, self.parserOptions) + return parser.extract_model()