LCOV - code coverage report
Current view: top level - frmts/openjpeg - openjpegdataset.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 8 10 80.0 %
Date: 2024-11-21 22:18:42 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Author:   Aaron Boxer, <boxerab at protonmail dot com>
       4             :  *
       5             :  ******************************************************************************
       6             :  * Copyright (c) 2023, Grok Image Compression Inc.
       7             :  *
       8             :  * SPDX-License-Identifier: MIT
       9             :  ****************************************************************************/
      10             : 
      11             : #include "jp2opjlikedataset.h"
      12             : #include "jp2opjlikedataset.cpp"
      13             : 
      14             : #include "opjdatasetbase.h"
      15             : #include "openjpegdrivercore.h"
      16             : 
      17             : /************************************************************************/
      18             : /*                      GDALRegister_JP2OpenJPEG()                      */
      19             : /************************************************************************/
      20             : 
      21          10 : void GDALRegister_JP2OpenJPEG()
      22             : {
      23          10 :     if (!GDAL_CHECK_VERSION("JP2OpenJPEG driver"))
      24           0 :         return;
      25             : 
      26          10 :     if (GDALGetDriverByName(DRIVER_NAME) != nullptr)
      27           0 :         return;
      28             : 
      29          10 :     GDALDriver *poDriver = new GDALDriver();
      30          10 :     OPENJPEGDriverSetCommonMetadata(poDriver);
      31             : 
      32          10 :     poDriver->pfnOpen =
      33             :         JP2OPJLikeDataset<OPJCodecWrapper, JP2OPJDatasetBase>::Open;
      34          10 :     poDriver->pfnCreateCopy =
      35             :         JP2OPJLikeDataset<OPJCodecWrapper, JP2OPJDatasetBase>::CreateCopy;
      36             : 
      37          10 :     GetGDALDriverManager()->RegisterDriver(poDriver);
      38             : }

Generated by: LCOV version 1.14