Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
MP4(3)			    MP4	File Format Library			MP4(3)

NAME
       MP4CopySample - Make a copy of a	specified sample

SYNTAX
       #include	<mp4.h>

       MP4TrackId MP4CopySample(
	    MP4FileHandle srcFile,
	    MP4TrackId srcTrackId,
	    MP4SampleId	srcSampleId,
	    MP4FileHandle dstFile = MP4_INVALID_FILE_HANDLE,
	    MP4TrackId dstTrackId = MP4_INVALID_TRACK_ID,
	    MP4Duration	dstSampleDuration = MP4_INVALID_DURATION
       )

ARGUMENTS
       srcFile
	      Specifies	the mp4	file of	the source of the operation.

       srcTrackId
	      Specifies	the track of the source	sample.

       srcSampleId
	      Specifies	the sample to be copied.

       dstFile
	      Specifies	 the  mp4 file of the new, copied sample. If the value
	      is MP4_INVALID_FILE_HANDLE, the new sample  is  created  in  the
	      same file	as the source sample.

       dstTrackId
	      Specifies	 the  track of the new sample. If the value is MP4_IN-
	      VALID_TRACK_ID, the new sample is	created	in the same  track  as
	      the source sample.

       dstSampleDuration
	      Specifies	 the  duration in the track time scale of the new sam-
	      ple. If the value	is MP4_INVALID_DURATION, then the duration  of
	      the source sample	is used.

RETURN VALUES
       Upon  success,  the sample id of	the new	sample.	Upon an	error, MP4_IN-
       VALID_SAMPLE_ID.

DESCRIPTION
       MP4CopySample creates a new sample based	on an  existing	 sample.  Note
       that another copy of the	media sample data is created in	the file using
       this function. I.e. this	call is	equivalent to MP4ReadSample() followed
       by MP4WriteSample().

       Note that is the	responsibility of the caller to	ensure that the	copied
       media sample makes sense	in the destination track. E.g. copying a video
       sample to an audio track	is unlikely to result in anything good happen-
       ing, even copying a sample from video track to  another	requires  that
       the tracks use the same encoding	and that issues	such as	image size are
       addressed.

SEE ALSO
       MP4(3) MP4ReadSample(3) MP4WriteSample(3)

Cisco Systems Inc.		  Version 0.9				MP4(3)

NAME | SYNTAX | ARGUMENTS | RETURN VALUES | DESCRIPTION | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=MP4CopySample&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help