├── Android.mk ├── Application.mk ├── CHANGES.logging ├── COPYING ├── GNUmakefile.am ├── INSTALL ├── README.md ├── configure.ac ├── doc ├── GNUmakefile.mk ├── MP4.3 ├── MP4AddRtpESConfigurationPacket.3 ├── MP4AddRtpHint.3 ├── MP4AddRtpImmediateData.3 ├── MP4AddRtpPacket.3 ├── MP4AddRtpSampleData.3 ├── MP4AddRtpVideoHint.3 ├── MP4AddTrackEdit.3 ├── MP4AppendHintTrackSdp.3 ├── MP4AppendSessionSdp.3 ├── MP4BinaryToBase16.3 ├── MP4BinaryToBase64.3 ├── MP4CloneTrack.3 ├── MP4ConvertFromMovieDuration.3 ├── MP4ConvertFromTrackTimestamp.3 ├── MP4ConvertToTrackTimestamp.3 ├── MP4CopyTrack.3 ├── MP4DeleteTrack.3 ├── MP4DeleteTrackEdit.3 ├── MP4FindTrackId.3 ├── MP4FindTrackIndex.3 ├── MP4GetAudioProfileLevel.3 ├── MP4GetDuration.3 ├── MP4GetGraphicsProfileLevel.3 ├── MP4GetHintTrackReferenceTrackId.3 ├── MP4GetHintTrackRtpPayload.3 ├── MP4GetHintTrackSdp.3 ├── MP4GetNumberOfTracks.3 ├── MP4GetODProfileLevel.3 ├── MP4GetRtpHintNumberOfPackets.3 ├── MP4GetRtpPacketBFrame.3 ├── MP4GetRtpPacketTransmitOffset.3 ├── MP4GetRtpTimestampStart.3 ├── MP4GetSampleIdFromEditTime.3 ├── MP4GetSceneProfileLevel.3 ├── MP4GetSessionSdp.3 ├── MP4GetTrackAudioMpeg4Type.3 ├── MP4GetTrackAudioType.3 ├── MP4GetTrackBitRate.3 ├── MP4GetTrackDuration.3 ├── MP4GetTrackESConfiguration.3 ├── MP4GetTrackEditDuration.3 ├── MP4GetTrackEditDwell.3 ├── MP4GetTrackEditMediaStart.3 ├── MP4GetTrackEditStart.3 ├── MP4GetTrackEditTotalDuration.3 ├── MP4GetTrackFixedSampleDuration.3 ├── MP4GetTrackNumberOfEdits.3 ├── MP4GetTrackNumberOfSamples.3 ├── MP4GetTrackVideoFrameRate.3 ├── MP4GetTrackVideoHeight.3 ├── MP4GetTrackVideoType.3 ├── MP4GetTrackVideoWidth.3 ├── MP4GetVideoProfileLevel.3 ├── MP4MakeIsmaCompliant.3 ├── MP4ReadRtpHint.3 ├── MP4ReadRtpPacket.3 ├── MP4ReadSampleFromEditTime.3 ├── MP4SetAudioProfileLevel.3 ├── MP4SetGraphicsProfileLevel.3 ├── MP4SetHintTrackRtpPayload.3 ├── MP4SetHintTrackSdp.3 ├── MP4SetODProfileLevel.3 ├── MP4SetRtpTimestampStart.3 ├── MP4SetSceneProfileLevel.3 ├── MP4SetSessionSdp.3 ├── MP4SetTrackESConfiguration.3 ├── MP4SetTrackEditDuration.3 ├── MP4SetTrackEditDwell.3 ├── MP4SetTrackEditMediaStart.3 ├── MP4SetVideoProfileLevel.3 ├── MP4WriteRtpHint.3 ├── doxygen │ ├── Doxyfile.m4 │ ├── banner.png │ ├── footer.html.m4 │ ├── header.html.m4 │ ├── mainpage.h │ └── project.css ├── html │ ├── banner.png │ ├── footer.html.m4 │ ├── header.html.m4 │ └── project.css └── texi │ ├── Authors.texi │ ├── BuildRepository.texi │ ├── BuildSource.texi │ ├── Documentation.texi │ ├── ReleaseNotes.texi │ ├── ToolGuide.texi │ ├── base │ ├── article.texi │ ├── glossary.texi │ ├── guide.texi │ └── project.texi.m4 │ ├── build │ ├── commands.texi │ ├── overview.texi │ ├── platform.common.bundled.texi │ ├── platform.common.conf.bi.texi │ ├── platform.common.conf.default.texi │ ├── platform.cygwin.texi │ ├── platform.freebsd.texi │ ├── platform.linux.texi │ ├── platform.osx.texi │ ├── platform.solaris.texi │ ├── platform.windows.texi │ ├── platforms.texi │ ├── process.bootstrap.texi │ ├── process.build.texi │ ├── process.checkout.texi │ ├── process.configure.texi │ ├── process.dist.texi │ ├── process.doc.texi │ ├── process.extract.texi │ ├── process.google.texi │ └── process.install.texi │ ├── changelog │ ├── version-1.6.texi │ ├── version-1.9.texi │ └── version-2.0.texi │ ├── releasenotes │ ├── intro.developer.texi │ └── intro.stable.texi │ └── tool │ ├── mp4art.texi │ ├── mp4file.texi │ └── mp4track.texi ├── example ├── itmf │ ├── generic.c │ └── tags.c └── provider │ └── provider.c ├── include └── mp4v2 │ ├── chapter.h │ ├── file.h │ ├── file_prop.h │ ├── general.h │ ├── isma.h │ ├── itmf_generic.h │ ├── itmf_tags.h │ ├── mp4v2.h │ ├── platform.h │ ├── project.h.in │ ├── sample.h │ ├── streaming.h │ ├── track.h │ └── track_prop.h ├── libplatform ├── config.h ├── config.h.in ├── endian.h ├── impl.h ├── io │ ├── File.cpp │ ├── File.h │ ├── FileSystem.cpp │ ├── FileSystem.h │ ├── FileSystem_posix.cpp │ ├── FileSystem_win32.cpp │ ├── File_posix.cpp │ └── File_win32.cpp ├── number │ ├── random.h │ ├── random_posix.cpp │ └── random_win32.cpp ├── platform.h ├── platform_base.h ├── platform_posix.h ├── platform_win32.cpp ├── platform_win32.h ├── platform_win32_impl.h ├── process │ ├── process.h │ ├── process_posix.cpp │ └── process_win32.cpp ├── prog │ ├── option.cpp │ └── option.h ├── sys │ ├── error.cpp │ └── error.h ├── time │ ├── time.cpp │ ├── time.h │ ├── time_posix.cpp │ └── time_win32.cpp └── warning.h ├── libutil ├── Database.cpp ├── Database.h ├── Timecode.cpp ├── Timecode.h ├── TrackModifier.cpp ├── TrackModifier.h ├── Utility.cpp ├── Utility.h ├── crc.cpp ├── crc.h ├── impl.h ├── other.cpp ├── other.h └── util.h ├── maintainer ├── HOWTO-ADD_SOURCE.txt ├── HOWTO-AUTOTOOLS.txt ├── HOWTO-RELEASE.txt ├── HOWTO-TEST.txt ├── INTERNALS.txt ├── LIBPLATFORM.txt ├── NAMESPACES.txt └── SOURCE.txt ├── project ├── htmlcombine.py ├── project.m4.in ├── project.m4sugar └── xml2wiki.py ├── src ├── 3gp.cpp ├── atom_ac3.cpp ├── atom_amr.cpp ├── atom_avc1.cpp ├── atom_avcC.cpp ├── atom_chpl.cpp ├── atom_colr.cpp ├── atom_d263.cpp ├── atom_dac3.cpp ├── atom_damr.cpp ├── atom_dref.cpp ├── atom_elst.cpp ├── atom_enca.cpp ├── atom_encv.cpp ├── atom_free.cpp ├── atom_ftab.cpp ├── atom_ftyp.cpp ├── atom_gmin.cpp ├── atom_hdlr.cpp ├── atom_hinf.cpp ├── atom_hnti.cpp ├── atom_href.cpp ├── atom_mdat.cpp ├── atom_mdhd.cpp ├── atom_meta.cpp ├── atom_mp4s.cpp ├── atom_mp4v.cpp ├── atom_mvhd.cpp ├── atom_nmhd.cpp ├── atom_ohdr.cpp ├── atom_pasp.cpp ├── atom_root.cpp ├── atom_rtp.cpp ├── atom_s263.cpp ├── atom_sdp.cpp ├── atom_sdtp.cpp ├── atom_smi.cpp ├── atom_sound.cpp ├── atom_standard.cpp ├── atom_stbl.cpp ├── atom_stdp.cpp ├── atom_stsc.cpp ├── atom_stsd.cpp ├── atom_stsz.cpp ├── atom_stz2.cpp ├── atom_text.cpp ├── atom_tfhd.cpp ├── atom_tkhd.cpp ├── atom_treftype.cpp ├── atom_trun.cpp ├── atom_tx3g.cpp ├── atom_udta.cpp ├── atom_url.cpp ├── atom_urn.cpp ├── atom_uuid.cpp ├── atom_video.cpp ├── atom_vmhd.cpp ├── atoms.h ├── bmff │ ├── bmff.h │ ├── impl.h │ ├── typebmff.cpp │ └── typebmff.h ├── cmeta.cpp ├── descriptors.cpp ├── descriptors.h ├── enum.h ├── enum.tcc ├── exception.cpp ├── exception.h ├── impl.h ├── isma.cpp ├── itmf │ ├── CoverArtBox.cpp │ ├── CoverArtBox.h │ ├── Tags.cpp │ ├── Tags.h │ ├── generic.cpp │ ├── generic.h │ ├── impl.h │ ├── itmf.h │ ├── type.cpp │ └── type.h ├── log.cpp ├── log.h ├── mp4.cpp ├── mp4array.h ├── mp4atom.cpp ├── mp4atom.h ├── mp4container.cpp ├── mp4container.h ├── mp4descriptor.cpp ├── mp4descriptor.h ├── mp4file.cpp ├── mp4file.h ├── mp4file_io.cpp ├── mp4info.cpp ├── mp4property.cpp ├── mp4property.h ├── mp4track.cpp ├── mp4track.h ├── mp4util.cpp ├── mp4util.h ├── ocidescriptors.cpp ├── ocidescriptors.h ├── odcommands.cpp ├── odcommands.h ├── qosqualifiers.cpp ├── qosqualifiers.h ├── qtff │ ├── ColorParameterBox.cpp │ ├── ColorParameterBox.h │ ├── PictureAspectRatioBox.cpp │ ├── PictureAspectRatioBox.h │ ├── coding.cpp │ ├── coding.h │ ├── impl.h │ └── qtff.h ├── rtphint.cpp ├── rtphint.h ├── src.h ├── text.cpp ├── text.h └── util.h ├── test └── OLD │ ├── c_api.c │ ├── mp4clip.cpp │ ├── nullcreate.cpp │ ├── nullvplayer.cpp │ └── urltrack.cpp ├── testsuite ├── config │ └── unix.exp ├── lib │ └── command.exp └── main │ └── standardUsage.exp ├── util ├── impl.h ├── mp4art.cpp ├── mp4chaps.cpp ├── mp4extract.cpp ├── mp4file.cpp ├── mp4info.cpp ├── mp4subtitle.cpp ├── mp4tags.cpp ├── mp4track.cpp └── mp4trackdump.cpp └── vstudio9.0 ├── include └── mp4v2 │ └── project.h ├── libmp4v2 ├── Version.rc └── libmp4v2.vcproj ├── mp4art └── mp4art.vcproj ├── mp4chaps └── mp4chaps.vcproj ├── mp4extract └── mp4extract.vcproj ├── mp4file └── mp4file.vcproj ├── mp4info └── mp4info.vcproj ├── mp4subtitle └── mp4subtitle.vcproj ├── mp4tags └── mp4tags.vcproj ├── mp4track └── mp4track.vcproj ├── mp4trackdump └── mp4trackdump.vcproj └── mp4v2.sln /Application.mk: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------- 2 | # Author: momo0853@live.com 3 | # Time : 2016年 04月 20日 星期三 17:43:07 CST 4 | #---------------------------------------------------- 5 | 6 | # This is an automatically generated file, in order to reduce repetitive work. 7 | # Android.mk: For more details, please see "http://developer.android.com/ndk/guides/android_mk.html". 8 | # Application.mk: For more details, please see "http://developer.android.com/ndk/guides/application_mk.html". 9 | # Can identify the suffix for .c .cc .cpp and .a .so. 10 | 11 | NDK_TOOLCHAIN_VERSION :=#(4.6 4.8 4.9) 12 | APP_BUILD_SCRIPT := Android.mk 13 | APP_ABI := armeabi-v7a#(32_bit(armeabi armeabi-v7a x86 mips), 64_bit(arm64-v8a x86_64 mips64)) 14 | APP_PLATFORM := android-21# "5.0" (3~21) 15 | APP_STL := gnustl_static#(system stlport_static stlport_shared gnustl_static gnustl_shared \ 16 | gabi++_static gabi++_shared c++_static c++_shared) 17 | APP_OPTIM := release#(release debug) 18 | APP_PIE := true 19 | 20 | APP_MODULES := 21 | APP_CFLAGS := 22 | APP_CPPFLAGS := 23 | APP_ASMFLAGS := 24 | APP_CONLYFLAGS := 25 | APP_SHORT_COMMANDS := 26 | APP_THIN_ARCHIVE := false #(false true) merit :generate a thin archive; \ 27 | drawback:such libraries cannot be moved to a different location 28 | APP_PROJECT_PATH := 29 | APP_LDFLAGS := 30 | 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | All docs are located in doc/ subdirectory. Useful starting points: 2 | 3 | ``` 4 | Release Notes -- doc/ReleaseNotes.txt 5 | Building the Source -- doc/BuildSource.txt 6 | Building the Repository -- doc/BuildRepository.txt 7 | ``` 8 | 9 | --- 10 | 11 | - 添加Android平台的Android.mk和Application.mk 12 | - 添加Android平台的配置文件config.h 13 | 14 | -------------------------------------------------------------------------------- /doc/MP4AddRtpESConfigurationPacket.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4AddRtpESConfigurationPacket\fR \- Add ES configuration information to an RTP hint 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4AddRtpESConfigurationPacket\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ); 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the hint track to which the operation applies. 24 | 25 | .SH "RETURN VALUES" 26 | .LP 27 | Upon success, true (1). Upon an error, false (0). 28 | .SH "DESCRIPTION" 29 | .LP 30 | \fBMP4AddRtpESConfigurationPacket\fR adds a packet to the current RTP hint that contains a copy of the elementary stream configuration information of the reference media track. Some RTP payloads require this information to be transmitted at the start of streaming or periodically during streaming. 31 | .SH "SEE ALSO" 32 | .LP 33 | MP4(3) MP4SetTrackESConfiguration(3) 34 | -------------------------------------------------------------------------------- /doc/MP4AddRtpHint.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4AddRtpHint\fR \- Add an RTP hint 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4AddRtpHint\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ); 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the hint track to which the operation applies. 24 | 25 | .SH "RETURN VALUES" 26 | .LP 27 | Upon success, true (1). Upon an error, false (0). 28 | .SH "DESCRIPTION" 29 | .LP 30 | \fBMP4AddRtpHint\fR creates a new hint sample for the specified hint track and enables subsequent calls to MP4AddRtpPacket() to create the RTP packets associated with this hint. After all the RTP packets for the hint have been created, MP4WriteRtpHint() should be called to write the hint to the track. 31 | .SH "SEE ALSO" 32 | .LP 33 | MP4(3) MP4AddRtpPacket(3) MP4WriteRtpHint (3) 34 | -------------------------------------------------------------------------------- /doc/MP4AddRtpImmediateData.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4AddRtpImmediateData\fR \- Add immediate data to an RTP packet 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4AddRtpImmediateData\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fIhintTrackId\fP, 14 | .br 15 | u_int8_t* \fIpBytes\fP, 16 | .br 17 | u_int32_t \fInumBytes\fP 18 | .br 19 | ); 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fIhintTrackId\fP 27 | Specifies the hint track to which the operation applies. 28 | .TP 29 | \fIpBytes\fP 30 | Specifies a pointer to the immediate data that should be included in the current RTP packet. 31 | .TP 32 | \fInumBytes\fP 33 | Specifies the length in bytes of the immediate data that should be included in the current RTP packet. 34 | .SH "RETURN VALUES" 35 | .LP 36 | Upon success, true (1). Upon an error, false (0). 37 | .SH "DESCRIPTION" 38 | .LP 39 | \fBMP4AddRtpImmediateData\fR adds immediate data to the current pending RTP packet. Typically, this is used to add RTP payload specific headers to RTP packets. Note that the size of a block of immediate data is limited to 14 bytes. But multiple immediate data blocks can be added if more space is needed. 40 | .SH "SEE ALSO" 41 | .LP 42 | MP4(3) MP4AddRtpPacket (3) MP4AddRtpImmediateData (3) 43 | -------------------------------------------------------------------------------- /doc/MP4AddRtpPacket.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4AddRtpPacket\fR \- Add an RTP packet 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4AddRtpPacket\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | bool setMBit = false, 16 | .br 17 | int32 transmitOffset = 0 18 | .br 19 | ); 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fItrackId\fP 27 | Specifies the hint track to which the operation applies. 28 | .TP 29 | \fIsetMBit\fP 30 | Specifies the value of the RTP packet header marker bit for this packet. The value depends on the rules of the RTP payload used for this hint track. 31 | .TP 32 | \fItransmitOffset\fP 33 | Specifies an offset to apply to the normal transmission time of this packet. The purpose of this offset is to allow smoothing of packet transmission over the duration of the hint. 34 | .SH "RETURN VALUES" 35 | .LP 36 | Upon success, true (1). Upon an error, false (0). 37 | .SH "DESCRIPTION" 38 | .LP 39 | \fBMP4AddRtpPacket\fR creates a new RTP packet for the currently pending RTP hint sample for the specified hint track. It also enables subsequent calls to MP4AddRtpImmediateData() and MP4AddRtpSampleData to add data to the RTP packets. After all the RTP packets for the hint have been created, MP4WriteRtpHint() should be called to write the hint to the track. 40 | .SH "SEE ALSO" 41 | .LP 42 | MP4(3) MP4AddRtpHint(3) MP4AddRtpImmediateData (3) MP4AddRtpSampleData (3) MP4WriteRtpHint (3) 43 | -------------------------------------------------------------------------------- /doc/MP4AddRtpSampleData.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4AddRtpSampleData\fR \- Add media sample data to an RTP packet 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4AddRtpSampleData\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fIhintTrackId\fP, 14 | .br 15 | MP4SampleId \fIsampleId\fP, 16 | .br 17 | u_int32_t \fIdataOffset\fP, 18 | .br 19 | u_int32_t \fIdataLength\fP 20 | .br 21 | ); 22 | .SH "ARGUMENTS" 23 | .LP 24 | .TP 25 | \fIhFile\fP 26 | Specifies the mp4 file to which the operation applies. 27 | .TP 28 | \fIhintTrackId\fP 29 | Specifies the hint track to which the operation applies. 30 | .TP 31 | \fIsampleId\fP 32 | Specifies the reference media sample id from which the media data should be taken. 33 | .TP 34 | \fIdataOffset\fP 35 | Specifies the byte offset in the specified media sample where data should be taken from for the current RTP packet. 36 | .TP 37 | \fIdataLength\fP 38 | Specifies the length in bytes of the media data that should be included in the current RTP packet. 39 | .SH "RETURN VALUES" 40 | .LP 41 | Upon success, true (1). Upon an error, false (0). 42 | .SH "DESCRIPTION" 43 | .LP 44 | \fBMP4AddRtpSampleData\fR adds a reference in the current pending RTP packet to the media data in the specified media sample of the reference media track. Note this is a reference, not a copy, of the media data. 45 | .SH "SEE ALSO" 46 | .LP 47 | MP4(3) MP4AddRtpPacket (3) MP4AddRtpImmediateData (3) 48 | -------------------------------------------------------------------------------- /doc/MP4AddRtpVideoHint.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4AddRtpVideoHint\fR \- Add an RTP video specific hint 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4AddRtpVideoHint\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | bool \fIisBFrame\fP = false, 16 | .br 17 | u_int32_t \fItimestampOffset\fP = 0 18 | .br 19 | ); 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fItrackId\fP 27 | Specifies the hint track to which the operation applies. 28 | .TP 29 | \fIisBFrame\fP 30 | Specifies if this hint will contain packets for a video B frame 31 | .TP 32 | \fItimestampOffset\fP 33 | Specifies a positive offset to add to the RTP timestamp for this hint. Caveat: the value is in the hint track timescale. 34 | .SH "RETURN VALUES" 35 | .LP 36 | Upon success, true (1). Upon an error, false (0). 37 | .SH "DESCRIPTION" 38 | .LP 39 | \fBMP4AddRtpVideoHint\fR is an extended version of MP4AddRtpHint specifically to handle MPEG video frames. 40 | .LP 41 | The isBFrame parameter allows the packets in the RTP hint to be marked as belonging to a video B frame. This can be useful to a streaming server if packets must be dropped due to system load or network congestion. No other video frames are dependent on the contents of B frames, so they are least damaging type of frames to drop. 42 | .LP 43 | The timestampOffset parameter allows an offset to be added to the RTP timestamp of the packets in the RTP hint. This is necessary for MPEG video that contains B frames since the video frames are transmitted out of order with respect to when they should be rendered. I.e I and P frames are transmitted before any B frames that depend on them. The RTP timestamp must represent the rendering time of the data in the packets hence an offset must be added. 44 | .LP 45 | Note: The timestampOffset is equivalent to the sample rendering offset of a video media track. See MP4GetSampleRenderingOffset(). 46 | 47 | .SH "SEE ALSO" 48 | .LP 49 | MP4(3) MP4AddRtpHint(3) MP4AddRtpPacket(3) MP4WriteRtpHint (3) 50 | -------------------------------------------------------------------------------- /doc/MP4AppendHintTrackSdp.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4AppendHintTrackSdp\fR \- Add to the SDP media level description of the hint track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4AppendHintTrackSdp\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | const char* sdpString 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fIsdpString\fP 23 | Specifies the addition to the hint track sdp string. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, true (1). Upon an error, false (0). 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4AppendHintTrackSdp\fR appends the specified string to the SDP (IETF RFC 2327) media level fragment for the hint track. This is used by a streaming server to create a complete SDP description of the multimedia session represented by the file. 30 | 31 | .SH "SEE ALSO" 32 | .LP 33 | MP4(3) MP4GetHintTrackSdp(3) MP4SetHintTrackSdp(3) 34 | -------------------------------------------------------------------------------- /doc/MP4AppendSessionSdp.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4AppendSessionSdp\fR \- Add to the SDP session level description of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4AppendSessionSdp\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | const char* sdpString 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fIsdpString\fP 23 | Specifies the addition to the session sdp string. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, true (1). Upon an error, false (0). 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4AppendSessionSdp\fR appends the specified string to the SDP (IETF RFC 2327) session level fragment for the file. This is used by a streaming server to create a complete SDP description of the multimedia session represented by the file. 30 | 31 | .SH "SEE ALSO" 32 | .LP 33 | MP4(3) MP4GetSessionSdp(3) MP4SetSessionSdp(3) 34 | -------------------------------------------------------------------------------- /doc/MP4BinaryToBase16.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4BinaryToBase16\fR \- Convert binary data to a base 16 string 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | char* \fBMP4BinaryToBase16\fR( 10 | .br 11 | const u_int8_t* \fIpData\fP, 12 | .br 13 | u_int32_t \fIdataSize\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIpData\fP 20 | Specifies the pointer to the binary data. 21 | .TP 22 | \fIdataSize\fP 23 | Specifies the size in bytes of the binary data. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, a null terminated string representing the data in base 16. Upon error, NULL. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4BinaryToBase16\fR converts binary data to a base 16 string. This encoding maps groups of 4 bits into the character set [0\-9a\-f]. The string is in malloc'd memory, so the caller is responsible for free'ing the memory. 30 | .LP 31 | This utility is useful for generating the SDP descriptions for some RTP payloads. 32 | .LP 33 | Example: 34 | 0x12, 0xAB \-> "12ab" 35 | .SH "SEE ALSO" 36 | .LP 37 | MP4(3) 38 | -------------------------------------------------------------------------------- /doc/MP4BinaryToBase64.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4BinaryToBase64\fR \- Convert binary data to a base 64 string 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | char* \fBMP4BinaryToBase64\fR( 10 | .br 11 | const u_int8_t* \fIpData\fP, 12 | .br 13 | u_int32_t \fIdataSize\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIpData\fP 20 | Specifies the pointer to the binary data. 21 | .TP 22 | \fIdataSize\fP 23 | Specifies the size in bytes of the binary data. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, a null terminated string representing the data in base 64. Upon error, NULL. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4BinaryToBase64\fR converts binary data to a base 64 string. This encoding maps groups of 6 bits into the character set [A\-Za\-z0\-9+/=]. The string is in malloc'd memory, so the caller is responsible for free'ing the memory. 30 | .LP 31 | This utility is useful for generating the SDP descriptions for some RTP payloads. 32 | .LP 33 | Example: 34 | 0x12, 0xAB \-> "Eqs=" 35 | .SH "SEE ALSO" 36 | .LP 37 | MP4(3) 38 | -------------------------------------------------------------------------------- /doc/MP4CloneTrack.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4CloneTrack\fR \- Make a clone of a specified track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4TrackId \fBMP4CloneTrack\fR( 10 | .br 11 | MP4FileHandle \fIsrcFile\fP, 12 | .br 13 | MP4TrackId \fIsrcTrackId\fP, 14 | .br 15 | MP4FileHandle \fIdstFile\fP = MP4_INVALID_FILE_HANDLE, 16 | .br 17 | MP4TrackId \fIdstHintTrackReferenceTrack\fP = MP4_INVALID_TRACK_ID 18 | .br 19 | ) 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIsrcFile\fP 24 | Specifies the mp4 file of the source track of the operation. 25 | .TP 26 | \fIsrcTrackId\fP 27 | Specifies the track id of the track to be cloned. 28 | .TP 29 | \fIdstFile\fP 30 | Specifies the mp4 file of the new, cloned track. If the value is MP4_INVALID_FILE_HANDLE, the new track is created in the same file as the source track. 31 | .TP 32 | \fIdstHintTrackReferenceTrack\fP 33 | When cloning a hint track, this parameter specifies the track id of the reference track in the destination file. 34 | .SH "RETURN VALUES" 35 | .LP 36 | Upon success, the track id of the new track. Upon an error, MP4_INVALID_TRACK_ID. 37 | 38 | .SH "DESCRIPTION" 39 | .LP 40 | \fBMP4CloneTrack\fR creates a new track to an mp4 file that is a copy of an existing track with respect to the track media type, and other control information. 41 | .LP 42 | Note this function does not copy the media samples of the source track to the new track. If you want to do that use MP4CopyTrack() instead. 43 | 44 | 45 | .SH "SEE ALSO" 46 | .LP 47 | MP4(3) MP4CopyTrack(3) 48 | -------------------------------------------------------------------------------- /doc/MP4ConvertFromMovieDuration.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4ConvertFromMovieDuration\fR \- Convert a duration from the movie (file) time scale to a specified time scale. 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int64_t \fBMP4ConvertFromMovieDuration\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4Duration \fIduration\fP, 14 | .br 15 | u_int32_t \fInewTimeScale\fP 16 | .br 17 | ) 18 | .SH "ARGUMENTS" 19 | .LP 20 | .TP 21 | \fIhFile\fP 22 | Specifies the mp4 file to which the operation applies. 23 | .TP 24 | \fIduration\fP 25 | Specifies the duration that is to be converted. 26 | .TP 27 | \fInewTimeScale\fP 28 | Specifies the new time scale in ticks per second to which the duration should be converted. 29 | .SH "RETURN VALUES" 30 | .LP 31 | Upon success, the duration in the new time scale units. Upon error, 0. 32 | .SH "DESCRIPTION" 33 | .LP 34 | \fBMP4ConvertFromMovieDuration\fR converts a duration such as the total movie (file) duration from the movie time scale to another specified time scale. 35 | .SH "SEE ALSO" 36 | .LP 37 | MP4(3) MP4GetDuration(3) 38 | -------------------------------------------------------------------------------- /doc/MP4ConvertFromTrackTimestamp.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4ConvertFromTrackTimestamp\fR \- Convert a timestamp from the track time scale to a specified time scale. 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int64_t \fBMP4ConvertFromTrackTimestamp\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4Timestamp \fItimestamp\fP, 16 | .br 17 | u_int32_t \fInewTimeScale\fP 18 | .br 19 | ) 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fItrackId\fP 27 | Specifies the track from which the timestamp originates. 28 | .TP 29 | \fItimestamp\fP 30 | Specifies the timestamp that is to be converted. 31 | .TP 32 | \fInewTimeScale\fP 33 | Specifies the new time scale in ticks per second to which the timestamp should be converted. 34 | .SH "RETURN VALUES" 35 | .LP 36 | Upon success, the timestamp in the new time scale units. Upon error, 0xFFFFFFFFFFFFFFFF. 37 | .SH "DESCRIPTION" 38 | .LP 39 | \fBMP4ConvertFromTrackTimestamp\fR converts a timestamp such as a sample start time from the track time scale to another specified time scale. This can be used by a player application to map all track samples to a common time scale. 40 | 41 | .SH "SEE ALSO" 42 | .LP 43 | MP4(3) MP4ConvertToTrackTimestamp(3) 44 | -------------------------------------------------------------------------------- /doc/MP4ConvertToTrackTimestamp.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4ConvertToTrackTimestamp\fR \- Convert a timestamp from a specified time scale to the track time scale. 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4Timestamp \fBMP4ConvertToTrackTimestamp\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | u_int64_t \fItimestamp\fP, 16 | .br 17 | u_int32_t \fIoldTimeScale\fP 18 | .br 19 | ) 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fItrackId\fP 27 | Specifies the track from which the duration originates. 28 | .TP 29 | \fItimestamp\fP 30 | Specifies the timestamp that is to be converted. 31 | .TP 32 | \fIoldTimeScale\fP 33 | Specifies the time scale in ticks per second in which the timestamp is currently expressed. 34 | .SH "RETURN VALUES" 35 | .LP 36 | Upon success, the timestamp in the track time scale units. Upon error, MP4_INVALID_TIMESTAMP. 37 | .SH "DESCRIPTION" 38 | .LP 39 | \fBMP4ConvertToTrackTimestamp\fR converts a timestamp such as a sample start time from the specified time scale to the track time scale. 40 | .SH "SEE ALSO" 41 | .LP 42 | MP4(3) MP4ConvertFromTrackTimestamp(3) 43 | -------------------------------------------------------------------------------- /doc/MP4CopyTrack.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4CopyTrack\fR \- Make a copy of a specified track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4TrackId \fBMP4CopyTrack\fR( 10 | .br 11 | MP4FileHandle \fIsrcFile\fP, 12 | .br 13 | MP4TrackId \fIsrcTrackId\fP, 14 | .br 15 | MP4FileHandle \fIdstFile\fP = MP4_INVALID_FILE_HANDLE, 16 | .br 17 | bool \fIapplyEdits\fP = false, 18 | .br 19 | MP4TrackId \fIdstHintTrackReferenceTrack\fP = MP4_INVALID_TRACK_ID 20 | .br 21 | ) 22 | .SH "ARGUMENTS" 23 | .LP 24 | .TP 25 | \fIsrcFile\fP 26 | Specifies the mp4 file of the source track of the operation. 27 | .TP 28 | \fIsrcTrackId\fP 29 | Specifies the track id of the track to be copied. 30 | .TP 31 | \fIdstFile\fP 32 | Specifies the mp4 file of the new, copied track. If the value is MP4_INVALID_FILE_HANDLE, the new track is created in the same file as the source track. 33 | .TP 34 | \fIapplyEdits\fP 35 | Specifies if the track edit list is to be applied during the copying of media samples. If false, then all samples are copied, if true then only those samples included by the track edit list are copied. 36 | .TP 37 | \fIdstHintTrackReferenceTrack\fP 38 | When cloning a hint track, this parameter specifies the track id of the reference track in the destination file. 39 | .SH "RETURN VALUES" 40 | .LP 41 | Upon success, the track id of the new track. Upon an error, MP4_INVALID_TRACK_ID. 42 | 43 | .SH "DESCRIPTION" 44 | .LP 45 | \fBMP4CopyTrack\fR creates a new track to an mp4 file that is a copy of an existing track with respect to the track media type, other control information, and media samples. 46 | .LP 47 | The applyEdits parameter of this function allows for easy creation of standalone clips from a larger mp4 file. To do this use MP4AddTrackEdit() to specify the start and duration of the clip, and then use MP4CopyTrack() to export that portion of the media to a new mp4 file. 48 | .LP 49 | Note if you do not want to copy the media samples, but just want to create a track with the same type and control information of the source track use MP4CloneTrack(). 50 | 51 | 52 | .SH "SEE ALSO" 53 | .LP 54 | MP4(3) MP4CloneTrack(3) MP4AddTrackEdit(3) 55 | -------------------------------------------------------------------------------- /doc/MP4DeleteTrack.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4DeleteTrack\fR \- Delete a track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4DeleteTrack\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track to which the operation applies. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, true (1). Upon an error, false (0). 27 | 28 | .SH "DESCRIPTION" 29 | .LP 30 | \fBMP4DeleteTrack\fR deletes the control information associated with the specified track. The trackId will become invalid if this call succeeds. 31 | .LP 32 | Note that the samples associated with this track are not deleted with this call. This can be accomplished via MP4Optimize(). The reason for this is that multiple tracks can reference the same samples so a global view must be taken when deleting them. 33 | .SH "SEE ALSO" 34 | .LP 35 | MP4(3) 36 | -------------------------------------------------------------------------------- /doc/MP4DeleteTrackEdit.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4DeleteTrackEdit\fR \- Delete a track edit segment 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4DeleteTrackEdit\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4EditId \fIeditId\fP 16 | .br 17 | ) 18 | .SH "ARGUMENTS" 19 | .LP 20 | .TP 21 | \fIhFile\fP 22 | Specifies the mp4 file to which the operation applies. 23 | .TP 24 | \fItrackId\fP 25 | Specifies the track to which the operation applies. 26 | .TP 27 | \fIeditId\fP 28 | Specifies the edit segment to be deleted. 29 | .SH "RETURN VALUES" 30 | .LP 31 | Upon success, true (1). Upon an error, false (0). 32 | 33 | .SH "DESCRIPTION" 34 | .LP 35 | \fBMP4DeleteTrackEdit\fR deletes the specified track edit segment. Note that since editId's form a sequence, deleting an editId will cause all edit segments with editId's greater than the deleted one to be reassigned to their editId minus one. 36 | .LP 37 | Deleting an edit segment does not delete any media samples. 38 | 39 | .SH "SEE ALSO" 40 | .LP 41 | MP4(3) MP4AddTrackEdit(3) 42 | -------------------------------------------------------------------------------- /doc/MP4FindTrackId.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4FindTrackId\fR \- Find a track id 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4TrackId \fBMP4FindTrackId\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | u_int16_t \fIindex\fP, 14 | .br 15 | const char* \fItype\fP = NULL, 16 | .br 17 | u_int8_t \fIsubType\fP = 0 18 | .br 19 | ) 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fIindex\fP 27 | Specifies which track is desired from matching tracks. 28 | .TP 29 | \fItype\fP 30 | Specifies the type of track to be matched. A NULL value implies any type of track. See MP4GetTrackType() for predefined values. 31 | .TP 32 | \fIsubType\fP 33 | Specifies the subtype of the track to be matched. Subtypes are only defined for audio and video tracks, see MP4GetAudioTrackType() and MP4GetVideoTrackType() for predefined values. A zero value implies any subtype. 34 | .SH "RETURN VALUES" 35 | .LP 36 | Upon success, the track id of the specified track. Upon an error, MP4_INVALID_TRACK_ID. 37 | 38 | .SH "DESCRIPTION" 39 | .LP 40 | \fBMP4FindTrackId\fR gets the track id associated with the index'th track of the specified track type. For example, to get the track id of the first video track: 41 | .LP 42 | MP4FindTrackId(hFile, 0, MP4_VIDEO_TRACK_TYPE); 43 | .LP 44 | For audio and video tracks, a subtype can be specified to find a track of a particular encoding. For example, to get the track id of the first audio track encoded with MPEG\-1 audio: 45 | .LP 46 | MP4FindTrackId(hFile, 0, MP4_AUDIO_TRACK_TYPE, MP4_MPEG1_AUDIO_TYPE); 47 | .LP 48 | Caveat: The track id's do not imply anything about the ordering of the track information within the mp4 file. 49 | .SH "SEE ALSO" 50 | .LP 51 | MP4(3) MP4FindTrackIndex(3) 52 | -------------------------------------------------------------------------------- /doc/MP4FindTrackIndex.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4FindTrackIndex\fR \- Find a track index 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int16_t \fBMP4FindTrackIndex\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track for which the index is desired. 24 | 25 | .SH "RETURN VALUES" 26 | .LP 27 | Upon success, the track index of the specified track. Upon an error, 0xFFFF. 28 | 29 | .SH "DESCRIPTION" 30 | .LP 31 | \fBMP4FindTrackIndex\fR gets the index of the track with the specified track id. 32 | .SH "SEE ALSO" 33 | .LP 34 | MP4(3) MP4FindTrackId(3) 35 | -------------------------------------------------------------------------------- /doc/MP4GetAudioProfileLevel.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetAudioProfileLevel\fR \- Gets the minimum MPEG\-4 audio profile and level required to render the contents of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int8_t \fBMP4GetAudioProfileLevel\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP 12 | .br 13 | ) 14 | .SH "ARGUMENTS" 15 | .LP 16 | .TP 17 | \fIhFile\fP 18 | Specifies the mp4 file to which the operation applies. 19 | .SH "RETURN VALUES" 20 | .LP 21 | The current audio profile/level for the file. See MP4SetAudioProfileLevel() for known values. 22 | .SH "DESCRIPTION" 23 | .LP 24 | \fBMP4GetAudioProfileLevel\fR returns the minumum profile/level of MPEG\-4 audio support necessary to render the contents of the file. 25 | .SH "SEE ALSO" 26 | .LP 27 | MP4(3) MP4SetAudioProfileLevel(3) 28 | -------------------------------------------------------------------------------- /doc/MP4GetDuration.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetDuration\fR \- Get the duration of the movie (file) 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4Duration \fBMP4GetDuration\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP 12 | .br 13 | ) 14 | .SH "ARGUMENTS" 15 | .LP 16 | .TP 17 | \fIhFile\fP 18 | Specifies the mp4 file to which the operation applies. 19 | .SH "RETURN VALUES" 20 | .LP 21 | The duration of the movie (file) in movie (file) time scale units. 22 | .SH "DESCRIPTION" 23 | .LP 24 | \fBMP4GetDuration\fR returns the maximum duration of all the tracks in the specified mp4 file. 25 | .LP 26 | Caveat: the duration is the movie (file) time scale units. 27 | .SH "SEE ALSO" 28 | .LP 29 | MP4(3) MP4GetTimeScale(3) MP4ConvertFromMovieDuration(3) 30 | -------------------------------------------------------------------------------- /doc/MP4GetGraphicsProfileLevel.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetGraphicsProfileLevel\fR \- Gets the minimum MPEG\-4 graphics profile and level required to render the contents of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int8_t \fBMP4GetGraphicsProfileLevel\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP 12 | .br 13 | ) 14 | .SH "ARGUMENTS" 15 | .LP 16 | .TP 17 | \fIhFile\fP 18 | Specifies the mp4 file to which the operation applies. 19 | .SH "RETURN VALUES" 20 | .LP 21 | The current graphics profile/level for the file. See MP4SetGraphicsProfileLevel() for known values. 22 | .SH "DESCRIPTION" 23 | .LP 24 | \fBMP4GetGraphicsProfileLevel\fR returns the minumum profile/level of MPEG\-4 graphics support necessary to render the contents of the file. 25 | .SH "SEE ALSO" 26 | .LP 27 | MP4(3) MP4SetGraphicsProfileLevel(3) 28 | -------------------------------------------------------------------------------- /doc/MP4GetHintTrackReferenceTrackId.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetHintTrackReferenceTrackId\fR \- Get the reference track id for a hint track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4TrackId \fBMP4GetHintTrackReferenceTrackId\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fIhintTrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fIhintTrackId\fP 23 | Specifies the hint track to which the operation applies. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, the track id of the reference media track. Upon an error, MP4_INVALID_TRACK_ID. 27 | 28 | .SH "DESCRIPTION" 29 | .LP 30 | \fBMP4GetHintTrackReferenceTrackId\fR gets the track id of the reference media track associated with the specified hint track. 31 | .SH "SEE ALSO" 32 | .LP 33 | MP4(3) MP4AddHintTrack(3) 34 | -------------------------------------------------------------------------------- /doc/MP4GetHintTrackSdp.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetHintTrackSdp\fR \- Get the SDP media level description associated with a hint track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | const char* \fBMP4GetHintTrackSdp\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fIhintTrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the hint track to which the operation applies. 24 | .SH "RETURN VALUES" 25 | .LP 26 | The SDP media level description fragment associated with the hint track. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetHintTrackSdp\fR returns the SDP (IETF RFC 2327) media level fragment associated with the hint track. This is used by a streaming server to create a complete SDP description of the multimedia session represented by the file. 30 | .LP 31 | The mp4broadcaster test program provided with the MP4 library gives an example of using this call to create the complete SDP description. 32 | .SH "SEE ALSO" 33 | .LP 34 | MP4(3) MP4SetHintTrackSdp(3) MP4AppendHintTrackSdp(3) MP4GetSessionSdp(3) 35 | -------------------------------------------------------------------------------- /doc/MP4GetNumberOfTracks.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetNumberOfTracks\fR \- Get the number of tracks 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int32_t \fBMP4GetNumberOfTracks\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | const char* \fItype\fP = NULL, 14 | .br 15 | u_int8_t subType = 0 16 | .br 17 | ) 18 | .SH "ARGUMENTS" 19 | .LP 20 | .TP 21 | \fIhFile\fP 22 | Specifies the mp4 file to which the operation applies. 23 | .TP 24 | \fItype\fP 25 | Species the type of track for which a count is desired. A NULL value implies any type of track. See MP4GetTrackType() for predefined values. 26 | .TP 27 | \fIsubType\fP 28 | Specifies the subtype of the tracks to be counted. Subtypes are only defined for audio and video tracks, see MP4GetAudioTrackType() and MP4GetVideoTrackType() for predefined values. A zero value implies any subtype. 29 | .SH "RETURN VALUES" 30 | .LP 31 | The number of tracks of the specified type and subType in the mp4 file. 32 | .SH "DESCRIPTION" 33 | .LP 34 | \fBMP4GetNumberOfTracks\fR returns how many tracks of the specified type and subtype exist in the mp4 file. This can be used to determine if an mp4 file contains a track of a given type of media, for instance audio or video. It can also be used to determine if multiple options may be available. For instance multiple audio tracks in different languages. 35 | .LP 36 | For audio and video tracks, a subtype can be specified to only count tracks of a particular encoding. 37 | .SH "SEE ALSO" 38 | .LP 39 | MP4(3) 40 | -------------------------------------------------------------------------------- /doc/MP4GetODProfileLevel.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetODProfileLevel\fR \- Gets the minimum MPEG\-4 object descriptor profile and level required to render the contents of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int8_t \fBMP4GetODProfileLevel\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP 12 | .br 13 | ) 14 | .SH "ARGUMENTS" 15 | .LP 16 | .TP 17 | \fIhFile\fP 18 | Specifies the mp4 file to which the operation applies. 19 | .SH "RETURN VALUES" 20 | .LP 21 | The current object descriptor profile/level for the file. See MP4SetODProfileLevel() for known values. 22 | .SH "DESCRIPTION" 23 | .LP 24 | \fBMP4GetODProfileLevel\fR returns the minumum profile/level of MPEG\-4 object descriptor support necessary to render the contents of the file. 25 | .SH "SEE ALSO" 26 | .LP 27 | MP4(3) MP4SetODProfileLevel(3) 28 | -------------------------------------------------------------------------------- /doc/MP4GetRtpHintNumberOfPackets.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetRtpHintNumberOfPackets\fR \- Get the number of packets in an RTP hint 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int16_t \fBMP4GetRtpHintNumberOfPackets\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fIhintTrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fIhintTrackId\fP 23 | Specifies the hint track to which the operation applies. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, the number of packets in the current RTP hint. Upon an error, 0. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetRtpHintNumberOfPackets\fR returns the number of packets contained in the current RTP hint as established by a call to MP4ReadRtpHint(). 30 | .SH "SEE ALSO" 31 | .LP 32 | MP4(3) MP4ReadRtpHint(3) 33 | -------------------------------------------------------------------------------- /doc/MP4GetRtpPacketBFrame.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetRtpPacketBFrame\fR \- Get the B frame flag of an RTP packet 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | int8_t \fBMP4GetRtpPacketBFrame\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fIhintTrackId\fP, 14 | .br 15 | u_int16_t \fIpacketIndex\fP 16 | .br 17 | ) 18 | .SH "ARGUMENTS" 19 | .LP 20 | .TP 21 | \fIhFile\fP 22 | Specifies the mp4 file to which the operation applies. 23 | .TP 24 | \fIhintTrackId\fP 25 | Specifies the hint track to which the operation applies. 26 | .TP 27 | \fIpacketIndex\fP 28 | Specifies the packet to which the operation applies. 29 | .SH "RETURN VALUES" 30 | .LP 31 | Upon success, the state of the B frame flag for the specified packet. Upon an error, \-1. 32 | .SH "DESCRIPTION" 33 | .LP 34 | \fBMP4GetRtpPacketBFrame\fR returns the state of the B Frame flag of an RTP packet. See MP4AddRtpHint for a description of this flag. 35 | 36 | .SH "SEE ALSO" 37 | .LP 38 | MP4(3) MP4AddRtpHint(3) MP4ReadRtpPacket(3) 39 | -------------------------------------------------------------------------------- /doc/MP4GetRtpPacketTransmitOffset.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetRtpPacketTransmitOffset\fR \- Get the transmit offset of an RTP packet 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | int32_t \fBMP4GetRtpPacketTransmitOffset\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fIhintTrackId\fP, 14 | .br 15 | u_int16_t \fIpacketIndex\fP 16 | .br 17 | ) 18 | .SH "ARGUMENTS" 19 | .LP 20 | .TP 21 | \fIhFile\fP 22 | Specifies the mp4 file to which the operation applies. 23 | .TP 24 | \fIhintTrackId\fP 25 | Specifies the hint track to which the operation applies. 26 | .TP 27 | \fIpacketIndex\fP 28 | Specifies the packet to which the operation applies. 29 | .SH "RETURN VALUES" 30 | .LP 31 | The transmit offset for the specified packet in the hint track timescale. 32 | .SH "DESCRIPTION" 33 | .LP 34 | \fBMP4GetRtpPacketTransmitOffset\fR returns the transmit offset of an RTP packet. This offset may be set by some hinters to smooth out the packet transmission times and reduce network burstiness. A transmitter would need to apply this offset to the calculated transmission time based on the hint start time. 35 | 36 | .SH "SEE ALSO" 37 | .LP 38 | MP4(3) MP4AddRtpPacket(3) MP4ReadRtpPacket(3) 39 | -------------------------------------------------------------------------------- /doc/MP4GetRtpTimestampStart.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetRtpTimestampStart\fR \- Get the RTP start time of a hint track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4Timestamp \fBMP4GetRtpTimestampStart\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fIhintTrackId\fP 14 | .br 15 | ); 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the hint track to which the operation applies. 24 | 25 | 26 | .SH "RETURN VALUES" 27 | .LP 28 | Upon success, the RTP start time in the RTP time scale which is identical to the hint track time scale. Upon an error, MP4_INVALID_TIMESTAMP. 29 | .SH "DESCRIPTION" 30 | .LP 31 | \fBMP4GetRtpTimestampStart\fR returns the RTP timestamp start of the specified hint track. Typically this is a random value that is chosen when the first RTP packet is constructed by the MP4 library. However the value can be set explicitly for the hint track and stored. Typically this is used if it is desired that timestamps start at zero. 32 | .LP 33 | An application will need this value in order to construct RTCP Sender Reports that relate the hint track time to an real time clock. The mp4broadcaster test program provided with the MP4 library gives an example of this. 34 | .LP 35 | See IETF RFC 1889 for details regarding RTP timestamps and RTCP. 36 | .SH "SEE ALSO" 37 | .LP 38 | MP4(3) MP4SetRtpTimestampStart(3) 39 | -------------------------------------------------------------------------------- /doc/MP4GetSampleIdFromEditTime.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetSampleIdFromEditTime\fR \- Get the sample id of a specified time in the edit list timeline 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4SampleId \fBMP4GetSampleIdFromEditTime\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4Timestamp \fIwhen\fP, 16 | .br 17 | MP4Timestamp* \fIpStartTime\fP = NULL, 18 | .br 19 | MP4Duration* \fIpDuration\fP = NULL 20 | .br 21 | ); 22 | .SH "ARGUMENTS" 23 | .LP 24 | .TP 25 | \fIhFile\fP 26 | Specifies the mp4 file to which the operation applies. 27 | .TP 28 | \fItrackId\fP 29 | Specifies the track to which the operation applies. 30 | .TP 31 | \fIwhen\fP 32 | Specifies the time in the track time scale that is desired. 33 | .TP 34 | \fIpStartTime\fP 35 | If non\-NULL, pointer to variable that will receive the starting timestamp for this sample. Caveat: The timestamp is in the track edit list timescale. 36 | .TP 37 | \fIpDuration\fP 38 | If non\-NULL, pointer to variable that will receive the duration for this sample in the edit list timeline. Caveat: The duration is in the track timescale units. 39 | 40 | .SH "RETURN VALUES" 41 | .LP 42 | Upon success, the sample id that occurs at the specified time. Upon an error, MP4_INVALID_SAMPLE_ID. 43 | .SH "DESCRIPTION" 44 | .LP 45 | \fBMP4GetSampleIdFromEditTime\fR returns the sample id of the track sample in which the specified time occurs in the edit list timeline. 46 | .LP 47 | The specified time should be in the track time scale. See MP4ConvertToTrackTimestamp() for how to map a time value to this time scale. 48 | .LP 49 | Since the edit list can cause the sample start time and duration to be different that it in the standard track timeline, it is strongly advised that the caller retrieve the new sample start time and duration via this function. 50 | .SH "SEE ALSO" 51 | .LP 52 | MP4(3) MP4GetSampleIdFromTime(3) 53 | -------------------------------------------------------------------------------- /doc/MP4GetSceneProfileLevel.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetSceneProfileLevel\fR \- Gets the minimum MPEG\-4 scene graph profile and level required to render the contents of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int8_t \fBMP4GetSceneProfileLevel\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP 12 | .br 13 | ) 14 | .SH "ARGUMENTS" 15 | .LP 16 | .TP 17 | \fIhFile\fP 18 | Specifies the mp4 file to which the operation applies. 19 | .SH "RETURN VALUES" 20 | .LP 21 | The current scene graph profile/level for the file. See MP4SetSceneProfileLevel() for known values. 22 | .SH "DESCRIPTION" 23 | .LP 24 | \fBMP4GetSceneProfileLevel\fR returns the minumum profile/level of MPEG\-4 scene graph support necessary to render the contents of the file. 25 | .SH "SEE ALSO" 26 | .LP 27 | MP4(3) MP4SetSceneProfileLevel(3) 28 | -------------------------------------------------------------------------------- /doc/MP4GetSessionSdp.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetSessionSdp\fR \- Get the SDP session level description of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | const char* \fBMP4GetSessionSdp\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP 12 | .br 13 | ) 14 | .SH "ARGUMENTS" 15 | .LP 16 | .TP 17 | \fIhFile\fP 18 | Specifies the mp4 file to which the operation applies. 19 | .SH "RETURN VALUES" 20 | .LP 21 | The SDP session level description fragment of the mp4 file. 22 | .SH "DESCRIPTION" 23 | .LP 24 | \fBMP4GetSessionSdp\fR returns the SDP (IETF RFC 2327) session level fragment for the file. This is used by a streaming server to create a complete SDP description of the multimedia session represented by the file. 25 | .LP 26 | The mp4broadcaster test program provided with the MP4 library gives an example of using this call to create the complete SDP description. 27 | .SH "SEE ALSO" 28 | .LP 29 | MP4(3) MP4SetSessionSdp(3) MP4AppendSessionSdp(3) MP4GetHintTrackSdp(3) 30 | -------------------------------------------------------------------------------- /doc/MP4GetTrackAudioType.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackAudioType\fR \- Get the encoding type of an audio track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int8_t \fBMP4GetTrackAudioType\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track for which the audio type is desired. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, the audio type of the track. Upon error, MP4_INVALID_AUDIO_TYPE is returned. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetTrackAudioType\fR returns the encoding type of the specified audio track in the mp4 file. 30 | .LP 31 | Known audio encoding types are: 32 | .LP 33 | MP4_MPEG1_AUDIO_TYPE 34 | .br 35 | MPEG\-1 Audio Layers I, II, & III 36 | .LP 37 | MP4_MPEG2_AUDIO_TYPE 38 | .br 39 | MPEG\-2 low bitrate extensions to MPEG\-1 Audio 40 | .br 41 | MP4_MP3_AUDIO_TYPE is an alias for this value 42 | .LP 43 | MP4_MPEG2_AAC_MAIN_AUDIO_TYPE 44 | .br 45 | MPEG\-2 AAC Main profile 46 | .LP 47 | MP4_MPEG2_AAC_LC_AUDIO_TYPE 48 | .br 49 | MPEG\-2 AAC Low Complexity profile 50 | .LP 51 | MP4_MPEG2_AAC_SSR_AUDIO_TYPE 52 | .br 53 | MPEG\-2 AAC SSR profile 54 | .LP 55 | MP4_MPEG4_AUDIO_TYPE 56 | .br 57 | MPEG\-4 Audio, includes MPEG\-4 extensions to AAC 58 | .LP 59 | MP4_PRIVATE_AUDIO_TYPE 60 | .br 61 | User private type 62 | .SH "SEE ALSO" 63 | .LP 64 | MP4(3) MP4AddAudioTrack(3) 65 | -------------------------------------------------------------------------------- /doc/MP4GetTrackBitRate.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackBitRate\fR \- Get the average bit rate in bits per second of the specified track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int32_t \fBMP4GetTrackBitRate\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track for which the bit rate is desired. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, the average bit rate in bits per second of the track. Upon an error, 0. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetTrackBitRate\fR returns the average bit rate in bits per second in the specified track in the mp4 file. 30 | .LP 31 | Note: hint tracks will not return their bit rate via this mechanism. 32 | .SH "SEE ALSO" 33 | .LP 34 | MP4(3) 35 | -------------------------------------------------------------------------------- /doc/MP4GetTrackDuration.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackDuration\fR \- Get the duration of a track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4Duration \fBMP4GetTrackDuration\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track for which the duration is desired. 24 | .SH "RETURN VALUES" 25 | .LP 26 | The duration in track time scale units of the track in the mp4 file. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetTrackDuration\fR returns the total duration of all the samples in the specified track in the mp4 file. 30 | .LP 31 | Caveat: The value is in units of the track time scale. 32 | .SH "SEE ALSO" 33 | .LP 34 | MP4(3) 35 | -------------------------------------------------------------------------------- /doc/MP4GetTrackESConfiguration.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackESConfiguration\fR \- Get the elementary stream (ES) configuration of a track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | void \fBMP4GetTrackESConfiguration\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | u_int8_t** \fIppConfig\fP, 16 | .br 17 | u_int32_t* \fIpConfigSize\fP 18 | .br 19 | ) 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fItrackId\fP 27 | Specifies the track for which the ES configuration is desired. 28 | .TP 29 | \fIppConfig\fP 30 | Specifies a pointer to a pointer variable that will be given the address of the configuration information. 31 | .TP 32 | \fIpConfigSize\fP 33 | Specifies a pointer to a variable to hold the size of the ES configuration information. 34 | .SH "RETURN VALUES" 35 | .LP 36 | Upon success, *ppConfig will point to a malloc'd block of memory with the ES configuration, and *pConfigSize will indicated the number of bytes of the ES configuration. Upon error, *ppConfig will be NULL, and *pConfigSize will be 0. 37 | .SH "DESCRIPTION" 38 | .LP 39 | \fBMP4GetTrackESConfiguration\fR returns the elementary stream (ES) configuration of the specified track in the mp4 file. This information is codec specific and contains the configuration necessary for the given codec to decode the samples in the track. 40 | .LP 41 | Caveat: the returned block of memory has been malloc'd. The caller may safely modify the value without effecting the library, but the caller takes responsiblity for free'ing the memory. 42 | .SH "SEE ALSO" 43 | .LP 44 | MP4(3) 45 | -------------------------------------------------------------------------------- /doc/MP4GetTrackEditDuration.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackEditDuration\fR \- Get the duration of a track edit segment 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4Duration \fBMP4GetTrackEditDuration\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4EditId \fIeditId\fP 16 | .br 17 | ) 18 | .SH "ARGUMENTS" 19 | .LP 20 | .TP 21 | \fIhFile\fP 22 | Specifies the mp4 file to which the operation applies. 23 | .TP 24 | \fItrackId\fP 25 | Specifies the track to which the operation applies. 26 | .TP 27 | \fIeditId\fP 28 | Specifies the edit segment for which the duration is desired. 29 | .SH "RETURN VALUES" 30 | .LP 31 | The duration of the edit segment in track time scale units of the track in the mp4 file. 32 | .SH "DESCRIPTION" 33 | .LP 34 | \fBMP4GetTrackEditDuration\fR returns the duration of the specified track edit segment. 35 | .LP 36 | Caveat: The value is in units of the track time scale. 37 | .SH "SEE ALSO" 38 | .LP 39 | MP4(3) MP4SetTrackEditDuration(3) 40 | -------------------------------------------------------------------------------- /doc/MP4GetTrackEditDwell.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackEditDwell\fR \- Get the dwell value of a track edit segment 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4Duration \fBMP4GetTrackEditDwell\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4EditId \fIeditId\fP 16 | .br 17 | ) 18 | .SH "ARGUMENTS" 19 | .LP 20 | .TP 21 | \fIhFile\fP 22 | Specifies the mp4 file to which the operation applies. 23 | .TP 24 | \fItrackId\fP 25 | Specifies the track to which the operation applies. 26 | .TP 27 | \fIeditId\fP 28 | Specifies the edit segment for which the dwell value is desired. 29 | .SH "RETURN VALUES" 30 | .LP 31 | The dwell value of the edit segment of the track in the mp4 file. 32 | .SH "DESCRIPTION" 33 | .LP 34 | \fBMP4GetTrackEditDwell\fR returns the dwell value of the specified track edit segment. A value of true (1) indicates that during this edit segment the media will be paused; a value of false (0) indicates that during this edit segment the media will be played at its normal rate. 35 | .SH "SEE ALSO" 36 | .LP 37 | MP4(3) MP4SetTrackEditDwell(3) 38 | -------------------------------------------------------------------------------- /doc/MP4GetTrackEditMediaStart.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackEditMediaStart\fR \- Get the media start time of a track edit segment 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4Timestamp \fBMP4GetTrackEditMediaStart\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4EditId \fIeditId\fP 16 | .br 17 | ) 18 | .SH "ARGUMENTS" 19 | .LP 20 | .TP 21 | \fIhFile\fP 22 | Specifies the mp4 file to which the operation applies. 23 | .TP 24 | \fItrackId\fP 25 | Specifies the track to which the operation applies. 26 | .TP 27 | \fIeditId\fP 28 | Specifies the edit segment for which the media start time is desired. 29 | .SH "RETURN VALUES" 30 | .LP 31 | The media start time of the edit segment in track time scale units of the track in the mp4 file. 32 | .SH "DESCRIPTION" 33 | .LP 34 | \fBMP4GetTrackEditMediaStart\fR returns the media start time of the of the specified track edit segment. 35 | .LP 36 | Caveat: The value is in units of the track time scale. 37 | .LP 38 | Note that this differs from the edit segment start time, MP4GetTrackEditStart(). For example: 39 | .LP 40 | EditId Start MediaStart Duration 41 | 1 0 15 30 42 | .br 43 | 2 30 120 20 44 | .br 45 | 3 50 3000 10 46 | .SH "SEE ALSO" 47 | .LP 48 | MP4(3) MP4SetTrackEditMediaStart(3) 49 | -------------------------------------------------------------------------------- /doc/MP4GetTrackEditStart.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackEditStart\fR \- Get the start time of a track edit segment 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4Timestamp \fBMP4GetTrackEditStart\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4EditId \fIeditId\fP 16 | .br 17 | ) 18 | .SH "ARGUMENTS" 19 | .LP 20 | .TP 21 | \fIhFile\fP 22 | Specifies the mp4 file to which the operation applies. 23 | .TP 24 | \fItrackId\fP 25 | Specifies the track to which the operation applies. 26 | .TP 27 | \fIeditId\fP 28 | Specifies the edit segment for which the start time is desired. 29 | .SH "RETURN VALUES" 30 | .LP 31 | The start time of the edit segment in track time scale units of the track in the mp4 file. 32 | .SH "DESCRIPTION" 33 | .LP 34 | \fBMP4GetTrackEditStart\fR returns the start time of the of the specified track edit segment in the timeline of the track edit list. 35 | .LP 36 | Caveat: The value is in units of the track time scale. 37 | .LP 38 | Note that this differs from the edit segment media start time, MP4GetTrackEditMediaStart(). For example: 39 | .LP 40 | EditId Start MediaStart Duration 41 | 1 0 15 30 42 | .br 43 | 2 30 120 20 44 | .br 45 | 3 50 3000 10 46 | .SH "SEE ALSO" 47 | .LP 48 | MP4(3) MP4SetTrackEditStart(3) 49 | -------------------------------------------------------------------------------- /doc/MP4GetTrackEditTotalDuration.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackEditTotalDuration\fR \- Get the total duration of a sequence of track edit segments 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4Duration \fBMP4GetTrackEditTotalDuration\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4EditId \fIeditId\fP = MP4_INVALID_EDIT_ID 16 | .br 17 | ) 18 | .SH "ARGUMENTS" 19 | .LP 20 | .TP 21 | \fIhFile\fP 22 | Specifies the mp4 file to which the operation applies. 23 | .TP 24 | \fItrackId\fP 25 | Specifies the track to which the operation applies. 26 | .TP 27 | \fIeditId\fP 28 | Specifies the edit segment for which the total duration is desired. A value of MP4_INVALID_EDIT_ID specifies that all edit segments should be included. 29 | .SH "RETURN VALUES" 30 | .LP 31 | The total duration of the edit segment sequence in track time scale units of the track in the mp4 file. 32 | .SH "DESCRIPTION" 33 | .LP 34 | \fBMP4GetTrackEditTotalDuration\fR returns the total duration of the specified sequence of track edit segments from the first edit segment up to and including the specified edit segment. If the edit id value is MP4_INVALID_EDIT_ID, then the total duration of all of the edit segments is returned. 35 | .LP 36 | Caveat: The value is in units of the track time scale. 37 | .SH "SEE ALSO" 38 | .LP 39 | MP4(3) MP4GetTrackEditDuration(3) 40 | -------------------------------------------------------------------------------- /doc/MP4GetTrackFixedSampleDuration.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackFixedSampleDuration\fR \- Get the fixed duration of samples in a track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | MP4Duration \fBMP4GetTrackFixedSampleDuration\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track to which the operation applies. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, the number of fixed duration of the samples in the track in track time scale units. Upon an error, MP4_INVALID_DURATION. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetTrackFixedSampleDuration\fR returns the duration of samples in the specified track in the mp4 file, if this value is fixed for all samples. This is typically the case for audio tracks and video tracks. If the track samples have variable duration, then MP4_INVALID_DURATION is returned. 30 | .SH "SEE ALSO" 31 | .LP 32 | MP4(3) 33 | -------------------------------------------------------------------------------- /doc/MP4GetTrackNumberOfEdits.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackNumberOfEdits\fR \- Get the number of edit segments for a track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int32_t \fBMP4GetTrackNumberOfEdits\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track for which the number of edit segments is desired. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, the number of edit segments for the track. Upon an error, 0. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetTrackNumberOfEdits\fR returns the number of edit segments in the specified track in the mp4 file. Edit id's are the consecutive sequence of numbers from 1 to the total number of edit segments, i.e. 1\-based indexing, not 0\-based indexing. 30 | .SH "SEE ALSO" 31 | .LP 32 | MP4(3) MP4AddTrackEdit(3) MP4DeleteTrackEdit(3) 33 | -------------------------------------------------------------------------------- /doc/MP4GetTrackNumberOfSamples.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackNumberOfSamples\fR \- Get the number of samples in a track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int32_t \fBMP4GetTrackNumberOfSamples\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track for which the number of samples is desired. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, the number of samples in the track. Upon an error, 0. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetTrackNumberOfSamples\fR returns the number of samples in the specified track in the mp4 file. Sample id's are the consecutive sequence of numbers from 1 to the total number of samples, i.e. 1\-based indexing, not 0\-based indexing. 30 | .SH "SEE ALSO" 31 | .LP 32 | MP4(3) 33 | -------------------------------------------------------------------------------- /doc/MP4GetTrackVideoFrameRate.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackVideoFrameRate\fR \- Get the video frame rate of the specified video track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | float \fBMP4GetTrackVideoFrameRate\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track for which the video frame rate is desired. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, the number of video frames per second of the track. Upon an error, 0. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetTrackVideoFrameRate\fR returns the frame rate of the video in the specified track in the mp4 file. If the video is variable rate, the average frame rate is returned. 30 | 31 | .SH "SEE ALSO" 32 | .LP 33 | MP4(3) 34 | -------------------------------------------------------------------------------- /doc/MP4GetTrackVideoHeight.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackVideoHeight\fR \- Get the video height in pixels of the specified video track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int16_t \fBMP4GetTrackVideoHeight\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track for which the video height is desired. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, the number of pixels of the video height in the track. Upon an error, 0. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetTrackVideoWidth\fR returns the height of the video in pixels in the specified track in the mp4 file. 30 | .LP 31 | Caveat: Not all mp4 implementations set this value accurately. The mp4 specification states that the authoritative values are contained in the track ES configuration which is video encoding specific, and hence not interpretable by the mp4 library. 32 | If the value of 240 is returned, care should be taken to verify the accuracy of this value since this is the default value in the mp4 specification. 33 | .SH "SEE ALSO" 34 | .LP 35 | MP4(3) MP4GetTrackVideoWidth(3) MP4GetTrackESConfiguration(3) 36 | -------------------------------------------------------------------------------- /doc/MP4GetTrackVideoType.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackVideoType\fR \- Get the encoding type of a video track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int8_t \fBMP4GetTrackVideoType\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track for which the video type is desired. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, the video type of the track. Upon error, MP4_INVALID_VIDEO_TYPE is returned. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetTrackVideoType\fR returns the encoding type of the specified video track in the mp4 file. 30 | .LP 31 | Known video encoding types are: 32 | .LP 33 | MP4_MPEG1_VIDEO_TYPE 34 | .br 35 | MPEG\-1 Video 36 | .LP 37 | MP4_MPEG2_SIMPLE_VIDEO_TYPE 38 | .br 39 | MPEG\-2 Simple Profile Video 40 | .LP 41 | MP4_MPEG2_MAIN_VIDEO_TYPE 42 | .br 43 | MPEG\-2 Main Profile Video (Broadcast/DVD) 44 | .LP 45 | MP4_MPEG2_SNR_VIDEO_TYPE 46 | .br 47 | MPEG\-2 SNR Profile Video 48 | .LP 49 | MP4_MPEG2_SPATIAL_VIDEO_TYPE 50 | .br 51 | MPEG\-2 Spatial Scalability Profile Video 52 | .LP 53 | MP4_MPEG2_HIGH_VIDEO_TYPE 54 | .br 55 | MPEG\-2 High Profile Video (HDTV) 56 | .LP 57 | MP4_MPEG2_442_VIDEO_TYPE 58 | .br 59 | MPEG\-2 442 Profile Video (Studio) 60 | .LP 61 | MP4_MPEG4_VIDEO_TYPE 62 | .br 63 | MPEG\-4 Video 64 | .LP 65 | MP4_JPEG_VIDEO_TYPE 66 | .br 67 | JPEG stills or motion JPEG 68 | .LP 69 | MP4_PRIVATE_VIDEO_TYPE 70 | .br 71 | User private type 72 | .SH "SEE ALSO" 73 | .LP 74 | MP4(3) MP4AddVideoTrack(3) 75 | -------------------------------------------------------------------------------- /doc/MP4GetTrackVideoWidth.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetTrackVideoWidth\fR \- Get the video width in pixels of the specified video track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int16_t \fBMP4GetTrackVideoWidth\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fItrackId\fP 23 | Specifies the track for which the video width is desired. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, the number of pixels of the video width in the track. Upon an error, 0. 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4GetTrackVideoWidth\fR returns the width of the video in pixels in the specified track in the mp4 file. 30 | .LP 31 | Caveat: Not all mp4 implementations set this value accurately. The mp4 specification states that the authoritative values are contained in the track ES configuration which is video encoding specific, and hence not interpretable by the mp4 library. 32 | If the value of 320 is returned, care should be taken to verify the accuracy of this value since this is the default value in the mp4 specification. 33 | .SH "SEE ALSO" 34 | .LP 35 | MP4(3) MP4GetTrackVideoHeight(3) MP4GetTrackESConfiguration(3) 36 | -------------------------------------------------------------------------------- /doc/MP4GetVideoProfileLevel.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4GetVideoProfileLevel\fR \- Gets the minimum MPEG\-4 video profile and level required to render the contents of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | u_int8_t \fBMP4GetVideoProfileLevel\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP 12 | .br 13 | ) 14 | .SH "ARGUMENTS" 15 | .LP 16 | .TP 17 | \fIhFile\fP 18 | Specifies the mp4 file to which the operation applies. 19 | .SH "RETURN VALUES" 20 | .LP 21 | The current video profile/level for the file. See MP4SetVideoProfileLevel() for known values. 22 | .SH "DESCRIPTION" 23 | .LP 24 | \fBMP4GetVideoProfileLevel\fR returns the minumum profile/level of MPEG\-4 video support necessary to render the contents of the file. 25 | .SH "SEE ALSO" 26 | .LP 27 | MP4(3) MP4SetVideoProfileLevel(3) 28 | -------------------------------------------------------------------------------- /doc/MP4MakeIsmaCompliant.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4MakeIsmaCompliant\fR \- Add ISMA compliant OD and Scene tracks 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4MakeIsmaCompliant\fR( 10 | .br 11 | const char* \fIfileName\fP, 12 | .br 13 | u_int32_t \fIverbosity\fP = 0 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIfileName\fP 20 | Specifies the path name of the file to be modified. 21 | .TP 22 | \fIverbosity\fP 23 | Specifies a bitmask of diagnostic details the library should print to stdout during its functioning. See MP4SetVerbosity() for values. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, true (1). Upon an error, false (0). 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4MakeIsmaCompliant\fR modifies an mp4 file so that it complies with the minimal MPEG\-4 Systems requirements defined by the Internet Streaming Media Alliance (ISMA, http://www.isma.tv) 30 | .LP 31 | This involves creating an OD and Scene track, and using them to describe a simple scene of one audio, or one video, or one of each. An SDP version of this information is also added to the mp4 file. 32 | .LP 33 | Caveat: whether the file is truly ISMA compliant also depends on the contents of the media and hint tracks. This function does not guarantee that these tracks are compliant. 34 | .SH "SEE ALSO" 35 | .LP 36 | MP4(3) 37 | -------------------------------------------------------------------------------- /doc/MP4ReadRtpHint.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4ReadRtpHint\fR \- Read an RTP hint 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4ReadRtpHint\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4SampleId \fIsampleId\fP, 16 | .br 17 | u_int16_t* \fIpNumPackets\fP = NULL 18 | .br 19 | ); 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fItrackId\fP 27 | Specifies the hint track to which the operation applies. 28 | .TP 29 | \fIsampleId\fP 30 | Specifies which hint sample is to be read. Caveat: the first sample has id 1 not 0. 31 | .TP 32 | \fIpNumPackets\fP 33 | Pointer to variable that will be hold the number of packets in the hint. 34 | .SH "RETURN VALUES" 35 | .LP 36 | Upon success, true (1). Upon an error, false (0). 37 | .SH "DESCRIPTION" 38 | .LP 39 | \fBMP4ReadRtpHint\fR reads the specified hint sample from the specified hint track and enables subsequent calls to MP4ReadRtpPacket() to read the individual RTP packets associated with this hint. If desired, the number of RTP packets associated with this hint is returned. 40 | .LP 41 | Note that a hint track sample is just like any other track sample. I.e MP4ReadSample(), MP4GetSampleSize(), MP4GetSampleTime(), etc. are all valid. The RTP specific functions are provided to interpret the information contain in the hint track samples that give instructions on how to form the actual RTP packets. 42 | .SH "SEE ALSO" 43 | .LP 44 | MP4(3) MP4ReadRtpPacket(3) 45 | -------------------------------------------------------------------------------- /doc/MP4SetAudioProfileLevel.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetAudioProfileLevel\fR \- Sets the minimum MPEG\-4 audio profile and level required to render the contents of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetAudioProfileLevel\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | u_int8_t \fIprofileLevel\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .SH "RETURN VALUES" 22 | .LP 23 | Upon success, true (1). Upon an error, false (0). 24 | .SH "DESCRIPTION" 25 | .LP 26 | \fBMP4SetAudioProfileLevel\fR sets the minumum profile/level of MPEG\-4 audio support necessary to render the contents of the file. 27 | .LP 28 | ISO/IEC 14496\-1:2001 MPEG\-4 Systems defines the following values: 29 | .br 30 | 0x00 Reserved 31 | .br 32 | 0x01 Main Profile @ Level 1 33 | .br 34 | 0x02 Main Profile @ Level 2 35 | .br 36 | 0x03 Main Profile @ Level 3 37 | .br 38 | 0x04 Main Profile @ Level 4 39 | .br 40 | 0x05 Scalable Profile @ Level 1 41 | .br 42 | 0x06 Scalable Profile @ Level 2 43 | .br 44 | 0x07 Scalable Profile @ Level 3 45 | .br 46 | 0x08 Scalable Profile @ Level 4 47 | .br 48 | 0x09 Speech Profile @ Level 1 49 | .br 50 | 0x0A Speech Profile @ Level 2 51 | .br 52 | 0x0B Synthesis Profile @ Level 1 53 | .br 54 | 0x0C Synthesis Profile @ Level 2 55 | .br 56 | 0x0D Synthesis Profile @ Level 3 57 | .br 58 | 0x0E\-0x7F Reserved 59 | .br 60 | 0x80\-0xFD User private 61 | .br 62 | 0xFE No audio profile specified 63 | .br 64 | 0xFF No audio required 65 | .SH "SEE ALSO" 66 | .LP 67 | MP4(3) MP4GetAudioProfileLevel(3) 68 | -------------------------------------------------------------------------------- /doc/MP4SetGraphicsProfileLevel.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetGraphicsProfileLevel\fR \- Sets the minimum MPEG\-4 graphics profile and level required to render the contents of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetGraphicsProfileLevel\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | u_int8_t \fIprofileLevel\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .SH "RETURN VALUES" 22 | .LP 23 | Upon success, true (1). Upon an error, false (0). 24 | .SH "DESCRIPTION" 25 | .LP 26 | \fBMP4SetGraphicsProfileLevel\fR sets the minumum profile/level of MPEG\-4 graphics support necessary to render the contents of the file. 27 | .LP 28 | ISO/IEC 14496\-1:2001 MPEG\-4 Systems defines the following values: 29 | .br 30 | 0x00 Reserved 31 | .br 32 | 0x01 Simple 2D Profile @ Level 1 33 | .br 34 | 0x02\-0x7F Reserved 35 | .br 36 | 0x80\-0xFD User private 37 | .br 38 | 0xFE No audio profile specified 39 | .br 40 | 0xFF No audio required 41 | .SH "SEE ALSO" 42 | .LP 43 | MP4(3) MP4GetGraphicsProfileLevel(3) 44 | -------------------------------------------------------------------------------- /doc/MP4SetHintTrackSdp.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetHintTrackSdp\fR \- Set the SDP media level description of the hint track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetHintTrackSdp\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | const char* sdpString 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fIsdpString\fP 23 | Specifies the new value of the hint track sdp string. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, true (1). Upon an error, false (0). 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4SetHintTrackSdp\fR sets the SDP (IETF RFC 2327) media level fragment for the hint track. This is used by a streaming server to create a complete SDP description of the multimedia session represented by the file. 30 | 31 | .SH "SEE ALSO" 32 | .LP 33 | MP4(3) MP4GetHintTrackSdp(3) MP4AppendHintTrackSdp(3) 34 | -------------------------------------------------------------------------------- /doc/MP4SetODProfileLevel.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetODProfileLevel\fR \- Sets the minimum MPEG\-4 object descriptor profile and level required to render the contents of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetODProfileLevel\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | u_int8_t \fIprofileLevel\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .SH "RETURN VALUES" 22 | .LP 23 | Upon success, true (1). Upon an error, false (0). 24 | .SH "DESCRIPTION" 25 | .LP 26 | \fBMP4SetODProfileLevel\fR sets the minumum profile/level of MPEG\-4 object descriptor support necessary to render the contents of the file. 27 | .LP 28 | ISO/IEC 14496\-1:2001 MPEG\-4 Systems defines the following values: 29 | .br 30 | 0x00 Reserved 31 | .br 32 | 0x01\-0x7F Reserved 33 | .br 34 | 0x80\-0xFD User private 35 | .br 36 | 0xFE No object descriptor profile specified 37 | .br 38 | 0xFF No object descriptor required 39 | .SH "SEE ALSO" 40 | .LP 41 | MP4(3) MP4GetODProfileLevel(3) 42 | -------------------------------------------------------------------------------- /doc/MP4SetRtpTimestampStart.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetRtpTimestampStart\fR \- Set the RTP start time of a hint track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetRtpTimestampStart\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fIhintTrackId\fP, 14 | .br 15 | MP4Timestamp \fIstartTime\fP 16 | .br 17 | ); 18 | .SH "ARGUMENTS" 19 | .LP 20 | .TP 21 | \fIhFile\fP 22 | Specifies the mp4 file to which the operation applies. 23 | .TP 24 | \fItrackId\fP 25 | Specifies the hint track to which the operation applies. 26 | .TP 27 | \fIstartTime\fP 28 | Specifies the desired RTP start timestamp for the hint track. 29 | .SH "RETURN VALUES" 30 | .LP 31 | Upon success, true (1). Upon an error, false (0). 32 | .SH "DESCRIPTION" 33 | .LP 34 | \fBMP4SetRtpTimestampStart\fR sets the RTP timestamp start of the specified hint track. Typically this is a random value that is chosen when the first RTP packet is constructed by the MP4 library. However the value can be set explicitly for the hint track and stored. Typically this is used if it is desired that timestamps start at zero. 35 | .LP 36 | See IETF RFC 1889 for details regarding RTP timestamps and RTCP. 37 | .SH "SEE ALSO" 38 | .LP 39 | MP4(3) MP4GetRtpTimestampStart(3) 40 | -------------------------------------------------------------------------------- /doc/MP4SetSceneProfileLevel.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetSceneProfileLevel\fR \- Sets the minimum MPEG\-4 scene graph profile and level required to render the contents of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetSceneProfileLevel\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | u_int8_t \fIprofileLevel\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .SH "RETURN VALUES" 22 | .LP 23 | Upon success, true (1). Upon an error, false (0). 24 | .SH "DESCRIPTION" 25 | .LP 26 | \fBMP4SetSceneProfileLevel\fR sets the minumum profile/level of MPEG\-4 scene graph support necessary to render the contents of the file. 27 | .LP 28 | ISO/IEC 14496\-1:2001 MPEG\-4 Systems defines the following values: 29 | .br 30 | 0x00 Reserved 31 | .br 32 | 0x01 Simple 2D Profile @ Level 1 33 | .br 34 | 0x02\-0x7F Reserved 35 | .br 36 | 0x80\-0xFD User private 37 | .br 38 | 0xFE No scene graph profile specified 39 | .br 40 | 0xFF No scene graph required 41 | .SH "SEE ALSO" 42 | .LP 43 | MP4(3) MP4GetSceneProfileLevel(3) 44 | -------------------------------------------------------------------------------- /doc/MP4SetSessionSdp.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetSessionSdp\fR \- Set the SDP session level description of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetSessionSdp\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | const char* sdpString 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .TP 22 | \fIsdpString\fP 23 | Specifies the new value of the session sdp string. 24 | .SH "RETURN VALUES" 25 | .LP 26 | Upon success, true (1). Upon an error, false (0). 27 | .SH "DESCRIPTION" 28 | .LP 29 | \fBMP4SetSessionSdp\fR sets the SDP (IETF RFC 2327) session level fragment for the file. This is used by a streaming server to create a complete SDP description of the multimedia session represented by the file. 30 | 31 | .SH "SEE ALSO" 32 | .LP 33 | MP4(3) MP4GetSessionSdp(3) MP4AppendSessionSdp(3) 34 | -------------------------------------------------------------------------------- /doc/MP4SetTrackESConfiguration.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetTrackESConfiguration\fR \- Set the elementary stream (ES) configuration of a track 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetTrackESConfiguration\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP 14 | .br 15 | const u_int8_t* \fIpConfig\fP, 16 | .br 17 | u_int32_t \fIconfigSize\fP 18 | .br 19 | ) 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fItrackId\fP 27 | Specifies the track to which the operation applies. 28 | .TP 29 | \fIpConfig\fP 30 | Specifies a pointer to the ES configuration information. 31 | .TP 32 | \fIconfigSize\fP 33 | Specifies the size of the ES configuration information. 34 | .SH "RETURN VALUES" 35 | .LP 36 | Upon success, true (1). Upon an error, false (0). 37 | .SH "DESCRIPTION" 38 | .LP 39 | \fBMP4SetTrackESConfiguration\fR sets the elementary stream (ES) configuration of the specified track in the mp4 file. This information is codec specific and contains the configuration necessary for the given codec to decode the samples in the track. 40 | 41 | .SH "SEE ALSO" 42 | .LP 43 | MP4(3) 44 | -------------------------------------------------------------------------------- /doc/MP4SetTrackEditDuration.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetTrackEditDuration\fR \- Set the duration of a track edit segment 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetTrackEditDuration\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4EditId \fIeditId\fP, 16 | .br 17 | MP4Duration \fIduration\fP 18 | .br 19 | ); 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fItrackId\fP 27 | Specifies the track to which the operation applies. 28 | .TP 29 | \fIeditId\fP 30 | Specifies the edit segment to which the operation applies. Caveat: the first edit has id 1 not 0. 31 | .TP 32 | \fIduration\fP 33 | Species the new value for the duration in track time scale units. 34 | 35 | .SH "RETURN VALUES" 36 | .LP 37 | Upon success, true (1). Upon an error, false (0). 38 | 39 | .SH "DESCRIPTION" 40 | .LP 41 | \fBMP4SetTrackEditDuration\fR sets the duration of the specified edit segment from the specified track in the track time scale units. See MP4ConvertToTrackDuration() for how to map this value from another time scale. 42 | 43 | .SH "SEE ALSO" 44 | .LP 45 | MP4(3) MP4GetTrackEditDuration(3) 46 | -------------------------------------------------------------------------------- /doc/MP4SetTrackEditDwell.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetTrackEditDwell\fR \- Set the dwell value of a track edit segment 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetTrackEditDwell\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4EditId \fIeditId\fP, 16 | .br 17 | bool \fIdwell\fP 18 | .br 19 | ); 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fItrackId\fP 27 | Specifies the track to which the operation applies. 28 | .TP 29 | \fIeditId\fP 30 | Specifies the edit segment to which the operation applies. Caveat: the first edit has id 1 not 0. 31 | .TP 32 | \fIdwell\fP 33 | Species the new dwell value. 34 | 35 | .SH "RETURN VALUES" 36 | .LP 37 | Upon success, true (1). Upon an error, false (0). 38 | 39 | .SH "DESCRIPTION" 40 | .LP 41 | \fBMP4SetTrackEditDwell\fR sets the dwell value of the specified edit segment from the specified track. 42 | .LP 43 | A value of true (1) indicates that during this edit segment the media will be paused; a value of false (0) indicates that during this edit segment the media will be played at its normal rate. 44 | .SH "SEE ALSO" 45 | .LP 46 | MP4(3) MP4GetTrackEditDwell(3) 47 | -------------------------------------------------------------------------------- /doc/MP4SetTrackEditMediaStart.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetTrackEditMediaStart\fR \- Set the media start time of a track edit segment 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetTrackEditMediaStart\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4EditId \fIeditId\fP, 16 | .br 17 | MP4Timestamp \fImediaStartTime\fP 18 | .br 19 | ); 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fItrackId\fP 27 | Specifies the track to which the operation applies. 28 | .TP 29 | \fIeditId\fP 30 | Specifies the edit segment to which the operation applies. Caveat: the first edit has id 1 not 0. 31 | .TP 32 | \fImediaStartTime\fP 33 | Species the new value for the media start in track time scale units. 34 | 35 | .SH "RETURN VALUES" 36 | .LP 37 | Upon success, true (1). Upon an error, false (0). 38 | 39 | .SH "DESCRIPTION" 40 | .LP 41 | \fBMP4SetTrackEditMediaStart\fR sets the media start time of the specified edit segment from the specified track in the track time scale units. See MP4ConvertToTrackTimestamp() for how to map this value from another time scale. 42 | .LP 43 | Note that this differs from the edit segment start time. For example: 44 | .LP 45 | EditId Start MediaStart Duration 46 | 1 0 15 30 47 | .br 48 | 2 30 120 20 49 | .br 50 | 3 50 3000 10 51 | 52 | .SH "SEE ALSO" 53 | .LP 54 | MP4(3) MP4GetTrackEditMediaStart(3) 55 | -------------------------------------------------------------------------------- /doc/MP4SetVideoProfileLevel.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4SetVideoProfileLevel\fR \- Sets the minimum MPEG\-4 video profile and level required to render the contents of the file 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4SetVideoProfileLevel\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | u_int8_t \fIprofileLevel\fP 14 | .br 15 | ) 16 | .SH "ARGUMENTS" 17 | .LP 18 | .TP 19 | \fIhFile\fP 20 | Specifies the mp4 file to which the operation applies. 21 | .SH "RETURN VALUES" 22 | .LP 23 | Upon success, true (1). Upon an error, false (0). 24 | .SH "DESCRIPTION" 25 | .LP 26 | \fBMP4SetVideoProfileLevel\fR sets the minumum profile/level of MPEG\-4 video support necessary to render the contents of the file. 27 | .LP 28 | ISO/IEC 14496\-1:2001 MPEG\-4 Systems defines the following values: 29 | .br 30 | 0x00 Reserved 31 | .br 32 | 0x01 Simple Profile @ Level 3 33 | .br 34 | 0x02 Simple Profile @ Level 2 35 | .br 36 | 0x03 Simple Profile @ Level 1 37 | .br 38 | 0x04 Simple Scalable Profile @ Level 2 39 | .br 40 | 0x05 Simple Scalable Profile @ Level 1 41 | .br 42 | 0x06 Core Profile @ Level 2 43 | .br 44 | 0x07 Core Profile @ Level 1 45 | .br 46 | 0x08 Main Profile @ Level 4 47 | .br 48 | 0x09 Main Profile @ Level 3 49 | .br 50 | 0x0A Main Profile @ Level 2 51 | .br 52 | 0x0B N\-Bit Profile @ Level 2 53 | .br 54 | 0x0C Hybrid Profile @ Level 2 55 | .br 56 | 0x0D Hybrid Profile @ Level 1 57 | .br 58 | 0x0E Basic Animated Texture @ Level 2 59 | .br 60 | 0x0F Basic Animated Texture @ Level 1 61 | .br 62 | 0x10 Scalable Texture @ Level 3 63 | .br 64 | 0x11 Scalable Texture @ Level 2 65 | .br 66 | 0x12 Scalable Texture @ Level 1 67 | .br 68 | 0x13 Simple Face Animation @ Level 2 69 | .br 70 | 0x14 Simple Face Animation @ Level 1 71 | .br 72 | 0x15\-0x7F Reserved 73 | .br 74 | 0x80\-0xFD User private 75 | .br 76 | 0xFE No audio profile specified 77 | .br 78 | 0xFF No audio required 79 | .SH "SEE ALSO" 80 | .LP 81 | MP4(3) MP4GetVideoProfileLevel(3) 82 | -------------------------------------------------------------------------------- /doc/MP4WriteRtpHint.3: -------------------------------------------------------------------------------- 1 | .TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library" 2 | .SH "NAME" 3 | .LP 4 | \fBMP4WriteRtpHint\fR \- Write an RTP hint 5 | .SH "SYNTAX" 6 | .LP 7 | #include 8 | .LP 9 | bool \fBMP4WriteRtpHint\fR( 10 | .br 11 | MP4FileHandle \fIhFile\fP, 12 | .br 13 | MP4TrackId \fItrackId\fP, 14 | .br 15 | MP4Duration \fIduration\fP, 16 | .br 17 | bool \fIisSyncSample\fP = true 18 | .br 19 | ); 20 | .SH "ARGUMENTS" 21 | .LP 22 | .TP 23 | \fIhFile\fP 24 | Specifies the mp4 file to which the operation applies. 25 | .TP 26 | \fItrackId\fP 27 | Specifies the hint track to which the operation applies. 28 | .TP 29 | \fIduration\fP 30 | The duration for this hint sample. Typically this is the same duration as for the corresponding sample in the reference media track. Caveat: The duration should be in the hint track timescale units, again typically the same as the reference media track. 31 | .TP 32 | \fIisSyncSample\fP 33 | The sync/random access flag for this sample. Typically this is the same as for the corresponding sample in the reference media track. 34 | .SH "RETURN VALUES" 35 | .LP 36 | Upon success, true (1). Upon an error, false (0). 37 | .SH "DESCRIPTION" 38 | .LP 39 | \fBMP4WriteRtpHint\fR writes the current pending hint created with MP4AddRtpHint() to the specified hint track. 40 | 41 | .SH "SEE ALSO" 42 | .LP 43 | MP4(3) MP4AddRtpHint (3) 44 | -------------------------------------------------------------------------------- /doc/doxygen/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/momo0853/mp4v2/c299cd2076249d074bdddea5a04c5e86b903dd4a/doc/doxygen/banner.png -------------------------------------------------------------------------------- /doc/doxygen/footer.html.m4: -------------------------------------------------------------------------------- 1 | changequote(<<,>>)dnl 2 | include(<>)dnl 3 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /doc/doxygen/header.html.m4: -------------------------------------------------------------------------------- 1 | changequote(<<,>>)dnl 2 | include(<>)dnl 3 | 4 | 5 | 6 | __PROJECT_name_formal $title 7 | 8 | 9 | 10 |
11 |
12 | 13 |
14 |
15 | $title 16 |
17 | 24 |
25 | -------------------------------------------------------------------------------- /doc/html/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/momo0853/mp4v2/c299cd2076249d074bdddea5a04c5e86b903dd4a/doc/html/banner.png -------------------------------------------------------------------------------- /doc/html/footer.html.m4: -------------------------------------------------------------------------------- 1 | changequote(<<,>>)dnl 2 | include(<>)dnl 3 | 4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /doc/html/header.html.m4: -------------------------------------------------------------------------------- 1 | changequote(<<,>>)dnl 2 | include(<>)dnl 3 | 4 | 5 | 6 | __TITLE__ 7 | 8 | 9 | 10 |
11 |
12 |
13 | 14 |
15 |
16 | __SHORT_TITLE__ 17 |
18 | 25 |
26 |
27 | -------------------------------------------------------------------------------- /doc/texi/Authors.texi: -------------------------------------------------------------------------------- 1 | @input texinfo @c -*- Texinfo -*- 2 | @c %**start of header 3 | @setfilename Authors.info 4 | @include base/article.texi 5 | @paragraphindent none 6 | @c %**end of header 7 | 8 | @majorheading @value{PROJECT.name.formal} Authors 9 | 10 | This document lists significant contributors to @value{PROJECT.name}. If any contributors are missing please contact one of the project members. More extensive contributor information may be found in sources, docs, and other files where appropriate. 11 | 12 | @example 13 | Edward Groenendaal egroenen@@cisco.com 14 | Jonathon Rubin jb.rubin@@gmail.com 15 | Kona Blend kona8lend@@gmail.com 16 | Rouven Wessling mp4v2@@rouvenwessling.de 17 | @end example 18 | 19 | @heading Authors from original MPEG4IP/libmp4v2 20 | 21 | @example 22 | Dave Mackie dmackie@@cisco.com 23 | Alix Marchandise-Franquet alix@@cisco.com 24 | Bill May wmay@@cisco.com 25 | Ximpo Group Ltd. mp4v2@@ximpo.com 26 | Danijel Kopcinovic danijel.kopcinovic@@adnecto.net 27 | @end example 28 | -------------------------------------------------------------------------------- /doc/texi/BuildRepository.texi: -------------------------------------------------------------------------------- 1 | @input texinfo @c -*- Texinfo -*- 2 | @c %**start of header 3 | @setfilename BuildRepository.info 4 | @include base/article.texi 5 | @include build/commands.texi 6 | @paragraphindent none 7 | @c %**end of header 8 | 9 | @majorheading @value{PROJECT.name.formal} Building the Repository 10 | @contents 11 | 12 | @chapter Overview 13 | @include build/overview.texi 14 | 15 | @chapter Introduction 16 | This document describes the recommended process to build @value{PROJECT.name} from the repository. This process is a @b{superset} of the process to build from a @value{TERM.srcdist} bundle. If you are interested in building from a @value{TERM.srcdist} bundle then this document is not for you. 17 | 18 | @chapter Quickstart 19 | This chapter is for the impatient or those just looking for a quick summary of all the commands used in a typical build. You may skip this summary and jump to @ref{Build Process}. 20 | 21 | @example 22 | @COMMAND.checkout{} 23 | @COMMAND.bootstrap{} 24 | @COMMAND.configure{} 25 | @COMMAND.build{} 26 | @COMMAND.install{} 27 | @COMMAND.dist{} 28 | @end example 29 | 30 | @anchor{Build Process} 31 | @chapter Build Process 32 | 33 | @include build/process.checkout.texi 34 | @include build/process.bootstrap.texi 35 | @include build/process.configure.texi 36 | @include build/process.build.texi 37 | @include build/process.install.texi 38 | @include build/process.dist.texi 39 | @include build/process.doc.texi 40 | @include build/process.google.texi 41 | 42 | @include build/platforms.texi 43 | -------------------------------------------------------------------------------- /doc/texi/BuildSource.texi: -------------------------------------------------------------------------------- 1 | @input texinfo @c -*- Texinfo -*- 2 | @c %**start of header 3 | @setfilename BuildSource.info 4 | @include base/article.texi 5 | @include build/commands.texi 6 | @paragraphindent none 7 | @c %**end of header 8 | 9 | @majorheading @value{PROJECT.name.formal} Building the Source 10 | @contents 11 | 12 | @chapter Overview 13 | @include build/overview.texi 14 | 15 | @chapter Introduction 16 | This document describes the recommended process to build @value{PROJECT.name} from a @value{TERM.srcdist} bundle. This process is a @b{subset} of the process to build directly from the project's repository. If you are interested in building from the repository then this document is not for you. 17 | 18 | @chapter Quickstart 19 | This chapter is for the impatient or those just looking for a quick summary of all the commands used in a typical build. You may skip this summary and jump to @ref{Build Process}. 20 | 21 | @example 22 | @COMMAND.extract{} 23 | @COMMAND.configure{} 24 | @COMMAND.build{} 25 | @COMMAND.install{} 26 | @end example 27 | 28 | @anchor{Build Process} 29 | @chapter Build Process 30 | 31 | @include build/process.extract.texi 32 | @include build/process.configure.texi 33 | @include build/process.build.texi 34 | @include build/process.install.texi 35 | 36 | @include build/platforms.texi 37 | -------------------------------------------------------------------------------- /doc/texi/Documentation.texi: -------------------------------------------------------------------------------- 1 | @input texinfo @c -*- Texinfo -*- 2 | @c %**start of header 3 | @setfilename Documentation.info 4 | @include base/article.texi 5 | @paragraphindent none 6 | @c %**end of header 7 | 8 | @titlepage 9 | @end titlepage 10 | 11 | @majorheading @value{PROJECT.name.formal} Documentation 12 | @include releasenotes/intro.@value{PROJECT.repo.type}.texi 13 | 14 | @heading Introduction 15 | Project @value{PROJECT.name} consists of a C-library and various command-line utilities which permit creation and modification of MP4 files as defined by as defined by @cite{ISO base media file format}, document number @cite{ISO/IEC 14496-12:2005(E)}. 16 | 17 | @heading Official website 18 | The official @url{@value{PROJECT.url.website},website} makes various @url{@value{PROJECT.url.downloads},downloads} available and archives online browesable documentation for releases, including API Reference. Questions, bug-reports and general feedback may be submitted to the @url{@value{PROJECT.url.discussion},discussion} group. 19 | 20 | @ifnothtml 21 | @unnumbered Articles 22 | See Release Notes (@file{doc/ReleaseNotes.txt}) 23 | @* See Building the Source (@file{doc/BuildSource.txt}) 24 | @* See Building the Repository (@file{doc/BuildRepository.txt}) 25 | @* See Authors (@file{doc/Authors.txt}) 26 | 27 | @unnumbered Guides 28 | See Command-line Tools Guide (@file{doc/ToolGuide.txt}) 29 | @end ifnothtml 30 | 31 | @ifhtml 32 | @unnumbered Articles 33 | @enumerate 34 | @item @url{ReleaseNotes.html,Release Notes}. 35 | @item @url{BuildSource.html,Building the Source}. 36 | @item @url{BuildRepository.html,Building the Repository}. 37 | @item @url{Authors.html,Authors}. 38 | @end enumerate 39 | @unnumbered Guides 40 | @enumerate 41 | @item @url{ToolGuide.html,Command-line Tools Guide}. 42 | @end enumerate 43 | @unnumbered Reference 44 | @enumerate 45 | @item @url{api/index.html,API Reference}. 46 | @end enumerate 47 | @end ifhtml 48 | -------------------------------------------------------------------------------- /doc/texi/ReleaseNotes.texi: -------------------------------------------------------------------------------- 1 | @input texinfo @c -*- Texinfo -*- 2 | @c %**start of header 3 | @setfilename ReleaseNotes.info 4 | @include base/article.texi 5 | @paragraphindent none 6 | @c %**end of header 7 | 8 | @titlepage 9 | @end titlepage 10 | 11 | @majorheading @value{PROJECT.name.formal} Release Notes 12 | @include releasenotes/intro.@value{PROJECT.repo.type}.texi 13 | @contents 14 | 15 | @chapter What's New? 16 | [TODO] 17 | 18 | @chapter Breaking Changes 19 | @section Removed deprecated metadata/free-form API. 20 | The following functions have been removed and replaced with iTMF Generic and Tags API. Detailed documentation can be found under API modules section. 21 | 22 | DeleteMetadataAtom(), 23 | DeleteMetadataFreeForm(), 24 | DeleteMetadataGenre(), 25 | GetMetadataByIndex(), 26 | GetMetadataCoverArt(), 27 | GetMetadataCoverArtCount(), 28 | GetMetadataDisk(), 29 | GetMetadataFreeForm(), 30 | GetMetadataGenre(), 31 | GetMetadataString(), 32 | GetMetadataTrack(), 33 | GetMetadataUint16(), 34 | GetMetadataUint8(), 35 | MetadataDelete(), 36 | SetMetadataCoverArt(), 37 | SetMetadataDisk(), 38 | SetMetadataFreeForm(), 39 | SetMetadataGenre(), 40 | SetMetadataString(), 41 | SetMetadataTrack(), 42 | SetMetadataUint16(), 43 | SetMetadataUint8(). 44 | 45 | @appendix Changelog 46 | @appendixsection Version 2.0 47 | @include changelog/version-2.0.texi 48 | 49 | @appendixsection Version 1.9 50 | @include changelog/version-1.9.texi 51 | 52 | @appendixsection Version 1.6 53 | @include changelog/version-1.6.texi 54 | 55 | @appendix SCM repository details 56 | @example 57 | url: @value{PROJECT.repo.url} 58 | root: @value{PROJECT.repo.root} 59 | uuid: @value{PROJECT.repo.uuid} 60 | rev: @value{PROJECT.repo.rev} 61 | date: @value{PROJECT.repo.date} 62 | type: @value{PROJECT.repo.type} 63 | @end example 64 | -------------------------------------------------------------------------------- /doc/texi/base/article.texi: -------------------------------------------------------------------------------- 1 | @ifhtml 2 | @exampleindent 0 3 | @end ifhtml 4 | 5 | @include base/project.texi 6 | @include base/glossary.texi 7 | -------------------------------------------------------------------------------- /doc/texi/base/glossary.texi: -------------------------------------------------------------------------------- 1 | @set OS.cygwin Cygwin 2 | @set OS.freebsd FreeBSD 3 | @set OS.linux Linux 4 | @set OS.osx Mac OS X 5 | @set OS.solaris Solaris 6 | @set OS.unix unix 7 | @set OS.windows Windows 8 | 9 | @set TERM.srcdist source-distribution 10 | -------------------------------------------------------------------------------- /doc/texi/base/guide.texi: -------------------------------------------------------------------------------- 1 | @ifhtml 2 | @exampleindent 0 3 | @end ifhtml 4 | 5 | @include base/project.texi 6 | @include base/glossary.texi 7 | -------------------------------------------------------------------------------- /doc/texi/base/project.texi.m4: -------------------------------------------------------------------------------- 1 | changequote(<<,>>)dnl 2 | include(<>)dnl 3 | @set PROJECT.name __PROJECT_name 4 | @set PROJECT.name.lower __PROJECT_name_lower 5 | @set PROJECT.name.upper __PROJECT_name_upper 6 | @set PROJECT.name.formal __PROJECT_name_formal 7 | @set PROJECT.url.website __PROJECT_url_website 8 | @set PROJECT.url.downloads __PROJECT_url_downloads 9 | @set PROJECT.url.discussion __PROJECT_url_discussion 10 | @set PROJECT.irc __PROJECT_irc 11 | @set PROJECT.bugreport patsubst(__PROJECT_bugreport,@,@@) 12 | @set PROJECT.version __PROJECT_version 13 | @set PROJECT.version.hex __PROJECT_version_hex 14 | @set PROJECT.version.major __PROJECT_version_major 15 | @set PROJECT.version.minor __PROJECT_version_minor 16 | @set PROJECT.version.point __PROJECT_version_point 17 | @set PROJECT.repo.url __PROJECT_repo_url 18 | @set PROJECT.repo.branch __PROJECT_repo_branch 19 | @set PROJECT.repo.root __PROJECT_repo_root 20 | @set PROJECT.repo.uuid __PROJECT_repo_uuid 21 | @set PROJECT.repo.rev __PROJECT_repo_rev 22 | @set PROJECT.repo.date __PROJECT_repo_date 23 | @set PROJECT.repo.type __PROJECT_repo_type 24 | @set PROJECT.build __PROJECT_build 25 | -------------------------------------------------------------------------------- /doc/texi/build/commands.texi: -------------------------------------------------------------------------------- 1 | @macro COMMAND.checkout{} 2 | svn checkout @value{PROJECT.repo.url} @value{PROJECT.name.lower} 3 | cd @value{PROJECT.name.lower} 4 | @end macro 5 | 6 | @macro COMMAND.bootstrap{} 7 | autoreconf -fiv 8 | @end macro 9 | 10 | @macro COMMAND.extract{} 11 | tar xf @value{PROJECT.name.lower}-@value{PROJECT.version}.tar.bz2 12 | cd @value{PROJECT.name.lower}-@value{PROJECT.version}/ 13 | @end macro 14 | 15 | @macro COMMAND.configure{} 16 | rm -fr build/ 17 | mkdir build/ 18 | cd build/ 19 | ../configure 20 | @end macro 21 | 22 | @macro COMMAND.build{} 23 | make 24 | @end macro 25 | 26 | @macro COMMAND.install{} 27 | make install 28 | make install-man 29 | @end macro 30 | 31 | @macro COMMAND.dist{} 32 | make dist 33 | @end macro 34 | -------------------------------------------------------------------------------- /doc/texi/build/overview.texi: -------------------------------------------------------------------------------- 1 | The documented and supported method to build @value{PROJECT.name} uses the GNU build system (also known as the Autotools). You must first obtain the sources by either downloading and extracting the @value{TERM.srcdist} bundle or working directly @value{PROJECT.name}'s Subversion repository. We have build documents for both methods, but unless you are a member of the @value{PROJECT.name} project, you are @b{strongly encouraged} to use the @value{TERM.srcdist} method. 2 | 3 | On other supported platforms which lack Autotools we provide an alternative method for building the software. Please see the appropriate platform section. 4 | -------------------------------------------------------------------------------- /doc/texi/build/platform.common.bundled.texi: -------------------------------------------------------------------------------- 1 | @quotation Note 2 | It is recommended to use the platform distribution's bundled compiler for maximum C++ compatibility. If you build with a custom compiler it will likely introduce non-standard runtime requirements for your users. There are of course many valid reasons to build with unbundled compilers, but be aware that is generally unsupported and left as an exercise to the reader. 3 | @end quotation 4 | -------------------------------------------------------------------------------- /doc/texi/build/platform.common.conf.bi.texi: -------------------------------------------------------------------------------- 1 | @subsection Bi-arch compilation 2 | The preferred method to produce a bi-arch binary is to specify the target (eg. 32-bit) with the following option to configure. This example will produce a 32-bit binary if compiling on a platform which defaults to producing 64-bit binaries. The inverse is also possible. 3 | 4 | @example 5 | ../configure --enable-bi=32 6 | @end example 7 | 8 | @quotation Warning 9 | Currently bi-arch cross-compilation is not supported due to a bug with libtool which fails miserably during linking. 10 | @end quotation 11 | -------------------------------------------------------------------------------- /doc/texi/build/platform.common.conf.default.texi: -------------------------------------------------------------------------------- 1 | @subsection Default Binaries 2 | The preferred method to produce default binaries is to run configure without any options which will compile with debug+optimize and produce static+shared libraries and dynamic executables. 3 | 4 | @example 5 | ../configure 6 | @end example 7 | 8 | @subsection Release Binaries 9 | The preferred method to produce binaries suitable for releases, (ie. which does not contain debug information) is to pass the following to configure: 10 | 11 | @example 12 | ../configure --disable-debug 13 | @end example 14 | 15 | @subsection Developer Binaries 16 | The preferred method to produce binaries suitable for development is to pass the following to configure. Default Binaries will work, however for the best debugging experience we recommend no optimize and no static libraries. 17 | 18 | @example 19 | ../configure --disable-optimize --disable-static 20 | @end example 21 | -------------------------------------------------------------------------------- /doc/texi/build/platform.cygwin.texi: -------------------------------------------------------------------------------- 1 | @section @value{OS.cygwin} 2 | Building on @value{OS.cygwin} is supported. The following are the recommended specifications for this platform; but is not necessarily the only configuration that is possible: 3 | 4 | @itemize @bullet 5 | @item Intel 32-bit or 64-bit hardware 6 | @item @value{OS.cygwin}, gcc 4.3.2 7 | @item gcc 3.4.0 or higher is reported to work 8 | @end itemize 9 | 10 | @quotation Note 11 | As of this writing, @value{OS.cygwin} has available to it several versions of gcc; only one of which may be found and used in the path as @code{gcc} and @code{g++}. Configure will thus find what is probably the older more stable version of gcc in a typical @value{OS.cygwin} environment. If you desire to build with the newer gcc, it is found in the path as @code{gcc-4} and @code{g++-4} respectively and you must indicate to configure the desired versions. Defining the following variables beforing running configure should do the trick: 12 | @end quotation 13 | 14 | @example 15 | setenv CC gcc-4 16 | setenv CXX gcc-4 17 | ../configure 18 | @end example 19 | 20 | @include build/platform.common.conf.default.texi 21 | -------------------------------------------------------------------------------- /doc/texi/build/platform.freebsd.texi: -------------------------------------------------------------------------------- 1 | @section @value{OS.freebsd} 2 | Building on @value{OS.freebsd} is supported. The following are the recommended specifications for this platform; but is not necessarily the only configuration that is possible: 3 | 4 | @itemize @bullet 5 | @item Intel 32-bit or 64-bit hardware 6 | @item @value{OS.freebsd} 7.0 Release, gcc 4.2.1 7 | @item gcc 3.4.0 or higher is reported to work 8 | @end itemize 9 | 10 | @include build/platform.common.bundled.texi 11 | @include build/platform.common.conf.default.texi 12 | @include build/platform.common.conf.bi.texi 13 | -------------------------------------------------------------------------------- /doc/texi/build/platform.linux.texi: -------------------------------------------------------------------------------- 1 | @section @value{OS.linux} 2 | Building on @value{OS.linux} is well supported as it is used by maintainers of this project. The following are the recommended specifications for this platform; but is not necessarily the only configuration that is possible: 3 | 4 | @itemize @bullet 5 | @item Intel 32-bit or 64-bit hardware 6 | @item Fedora 10, gcc 4.3.2 7 | @item gcc 3.4.0 or higher is reported to work 8 | @end itemize 9 | 10 | @include build/platform.common.bundled.texi 11 | @include build/platform.common.conf.default.texi 12 | @include build/platform.common.conf.bi.texi 13 | -------------------------------------------------------------------------------- /doc/texi/build/platform.osx.texi: -------------------------------------------------------------------------------- 1 | @section @value{OS.osx} 2 | Building on @value{OS.osx} is well supported as it is used by maintainers of this project. The following are the recommended specifications for this platform; but is not necessarily the only configuration that is possible: 3 | 4 | @itemize @bullet 5 | @item Mac Intel hardware 6 | @item Mac OS X 10.5.7 7 | @item Xcode-3.1.2 8 | @item gcc 4.0.1 (Apple Inc. build 5493) 9 | @item gcc 4.2.1 (Apple Inc. build 5570) 10 | @end itemize 11 | 12 | @include build/platform.common.bundled.texi 13 | 14 | @include build/platform.common.conf.default.texi 15 | 16 | @subsection Universal Binaries - all architectures 17 | The preferred method to produce universal binaries for all supported architectures is to pass the following option to configure. As of this writing, architectures @{ i386, x86_64, ppc, ppc64 @} are built. 18 | 19 | @example 20 | ../configure --enable-ub 21 | @end example 22 | 23 | @subsection Universal Binaries - selected architectures 24 | The preferred method to produce universal binaries for selected architectures is to specify a comma-delimited list specifying the desired architecture identifiers. Passing the following option will produce universal binaries for architectures @{ i386, x86_64 @}. 25 | 26 | @example 27 | ../configure --enable-ub=i386,x86_64 28 | @end example 29 | -------------------------------------------------------------------------------- /doc/texi/build/platform.solaris.texi: -------------------------------------------------------------------------------- 1 | @section @value{OS.solaris} 2 | Building on @value{OS.solaris} is supported. The following are the recommended specifications for this platform; but is not necessarily the only configuration that is possible: 3 | 4 | @itemize @bullet 5 | @item Intel 32-bit or 64-bit hardware 6 | @item @value{OS.solaris} 10u6, gcc 3.4.3 7 | @item gcc 3.4.0 or higher is reported to work 8 | @end itemize 9 | 10 | @include build/platform.common.bundled.texi 11 | @quotation Note 12 | @value{OS.solaris} does not (yet) really bundle a compiler. The recommendation is to use the companion-disk compiler for maximum C++ runtime compatibility. It is usually found in @file{/usr/sfw/bin}. 13 | @end quotation 14 | 15 | @include build/platform.common.conf.default.texi 16 | @include build/platform.common.conf.bi.texi 17 | -------------------------------------------------------------------------------- /doc/texi/build/platform.windows.texi: -------------------------------------------------------------------------------- 1 | @section @value{OS.windows} 2 | Native builds on @value{OS.windows} is supported via Microsoft's Visual Studio package. Both the commercial version and free version (express) are known to work. The following are the recommended specifications for this platform; but is not necessarily the only configuration that is possible: 3 | 4 | @itemize @bullet 5 | @item Intel 32-bit or 64-bit hardware 6 | @item @value{OS.windows} 2000 or higher, Visual Studio 9.0 (aka. Visual Studio 2008) 7 | @item Visual Studio 9.0 Express is reported to work 8 | @end itemize 9 | 10 | Only 32-bit binaries are targeted, and win32-API is set to @value{OS.windows} 2000 or higher. Older versions of @value{OS.windows}, or win32-API are not supported. 11 | 12 | @value{PROJECT.name} has directory @file{vstudio9.0/} which contains the necessary solution+project files to produce a basic build of libmp4v2's DLL and several command-line executables. Enabling things such as debugging, optimization, etc, are all left as an exercise to the user. 13 | 14 | @quotation Warning 15 | Project meta-data is stored in header @file{project.h}. A proper source distribution is built using autotools and generates @file{TOP/include/mp4v2/project.h} correctly, which is then bundled with our source distribution. This is adequate for building on the @value{OS.windows} platform. 16 | 17 | However, if you are building from the repository, be warned that there is no method to automatically generate @file{project.h} on Windows. Instead, we periodically checkin a copy of this file (generated using autotools) as @file{vstudio9.0/include/mp4v2/project.h} which may from time to time get out of date. If it is significantly out of date, you should find the latest source distribution and copy the @file{project.h} from there. 18 | @end quotation 19 | -------------------------------------------------------------------------------- /doc/texi/build/platforms.texi: -------------------------------------------------------------------------------- 1 | @chapter Platform Notes 2 | @value{PROJECT.name} builds on many unix-style platforms, also commonly referred to as posix-style systems. Building on @value{OS.osx}, @value{OS.linux}, @value{OS.freebsd}, @value{OS.solaris}, @value{OS.cygwin}, @value{OS.windows} are known to work. 3 | 4 | Similar platforms should also work. Please see the following platform specific notes for instructions on commonly used options for various platforms. 5 | 6 | @include build/platform.osx.texi 7 | @include build/platform.linux.texi 8 | @include build/platform.freebsd.texi 9 | @include build/platform.solaris.texi 10 | @include build/platform.cygwin.texi 11 | @include build/platform.windows.texi 12 | -------------------------------------------------------------------------------- /doc/texi/build/process.bootstrap.texi: -------------------------------------------------------------------------------- 1 | @section Boostrap (Autotools) 2 | 3 | The following command causes forces Autotools to regenerate all files and install helper scripts needed at configure-time and to regenerate all files. 4 | 5 | @example 6 | @COMMAND.bootstrap{} 7 | @end example 8 | 9 | If you are a project member and preparing for a release, it is important to note that the versions of Autotools available in your path will directly effect files added to the bundle. At the time of writing, the following versions of Autotools are recommended; in some cases a minimum is hard-coded and warnings will be issued if in violation: 10 | 11 | @itemize 12 | @item GNU autoconf 2.61 or higher (lower versions might work) 13 | @item GNU automake 1.10 or higher (lower versions might work) 14 | @item GNU libtool 1.5.26 or higher (lower versions might work) 15 | @end itemize 16 | -------------------------------------------------------------------------------- /doc/texi/build/process.build.texi: -------------------------------------------------------------------------------- 1 | @section Build 2 | 3 | The following command will build @value{PROJECT.name}. 4 | 5 | @example 6 | @COMMAND.build{} 7 | @end example 8 | 9 | On some platforms @code{make} refers to a BSD-flavor of make which is not compatible with this project. Check if @code{gmake} is installed, and if it is, substitute @code{gmake} wherever you may see @code{make} in this document. Otherwise you will need to install GNU make package version 3.81 or higher. Lower versions might work. 10 | -------------------------------------------------------------------------------- /doc/texi/build/process.checkout.texi: -------------------------------------------------------------------------------- 1 | @section Checkout Sources 2 | 3 | Checkout sources from the project's Subversion repository. 4 | 5 | Sources are checked out from either the trunk, release or a branch. This document was generated from one of those, and for example purposes, we will use exactly the same URL which used to create the distribution which contains this document. 6 | 7 | If you are a project member, then you may add the appropriate login/password information as needed. 8 | 9 | @example 10 | @COMMAND.checkout{} 11 | @end example 12 | 13 | It is recommended to use Subversion 1.5.0 or higher. 14 | Lower versions might work. 15 | -------------------------------------------------------------------------------- /doc/texi/build/process.dist.texi: -------------------------------------------------------------------------------- 1 | @section Create Distribution 2 | 3 | The following command will create a @value{PROJECT.name} source distribution. It is during this step that shipped documentation is generated. 4 | 5 | @example 6 | @COMMAND.dist{} 7 | @end example 8 | 9 | This step in the build process introduces additional requirements to the host system. While most of the following utilities are generally available, @command{help2man} is used to generate man-pages; however if this command is not available the man-pages will be empty. This is acceptable for non-release builds but for full quality builds this command is required. 10 | 11 | @itemize 12 | @item GNU help2man 1.36 or higher (lower versions should work) 13 | @item GNU tar 1.15.1 or higher (lower versions should work) 14 | @item GNU gzip 1.3.10 or higher (lower versions should work) 15 | @item bzip2 1.0.4 or higher (lower versions should work) 16 | @item Info-ZIP zip 2.32 or higher (lower versions should work) 17 | @end itemize 18 | -------------------------------------------------------------------------------- /doc/texi/build/process.extract.texi: -------------------------------------------------------------------------------- 1 | @section Extract 2 | Extract sources from a @value{TERM.srcdist} bundle. Releases are available from @url{@value{PROJECT.url.website}} in the @url{@value{PROJECT.url.downloads},downloads} section. 3 | 4 | @example 5 | @COMMAND.extract{} 6 | @end example 7 | 8 | Older versions of @code{tar} may not automatically uncompress the bundle, so you might have to either enter additional flags manually, or first decompress the bundle before extracting. Some possible command variations for uncompressing a @file{bz2} file: 9 | 10 | @example 11 | tar xjf @value{PROJECT.name.lower}-@value{PROJECT.version}.tar.bz2 12 | bunzip2 -c @value{PROJECT.name.lower}-@value{PROJECT.version}.tar.bz2 | tar xf - 13 | bzcat @value{PROJECT.name.lower}-@value{PROJECT.version}.tar.bz2 | tar xf - 14 | @end example 15 | 16 | And for a @file{gz} file: 17 | 18 | @example 19 | tar xzf @value{PROJECT.name.lower}-@value{PROJECT.version}.tar.gz 20 | gunzip -c @value{PROJECT.name.lower}-@value{PROJECT.version}.tar.gz | tar xf - 21 | gzcat @value{PROJECT.name.lower}-@value{PROJECT.version}.tar.gz | tar xf - 22 | @end example 23 | -------------------------------------------------------------------------------- /doc/texi/build/process.google.texi: -------------------------------------------------------------------------------- 1 | @section Post Site and API Documentation to project website. 2 | 3 | This step is for project maintainers and can be used to update Site and API documentation. The following components are updated: 4 | 5 | @itemize 6 | @item Featured Wiki article: BuildRepository 7 | @item Featured Wiki article: BuildSource 8 | @item MP4v2 (trunk) docs (includes Release Notes and other articles, and API docs). 9 | @end itemize 10 | 11 | This procedure may only be run from a *nix platform and has only been tested on @value{OS.osx}. 12 | 13 | @table @samp 14 | 15 | @item make google.clean 16 | Clean any local working copy of google changeset. 17 | 18 | @item make google.post 19 | Generate required docs, sparse-checkout google tree, remove files which are no longer generated, add new files which are generated, and update existing files. 20 | 21 | @item svn ci -m "-refreshed GoogleCode site+api docs." google/. 22 | Check-in changes. This might take several minutes, especially if your upstream bandwidth is limited. 23 | 24 | @end table 25 | -------------------------------------------------------------------------------- /doc/texi/build/process.install.texi: -------------------------------------------------------------------------------- 1 | @anchor{Install} 2 | @section Install 3 | 4 | The following command will install @value{PROJECT.name}. 5 | 6 | @example 7 | @COMMAND.install{} 8 | @end example 9 | -------------------------------------------------------------------------------- /doc/texi/changelog/version-1.6.texi: -------------------------------------------------------------------------------- 1 | @enumerate 2 | @item 3 | Branched libmp4v2 module from mpeg4ip project version 1.6.1. 4 | @end enumerate 5 | -------------------------------------------------------------------------------- /doc/texi/changelog/version-1.9.texi: -------------------------------------------------------------------------------- 1 | @enumerate 2 | @item 3 | Renamed public API top-level header to @code{} and added namespaces for implementation (private) symbols. Only public API symbols are exported for dynamic (shared) or DLL libraries. All other symbols are now private, notwithstanding static-library usage. 4 | 5 | @item 6 | Added initial AC3 support. 7 | 8 | @item 9 | Added native Windows port. The port targets @code{WINVER 0x0500} which is Windows 2000 or higher. 10 | 11 | @item 12 | Added QuickTime and Nero chapter support. See @command{mp4chaps} command-line utility. 13 | @* Contributed by Ullrich Pollähne . 14 | 15 | @item 16 | Enhanced @command{mp4art} to support multiple cover-art atoms. 17 | 18 | @item 19 | Dropped @command{mp4dump} and replaced with @command{mp4file} which supports general file operations. 20 | 21 | @item 22 | Added @command{mp4track} with colr-box and pasp-box support. 23 | 24 | @item 25 | Fixed corruption of @b{udta.name} atom during read-in. 26 | 27 | @item 28 | Enhanced @command{mp4file --dump} to show hexdump-style canonical hex+ASCII data. 29 | 30 | @item 31 | Enhanced @command{mp4file --dump} to show human-readble value for tag @b{typeCode} values. 32 | 33 | @item 34 | Enhanced @command{mp4file --dump} to show human-readble value for ISO-639-2/T language codes. 35 | 36 | @item 37 | Added new public-API: MP4GetTrackLanguage(). 38 | 39 | @item 40 | Added new public-API: MP4SetTrackLanguage(). 41 | 42 | @item 43 | Added support for GCC precompiled-headers on various *nix platforms to speed up builds as we are using quite a few C++ headers. 44 | 45 | @item 46 | Enhanced @command{mp4track} to facilitate modification of @{ enabled, inmovie, inpreview, altgroup, volume, width, height, language, hdlrname, udtaname @} properties. 47 | 48 | @item 49 | Added new public-API: MP4GetTrackDurationPerChunk(). 50 | 51 | @item 52 | Added new public-API: MP4SetTrackDurationPerChunk() to override default per-track chunk duration. 53 | 54 | @item 55 | Added new public-API: MP4WriteSampleDependency(). 56 | 57 | @item 58 | Replaced (undocumented) public-API: MP4CreateEx() with MP4CreateProvider(). 59 | 60 | @item 61 | Added new public-API for iTMF Generic functionality. 62 | @end enumerate 63 | -------------------------------------------------------------------------------- /doc/texi/changelog/version-2.0.texi: -------------------------------------------------------------------------------- 1 | @enumerate 2 | @item 3 | Removed deprecated metadata/free-form API and replaced with iTMF Generic and Tags API. 4 | 5 | @item 6 | Added new public-API: MP4SetLogCallback(). 7 | 8 | @end enumerate 9 | -------------------------------------------------------------------------------- /doc/texi/releasenotes/intro.developer.texi: -------------------------------------------------------------------------------- 1 | @quotation Warning 2 | This is a @b{developer} release which includes all the normal pieces of a stable release but is considered @b{unstable}. 3 | The purpose of a developer release is to make available to @value{PROJECT.name} developers features which require collaborative testing. 4 | @end quotation 5 | 6 | -------------------------------------------------------------------------------- /doc/texi/releasenotes/intro.stable.texi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/momo0853/mp4v2/c299cd2076249d074bdddea5a04c5e86b903dd4a/doc/texi/releasenotes/intro.stable.texi -------------------------------------------------------------------------------- /doc/texi/tool/mp4art.texi: -------------------------------------------------------------------------------- 1 | @chapter mp4art 2 | This tool is used to manage iTunes Metadata Cover-art which is typically used to embed an image to a song file. For example, the songs in an album collection might all contain an image of the album cover art. This data is usually found in @samp{.m4a}, @samp{.m4v} and @samp{.mov} files. 3 | 4 | @table @samp 5 | @item --art-any 6 | act on all covr-boxes (default). 7 | Specifies the scope of the action to operate on all, if applicable, covr-boxes. 8 | 9 | @item --art-index IDX 10 | act on covr-box index IDX. 11 | Specifies the scope of the action to operate on single covr-box INDEX. 12 | @end table 13 | 14 | @table @samp 15 | @item --list 16 | list all covr-boxes. 17 | @example 18 | IDX BYTES CRC32 TYPE FILE 19 | ---------------------------------------------------------------------- 20 | 0 173613 710a3ec9 JPEG 01 Life In Technicolor.m4a 21 | 0 173613 710a3ec9 JPEG 02 Cemeteries Of London.m4a 22 | 0 173613 710a3ec9 JPEG 03 Lost!.m4a 23 | 0 173613 710a3ec9 JPEG 04 42.m4a 24 | 0 173613 710a3ec9 JPEG 05 Lovers In Japan _ Reign Of Love.m4a 25 | 0 173613 710a3ec9 JPEG 06 Yes.m4a 26 | 0 173613 710a3ec9 JPEG 07 Viva La Vida.m4a 27 | 0 173613 710a3ec9 JPEG 08 Violet Hill.m4a 28 | 0 173613 710a3ec9 JPEG 09 Strawberry Swing.m4a 29 | 0 173613 710a3ec9 JPEG 10 Death And All His Friends.m4a 30 | @end example 31 | 32 | @item --add IMG 33 | add covr-box from IMG file. 34 | 35 | @item --replace IMG 36 | replace covr-box with IMG file. 37 | 38 | @item --remove 39 | remove covr-box. 40 | 41 | @item --extract 42 | extract covr-box. 43 | This will extract all covr-box data to image files in the format of @samp{BASENAME.art[INDEX].TYPE} . 44 | 45 | Example, add PNG image file: 46 | @example 47 | mp4art --add ACDC.png mysong.m4a 48 | @end example 49 | 50 | Example, extract image files from file: 51 | @example 52 | mp4art --extract mysong.m4a 53 | @end example 54 | 55 | @end table 56 | -------------------------------------------------------------------------------- /doc/texi/tool/mp4file.texi: -------------------------------------------------------------------------------- 1 | @chapter mp4file 2 | 3 | @table @samp 4 | @item --list 5 | list (summary information). 6 | This will produce brief report when summarizing each mp4 file. 7 | @b{BRAND} shows the file's main brand identifier. 8 | @b{COMPAT} shows additional brands for which the file purports to be comaptible with. 9 | @b{SIZING} displays if the file has 64-bit extensions of any kind, otherwise 32-bit. 10 | Example output: 11 | @example 12 | BRAND COMPAT SIZING FILE 13 | ---------------------------------------------------------------------- 14 | M4A M4A,isom,mp42 32-bit Song.m4a 15 | mp42 isom,mp42 32-bit Movie1.m4v 16 | mp42 isom,mp42 32-bit Movie2.m4v 17 | @end example 18 | 19 | @item --optimize 20 | optimize mp4 structure. 21 | This will rewrite the entire mp4 file which, if needed, will clean up 22 | any unused (free) sections, and re-order the atoms in a manner somewhat 23 | consistent with the best-practices described in the ISO base media file 24 | specification. 25 | 26 | @item --dump 27 | dump mp4 structure in human-readable format. 28 | An ASCII dump of mp4 atoms is printed to stdout. This action is heavily 29 | influenced by @samp{--debug} option. 30 | 31 | Example, list some files: 32 | @example 33 | mp4file --list *.mp4 *.m4a *.m4v 34 | @end example 35 | 36 | Example, dump a file with more than usual debugging information: 37 | @example 38 | mp4file -dd --dump movie.m4v 39 | @end example 40 | @end table 41 | -------------------------------------------------------------------------------- /include/mp4v2/project.h.in: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_PROJECT_H 2 | #define MP4V2_PROJECT_H 3 | 4 | /*****************************************************************************/ 5 | 6 | #define MP4V2_PROJECT_name "@PROJECT_name@" 7 | #define MP4V2_PROJECT_name_lower "@PROJECT_name_lower@" 8 | #define MP4V2_PROJECT_name_upper "@PROJECT_name_upper@" 9 | #define MP4V2_PROJECT_name_formal "@PROJECT_name_formal@" 10 | #define MP4V2_PROJECT_url_website "@PROJECT_url_website@" 11 | #define MP4V2_PROJECT_url_downloads "@PROJECT_url_downloads@" 12 | #define MP4V2_PROJECT_url_discussion "@PROJECT_url_discussion@" 13 | #define MP4V2_PROJECT_irc "@PROJECT_irc@" 14 | #define MP4V2_PROJECT_bugreport "@PROJECT_bugreport@" 15 | #define MP4V2_PROJECT_version "@PROJECT_version@" 16 | #define MP4V2_PROJECT_version_hex @PROJECT_version_hex@ 17 | #define MP4V2_PROJECT_version_major @PROJECT_version_major@ 18 | #define MP4V2_PROJECT_version_minor @PROJECT_version_minor@ 19 | #define MP4V2_PROJECT_version_point @PROJECT_version_point@ 20 | #define MP4V2_PROJECT_repo_url "@PROJECT_repo_url@" 21 | #define MP4V2_PROJECT_repo_branch "@PROJECT_repo_branch@" 22 | #define MP4V2_PROJECT_repo_root "@PROJECT_repo_root@" 23 | #define MP4V2_PROJECT_repo_uuid "@PROJECT_repo_uuid@" 24 | #define MP4V2_PROJECT_repo_rev @PROJECT_repo_rev@ 25 | #define MP4V2_PROJECT_repo_date "@PROJECT_repo_date@" 26 | #define MP4V2_PROJECT_repo_type "@PROJECT_repo_type@" 27 | #define MP4V2_PROJECT_build "@PROJECT_build@" 28 | 29 | /*****************************************************************************/ 30 | 31 | #endif /* MP4V2_PROJECT_H */ 32 | -------------------------------------------------------------------------------- /libplatform/config.h: -------------------------------------------------------------------------------- 1 | /* libplatform/config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define to 1 if you have the header file. */ 4 | #define HAVE_DLFCN_H 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #define HAVE_INTTYPES_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_MEMORY_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #define HAVE_STDINT_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #define HAVE_STDLIB_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #define HAVE_STRINGS_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #define HAVE_STRING_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #define HAVE_SYS_STAT_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #define HAVE_SYS_TYPES_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #define HAVE_UNISTD_H 32 | 33 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 34 | */ 35 | #undef LT_OBJDIR 36 | 37 | /* Define to 1 if LFS should be activated */ 38 | #undef NEED_LFS_ACTIVATION 39 | 40 | /* Name of package */ 41 | #undef PACKAGE 42 | 43 | /* Define to the address where bug reports for this package should be sent. */ 44 | #undef PACKAGE_BUGREPORT 45 | 46 | /* Define to the full name of this package. */ 47 | #undef PACKAGE_NAME 48 | 49 | /* Define to the full name and version of this package. */ 50 | #undef PACKAGE_STRING 51 | 52 | /* Define to the one symbol short name of this package. */ 53 | #undef PACKAGE_TARNAME 54 | 55 | /* Define to the home page for this package. */ 56 | #undef PACKAGE_URL 57 | 58 | /* Define to the version of this package. */ 59 | #undef PACKAGE_VERSION 60 | 61 | /* Define to 1 if you have the ANSI C header files. */ 62 | #undef STDC_HEADERS 63 | 64 | /* Version number of package */ 65 | #undef VERSION 66 | -------------------------------------------------------------------------------- /libplatform/config.h.in: -------------------------------------------------------------------------------- 1 | /* libplatform/config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define to 1 if you have the header file. */ 4 | #undef HAVE_DLFCN_H 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_INTTYPES_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_MEMORY_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_STDINT_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDLIB_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STRINGS_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRING_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_SYS_STAT_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_TYPES_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_UNISTD_H 32 | 33 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 34 | */ 35 | #undef LT_OBJDIR 36 | 37 | /* Define to 1 if LFS should be activated */ 38 | #undef NEED_LFS_ACTIVATION 39 | 40 | /* Name of package */ 41 | #undef PACKAGE 42 | 43 | /* Define to the address where bug reports for this package should be sent. */ 44 | #undef PACKAGE_BUGREPORT 45 | 46 | /* Define to the full name of this package. */ 47 | #undef PACKAGE_NAME 48 | 49 | /* Define to the full name and version of this package. */ 50 | #undef PACKAGE_STRING 51 | 52 | /* Define to the one symbol short name of this package. */ 53 | #undef PACKAGE_TARNAME 54 | 55 | /* Define to the home page for this package. */ 56 | #undef PACKAGE_URL 57 | 58 | /* Define to the version of this package. */ 59 | #undef PACKAGE_VERSION 60 | 61 | /* Define to 1 if you have the ANSI C header files. */ 62 | #undef STDC_HEADERS 63 | 64 | /* Version number of package */ 65 | #undef VERSION 66 | -------------------------------------------------------------------------------- /libplatform/impl.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_PLATFORM_IMPL_H 2 | #define MP4V2_PLATFORM_IMPL_H 3 | 4 | /////////////////////////////////////////////////////////////////////////////// 5 | 6 | #include "libplatform/platform.h" 7 | #if defined _WIN32 8 | #include "libplatform/platform_win32_impl.h" 9 | #endif 10 | 11 | /////////////////////////////////////////////////////////////////////////////// 12 | 13 | #endif // MP4V2_PLATFORM_IMPL_H 14 | -------------------------------------------------------------------------------- /libplatform/io/FileSystem_posix.cpp: -------------------------------------------------------------------------------- 1 | #include "libplatform/impl.h" 2 | #include 3 | 4 | namespace mp4v2 { namespace platform { namespace io { 5 | 6 | /////////////////////////////////////////////////////////////////////////////// 7 | 8 | bool 9 | FileSystem::exists( string path_ ) 10 | { 11 | struct stat buf; 12 | return stat( path_.c_str(), &buf ) == 0; 13 | } 14 | 15 | /////////////////////////////////////////////////////////////////////////////// 16 | 17 | bool 18 | FileSystem::isDirectory( string path_ ) 19 | { 20 | struct stat buf; 21 | if( stat( path_.c_str(), &buf )) 22 | return false; 23 | return S_ISDIR( buf.st_mode ); 24 | } 25 | 26 | /////////////////////////////////////////////////////////////////////////////// 27 | 28 | bool 29 | FileSystem::isFile( string path_ ) 30 | { 31 | struct stat buf; 32 | if( stat( path_.c_str(), &buf )) 33 | return false; 34 | return S_ISREG( buf.st_mode ); 35 | } 36 | 37 | /////////////////////////////////////////////////////////////////////////////// 38 | 39 | bool 40 | FileSystem::getFileSize( string path_, File::Size& size_ ) 41 | { 42 | size_ = 0; 43 | struct stat buf; 44 | if( stat( path_.c_str(), &buf )) 45 | return true; 46 | size_ = buf.st_size; 47 | return false; 48 | } 49 | 50 | /////////////////////////////////////////////////////////////////////////////// 51 | 52 | bool 53 | FileSystem::rename( string from, string to ) 54 | { 55 | return ::rename( from.c_str(), to.c_str() ) != 0; 56 | } 57 | 58 | /////////////////////////////////////////////////////////////////////////////// 59 | 60 | string FileSystem::DIR_SEPARATOR = "/"; 61 | string FileSystem::PATH_SEPARATOR = ":"; 62 | 63 | /////////////////////////////////////////////////////////////////////////////// 64 | 65 | }}} // namespace mp4v2::platform::io 66 | -------------------------------------------------------------------------------- /libplatform/number/random.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_PLATFORM_NUMBER_RANDOM_H 2 | #define MP4V2_PLATFORM_NUMBER_RANDOM_H 3 | 4 | namespace mp4v2 { namespace platform { namespace number { 5 | 6 | /////////////////////////////////////////////////////////////////////////////// 7 | 8 | /// Generate 32-bit pseudo-random number. 9 | MP4V2_EXPORT uint32_t random32(); 10 | 11 | /// Seed pseudo-random number generator. 12 | MP4V2_EXPORT void srandom( uint32_t ); 13 | 14 | /////////////////////////////////////////////////////////////////////////////// 15 | 16 | }}} // namespace mp4v2::platform::number 17 | 18 | #endif // MP4V2_PLATFORM_NUMBER_RANDOM_H 19 | -------------------------------------------------------------------------------- /libplatform/number/random_posix.cpp: -------------------------------------------------------------------------------- 1 | #include "libplatform/impl.h" 2 | #include 3 | 4 | namespace mp4v2 { namespace platform { namespace number { 5 | 6 | /////////////////////////////////////////////////////////////////////////////// 7 | 8 | uint32_t 9 | random32() 10 | { 11 | return uint32_t( ::random() ); 12 | } 13 | 14 | /////////////////////////////////////////////////////////////////////////////// 15 | 16 | void 17 | srandom( uint32_t seed ) 18 | { 19 | ::srandom( seed ); 20 | } 21 | 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | }}} // namespace mp4v2::platform::time 25 | -------------------------------------------------------------------------------- /libplatform/number/random_win32.cpp: -------------------------------------------------------------------------------- 1 | #include "libplatform/impl.h" 2 | #include 3 | 4 | namespace mp4v2 { namespace platform { namespace number { 5 | 6 | /////////////////////////////////////////////////////////////////////////////// 7 | 8 | uint32_t 9 | random32() 10 | { 11 | return uint32_t( ::rand() << 16 | ::rand() ); 12 | } 13 | 14 | /////////////////////////////////////////////////////////////////////////////// 15 | 16 | void 17 | srandom( uint32_t seed ) 18 | { 19 | ::srand( seed ); 20 | } 21 | 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | }}} // namespace mp4v2::platform::time 25 | -------------------------------------------------------------------------------- /libplatform/platform.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_PLATFORM_PLATFORM_H 2 | #define MP4V2_PLATFORM_PLATFORM_H 3 | 4 | /// @namespace mp4v2::platform (private) Platform abstraction. 5 | /// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. 6 | /// 7 | /// This namespace implements platform abstractions that are useful for 8 | /// keeping the code base portable. 9 | 10 | /// @namespace mp4v2::platform::io (private) I/O. 11 | /// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. 12 | 13 | /// @namespace mp4v2::platform::number (private) Number. 14 | /// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. 15 | 16 | /// @namespace mp4v2::platform::sys (private) System. 17 | /// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. 18 | 19 | /////////////////////////////////////////////////////////////////////////////// 20 | 21 | #if defined( _WIN32 ) 22 | # include "libplatform/platform_win32.h" 23 | #else 24 | # include "libplatform/platform_posix.h" 25 | #endif 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | #include "libplatform/warning.h" 30 | #include "libplatform/endian.h" 31 | 32 | #include "libplatform/io/File.h" 33 | #include "libplatform/io/FileSystem.h" 34 | 35 | #include "libplatform/number/random.h" 36 | #include "libplatform/process/process.h" 37 | #include "libplatform/prog/option.h" 38 | #include "libplatform/sys/error.h" 39 | #include "libplatform/time/time.h" 40 | 41 | /////////////////////////////////////////////////////////////////////////////// 42 | 43 | #endif // MP4V2_PLATFORM_PLATFORM_H 44 | -------------------------------------------------------------------------------- /libplatform/platform_base.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_PLATFORM_BASE_H 2 | #define MP4V2_PLATFORM_BASE_H 3 | 4 | /////////////////////////////////////////////////////////////////////////////// 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | /////////////////////////////////////////////////////////////////////////////// 33 | 34 | #endif // MP4V2_PLATFORM_BASE_H 35 | -------------------------------------------------------------------------------- /libplatform/process/process.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_PLATFORM_PROCESS_PROCESS_H 2 | #define MP4V2_PLATFORM_PROCESS_PROCESS_H 3 | 4 | /// @namespace mp4v2::platform::process (private) Process. 5 | /// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. 6 | namespace mp4v2 { namespace platform { namespace process { 7 | 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | MP4V2_EXPORT int32_t getpid(); 11 | 12 | /////////////////////////////////////////////////////////////////////////////// 13 | 14 | }}} // namespace mp4v2::platform::process 15 | 16 | #endif // MP4V2_PLATFORM_PROCESS_PROCESS_H 17 | -------------------------------------------------------------------------------- /libplatform/process/process_posix.cpp: -------------------------------------------------------------------------------- 1 | #include "libplatform/impl.h" 2 | 3 | namespace mp4v2 { namespace platform { namespace process { 4 | 5 | /////////////////////////////////////////////////////////////////////////////// 6 | 7 | int32_t 8 | getpid() 9 | { 10 | return ::getpid(); 11 | } 12 | 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | }}} // namespace mp4v2::platform::process 16 | -------------------------------------------------------------------------------- /libplatform/process/process_win32.cpp: -------------------------------------------------------------------------------- 1 | #include "libplatform/impl.h" 2 | #include 3 | 4 | namespace mp4v2 { namespace platform { namespace process { 5 | 6 | /////////////////////////////////////////////////////////////////////////////// 7 | 8 | int32_t 9 | getpid() 10 | { 11 | return ::_getpid(); 12 | } 13 | 14 | /////////////////////////////////////////////////////////////////////////////// 15 | 16 | }}} // namespace mp4v2::platform::process 17 | -------------------------------------------------------------------------------- /libplatform/sys/error.cpp: -------------------------------------------------------------------------------- 1 | #include "libplatform/impl.h" 2 | 3 | namespace mp4v2 { namespace platform { namespace sys { 4 | 5 | /////////////////////////////////////////////////////////////////////////////// 6 | 7 | const char* 8 | getErrorStr( int errno_ ) 9 | { 10 | return std::strerror( errno_ ); 11 | } 12 | 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | int 16 | getLastError() 17 | { 18 | return errno; 19 | } 20 | 21 | /////////////////////////////////////////////////////////////////////////////// 22 | 23 | const char* 24 | getLastErrorStr() 25 | { 26 | return strerror( errno ); 27 | } 28 | 29 | /////////////////////////////////////////////////////////////////////////////// 30 | 31 | }}} // namespace mp4v2::platform::sys 32 | -------------------------------------------------------------------------------- /libplatform/sys/error.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_PLATFORM_SYS_ERROR_H 2 | #define MP4V2_PLATFORM_SYS_ERROR_H 3 | 4 | namespace mp4v2 { namespace platform { namespace sys { 5 | 6 | /////////////////////////////////////////////////////////////////////////////// 7 | 8 | MP4V2_EXPORT int getLastError ( ); 9 | MP4V2_EXPORT const char* getLastErrorStr ( ); 10 | MP4V2_EXPORT const char* getErrorStr ( int ); 11 | 12 | /////////////////////////////////////////////////////////////////////////////// 13 | 14 | }}} // namespace mp4v2::platform::sys 15 | 16 | #endif // MP4V2_PLATFORM_SYS_ERROR_H 17 | -------------------------------------------------------------------------------- /libplatform/time/time.cpp: -------------------------------------------------------------------------------- 1 | #include "libplatform/impl.h" 2 | 3 | namespace mp4v2 { namespace platform { namespace time { 4 | 5 | /////////////////////////////////////////////////////////////////////////////// 6 | 7 | seconds_t 8 | getLocalTimeSeconds() 9 | { 10 | return getLocalTimeMilliseconds() / 1000; 11 | } 12 | 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | }}} // namespace mp4v2::platform::time 16 | -------------------------------------------------------------------------------- /libplatform/time/time.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_PLATFORM_TIME_TIME_H 2 | #define MP4V2_PLATFORM_TIME_TIME_H 3 | 4 | /// @namespace mp4v2::platform::time (private) Time. 5 | /// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. 6 | namespace mp4v2 { namespace platform { namespace time { 7 | 8 | //! type used to represent milliseconds 9 | typedef int64_t milliseconds_t; 10 | 11 | //! type used to represent seconds 12 | typedef int64_t seconds_t; 13 | 14 | /////////////////////////////////////////////////////////////////////////////// 15 | //! 16 | //! Get local-time in milliseconds. 17 | //! 18 | //! getLocalTimeMilliseconds obtains the system's notion of current Greenwich 19 | //! time, adjusted according to the current timezone of the host system. 20 | //! The time is expressed as an absolute value since midnight (0 hour), 21 | //! January 1, 1970. This is commonly referred to as the "epoch". 22 | //! 23 | //! @return local-time in milliseconds elapsed since the epoch. 24 | //! 25 | /////////////////////////////////////////////////////////////////////////////// 26 | MP4V2_EXPORT milliseconds_t getLocalTimeMilliseconds(); 27 | 28 | /////////////////////////////////////////////////////////////////////////////// 29 | //! 30 | //! Get local-time in seconds. 31 | //! 32 | //! getLocalTimeMilliseconds obtains the system's notion of current Greenwich 33 | //! time, adjusted according to the current timezone of the host system. 34 | //! The time is expressed as an absolute value since midnight (0 hour), 35 | //! January 1, 1970. This is commonly referred to as the "epoch". 36 | //! 37 | //! @return local-time in seconds elapsed since the epoch. 38 | //! 39 | /////////////////////////////////////////////////////////////////////////////// 40 | MP4V2_EXPORT seconds_t getLocalTimeSeconds(); 41 | 42 | /////////////////////////////////////////////////////////////////////////////// 43 | //! @} 44 | /////////////////////////////////////////////////////////////////////////////// 45 | 46 | }}} // namespace mp4v2::platform::time 47 | 48 | #endif // MP4V2_PLATFORM_TIME_TIME_H 49 | -------------------------------------------------------------------------------- /libplatform/time/time_posix.cpp: -------------------------------------------------------------------------------- 1 | #include "libplatform/impl.h" 2 | #include 3 | 4 | namespace mp4v2 { namespace platform { namespace time { 5 | 6 | /////////////////////////////////////////////////////////////////////////////// 7 | 8 | milliseconds_t 9 | getLocalTimeMilliseconds() 10 | { 11 | timeval buf; 12 | if( gettimeofday( &buf, 0 )) 13 | memset( &buf, 0, sizeof( buf )); 14 | return milliseconds_t( buf.tv_sec ) * 1000 + buf.tv_usec / 1000; 15 | } 16 | 17 | /////////////////////////////////////////////////////////////////////////////// 18 | 19 | }}} // namespace mp4v2::platform::time 20 | -------------------------------------------------------------------------------- /libplatform/time/time_win32.cpp: -------------------------------------------------------------------------------- 1 | #include "libplatform/impl.h" 2 | #include 3 | 4 | namespace mp4v2 { namespace platform { namespace time { 5 | 6 | /////////////////////////////////////////////////////////////////////////////// 7 | 8 | milliseconds_t 9 | getLocalTimeMilliseconds() 10 | { 11 | __timeb64 buf; 12 | _ftime64( &buf ); 13 | return milliseconds_t( buf.time ) * 1000 + buf.millitm; 14 | } 15 | 16 | /////////////////////////////////////////////////////////////////////////////// 17 | 18 | }}} // namespace mp4v2::platform::time 19 | -------------------------------------------------------------------------------- /libplatform/warning.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_PLATFORM_WARNING_H 2 | #define MP4V2_PLATFORM_WARNING_H 3 | 4 | /////////////////////////////////////////////////////////////////////////////// 5 | 6 | // TODO-KB: clean code to avoid disabling warnings 7 | 8 | #if defined( __GNUC__ ) && ( __GNUC__ >= 4 ) && ( __GNUC_MINOR__ >= 2 ) 9 | # pragma GCC diagnostic ignored "-Wwrite-strings" 10 | #elif defined( _MSC_VER ) 11 | # pragma warning( disable: 4244 ) 12 | # pragma warning( disable: 4251 ) 13 | # pragma warning( disable: 4800 ) 14 | # pragma warning( disable: 4996 ) 15 | #endif 16 | 17 | /////////////////////////////////////////////////////////////////////////////// 18 | 19 | // this macro is used to mark printf-style functions for GCC to examine 20 | // the format string and arguments and issue warnings if needed 21 | 22 | #if defined( __GNUC__ ) 23 | # define MP4V2_WFORMAT_PRINTF(i,j) __attribute__((format(__printf__,i,j))) 24 | #else 25 | # define MP4V2_WFORMAT_PRINTF(i,j) 26 | #endif 27 | 28 | /////////////////////////////////////////////////////////////////////////////// 29 | 30 | #endif // MP4V2_PLATFORM_WARNING_H 31 | -------------------------------------------------------------------------------- /libutil/crc.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // The contents of this file are subject to the Mozilla Public License 4 | // Version 1.1 (the "License"); you may not use this file except in 5 | // compliance with the License. You may obtain a copy of the License at 6 | // http://www.mozilla.org/MPL/ 7 | // 8 | // Software distributed under the License is distributed on an "AS IS" 9 | // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 10 | // License for the specific language governing rights and limitations 11 | // under the License. 12 | // 13 | // The Original Code is MP4v2. 14 | // 15 | // The Initial Developer of the Original Code is Kona Blend. 16 | // Portions created by Kona Blend are Copyright (C) 2008. 17 | // All Rights Reserved. 18 | // 19 | // Contributors: 20 | // Kona Blend, kona8lend@@gmail.com 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | #ifndef MP4V2_UTIL_CRC_H 25 | #define MP4V2_UTIL_CRC_H 26 | 27 | namespace mp4v2 { namespace util { 28 | 29 | /////////////////////////////////////////////////////////////////////////////// 30 | 31 | MP4V2_EXPORT 32 | uint32_t crc32( const unsigned char*, uint32_t ); // ISO/IEC 8802-3:1989 33 | 34 | /////////////////////////////////////////////////////////////////////////////// 35 | 36 | }} // namespace mp4v2::util 37 | 38 | #endif // MP4V2_UTIL_CRC_H 39 | -------------------------------------------------------------------------------- /libutil/impl.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_UTIL_IMPL_H 2 | #define MP4V2_UTIL_IMPL_H 3 | 4 | /////////////////////////////////////////////////////////////////////////////// 5 | 6 | #include "util.h" 7 | 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | #endif // MP4V2_UTIL_IMPL_H 11 | -------------------------------------------------------------------------------- /libutil/other.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_UTIL_OTHER_H 2 | #define MP4V2_UTIL_OTHER_H 3 | 4 | /////////////////////////////////////////////////////////////////////////////// 5 | 6 | namespace mp4v2 { namespace util { 7 | 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | struct MP4V2_EXPORT FileSummaryInfo { 11 | typedef set BrandSet; 12 | 13 | // standard ftyp box attributes 14 | string major_brand; 15 | uint32_t minor_version; 16 | BrandSet compatible_brands; 17 | 18 | uint32_t nlargesize; 19 | uint32_t nversion1; 20 | uint32_t nspecial; 21 | }; 22 | 23 | /////////////////////////////////////////////////////////////////////////////// 24 | /// 25 | /// Fetch mp4 file summary information. 26 | /// 27 | /// This function fetches summary information for file and information 28 | /// is stored in info. 29 | /// 30 | /// @return On success true. 31 | /// On failure false, and contents of info are undefined. 32 | /// 33 | MP4V2_EXPORT 34 | bool fileFetchSummaryInfo( MP4FileHandle file, FileSummaryInfo& info ); 35 | 36 | /////////////////////////////////////////////////////////////////////////////// 37 | 38 | }} // namespace mp4v2::util 39 | 40 | #endif // MP4V2_UTIL_OTHER_H 41 | -------------------------------------------------------------------------------- /libutil/util.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_UTIL_UTIL_H 2 | #define MP4V2_UTIL_UTIL_H 3 | 4 | /////////////////////////////////////////////////////////////////////////////// 5 | 6 | #include "src/src.h" 7 | 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | /// @namespace mp4v2::util (private) Command-line utility support. 11 | /// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. 12 | /// 13 | /// This namespace is used for command-line utilities. Some symbols from this 14 | /// namespace are exported from libmp4v2 in order to support new functionality 15 | /// which may or may not make it into some form of public API, at which time 16 | /// it will be moved out of this namespace. 17 | /// 18 | namespace mp4v2 { namespace util { 19 | using namespace std; 20 | using namespace mp4v2::impl; 21 | }} // namespace mp4v2::util 22 | 23 | /////////////////////////////////////////////////////////////////////////////// 24 | 25 | #include "Database.h" 26 | #include "Timecode.h" 27 | #include "TrackModifier.h" 28 | #include "Utility.h" 29 | #include "crc.h" 30 | #include "other.h" 31 | 32 | /////////////////////////////////////////////////////////////////////////////// 33 | 34 | #endif // MP4V2_UTIL_UTIL_H 35 | -------------------------------------------------------------------------------- /maintainer/HOWTO-ADD_SOURCE.txt: -------------------------------------------------------------------------------- 1 | Maintainer Add Source Files 2 | *************************** 3 | 4 | Almost any new .cpp or .h files will have to be added to GNUmakefile.am . 5 | It is trivial to add hand-written source files. Just add them to the list 6 | for the particular library or program which already exists. For example, 7 | to add a source file to libmp4v2: 8 | 9 | libmp4v2_la_SOURCES = ... 10 | 11 | In the rare situation that you desire to add a header file to be installed 12 | during 'make install' and used by the public API (such as mp4v2.h) then it 13 | should be taken out of libmp4v2_la_SOURCES and added to: 14 | 15 | mp4v2inc_HEADERS = ... 16 | 17 | Once done, autotool files such as configure will need to be regenerated. 18 | This is usually done automatically for you by the generated makefile, 19 | but the following command is always an excellent way to make sure 20 | everything is regenerated properly: 21 | 22 | autoreconf -fiv 23 | 24 | Don't be alarmed at the number of files created by autoreconf. These 25 | files will be part of any dist-bundle created but do not add them to the 26 | repository -- they are dist-only files. 27 | -------------------------------------------------------------------------------- /maintainer/HOWTO-AUTOTOOLS.txt: -------------------------------------------------------------------------------- 1 | Maintainer Autotools Instructions 2 | ********************************* 3 | 4 | This project uses autotools and does not add/checkin files generated by 5 | autoreconf to the repository. These files are to be included only in 6 | dist-bundles. 7 | 8 | There is a clear distinction between building from the repository or 9 | building from a dist-bundle. This document is for project maintainers 10 | building from the repository. 11 | 12 | The maintainer is responsible for generating files associated with 13 | autotools. These files in turn are distributed with dist-bundles, but 14 | never should be added/checked-in to the repository. 15 | 16 | Whenever any information for which autotools may depend on is changed, 17 | then you must issue the following command which will force generation 18 | of all files and install support scripts required at configure-time: 19 | 20 | autoreconf -fiv 21 | 22 | Where is Makefile.am? And what is this GNUmakefile stuff? 23 | We already have a sophisticated project which requires enough GNU-tools 24 | at build-time that it makes no sense to hope-and-pray that BSD flavors 25 | of make will work. As such, the files are renamed to be those which are 26 | only recognized by GNU make. This helps avoid confusion when people run 27 | the wrong make flavor -- it's better to see Makefile not found, rather 28 | than 100 obscure make incompatibility-errors. So we have GNUmakefile.am 29 | which is just like the old Makefile.am only better. 30 | 31 | Post configure, we end up with GNUmakefile in your build directory. 32 | 33 | Care has been taken to avoid subdir makefiles. And while they may 34 | eventually become part of this project, it's nice to avoid them when 35 | when possible. 36 | -------------------------------------------------------------------------------- /maintainer/LIBPLATFORM.txt: -------------------------------------------------------------------------------- 1 | libplatform Notes 2 | ***************** 3 | 4 | libplatform is a private library used by this project for portability 5 | across platforms. Simple file access, getting system time, parsing 6 | command-line arguments, endian byte-swap macros, are examples of 7 | things that belong in this convenience library. 8 | 9 | The implementation means to support the following platforms: 10 | 11 | - posix (the default) 12 | - win32 (Windows 2000 or newer) 13 | 14 | 15 | All symbols in libplatform reside in private namespace mp4v2::platform 16 | and must never be made visible through public interfaces. In general, 17 | implementation .h and .cpp files are free to include this library. 18 | 19 | Both libmp4v2 and various executables created by this project rely on 20 | libplatform and this creates a bit of a dilemma in that libmp4v2 must 21 | ship as a stand-alone library. Thus, when creating libmp4v2 we must always 22 | embed the needed bits from libplatform. In turn, the executables then 23 | link against both libmp4v2 and the remaining bits of libplatform. 24 | 25 | This approach requires advanced linking which is available using 26 | several different methods, varying by platforms. And to complicate 27 | matters further, libtool (even version 2.2.6) makes this impossible. 28 | So the simple solution is to add libplatform symbols to libmp4v2. 29 | The only problem with this is libmp4v2 becomes a little fatter than 30 | it needs to be, but since all the symbols are in a private namespace 31 | and we use set default symbol visibility to hidden, we protect our 32 | clients from inadvertantly becoming dependents. 33 | 34 | If libplatform ever becomes bulky we can revisit this issue, but at 35 | this time using advanced linking would only save ~10KB of binary size. 36 | -------------------------------------------------------------------------------- /maintainer/NAMESPACES.txt: -------------------------------------------------------------------------------- 1 | Maintainer C++ Namespace Notes 2 | ****************************** 3 | 4 | Namespaces have been employed to help organize source and push all private 5 | symbols (those which are not part of the public C API) to a location 6 | that is unlikely to be accidentally used by anyone. It also virtually 7 | eliminates any chance that private impl symbols will cause symbol collisions 8 | at compile or link-time. 9 | 10 | The global namespace is used by C API which generally prefixes all 11 | of its symobls with MP4 to avoid collisions. This space is used by 12 | src/mp4.cpp and include/mp4v2/mp4v2.h . A few exceptions may exist where 13 | additional API is exported from some differently-implemented code. 14 | 15 | The rest of the codebase is tucked into various child-namespaces of 16 | the project's top-level 'mp4v2' namespace. The top-level namespace 17 | is reserved for this project, and unless someone branches our codebase 18 | and ignores their moral responsibility to rename their root namespace, 19 | we should neatly avoid symbol collisions. Code external to the project 20 | should never use any symbols which reside in mp4v2. 21 | 22 | The namespace 'mp4v2::platform' is private and used for code which abstracts 23 | various plaform differences or implements missing features. 24 | 25 | The namespace 'mp4v2::impl' is a private namespace for the main 26 | implementation of libmp4v2. This namespace generally depends on 27 | mp4v2::platform . 28 | 29 | The namespace 'mp4v2::util' is a private namespace which adds 30 | functionality for use with libutil and util/ command-line tools. The 31 | positioning is a little more complicated in that it has symbols which 32 | are exported from libmp4v2, which needs full access to mp4v2::impl 33 | hidden symbols. Then libutil itself adds to the same namespace, but 34 | because libutil does not require direct access to mp4v2::impl hidden 35 | symbols it is a separate static library. And finally, the util/ tools 36 | themselves use the namespace for implementation convenience. 37 | 38 | Nested (child) namespaces of those listed above are used for further 39 | organization when applicable. 40 | 41 | Further documentation is available in the API Reference; 42 | see Namespaces section. 43 | -------------------------------------------------------------------------------- /project/project.m4.in: -------------------------------------------------------------------------------- 1 | define(<<__PROJECT_name>>, <<@PROJECT_name@>>)dnl 2 | define(<<__PROJECT_name_lower>>, <<@PROJECT_name_lower@>>)dnl 3 | define(<<__PROJECT_name_upper>>, <<@PROJECT_name_upper@>>)dnl 4 | define(<<__PROJECT_name_formal>>, <<@PROJECT_name_formal@>>)dnl 5 | define(<<__PROJECT_url_website>>, <<@PROJECT_url_website@>>)dnl 6 | define(<<__PROJECT_url_downloads>>, <<@PROJECT_url_downloads@>>)dnl 7 | define(<<__PROJECT_url_discussion>>, <<@PROJECT_url_discussion@>>)dnl 8 | define(<<__PROJECT_irc>>, <<@PROJECT_irc@>>)dnl 9 | define(<<__PROJECT_bugreport>>, <<@PROJECT_bugreport@>>)dnl 10 | define(<<__PROJECT_version>>, <<@PROJECT_version@>>)dnl 11 | define(<<__PROJECT_version_hex>>, <<@PROJECT_version_hex@>>)dnl 12 | define(<<__PROJECT_version_major>>, <<@PROJECT_version_major@>>)dnl 13 | define(<<__PROJECT_version_minor>>, <<@PROJECT_version_minor@>>)dnl 14 | define(<<__PROJECT_version_point>>, <<@PROJECT_version_point@>>)dnl 15 | define(<<__PROJECT_repo_url>>, <<@PROJECT_repo_url@>>)dnl 16 | define(<<__PROJECT_repo_branch>>, <<@PROJECT_repo_branch@>>)dnl 17 | define(<<__PROJECT_repo_root>>, <<@PROJECT_repo_root@>>)dnl 18 | define(<<__PROJECT_repo_uuid>>, <<@PROJECT_repo_uuid@>>)dnl 19 | define(<<__PROJECT_repo_rev>>, <<@PROJECT_repo_rev@>>)dnl 20 | define(<<__PROJECT_repo_date>>, <<@PROJECT_repo_date@>>)dnl 21 | define(<<__PROJECT_repo_type>>, <<@PROJECT_repo_type@>>)dnl 22 | define(<<__PROJECT_build>>, <<@PROJECT_build@>>)dnl 23 | dnl 24 | define(<<__MAKE_ABS_TOP_BUILDDIR>>, <<@abs_top_builddir@>>)dnl 25 | define(<<__MAKE_ABS_TOP_SRCDIR>>, <<@abs_top_srcdir@>>)dnl 26 | -------------------------------------------------------------------------------- /project/project.m4sugar: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl This file defines highest-level project meta-data in autoconf M4 format. 3 | dnl It is needed downstream by configure.ac. 4 | dnl 5 | define([PRJ_name], [MP4v2]) 6 | define([PRJ_name_lower], [mp4v2]) 7 | define([PRJ_name_upper], [MP4V2]) 8 | define([PRJ_url_website], [http://code.google.com/p/mp4v2]) 9 | define([PRJ_url_downloads], [http://code.google.com/p/mp4v2/downloads/list]) 10 | define([PRJ_url_discussion], [http://groups.google.com/group/mp4v2]) 11 | define([PRJ_irc], [irc://irc.freenode.net/handbrake]) 12 | define([PRJ_bugreport], [kidjan@gmail.com]) 13 | define([PRJ_version_major], [2]) 14 | define([PRJ_version_minor], [1]) 15 | define([PRJ_version_point], [0]) 16 | -------------------------------------------------------------------------------- /src/atom_colr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * Contributer has declined to give copyright information, and gives 15 | * it freely to the world. 16 | * 17 | * Contributor(s): 18 | */ 19 | 20 | #include "src/impl.h" 21 | 22 | namespace mp4v2 { 23 | namespace impl { 24 | 25 | /////////////////////////////////////////////////////////////////////////////// 26 | 27 | MP4ColrAtom::MP4ColrAtom(MP4File &file) 28 | : MP4Atom(file, "colr") 29 | { 30 | MP4StringProperty* cpt = new MP4StringProperty(*this,"colorParameterType"); 31 | cpt->SetFixedLength(4); 32 | AddProperty(cpt); /* 0 */ 33 | 34 | AddProperty( /* 1 */ new MP4Integer16Property(*this,"primariesIndex")); 35 | 36 | AddProperty( /* 2 */ new MP4Integer16Property(*this,"transferFunctionIndex")); 37 | 38 | AddProperty( /* 3 */ new MP4Integer16Property(*this,"matrixIndex")); 39 | } 40 | 41 | void MP4ColrAtom::Generate() 42 | { 43 | MP4Atom::Generate(); 44 | 45 | ((MP4StringProperty*)m_pProperties[0])->SetValue("nclc"); 46 | // default to ITU BT.709 values 47 | ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); 48 | ((MP4Integer16Property*)m_pProperties[2])->SetValue(1); 49 | ((MP4Integer16Property*)m_pProperties[3])->SetValue(1); 50 | } 51 | 52 | /////////////////////////////////////////////////////////////////////////////// 53 | 54 | } 55 | } // namespace mp4v2::impl 56 | -------------------------------------------------------------------------------- /src/atom_free.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | MP4FreeAtom::MP4FreeAtom( MP4File &file, const char* type ) 30 | : MP4Atom( file, type ? type : "free" ) 31 | { 32 | } 33 | 34 | void MP4FreeAtom::Read() 35 | { 36 | Skip(); 37 | } 38 | 39 | void MP4FreeAtom::Write() 40 | { 41 | bool use64 = (GetSize() > (0xFFFFFFFF - 8)); 42 | BeginWrite(use64); 43 | #if 1 44 | for (uint64_t ix = 0; ix < GetSize(); ix++) { 45 | m_File.WriteUInt8(0); 46 | } 47 | #else 48 | m_File.SetPosition(m_File.GetPosition() + GetSize()); 49 | #endif 50 | FinishWrite(use64); 51 | } 52 | 53 | /////////////////////////////////////////////////////////////////////////////// 54 | 55 | } 56 | } // namespace mp4v2::impl 57 | -------------------------------------------------------------------------------- /src/atom_ftab.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | */ 18 | 19 | #include "src/impl.h" 20 | 21 | namespace mp4v2 { 22 | namespace impl { 23 | 24 | /////////////////////////////////////////////////////////////////////////////// 25 | 26 | MP4FtabAtom::MP4FtabAtom(MP4File &file) 27 | : MP4Atom(file, "ftab") 28 | { 29 | MP4Integer16Property* pCount = new MP4Integer16Property(*this, "entryCount"); /* 0 */ 30 | AddProperty(pCount); 31 | 32 | MP4TableProperty* pTable = new MP4TableProperty(*this, "fontEntries", pCount); /* 1 */ 33 | AddProperty(pTable); 34 | 35 | pTable->AddProperty(new MP4Integer16Property(pTable->GetParentAtom(), "fontID")); /* 0 */ 36 | pTable->AddProperty(new MP4StringProperty(pTable->GetParentAtom(), "name", true)); /* 1 */ 37 | } 38 | 39 | /////////////////////////////////////////////////////////////////////////////// 40 | 41 | } 42 | } // namespace mp4v2::impl 43 | -------------------------------------------------------------------------------- /src/atom_ftyp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { namespace impl { 25 | 26 | /////////////////////////////////////////////////////////////////////////////// 27 | 28 | MP4FtypAtom::MP4FtypAtom(MP4File &file) 29 | : MP4Atom( file, "ftyp" ) 30 | , majorBrand ( *new MP4StringProperty( *this, "majorBrand" )) 31 | , minorVersion ( *new MP4Integer32Property( *this, "minorVersion" )) 32 | , compatibleBrands ( *new MP4StringProperty( *this, "compatibleBrands", false, false, true )) 33 | { 34 | majorBrand.SetFixedLength( 4 ); 35 | compatibleBrands.SetFixedLength( 4 ); 36 | 37 | AddProperty( &majorBrand ); 38 | AddProperty( &minorVersion ); 39 | AddProperty( &compatibleBrands ); 40 | } 41 | 42 | void MP4FtypAtom::Generate() 43 | { 44 | MP4Atom::Generate(); 45 | 46 | majorBrand.SetValue( "mp42" ); 47 | minorVersion.SetValue( 0 ); 48 | 49 | compatibleBrands.SetCount( 2 ); 50 | compatibleBrands.SetValue( "mp42", 0 ); 51 | compatibleBrands.SetValue( "isom", 1 ); 52 | } 53 | 54 | void MP4FtypAtom::Read() 55 | { 56 | compatibleBrands.SetCount( (m_size - 8) / 4 ); // brands array fills rest of atom 57 | MP4Atom::Read(); 58 | } 59 | 60 | /////////////////////////////////////////////////////////////////////////////// 61 | 62 | }} // namespace mp4v2::impl 63 | -------------------------------------------------------------------------------- /src/atom_gmin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * Contributer has declined to give copyright information, and gives 15 | * it freely to the world. 16 | * 17 | * Contributor(s): 18 | */ 19 | 20 | #include "src/impl.h" 21 | 22 | namespace mp4v2 { 23 | namespace impl { 24 | 25 | /////////////////////////////////////////////////////////////////////////////// 26 | 27 | MP4GminAtom::MP4GminAtom(MP4File &file) 28 | : MP4Atom(file, "gmin") 29 | { 30 | 31 | AddVersionAndFlags(); /* 0, 1 */ 32 | 33 | AddProperty(new MP4Integer16Property(*this, "graphicsMode")); /* 2 */ 34 | AddProperty(new MP4Integer16Property(*this, "opColorRed")); /* 3 */ 35 | AddProperty(new MP4Integer16Property(*this, "opColorGreen")); /* 4 */ 36 | AddProperty(new MP4Integer16Property(*this, "opColorBlue")); /* 5 */ 37 | AddProperty(new MP4Integer16Property(*this, "balance")); /* 6 */ 38 | AddReserved(*this, "reserved", 2); /* 7 */ 39 | 40 | } 41 | 42 | void MP4GminAtom::Generate() 43 | { 44 | 45 | MP4Atom::Generate(); 46 | 47 | ((MP4Integer16Property*)m_pProperties[2])->SetValue(0x0040); 48 | ((MP4Integer16Property*)m_pProperties[3])->SetValue(0x8000); 49 | ((MP4Integer16Property*)m_pProperties[4])->SetValue(0x8000); 50 | ((MP4Integer16Property*)m_pProperties[5])->SetValue(0x8000); 51 | ((MP4Integer16Property*)m_pProperties[6])->SetValue(0x0000); 52 | 53 | } 54 | 55 | /////////////////////////////////////////////////////////////////////////////// 56 | 57 | } 58 | } // namespace mp4v2::impl 59 | -------------------------------------------------------------------------------- /src/atom_hnti.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | MP4HntiAtom::MP4HntiAtom(MP4File &file) 30 | : MP4Atom(file, "hnti") 31 | { 32 | } 33 | 34 | void MP4HntiAtom::Read() 35 | { 36 | MP4Atom* grandParent = m_pParentAtom->GetParentAtom(); 37 | ASSERT(grandParent); 38 | if (ATOMID(grandParent->GetType()) == ATOMID("trak")) { 39 | ExpectChildAtom("sdp ", Optional, OnlyOne); 40 | } else { 41 | ExpectChildAtom("rtp ", Optional, OnlyOne); 42 | } 43 | 44 | MP4Atom::Read(); 45 | } 46 | 47 | /////////////////////////////////////////////////////////////////////////////// 48 | 49 | } 50 | } // namespace mp4v2::impl 51 | -------------------------------------------------------------------------------- /src/atom_href.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2005. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Bill May wmay@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | MP4HrefAtom::MP4HrefAtom(MP4File &file) 30 | : MP4Atom(file, "href") 31 | { 32 | AddReserved(*this, "reserved1", 6); /* 0 */ 33 | 34 | AddProperty( /* 1 */ 35 | new MP4Integer16Property(*this, "dataReferenceIndex")); 36 | ExpectChildAtom("burl", Optional, OnlyOne); 37 | } 38 | 39 | void MP4HrefAtom::Generate() 40 | { 41 | MP4Atom::Generate(); 42 | 43 | ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); 44 | 45 | } 46 | 47 | /////////////////////////////////////////////////////////////////////////////// 48 | 49 | } 50 | } // namespace mp4v2::impl 51 | -------------------------------------------------------------------------------- /src/atom_mdat.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | MP4MdatAtom::MP4MdatAtom(MP4File &file) 30 | : MP4Atom(file, "mdat") 31 | { 32 | } 33 | 34 | void MP4MdatAtom::Read() 35 | { 36 | Skip(); 37 | } 38 | 39 | void MP4MdatAtom::Write() 40 | { 41 | // should never get here 42 | ASSERT(false); 43 | } 44 | 45 | /////////////////////////////////////////////////////////////////////////////// 46 | 47 | } 48 | } // namespace mp4v2::impl 49 | -------------------------------------------------------------------------------- /src/atom_mp4s.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | MP4Mp4sAtom::MP4Mp4sAtom(MP4File &file) 30 | : MP4Atom(file, "mp4s") 31 | { 32 | AddReserved(*this, "reserved1", 6); 33 | AddProperty( 34 | new MP4Integer16Property(*this, "dataReferenceIndex")); 35 | 36 | ExpectChildAtom("esds", Required, OnlyOne); 37 | } 38 | 39 | void MP4Mp4sAtom::Generate() 40 | { 41 | MP4Atom::Generate(); 42 | 43 | ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); 44 | } 45 | 46 | /////////////////////////////////////////////////////////////////////////////// 47 | 48 | } 49 | } // namespace mp4v2::impl 50 | -------------------------------------------------------------------------------- /src/atom_nmhd.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | */ 18 | 19 | #include "src/impl.h" 20 | 21 | namespace mp4v2 { 22 | namespace impl { 23 | 24 | /////////////////////////////////////////////////////////////////////////////// 25 | 26 | MP4NmhdAtom::MP4NmhdAtom(MP4File &file) 27 | : MP4Atom(file, "nmhd") 28 | { 29 | AddVersionAndFlags(); 30 | } 31 | 32 | /////////////////////////////////////////////////////////////////////////////// 33 | 34 | } 35 | } // namespace mp4v2::impl 36 | -------------------------------------------------------------------------------- /src/atom_pasp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * Contributer has declined to give copyright information, and gives 15 | * it freely to the world. 16 | * 17 | * Contributor(s): 18 | */ 19 | 20 | #include "src/impl.h" 21 | 22 | namespace mp4v2 { 23 | namespace impl { 24 | 25 | /////////////////////////////////////////////////////////////////////////////// 26 | 27 | MP4PaspAtom::MP4PaspAtom(MP4File &file) 28 | : MP4Atom(file, "pasp") 29 | { 30 | 31 | AddProperty( /* 0 */ 32 | new MP4Integer32Property(*this, "hSpacing")); 33 | 34 | AddProperty( /* 1 */ 35 | new MP4Integer32Property(*this, "vSpacing")); 36 | 37 | } 38 | 39 | void MP4PaspAtom::Generate() 40 | { 41 | 42 | MP4Atom::Generate(); 43 | 44 | ((MP4Integer32Property*)m_pProperties[0])->SetValue(1); 45 | ((MP4Integer32Property*)m_pProperties[1])->SetValue(1); 46 | 47 | } 48 | 49 | /////////////////////////////////////////////////////////////////////////////// 50 | 51 | } 52 | } // namespace mp4v2::impl 53 | -------------------------------------------------------------------------------- /src/atom_sdp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | MP4SdpAtom::MP4SdpAtom(MP4File &file) : MP4Atom(file, "sdp ") 30 | { 31 | AddProperty( 32 | new MP4StringProperty(*this, "sdpText")); 33 | } 34 | 35 | void MP4SdpAtom::Read() 36 | { 37 | // read sdp string, length is implicit in size of atom 38 | uint64_t size = GetEnd() - m_File.GetPosition(); 39 | char* data = (char*)MP4Malloc(size + 1); 40 | ASSERT(data != NULL); 41 | m_File.ReadBytes((uint8_t*)data, size); 42 | data[size] = '\0'; 43 | ((MP4StringProperty*)m_pProperties[0])->SetValue(data); 44 | MP4Free(data); 45 | } 46 | 47 | void MP4SdpAtom::Write() 48 | { 49 | // since length of string is implicit in size of atom 50 | // we need to handle this specially, and not write the terminating \0 51 | MP4StringProperty* pSdp = (MP4StringProperty*)m_pProperties[0]; 52 | const char* sdpText = pSdp->GetValue(); 53 | if (sdpText) { 54 | pSdp->SetFixedLength((uint32_t)strlen(sdpText)); 55 | } 56 | MP4Atom::Write(); 57 | pSdp->SetFixedLength(0); 58 | } 59 | 60 | /////////////////////////////////////////////////////////////////////////////// 61 | 62 | } 63 | } // namespace mp4v2::impl 64 | -------------------------------------------------------------------------------- /src/atom_sdtp.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // The contents of this file are subject to the Mozilla Public License 4 | // Version 1.1 (the "License"); you may not use this file except in 5 | // compliance with the License. You may obtain a copy of the License at 6 | // http://www.mozilla.org/MPL/ 7 | // 8 | // Software distributed under the License is distributed on an "AS IS" 9 | // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 10 | // License for the specific language governing rights and limitations 11 | // under the License. 12 | // 13 | // The Original Code is MP4v2. 14 | // 15 | // The Initial Developer of the Original Code is Kona Blend. 16 | // Portions created by Kona Blend are Copyright (C) 2008. 17 | // All Rights Reserved. 18 | // 19 | // Contributors: 20 | // Kona Blend, kona8lend@@gmail.com 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | #include "src/impl.h" 25 | 26 | namespace mp4v2 { namespace impl { 27 | 28 | /////////////////////////////////////////////////////////////////////////////// 29 | 30 | MP4SdtpAtom::MP4SdtpAtom(MP4File &file) 31 | : MP4FullAtom ( file, "sdtp" ) 32 | , data ( *new MP4BytesProperty( *this, "data" )) 33 | { 34 | AddProperty( &data ); 35 | } 36 | 37 | /////////////////////////////////////////////////////////////////////////////// 38 | 39 | void MP4SdtpAtom::Read() 40 | { 41 | data.SetValueSize( m_size - 4 ); 42 | MP4FullAtom::Read(); 43 | } 44 | 45 | /////////////////////////////////////////////////////////////////////////////// 46 | 47 | }} // namespace mp4v2::impl 48 | -------------------------------------------------------------------------------- /src/atom_smi.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2004. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Bill May wmay@cisco.com 20 | * 21 | * Apple iTunes META data 22 | */ 23 | 24 | #include "src/impl.h" 25 | 26 | namespace mp4v2 { 27 | namespace impl { 28 | 29 | /////////////////////////////////////////////////////////////////////////////// 30 | 31 | MP4SmiAtom::MP4SmiAtom(MP4File &file) 32 | : MP4Atom(file, "meta") 33 | { 34 | 35 | AddProperty( new MP4BytesProperty(*this, "metadata")); 36 | 37 | } 38 | 39 | void MP4SmiAtom::Read() 40 | { 41 | // calculate size of the metadata from the atom size 42 | ((MP4BytesProperty*)m_pProperties[0])->SetValueSize(m_size); 43 | 44 | MP4Atom::Read(); 45 | } 46 | 47 | /////////////////////////////////////////////////////////////////////////////// 48 | 49 | } 50 | } // namespace mp4v2::impl 51 | -------------------------------------------------------------------------------- /src/atom_standard.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/momo0853/mp4v2/c299cd2076249d074bdddea5a04c5e86b903dd4a/src/atom_standard.cpp -------------------------------------------------------------------------------- /src/atom_stdp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | MP4StdpAtom::MP4StdpAtom(MP4File &file) 30 | : MP4Atom(file, "stdp") 31 | { 32 | AddVersionAndFlags(); 33 | 34 | MP4Integer32Property* pCount = 35 | new MP4Integer32Property(*this, "entryCount"); 36 | pCount->SetImplicit(); 37 | AddProperty(pCount); 38 | 39 | MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); 40 | AddProperty(pTable); 41 | 42 | pTable->AddProperty( 43 | new MP4Integer16Property(pTable->GetParentAtom(), "priority")); 44 | } 45 | 46 | void MP4StdpAtom::Read() 47 | { 48 | // table entry count computed from atom size 49 | ((MP4Integer32Property*)m_pProperties[2])->SetReadOnly(false); 50 | ((MP4Integer32Property*)m_pProperties[2])->SetValue((m_size - 4) / 2); 51 | ((MP4Integer32Property*)m_pProperties[2])->SetReadOnly(true); 52 | 53 | MP4Atom::Read(); 54 | } 55 | 56 | /////////////////////////////////////////////////////////////////////////////// 57 | 58 | } 59 | } // namespace mp4v2::impl 60 | -------------------------------------------------------------------------------- /src/atom_treftype.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | MP4TrefTypeAtom::MP4TrefTypeAtom(MP4File &file, const char* type) 30 | : MP4Atom(file, type) 31 | { 32 | MP4Integer32Property* pCount = 33 | new MP4Integer32Property(*this, "entryCount"); 34 | pCount->SetImplicit(); 35 | AddProperty(pCount); /* 0 */ 36 | 37 | MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); 38 | AddProperty(pTable); /* 1 */ 39 | 40 | pTable->AddProperty( /* 1, 0 */ 41 | new MP4Integer32Property(pTable->GetParentAtom(), "trackId")); 42 | } 43 | 44 | void MP4TrefTypeAtom::Read() 45 | { 46 | // table entry count computed from atom size 47 | ((MP4Integer32Property*)m_pProperties[0])->SetReadOnly(false); 48 | ((MP4Integer32Property*)m_pProperties[0])->SetValue(m_size / 4); 49 | ((MP4Integer32Property*)m_pProperties[0])->SetReadOnly(true); 50 | 51 | MP4Atom::Read(); 52 | } 53 | 54 | /////////////////////////////////////////////////////////////////////////////// 55 | 56 | } 57 | } // namespace mp4v2::impl 58 | -------------------------------------------------------------------------------- /src/atom_udta.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | MP4UdtaAtom::MP4UdtaAtom(MP4File &file) 30 | : MP4Atom(file, "udta") 31 | { 32 | ExpectChildAtom("chpl", Optional, OnlyOne); 33 | ExpectChildAtom("cprt", Optional, Many); 34 | ExpectChildAtom("hnti", Optional, OnlyOne); 35 | ExpectChildAtom("meta", Optional, OnlyOne); 36 | ExpectChildAtom("\251cpy", Optional, OnlyOne); 37 | ExpectChildAtom("\251des", Optional, OnlyOne); 38 | ExpectChildAtom("\251nam", Optional, OnlyOne); 39 | ExpectChildAtom("\251cmt", Optional, OnlyOne); 40 | ExpectChildAtom("\251prd", Optional, OnlyOne); 41 | } 42 | 43 | void MP4UdtaAtom::Read() 44 | { 45 | if (ATOMID(m_pParentAtom->GetType()) == ATOMID("trak")) { 46 | ExpectChildAtom("hinf", Optional, OnlyOne); 47 | ExpectChildAtom("name", Optional, OnlyOne); 48 | } 49 | 50 | MP4Atom::Read(); 51 | } 52 | 53 | /////////////////////////////////////////////////////////////////////////////// 54 | 55 | } 56 | } // namespace mp4v2::impl 57 | -------------------------------------------------------------------------------- /src/atom_urn.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | MP4UrnAtom::MP4UrnAtom(MP4File &file) 30 | : MP4Atom(file, "urn ") 31 | { 32 | AddVersionAndFlags(); 33 | AddProperty(new MP4StringProperty(*this, "name")); 34 | AddProperty(new MP4StringProperty(*this, "location")); 35 | } 36 | 37 | void MP4UrnAtom::Read() 38 | { 39 | // read the version, flags, and name properties 40 | ReadProperties(0, 3); 41 | 42 | // check if location is present 43 | if (m_File.GetPosition() < GetEnd()) { 44 | // read it 45 | ReadProperties(3); 46 | } 47 | 48 | Skip(); // to end of atom 49 | } 50 | 51 | /////////////////////////////////////////////////////////////////////////////// 52 | 53 | } 54 | } // namespace mp4v2::impl 55 | -------------------------------------------------------------------------------- /src/atom_uuid.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | IPodUUIDAtom::IPodUUIDAtom(MP4File &file) 30 | : MP4Atom(file, "uuid") 31 | { 32 | // 33 | // This is a hack, the contents of this atom need to be well defined. 34 | // 35 | static uint8_t ipod_magic[] = { 36 | 0x6b, 0x68, 0x40, 0xf2, 0x5f, 0x24, 0x4f, 0xc5, 37 | 0xba, 0x39, 0xa5, 0x1b, 0xcf, 0x03, 0x23, 0xf3 38 | }; 39 | 40 | SetExtendedType(ipod_magic); 41 | 42 | MP4Integer32Property* value = new MP4Integer32Property(*this, "value"); 43 | value->SetValue(1); 44 | AddProperty(value); 45 | } 46 | 47 | /////////////////////////////////////////////////////////////////////////////// 48 | 49 | } 50 | } // namespace mp4v2::impl 51 | -------------------------------------------------------------------------------- /src/atom_vmhd.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "src/impl.h" 23 | 24 | namespace mp4v2 { 25 | namespace impl { 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | MP4VmhdAtom::MP4VmhdAtom(MP4File &file) 30 | : MP4Atom(file, "vmhd") 31 | { 32 | AddVersionAndFlags(); 33 | AddReserved(*this, "reserved", 8); 34 | } 35 | 36 | void MP4VmhdAtom::Generate() 37 | { 38 | MP4Atom::Generate(); 39 | 40 | SetFlags(1); 41 | } 42 | 43 | /////////////////////////////////////////////////////////////////////////////// 44 | 45 | } 46 | } // namespace mp4v2::impl 47 | -------------------------------------------------------------------------------- /src/bmff/bmff.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // The contents of this file are subject to the Mozilla Public License 4 | // Version 1.1 (the "License"); you may not use this file except in 5 | // compliance with the License. You may obtain a copy of the License at 6 | // http://www.mozilla.org/MPL/ 7 | // 8 | // Software distributed under the License is distributed on an "AS IS" 9 | // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 10 | // License for the specific language governing rights and limitations 11 | // under the License. 12 | // 13 | // The Original Code is MP4v2. 14 | // 15 | // The Initial Developer of the Original Code is Kona Blend. 16 | // Portions created by Kona Blend are Copyright (C) 2008. 17 | // All Rights Reserved. 18 | // 19 | // Contributors: 20 | // Kona Blend, kona8lend@@gmail.com 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | #ifndef MP4V2_IMPL_BMFF_BMFF_H 25 | #define MP4V2_IMPL_BMFF_BMFF_H 26 | 27 | /// @namespace mp4v2::impl::bmff (private) ISO base media file format. 28 | /// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. 29 | /// 30 | /// This namespace implements some features that are specified by 31 | /// ISO base media file format, ISO/IEC 14496-12:2005(E). 32 | /// 33 | namespace mp4v2 { namespace impl { namespace bmff { 34 | ; 35 | }}} 36 | 37 | /////////////////////////////////////////////////////////////////////////////// 38 | 39 | //#include "type.h" 40 | 41 | /////////////////////////////////////////////////////////////////////////////// 42 | 43 | #endif // MP4V2_IMPL_BMFF_BMFF_H 44 | -------------------------------------------------------------------------------- /src/bmff/impl.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // The contents of this file are subject to the Mozilla Public License 4 | // Version 1.1 (the "License"); you may not use this file except in 5 | // compliance with the License. You may obtain a copy of the License at 6 | // http://www.mozilla.org/MPL/ 7 | // 8 | // Software distributed under the License is distributed on an "AS IS" 9 | // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 10 | // License for the specific language governing rights and limitations 11 | // under the License. 12 | // 13 | // The Original Code is MP4v2. 14 | // 15 | // The Initial Developer of the Original Code is Kona Blend. 16 | // Portions created by Kona Blend are Copyright (C) 2008. 17 | // All Rights Reserved. 18 | // 19 | // Contributors: 20 | // Kona Blend, kona8lend@@gmail.com 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | #ifndef MP4V2_IMPL_BMFF_IMPL_H 25 | #define MP4V2_IMPL_BMFF_IMPL_H 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | #include "src/impl.h" 30 | #include "bmff.h" 31 | 32 | /////////////////////////////////////////////////////////////////////////////// 33 | 34 | #endif // MP4V2_IMPL_BMFF_IMPL_H 35 | -------------------------------------------------------------------------------- /src/impl.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_IMPL_IMPL_H 2 | #define MP4V2_IMPL_IMPL_H 3 | 4 | /////////////////////////////////////////////////////////////////////////////// 5 | 6 | #include "src.h" 7 | 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | #endif // MP4V2_IMPL_IMPL_H 11 | -------------------------------------------------------------------------------- /src/itmf/impl.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // The contents of this file are subject to the Mozilla Public License 4 | // Version 1.1 (the "License"); you may not use this file except in 5 | // compliance with the License. You may obtain a copy of the License at 6 | // http://www.mozilla.org/MPL/ 7 | // 8 | // Software distributed under the License is distributed on an "AS IS" 9 | // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 10 | // License for the specific language governing rights and limitations 11 | // under the License. 12 | // 13 | // The Original Code is MP4v2. 14 | // 15 | // The Initial Developer of the Original Code is Kona Blend. 16 | // Portions created by Kona Blend are Copyright (C) 2008. 17 | // All Rights Reserved. 18 | // 19 | // Contributors: 20 | // Kona Blend, kona8lend@@gmail.com 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | #ifndef MP4V2_IMPL_ITMF_IMPL_H 25 | #define MP4V2_IMPL_ITMF_IMPL_H 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | #include "src/impl.h" 30 | #include "itmf.h" 31 | 32 | /////////////////////////////////////////////////////////////////////////////// 33 | 34 | #endif // MP4V2_IMPL_ITMF_IMPL_H 35 | -------------------------------------------------------------------------------- /src/itmf/itmf.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // The contents of this file are subject to the Mozilla Public License 4 | // Version 1.1 (the "License"); you may not use this file except in 5 | // compliance with the License. You may obtain a copy of the License at 6 | // http://www.mozilla.org/MPL/ 7 | // 8 | // Software distributed under the License is distributed on an "AS IS" 9 | // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 10 | // License for the specific language governing rights and limitations 11 | // under the License. 12 | // 13 | // The Original Code is MP4v2. 14 | // 15 | // The Initial Developer of the Original Code is Kona Blend. 16 | // Portions created by Kona Blend are Copyright (C) 2008. 17 | // All Rights Reserved. 18 | // 19 | // Contributors: 20 | // Kona Blend, kona8lend@@gmail.com 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | #ifndef MP4V2_IMPL_ITMF_ITMF_H 25 | #define MP4V2_IMPL_ITMF_ITMF_H 26 | 27 | /// @namespace mp4v2::impl::itmf (private) iTunes Metadata Format. 28 | /// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. 29 | /// 30 | /// This namespace implements some features that are specified by the 31 | /// iTunes Metadata Format Specification, revision 2008-04-16. 32 | /// 33 | namespace mp4v2 { namespace impl { namespace itmf { 34 | ; 35 | }}} 36 | 37 | /////////////////////////////////////////////////////////////////////////////// 38 | 39 | #include "CoverArtBox.h" 40 | #include "Tags.h" 41 | #include "generic.h" 42 | 43 | /////////////////////////////////////////////////////////////////////////////// 44 | 45 | #endif // MP4V2_IMPL_ITMF_ITMF_H 46 | -------------------------------------------------------------------------------- /src/qtff/coding.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // The contents of this file are subject to the Mozilla Public License 4 | // Version 1.1 (the "License"); you may not use this file except in 5 | // compliance with the License. You may obtain a copy of the License at 6 | // http://www.mozilla.org/MPL/ 7 | // 8 | // Software distributed under the License is distributed on an "AS IS" 9 | // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 10 | // License for the specific language governing rights and limitations 11 | // under the License. 12 | // 13 | // The Original Code is MP4v2. 14 | // 15 | // The Initial Developer of the Original Code is Kona Blend. 16 | // Portions created by Kona Blend are Copyright (C) 2008. 17 | // All Rights Reserved. 18 | // 19 | // Contributors: 20 | // Kona Blend, kona8lend@@gmail.com 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | #ifndef MP4V2_IMPL_QTFF_CODING_H 25 | #define MP4V2_IMPL_QTFF_CODING_H 26 | 27 | namespace mp4v2 { namespace impl { namespace qtff { 28 | 29 | /////////////////////////////////////////////////////////////////////////////// 30 | 31 | bool findCoding( MP4FileHandle file, uint16_t trackIndex, MP4Atom*& coding ); 32 | 33 | /////////////////////////////////////////////////////////////////////////////// 34 | 35 | }}} // namespace mp4v2::impl::qtff 36 | 37 | #endif // MP4V2_IMPL_QTTF_CODING_H 38 | -------------------------------------------------------------------------------- /src/qtff/impl.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // The contents of this file are subject to the Mozilla Public License 4 | // Version 1.1 (the "License"); you may not use this file except in 5 | // compliance with the License. You may obtain a copy of the License at 6 | // http://www.mozilla.org/MPL/ 7 | // 8 | // Software distributed under the License is distributed on an "AS IS" 9 | // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 10 | // License for the specific language governing rights and limitations 11 | // under the License. 12 | // 13 | // The Original Code is MP4v2. 14 | // 15 | // The Initial Developer of the Original Code is Kona Blend. 16 | // Portions created by Kona Blend are Copyright (C) 2008. 17 | // All Rights Reserved. 18 | // 19 | // Contributors: 20 | // Kona Blend, kona8lend@@gmail.com 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | #ifndef MP4V2_IMPL_QTFF_IMPL_H 25 | #define MP4V2_IMPL_QTFF_IMPL_H 26 | 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | #include "src/impl.h" 30 | #include "qtff.h" 31 | 32 | /////////////////////////////////////////////////////////////////////////////// 33 | 34 | #endif // MP4V2_IMPL_QTFF_IMPL_H 35 | -------------------------------------------------------------------------------- /src/qtff/qtff.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // The contents of this file are subject to the Mozilla Public License 4 | // Version 1.1 (the "License"); you may not use this file except in 5 | // compliance with the License. You may obtain a copy of the License at 6 | // http://www.mozilla.org/MPL/ 7 | // 8 | // Software distributed under the License is distributed on an "AS IS" 9 | // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 10 | // License for the specific language governing rights and limitations 11 | // under the License. 12 | // 13 | // The Original Code is MP4v2. 14 | // 15 | // The Initial Developer of the Original Code is Kona Blend. 16 | // Portions created by Kona Blend are Copyright (C) 2008. 17 | // All Rights Reserved. 18 | // 19 | // Contributors: 20 | // Kona Blend, kona8lend@@gmail.com 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | #ifndef MP4V2_IMPL_QTFF_QTFF_H 25 | #define MP4V2_IMPL_QTFF_QTFF_H 26 | 27 | /// @namespace mp4v2::impl::qtff (private) QuickTime File Format. 28 | /// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. 29 | /// 30 | /// This namespace implements some features that are specified by the 31 | /// QuickTime File Format Specification, revision 2007-09-04. 32 | /// 33 | namespace mp4v2 { namespace impl { namespace qtff { 34 | ; 35 | }}} 36 | 37 | /////////////////////////////////////////////////////////////////////////////// 38 | 39 | #include "ColorParameterBox.h" 40 | #include "PictureAspectRatioBox.h" 41 | #include "coding.h" 42 | 43 | /////////////////////////////////////////////////////////////////////////////// 44 | 45 | #endif // MP4V2_IMPL_QTTF_QTFF_H 46 | -------------------------------------------------------------------------------- /src/src.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_IMPL_SRC_H 2 | #define MP4V2_IMPL_SRC_H 3 | 4 | /////////////////////////////////////////////////////////////////////////////// 5 | 6 | #include "libplatform/platform.h" 7 | #include 8 | 9 | /////////////////////////////////////////////////////////////////////////////// 10 | 11 | namespace mp4v2 { namespace impl { 12 | using namespace mp4v2::platform; 13 | using io::File; 14 | using io::FileSystem; 15 | }} // namspace mp4v2::impl 16 | 17 | /////////////////////////////////////////////////////////////////////////////// 18 | 19 | #include "text.h" 20 | #include "enum.h" 21 | #include "exception.h" 22 | 23 | #include "bmff/typebmff.h" 24 | #include "itmf/type.h" 25 | 26 | #include "util.h" 27 | #include "log.h" 28 | #include "mp4util.h" 29 | #include "mp4array.h" 30 | #include "mp4track.h" 31 | #include "mp4file.h" 32 | #include "mp4property.h" 33 | #include "mp4container.h" 34 | 35 | #include "mp4atom.h" 36 | #include "atoms.h" 37 | 38 | #include "bmff/bmff.h" 39 | #include "itmf/itmf.h" 40 | #include "qtff/qtff.h" 41 | 42 | #include "mp4descriptor.h" 43 | #include "descriptors.h" 44 | #include "ocidescriptors.h" 45 | 46 | #include "qosqualifiers.h" 47 | #include "odcommands.h" 48 | #include "rtphint.h" 49 | 50 | /////////////////////////////////////////////////////////////////////////////// 51 | 52 | #endif // MP4V2_IMPL_SRC_H 53 | -------------------------------------------------------------------------------- /src/text.cpp: -------------------------------------------------------------------------------- 1 | #include "src/impl.h" 2 | 3 | namespace mp4v2 { namespace impl { 4 | 5 | /////////////////////////////////////////////////////////////////////////////// 6 | 7 | bool 8 | LessIgnoreCase::operator()( const string& xstr, const string& ystr ) const 9 | { 10 | const string::size_type xlen = xstr.length(); 11 | const string::size_type ylen = ystr.length(); 12 | 13 | if( xlen < ylen ) { 14 | for( string::size_type i = 0; i < xlen; i++ ) { 15 | const char x = std::toupper( xstr[i] ); 16 | const char y = std::toupper( ystr[i] ); 17 | 18 | if( x < y ) 19 | return true; 20 | else if ( x > y ) 21 | return false; 22 | } 23 | return true; 24 | } 25 | else { 26 | for( string::size_type i = 0; i < ylen; i++ ) { 27 | const char x = std::toupper( xstr[i] ); 28 | const char y = std::toupper( ystr[i] ); 29 | 30 | if( x < y ) 31 | return true; 32 | else if ( x > y ) 33 | return false; 34 | } 35 | return false; 36 | } 37 | } 38 | 39 | /////////////////////////////////////////////////////////////////////////////// 40 | 41 | }} // namespace mp4v2::impl 42 | -------------------------------------------------------------------------------- /src/text.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_IMPL_TEXT_H 2 | #define MP4V2_IMPL_TEXT_H 3 | 4 | namespace mp4v2 { namespace impl { 5 | 6 | /////////////////////////////////////////////////////////////////////////////// 7 | 8 | struct MP4V2_EXPORT LessIgnoreCase : less 9 | { 10 | bool operator()( const string&, const string& ) const; 11 | }; 12 | 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | }} // namespace mp4v2::impl 16 | 17 | #endif // MP4V2_IMPL_TEXT_H 18 | -------------------------------------------------------------------------------- /src/util.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_IMPL_UTIL_H 2 | #define MP4V2_IMPL_UTIL_H 3 | 4 | namespace mp4v2 { namespace impl { 5 | 6 | /////////////////////////////////////////////////////////////////////////////// 7 | 8 | inline int8_t max( int8_t a, int8_t b ) { 9 | return ( a > b ) ? a : b; 10 | } 11 | 12 | inline int16_t max( int16_t a, int16_t b ) { 13 | return ( a > b ) ? a : b; 14 | } 15 | 16 | inline int32_t max( int32_t a, int32_t b ) { 17 | return ( a > b ) ? a : b; 18 | } 19 | 20 | inline int64_t max( int64_t a, int64_t b ) { 21 | return ( a > b ) ? a : b; 22 | } 23 | 24 | /////////////////////////////////////////////////////////////////////////////// 25 | 26 | inline uint8_t max( uint8_t a, uint8_t b ) { 27 | return ( a > b ) ? a : b; 28 | } 29 | 30 | inline uint16_t max( uint16_t a, uint16_t b ) { 31 | return ( a > b ) ? a : b; 32 | } 33 | 34 | inline uint32_t max( uint32_t a, uint32_t b ) { 35 | return ( a > b ) ? a : b; 36 | } 37 | 38 | inline uint64_t max( uint64_t a, uint64_t b ) { 39 | return ( a > b ) ? a : b; 40 | } 41 | 42 | /////////////////////////////////////////////////////////////////////////////// 43 | 44 | inline int8_t min( int8_t a, int8_t b ) { 45 | return ( a < b ) ? a : b; 46 | } 47 | 48 | inline int16_t min( int16_t a, int16_t b ) { 49 | return ( a < b ) ? a : b; 50 | } 51 | 52 | inline int32_t min( int32_t a, int32_t b ) { 53 | return ( a < b ) ? a : b; 54 | } 55 | 56 | inline int64_t min( int64_t a, int64_t b ) { 57 | return ( a < b ) ? a : b; 58 | } 59 | 60 | /////////////////////////////////////////////////////////////////////////////// 61 | 62 | inline uint8_t min( uint8_t a, uint8_t b ) { 63 | return ( a < b ) ? a : b; 64 | } 65 | 66 | inline uint16_t min( uint16_t a, uint16_t b ) { 67 | return ( a < b ) ? a : b; 68 | } 69 | 70 | inline uint32_t min( uint32_t a, uint32_t b ) { 71 | return ( a < b ) ? a : b; 72 | } 73 | 74 | inline uint64_t min( uint64_t a, uint64_t b ) { 75 | return ( a < b ) ? a : b; 76 | } 77 | 78 | /////////////////////////////////////////////////////////////////////////////// 79 | 80 | }} // namespace mp4v2::impl 81 | 82 | #endif // MP4V2_IMPL_UTIL_H 83 | -------------------------------------------------------------------------------- /test/OLD/c_api.c: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Mozilla Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/MPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is MPEG4IP. 13 | * 14 | * The Initial Developer of the Original Code is Cisco Systems Inc. 15 | * Portions created by Cisco Systems Inc. are 16 | * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. 17 | * 18 | * Contributor(s): 19 | * Dave Mackie dmackie@cisco.com 20 | */ 21 | 22 | #include "mp4.h" 23 | 24 | main(int argc, char** argv) 25 | { 26 | #if 0 27 | MP4FileHandle mp4File = MP4Read(argv[1], MP4_DETAILS_ERROR); 28 | 29 | if (!mp4File) { 30 | exit(1); 31 | } 32 | 33 | MP4Dump(mp4File, stdout, 0); 34 | 35 | MP4Close(mp4File); 36 | 37 | exit(0); 38 | #else 39 | MP4FileHandle mp4File; 40 | 41 | mp4File = MP4Read(argv[1], MP4_DETAILS_ERROR); 42 | MP4SetVerbosity(mp4File, MP4_DETAILS_ALL); 43 | if (MP4HaveAtom(mp4File, "moov.mbhd")) { 44 | printf("found moov.mvhd\n"); 45 | } 46 | if (MP4HaveTrackAtom(mp4File, 1, argv[2])) { 47 | printf("found %s\n", argv[2]); 48 | } else { 49 | printf("didn't find it\n"); 50 | } 51 | 52 | #if 0 53 | u_int8_t* data=(u_int8_t*)"this is my tag data"; 54 | u_int32_t len=strlen((char*)data); 55 | MP4SetMetadataFreeForm(mp4File, "mytag1",data,len); 56 | MP4SetMetadataFreeForm(mp4File, "my_tag2",data,len); 57 | #endif 58 | MP4Close(mp4File); 59 | exit(0); 60 | #endif 61 | } 62 | 63 | -------------------------------------------------------------------------------- /testsuite/config/unix.exp: -------------------------------------------------------------------------------- 1 | load_lib command.exp 2 | -------------------------------------------------------------------------------- /testsuite/main/standardUsage.exp: -------------------------------------------------------------------------------- 1 | ::command::test_standardUsage mp4art 2 | ::command::test_standardUsage mp4file 3 | ::command::test_standardUsage mp4subtitle 4 | ::command::test_standardUsage mp4track 5 | -------------------------------------------------------------------------------- /util/impl.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_UTIL_IMPL_H 2 | #define MP4V2_UTIL_IMPL_H 3 | 4 | /////////////////////////////////////////////////////////////////////////////// 5 | 6 | #include "libutil/util.h" 7 | 8 | /////////////////////////////////////////////////////////////////////////////// 9 | 10 | #endif // MP4V2_UTIL_IMPL_H 11 | -------------------------------------------------------------------------------- /vstudio9.0/include/mp4v2/project.h: -------------------------------------------------------------------------------- 1 | #ifndef MP4V2_PROJECT_H 2 | #define MP4V2_PROJECT_H 3 | 4 | /*****************************************************************************/ 5 | 6 | #define MP4V2_PROJECT_name "MP4v2" 7 | #define MP4V2_PROJECT_name_lower "mp4v2" 8 | #define MP4V2_PROJECT_name_upper "MP4V2" 9 | #define MP4V2_PROJECT_name_formal "MP4v2 2.0-r477" 10 | #define MP4V2_PROJECT_url_website "http://code.google.com/p/mp4v2" 11 | #define MP4V2_PROJECT_url_downloads "http://code.google.com/p/mp4v2/downloads/list" 12 | #define MP4V2_PROJECT_url_discussion "http://groups.google.com/group/mp4v2" 13 | #define MP4V2_PROJECT_irc "irc://irc.freenode.net/handbrake" 14 | #define MP4V2_PROJECT_bugreport "" 15 | #define MP4V2_PROJECT_version "2.0-r477" 16 | #define MP4V2_PROJECT_version_hex 0x00020000 17 | #define MP4V2_PROJECT_version_major 2 18 | #define MP4V2_PROJECT_version_minor 0 19 | #define MP4V2_PROJECT_version_point 0 20 | #define MP4V2_PROJECT_repo_url "https://mp4v2.googlecode.com/svn/trunk" 21 | #define MP4V2_PROJECT_repo_root "https://mp4v2.googlecode.com/svn" 22 | #define MP4V2_PROJECT_repo_uuid "6e6572fa-98a6-11dd-ad9f-f77439c74b79" 23 | #define MP4V2_PROJECT_repo_rev 477 24 | #define MP4V2_PROJECT_repo_date "2011-06-25 15:50:07 -0700 (Sat, 25 Jun 2011)" 25 | #define MP4V2_PROJECT_repo_type "developer" 26 | #define MP4V2_PROJECT_build "Sat Jun 25 15:52:52 PDT 2011" 27 | 28 | /*****************************************************************************/ 29 | 30 | #endif /* MP4V2_PROJECT_H */ 31 | -------------------------------------------------------------------------------- /vstudio9.0/libmp4v2/Version.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | ///////////////////////////////////////////////////////////////////////////// 5 | // 6 | // Version 7 | // 8 | 9 | VS_VERSION_INFO VERSIONINFO 10 | FILEVERSION MP4V2_PROJECT_version_major, MP4V2_PROJECT_version_minor, MP4V2_PROJECT_version_point, MP4V2_PROJECT_repo_rev 11 | PRODUCTVERSION MP4V2_PROJECT_version_major, MP4V2_PROJECT_version_minor, MP4V2_PROJECT_version_point, MP4V2_PROJECT_repo_rev 12 | FILEFLAGSMASK 0x17L 13 | #ifdef _DEBUG 14 | FILEFLAGS 0x1L 15 | #else 16 | FILEFLAGS 0x0L 17 | #endif 18 | FILEOS 0x4L 19 | FILETYPE 0x2L 20 | FILESUBTYPE 0x0L 21 | BEGIN 22 | BLOCK "StringFileInfo" 23 | BEGIN 24 | BLOCK "040904b0" 25 | BEGIN 26 | VALUE "CompanyName", MP4V2_PROJECT_name 27 | VALUE "FileDescription", MP4V2_PROJECT_name_formal 28 | VALUE "FileVersion", MP4V2_PROJECT_version 29 | VALUE "InternalName", MP4V2_PROJECT_name_formal 30 | VALUE "LegalCopyright", MP4V2_PROJECT_name 31 | VALUE "OriginalFilename", "libmp4v2.dll" 32 | VALUE "ProductName", MP4V2_PROJECT_name 33 | VALUE "ProductVersion", MP4V2_PROJECT_version 34 | VALUE "Url", MP4V2_PROJECT_url_website 35 | END 36 | END 37 | BLOCK "VarFileInfo" 38 | BEGIN 39 | VALUE "Translation", 0x409, 1200 40 | END 41 | END 42 | --------------------------------------------------------------------------------