Tabnine Logo
HeaderPartition.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.netflix.imflibrary.st0377.HeaderPartition
constructor

Best Java code snippets using com.netflix.imflibrary.st0377.HeaderPartition.<init> (Showing top 11 results out of 315)

origin: Netflix/photon

/**
 * A method that returns an object model of the HeaderPartition in the Essence
 * @return Header partition in the essence
 * @throws IOException - any I/O related error will be exposed through an IOException
 */
public HeaderPartition getHeaderPartition() throws IOException{
  RandomIndexPack randomIndexPack = this.getRandomIndexPack();
  List<Long> allPartitionByteOffsets = randomIndexPack.getAllPartitionByteOffsets();
  long inclusiveRangeStart = allPartitionByteOffsets.get(0);
  long inclusiveRangeEnd = allPartitionByteOffsets.get(1) - 1;
  File fileWithHeaderPartition = this.resourceByteRangeProvider.getByteRange(inclusiveRangeStart, inclusiveRangeEnd, this.workingDirectory);
  ByteProvider byteProvider = this.getByteProvider(fileWithHeaderPartition);
  HeaderPartition headerPartition = new HeaderPartition(byteProvider, inclusiveRangeStart, inclusiveRangeEnd - inclusiveRangeStart + 1, this.imfErrorLogger);
  return headerPartition;
}
origin: Netflix/photon

private static Map<UUID, PayloadRecord> getTrackFileIdToHeaderPartitionPayLoadMap(List<PayloadRecord>
                                      headerPartitionPayloadRecords) throws
    IOException {
  IMFErrorLogger imfErrorLogger = new IMFErrorLoggerImpl();
  Map<UUID, PayloadRecord> trackFileIDMap = new HashMap<>();
  for (PayloadRecord payloadRecord : headerPartitionPayloadRecords) {
    if (payloadRecord.getPayloadAssetType() != PayloadRecord.PayloadAssetType.EssencePartition) {
      imfErrorLogger.addError(IMFErrorLogger.IMFErrors.ErrorCodes.IMP_VALIDATOR_PAYLOAD_ERROR,
          IMFErrorLogger.IMFErrors.ErrorLevels.FATAL,
          String.format("Payload asset type is %s, expected asset type %s", payloadRecord.getPayloadAssetType(),
              PayloadRecord.PayloadAssetType.EssencePartition.toString()));
      continue;
    }
    HeaderPartition headerPartition = new HeaderPartition(new ByteArrayDataProvider(payloadRecord.getPayload()),
      0L,
      (long) payloadRecord.getPayload().length,
      imfErrorLogger);
    Preface preface = headerPartition.getPreface();
    GenericPackage genericPackage = preface.getContentStorage().getEssenceContainerDataList().get(0).getLinkedPackage();
    SourcePackage filePackage = (SourcePackage) genericPackage;
    UUID packageUUID = filePackage.getPackageMaterialNumberasUUID();
    trackFileIDMap.put(packageUUID, payloadRecord);
  }
  return Collections.unmodifiableMap(trackFileIDMap);
}
origin: Netflix/photon

ResourceByteRangeProvider resourceByteRangeProvider = new ByteArrayByteRangeProvider(imfTrackFileMetadata.getHeaderPartition());
HeaderPartition headerPartition = new HeaderPartition(byteProvider, 0L, (long) imfTrackFileMetadata.getHeaderPartition().length, imfErrorLogger);
origin: Netflix/photon

          ()), imfErrorLogger);
HeaderPartition headerPartition = new HeaderPartition(new ByteArrayDataProvider(payloadRecord.getPayload()),
  0L,
  (long) payloadRecord.getPayload().length,
origin: Netflix/photon

          ()), imfErrorLogger);
