You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	Move AVPacket declaration from avformat.h to avcodec.h.
Patch by Thilo Borgmann thilo dot borgmann at googlemail _dot_ com. Originally committed as revision 18317 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		
				
					committed by
					
						 Stefano Sabatini
						Stefano Sabatini
					
				
			
			
				
	
			
			
			
						parent
						
							95b5770bc7
						
					
				
				
					commit
					fabd2469f1
				
			| @@ -30,8 +30,8 @@ | ||||
| #include "libavutil/avutil.h" | ||||
|  | ||||
| #define LIBAVCODEC_VERSION_MAJOR 52 | ||||
| #define LIBAVCODEC_VERSION_MINOR 22 | ||||
| #define LIBAVCODEC_VERSION_MICRO  3 | ||||
| #define LIBAVCODEC_VERSION_MINOR 23 | ||||
| #define LIBAVCODEC_VERSION_MICRO  0 | ||||
|  | ||||
| #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | ||||
|                                                LIBAVCODEC_VERSION_MINOR, \ | ||||
| @@ -2526,6 +2526,55 @@ typedef struct AVPaletteControl { | ||||
| } AVPaletteControl attribute_deprecated; | ||||
| #endif | ||||
|  | ||||
| typedef struct AVPacket { | ||||
|     /** | ||||
|      * Presentation timestamp in time_base units; the time at which the | ||||
|      * decompressed packet will be presented to the user. | ||||
|      * Can be AV_NOPTS_VALUE if it is not stored in the file. | ||||
|      * pts MUST be larger or equal to dts as presentation cannot happen before | ||||
|      * decompression, unless one wants to view hex dumps. Some formats misuse | ||||
|      * the terms dts and pts/cts to mean something different. Such timestamps | ||||
|      * must be converted to true pts/dts before they are stored in AVPacket. | ||||
|      */ | ||||
|     int64_t pts; | ||||
|     /** | ||||
|      * Decompression timestamp in time_base units; the time at which the | ||||
|      * packet is decompressed. | ||||
|      * Can be AV_NOPTS_VALUE if it is not stored in the file. | ||||
|      */ | ||||
|     int64_t dts; | ||||
|     uint8_t *data; | ||||
|     int   size; | ||||
|     int   stream_index; | ||||
|     int   flags; | ||||
|     /** | ||||
|      * Duration of this packet in time_base units, 0 if unknown. | ||||
|      * Equals next_pts - this_pts in presentation order. | ||||
|      */ | ||||
|     int   duration; | ||||
|     void  (*destruct)(struct AVPacket *); | ||||
|     void  *priv; | ||||
|     int64_t pos;                            ///< byte position in stream, -1 if unknown | ||||
|  | ||||
|     /** | ||||
|      * Time difference in stream time base units from the pts of this | ||||
|      * packet to the point at which the output from the decoder has converged | ||||
|      * independent from the availability of previous frames. That is, the | ||||
|      * frames are virtually identical no matter if decoding started from | ||||
|      * the very first frame or from this keyframe. | ||||
|      * Is AV_NOPTS_VALUE if unknown. | ||||
|      * This field is not the display duration of the current packet. | ||||
|      * | ||||
|      * The purpose of this field is to allow seeking in streams that have no | ||||
|      * keyframes in the conventional sense. It corresponds to the | ||||
|      * recovery point SEI in H.264 and match_time_delta in NUT. It is also | ||||
|      * essential for some types of subtitle streams to ensure that all | ||||
|      * subtitles are correctly displayed after seeking. | ||||
|      */ | ||||
|     int64_t convergence_duration; | ||||
| } AVPacket; | ||||
| #define PKT_FLAG_KEY   0x0001 | ||||
|  | ||||
| enum AVSubtitleType { | ||||
|     SUBTITLE_NONE, | ||||
|  | ||||
|   | ||||
| @@ -114,55 +114,6 @@ void av_metadata_free(AVMetadata **m); | ||||
|  | ||||
| /* packet functions */ | ||||
|  | ||||
| typedef struct AVPacket { | ||||
|     /** | ||||
|      * Presentation timestamp in time_base units; the time at which the | ||||
|      * decompressed packet will be presented to the user. | ||||
|      * Can be AV_NOPTS_VALUE if it is not stored in the file. | ||||
|      * pts MUST be larger or equal to dts as presentation cannot happen before | ||||
|      * decompression, unless one wants to view hex dumps. Some formats misuse | ||||
|      * the terms dts and pts/cts to mean something different. Such timestamps | ||||
|      * must be converted to true pts/dts before they are stored in AVPacket. | ||||
|      */ | ||||
|     int64_t pts; | ||||
|     /** | ||||
|      * Decompression timestamp in time_base units; the time at which the | ||||
|      * packet is decompressed. | ||||
|      * Can be AV_NOPTS_VALUE if it is not stored in the file. | ||||
|      */ | ||||
|     int64_t dts; | ||||
|     uint8_t *data; | ||||
|     int   size; | ||||
|     int   stream_index; | ||||
|     int   flags; | ||||
|     /** | ||||
|      * Duration of this packet in time_base units, 0 if unknown. | ||||
|      * Equals next_pts - this_pts in presentation order. | ||||
|      */ | ||||
|     int   duration; | ||||
|     void  (*destruct)(struct AVPacket *); | ||||
|     void  *priv; | ||||
|     int64_t pos;                            ///< byte position in stream, -1 if unknown | ||||
|  | ||||
|     /** | ||||
|      * Time difference in stream time base units from the pts of this | ||||
|      * packet to the point at which the output from the decoder has converged | ||||
|      * independent from the availability of previous frames. That is, the | ||||
|      * frames are virtually identical no matter if decoding started from | ||||
|      * the very first frame or from this keyframe. | ||||
|      * Is AV_NOPTS_VALUE if unknown. | ||||
|      * This field is not the display duration of the current packet. | ||||
|      * | ||||
|      * The purpose of this field is to allow seeking in streams that have no | ||||
|      * keyframes in the conventional sense. It corresponds to the | ||||
|      * recovery point SEI in H.264 and match_time_delta in NUT. It is also | ||||
|      * essential for some types of subtitle streams to ensure that all | ||||
|      * subtitles are correctly displayed after seeking. | ||||
|      */ | ||||
|     int64_t convergence_duration; | ||||
| } AVPacket; | ||||
| #define PKT_FLAG_KEY   0x0001 | ||||
|  | ||||
| void av_destruct_packet_nofree(AVPacket *pkt); | ||||
|  | ||||
| /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user