#!/usr/bin/env python
from setuptools import setup
setup(
  name = 'cs.iso14496',
  description = 'Facilities for ISO14496 files - the ISO Base Media File Format, the basis for several things including MP4 and MOV.',
  author = 'Cameron Simpson',
  author_email = 'cs@cskk.id.au',
  version = '20200130',
  url = 'https://bitbucket.org/cameron_simpson/css/commits/all',
  classifiers = ['Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Programming Language :: Python :: 3', 'Topic :: Multimedia :: Video', 'Operating System :: OS Independent', 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)'],
  include_package_data = True,
  install_requires = ['cs.binary', 'cs.buffer', 'cs.cmdutils', 'cs.fstags', 'cs.lex', 'cs.logutils', 'cs.pfx', 'cs.py.func', 'cs.units'],
  keywords = ['python3'],
  license = 'GNU General Public License v3 or later (GPLv3+)',
  long_description = '*Latest release 20200130*:\nParsing of ILST boxes (iTunes metadata).\nCommand line: new "info" subcommand reporting metadata, "autotag" applying metadata to fstags.\nBox tree walk, ancestor, iteration.\nAssorted cleanups and internal changes.\n\nFacilities for ISO14496 files - the ISO Base Media File Format,\nthe basis for several things including MP4 and MOV.\n\nISO make the standard available here:\n* [link](http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html)\n* [link](http://standards.iso.org/ittf/PubliclyAvailableStandards/c068960_ISO_IEC_14496-12_2015.zip)\n\n## Function `add_body_class(klass)`\n\nRegister a box body class in KNOWN_BOXBODY_CLASSES.\n\n## Function `add_body_subclass(superclass, box_type, section, desc)`\n\nCreate and register a new BoxBody class that is simply a subclass of\nanother.  Returns the new class.\n\n## Function `add_generic_sample_boxbody(box_type, section, desc, struct_format_v0, sample_fields, struct_format_v1=None, has_inferred_entry_count=False)`\n\nCreate and add a specific Time to Sample box - section 8.6.1.\n\n## Function `add_time_to_sample_boxbody(box_type, section, desc)`\n\nAdd a Time to Sample box - section 8.6.1.\n\n## Class `Box(cs.binary.Packet,cs.binary.PacketField)`\n\nBase class for all boxes - ISO14496 section 4.2.\n\nThis has the following `PacketField`s:\n* `header`: a `BoxHeader`\n* `body`: a `BoxBody` instance, usually a specific subclass\n* `unparsed`: if there are unconsumed bytes from the `Box` they\n  are stored as here as a `BytesesField`; note that this field\n  is not present if there were no unparsed bytes\n\n## Class `BoxBody(cs.binary.Packet,cs.binary.PacketField)`\n\nAbstract basis for all `Box` bodies.\n\n## Class `BoxHeader(cs.binary.Packet,cs.binary.PacketField)`\n\nAn ISO14496 Box header packet.\n\n## Class `BTRTBoxBody(BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nBitRateBoxBody - section 8.5.2.2.\n\n## Class `CO64BoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA \'c064\' Chunk Offset box - section 8.7.5.\n\n## Class `ContainerBoxBody(BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA base class for pure container boxes.\n\n## Class `CPRTBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA \'cprt\' Copyright box - section 8.10.2.\n\n## Class `CSLGBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA \'cslg\' Composition to Decode box - section 8.6.1.4.\n\n## Function `deref_box(B, path)`\n\nDereference a path with respect to this Box.\n\n## Class `DREFBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA \'dref\' Data Reference box containing Data Entry boxes - section 8.7.2.1.\n\n## Function `dump_box(B, indent=\'\', fp=None, crop_length=170, indent_incr=None)`\n\nRecursively dump a Box.\n\n## Class `ELNGBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA ELNGBoxBody is a Extended Language Tag box - ISO14496 section 8.4.6.\n\n## Class `FREEBoxBody(BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA \'free\' or \'skip\' box - ISO14496 section 8.1.2.\nNote the length and discard the data portion.\n\n## Class `FTYPBoxBody(BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nAn \'ftyp\' File Type box - ISO14496 section 4.3.\nDecode the major_brand, minor_version and compatible_brands.\n\n## Class `FullBoxBody(BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA common extension of a basic BoxBody, with a version and flags field.\nISO14496 section 4.2.\n\n## Class `HDLRBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA HDLRBoxBody is a Handler Reference box - ISO14496 section 8.4.3.\n\n## Class `ILSTBoxBody(ContainerBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\niTunes Information List, container for iTunes metadata fields.\n\nThe basis of the format knowledge here comes from AtomicParsley\'s\ndocumentation here:\n\n    http://atomicparsley.sourceforge.net/mpeg-4files.html\n\n## Function `main(argv=None)`\n\nCommand line mode.\n\n## Class `MDATBoxBody(BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA Media Data Box - ISO14496 section 8.1.1.\n\n## Class `MDHDBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA MDHDBoxBody is a Media Header box - ISO14496 section 8.4.2.\n\n## Class `METABoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA \'meta\' Meta BoxBody - section 8.11.1.\n\n## Class `MOOVBoxBody(ContainerBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nAn \'moov\' Movie box - ISO14496 section 8.2.1.\nDecode the contained boxes.\n\n## Class `MVHDBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nAn \'mvhd\' Movie Header box - ISO14496 section 8.2.2.\n\n## Class `OverBox(cs.binary.Packet,cs.binary.PacketField)`\n\nA fictitious `Box` encompassing all the Boxes in an input buffer.\n\n## Function `parse(o, **kw)`\n\nReturn the OverBoxes from source (str, int, file).\n\nThe leading `o` parameter may be one of:\n* `str`: a filesystem file pathname\n* `int`: a OS file descriptor\n* `file`: if not `int` or `str` the presumption\n  is that this is a file-like object\n\nKeyword arguments are as for `OverBox.from_buffer`.\n\n## Function `parse_buffer(bfr, copy_offsets=None, **kw)`\n\nParse an ISO14496 stream from the CornuCopyBuffer `bfr`,\nyield top level OverBoxes.\n\nParameters:\n* `bfr`: a `CornuCopyBuffer` provided the stream data,\n  preferably seekable\n* `discard_data`: whether to discard unparsed data, default `False`\n* `copy_offsets`: callable to receive Box offsets\n\n## Function `parse_chunks(chunks, **kw)`\n\nParse an ISO14496 stream from the iterator of data `chunks`,\nyield top level Boxes.\n\nParameters:\n* `chunks`: an iterator yielding bytes objects\n* `discard_data`: whether to discard unparsed data, default `False`\n* `copy_offsets`: callable to receive BoxBody offsets\n\n## Function `parse_deref_path(path, offset=0)`\n\nParse a `path` string from `offset`.\nReturn the path components and the offset where the parse stopped.\n\nPath components:\n* _identifier_: an identifier represents a Box field or if such a\n  field is not present, a the first subbox of this type\n* `[`_index_`]`: the subbox with index _index_\n\nExamples:\n\n    >>> parse_deref_path(\'.abcd[5]\')\n    [\'abcd\', 5]\n\n## Function `parse_fd(fd, discard_data=False, **kw)`\n\nParse an ISO14496 stream from the file descriptor `fd`, yield top level Boxes.\n\nParameters:\n* `fd`: a file descriptor open for read\n* `discard_data`: whether to discard unparsed data, default `False`\n* `copy_offsets`: callable to receive `BoxBody` offsets\n\n## Function `parse_file(fp, **kw)`\n\nParse an ISO14496 stream from the file `fp`, yield top level Boxes.\n\nParameters:\n* `fp`: a file open for read\n* `discard_data`: whether to discard unparsed data, default `False`\n* `copy_offsets`: callable to receive `BoxBody` offsets\n\n## Class `PDINBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nAn \'pdin\' Progressive Download Information box - ISO14496 section 8.1.3.\n\n## Function `pick_boxbody_class(box_type, default_type=None)`\n\nInfer a Python BoxBody subclass from the bytes `box_type`.\n\n* `box_type`: the 4 byte box type\n* `default_type`: the default BoxBody subclass if there is no\n  specific mapping, default None; if None, use BoxBody.\n\n## Class `SMHDBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA \'smhd\' Sound Media Headerbox - section 12.2.2.\n\n## Class `STCOBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA \'stco\' Chunk Offset box - section 8.7.5.\n\n## Class `STSCBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\n\'stsc\' (Sample Table box - section 8.7.4.1.\n\n## Class `STSZBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA \'stsz\' Sample Size box - section 8.7.3.2.\n\n## Class `STZ2BoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA \'stz2\' Compact Sample Size box - section 8.7.3.3.\n\n## Class `SubBoxesField(cs.binary.ListField,cs.binary.PacketField)`\n\nA field which is itself a list of Boxes.\n\n## Class `TimeStamp32(cs.binary.UInt32BE,cs.binary.PacketField,TimeStampMixin)`\n\nThe 32 bit form of an ISO14496 timestamp.\n\n## Class `TimeStamp64(cs.binary.UInt64BE,cs.binary.PacketField,TimeStampMixin)`\n\nThe 64 bit form of an ISO14496 timestamp.\n\n## Class `TimeStampMixin`\n\nMethods to assist with ISO14496 timestamps.\n\n## Class `TKHDBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nAn \'tkhd\' Track Header box - ISO14496 section 8.2.2.\n\n## Class `TrackGroupTypeBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA TrackGroupTypeBoxBody contains a track group id - ISO14496 section 8.3.3.2.\n\n## Class `TrackReferenceTypeBoxBody(BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA TrackReferenceTypeBoxBody contains references to other tracks - ISO14496 section 8.3.3.2.\n\n## Class `TREFBoxBody(ContainerBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nTrack Reference BoxBody, container for trackReferenceTypeBoxes - ISO14496 section 8.3.3.\n\n## Class `TTSB_Sample(builtins.tuple)`\n\nTTSB_Sample(count, delta)\n\n## Class `URL_BoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nAn \'url \' Data Entry URL BoxBody - section 8.7.2.1.\n\n## Class `URN_BoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nAn \'urn \' Data Entry URL BoxBody - section 8.7.2.1.\n\n## Class `UTF8or16Field(cs.binary.PacketField)`\n\nAn ISO14496 UTF8 or UTF16 encoded string.\n\n## Class `VMHDBoxBody(FullBoxBody,BoxBody,cs.binary.Packet,cs.binary.PacketField)`\n\nA \'vmhd\' Video Media Headerbox - section 12.1.2.\n\n\n\n# Release Log\n\n*Release 20200130*:\nParsing of ILST boxes (iTunes metadata).\nCommand line: new "info" subcommand reporting metadata, "autotag" applying metadata to fstags.\nBox tree walk, ancestor, iteration.\nAssorted cleanups and internal changes.\n\n*Release 20190220*:\nparse_buffer yields instead of returns; some small bugfixes.\n\n*Release 20180810*:\nparse_fd(): use a mmap to access the descriptor if a regular file and not discard_data;\nthis lets us use the mmapped file as backing store for the data, a big win for the media sections.\n\n*Release 20180805*:\nInitial PyPI release.',
  long_description_content_type = 'text/markdown',
  package_dir = {'': 'lib/python'},
  py_modules = ['cs.iso14496'],
)