HeaderPartition headerPartition = new HeaderPartition(new ByteArrayDataProvider(payloadRecord.getPayload()),
    0L,
    (long) payloadRecord.getPayload().length,
origin: Netflix/photon

HeaderPartition headerPartition = null;
try {
  headerPartition = new HeaderPartition(byteProvider, inclusiveRangeStart, inclusiveRangeEnd - inclusiveRangeStart + 1, imfErrorLogger);
origin: DSRCorporation/imf-conversion

private List<ErrorObject> validateMxf(File mxf) {
  return doValidate(ErrorCodes.IMF_ESSENCE_COMPONENT_ERROR,
      imfErrorLogger -> {
        PayloadRecord headerPartitionPayloadRecord = getHeaderPartition(mxf, imfErrorLogger);
        if (!imfErrorLogger.getErrors().isEmpty() || (headerPartitionPayloadRecord == null)) {
          return imfErrorLogger.getErrors();
        }
        HeaderPartition headerPartition = new HeaderPartition(
            new ByteArrayDataProvider(headerPartitionPayloadRecord.getPayload()),
            0L,
            (long) headerPartitionPayloadRecord.getPayload().length,
            imfErrorLogger);
        MXFOperationalPattern1A.HeaderPartitionOP1A headerPartitionOP1A =
            MXFOperationalPattern1A.checkOperationalPattern1ACompliance(headerPartition);
        IMFConstraints.checkIMFCompliance(headerPartitionOP1A);
        return imfErrorLogger.getErrors();
      });
}
origin: Netflix/photon

HeaderPartition headerPartition = new HeaderPartition(new ByteArrayDataProvider(payloadRecord.getPayload()),
    0L,
    (long) payloadRecord.getPayload().length,
origin: Netflix/photon

  continue;
headerPartitionTuples.add(new Composition.HeaderPartitionTuple(new HeaderPartition(new ByteArrayDataProvider(payloadRecord.getPayload()),
    0L,
    (long) payloadRecord.getPayload().length,
origin: Netflix/photon

headerPartition = new HeaderPartition(new ByteArrayDataProvider(payloadRecord.getPayload()),
  0L,
  (long)payloadRecord.getPayload().length,
origin: Netflix/photon

HeaderPartition headerPartition = new HeaderPartition(new ByteArrayDataProvider(headerPartitionPayloadRecord.getPayload()),
    0L,
    (long) headerPartitionPayloadRecord.getPayload().length,
com.netflix.imflibrary.st0377HeaderPartition<init>

Javadoc

Instantiates a new MXF Header partition.

Popular methods of HeaderPartition

  • cacheInterchangeObject
    A helper method to cache an InterchangeObject
  • constructInterchangeObject
    A factory method to reflectively construct InterchangeObject types by classname
  • constructInterchangeObjectBO
    A factory method to reflectively construct InterchangeObjectBO types by classname and argument list
  • getAudioChannelIDToMCASubDescriptorMap
    A method that returns the Channel ID to AudioChannelLabelSubDescriptor
  • getAudioChannelLabelSubDescriptors
    Gets all the audio channel label sub descriptors associated with this HeaderPartition object
  • getAudioEssenceSpokenLanguage
    A method that returns the spoken language within this essence provided it is an Audio Essence
  • getContentStorageList
    Gets all of the ContentStorage objects corresponding to this HeaderPartition object
  • getEssenceContainerDataList
    Gets all of the EssenceContainerData objects corresponding to this HeaderPartition object
  • getEssenceDescriptors
    Gets all of the EssenceDescriptor objects corresponding to this HeaderPartition object that are refe
  • getEssenceDuration
    Returns the largest duration of all the TimelineTracks within the first (in parsing order) Material
  • getEssenceTypes
    A method that retrieves all the EssenceTypes present in the MXF file
  • getImagePixelBitDepth
    A method that returns the pixel bit depth of the underlying image essence
  • getEssenceTypes,
  • getImagePixelBitDepth,
  • getInterchangeObjectBOs,
  • getInterchangeObjects,
  • getMaterialPackages,
  • getPartitionPack,
  • getPreface,
  • getPrimerPack,
  • getSoundFieldGroupLabelSubDescriptors

Popular in Java

  • Making http post requests using okhttp
  • compareTo (BigDecimal)
  • putExtra (Intent)
  • getContentResolver (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now