git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorSweidan Omar <TFS\sweidan.omar>
Mon, 6 Dec 2021 12:23:13 +0000 (12:23 +0000)
committerSweidan Omar <TFS\sweidan.omar>
Mon, 6 Dec 2021 12:23:13 +0000 (12:23 +0000)
server/user.jobengine.osgi.commons/src/user/commons/nexio/api/ClipImpl.java

index 295b9730880cf6ab11ebf87e24603af3c53ddb91..5cec800b8cc73c2d6f9a98d062d61cef217be397 100644 (file)
@@ -3,16 +3,13 @@ package user.commons.nexio.api;
 import java.io.IOException;
 import java.util.Calendar;
 
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
 import user.commons.nexio.server.protocol.Id;
 import user.commons.nexio.server.protocol.NexioServerProtocol;
 import user.commons.nexio.server.protocol.ProtocolException;
 import user.commons.nexio.server.protocol.Xid;
 
 class ClipImpl implements Clip {
-       private static final Logger logger = LogManager.getLogger();
+//     private static final Logger logger = LogManager.getLogger();
        private static final String PROTOCOL = "protocol";
        private static final String ID = "id";
        private static final String XID = "xid";
@@ -66,7 +63,8 @@ class ClipImpl implements Clip {
                        metadata = protocol.executeGetIDMetadata(id);
                        checkClipExists(metadata);
                }
-               //return metadata[16] + (metadata[17] << 8) + (metadata[18] << 16) + (metadata[19] << 24);
+               // return metadata[16] + (metadata[17] << 8) + (metadata[18] << 16) +
+               // (metadata[19] << 24);
                return metadata[19] << 24 | (metadata[18] & 0xFF) << 16 | (metadata[17] & 0xFF) << 8 | (metadata[16] & 0xFF);
        }
 
@@ -102,12 +100,14 @@ class ClipImpl implements Clip {
                data <<= 8;
                data |= (dtArray[1] & 0xFF);
 
-               //logger.info("--- {}  .. {}", NexioClipEventDispatcher.bytesToBin(dtArray), NexioClipEventDispatcher.longToStr(data));
+               // logger.info("--- {} .. {}", NexioClipEventDispatcher.bytesToBin(dtArray),
+               // NexioClipEventDispatcher.longToStr(data));
 
                int day = (int) (data >> 11);
                int month = (int) ((data & 0x7FF) >> 7);
                int year = 1900 + (int) (data & 0x7F);
-               //System.out.println(String.format("day %s month %s year %s", day, month, year));
+               // System.out.println(String.format("day %s month %s year %s", day, month,
+               // year));
                result.set(Calendar.YEAR, year);
                result.set(Calendar.MONTH, month - 1);
                result.set(Calendar.DAY_OF_MONTH, day);
@@ -148,24 +148,29 @@ class ClipImpl implements Clip {
                        metadata = protocol.executeGetIDMetadata(id);
                        checkClipExists(metadata);
                }
-               //Exact report of the compressed bit rate of the video portion of the clip.
-               //The 2 bytes are returned LSB first. This information replaces information provided
-               //in Data #11 as of the NEXIO 6.0 Software Release
+               // Exact report of the compressed bit rate of the video portion of the clip.
+               // The 2 bytes are returned LSB first. This information replaces information
+               // provided
+               // in Data #11 as of the NEXIO 6.0 Software Release
                ret = metadata[20] + (metadata[21] << 8);
                if (ret == 0) {
-                       //Use the information in this field only if the Exact Video Bit Rate = 0 (Data #20-21).
-                       //It reports the compressed bit rate of the video portion of the clip.
-                       //See note below for interpreting values >50 Mb/s.
+                       // Use the information in this field only if the Exact Video Bit Rate = 0 (Data
+                       // #20-21).
+                       // It reports the compressed bit rate of the video portion of the clip.
+                       // See note below for interpreting values >50 Mb/s.
                        ret = metadata[11];
                }
                return ret;
        }
 
        /**
-        * @return 0x00 Not supported 0x01 Not supported 0x02 MPEG2 4:2:0 0x03 MPEG2 4:2:2 0x04 DVCAM version of DV25 0x05 DVCPRO version of DV25 0x06 DV50, DVCPRO
-        *         HD, or DNxHD 0x07 Uncompressed KRGB 8 bits 0x08 Uncompressed K 16 bits 0x09 IMX (MPEG 4:2:2), CBG (constrained bytes per GOP) 0x0A H.264 4:2:0
-        *         0x0B H.264 4:2:2 0x0C H.264 4:2:0 CBG (e.g. AVC-Intra class 50) 0x0D H.264 4:2:2 CBG (e.g. AVC-Intra class 100) 0x0E Reserved 0x0F Audio-only (no
-        *         video)
+        * @return 0x00 Not supported 0x01 Not supported 0x02 MPEG2 4:2:0 0x03 MPEG2
+        *         4:2:2 0x04 DVCAM version of DV25 0x05 DVCPRO version of DV25 0x06
+        *         DV50, DVCPRO HD, or DNxHD 0x07 Uncompressed KRGB 8 bits 0x08
+        *         Uncompressed K 16 bits 0x09 IMX (MPEG 4:2:2), CBG (constrained bytes
+        *         per GOP) 0x0A H.264 4:2:0 0x0B H.264 4:2:2 0x0C H.264 4:2:0 CBG (e.g.
+        *         AVC-Intra class 50) 0x0D H.264 4:2:2 CBG (e.g. AVC-Intra class 100)
+        *         0x0E Reserved 0x0F Audio-only (no video)
         */
        @Override
        public int getVideoFormat() throws ClipNotFoundException, IOException, ProtocolException {