comparison avformat.h @ 53:fb671d87824e libavformat

zero copy packet handling for DV1394 by Max Krasnyansky
author bellard
date Mon, 03 Feb 2003 22:58:29 +0000
parents 2a60f406fccc
children b0e0eb595e29
comparison
equal deleted inserted replaced
52:2a60f406fccc 53:fb671d87824e
18 #define AV_NOPTS_VALUE 0 18 #define AV_NOPTS_VALUE 0
19 19
20 typedef struct AVPacket { 20 typedef struct AVPacket {
21 INT64 pts; /* presentation time stamp in stream units (set av_set_pts_info) */ 21 INT64 pts; /* presentation time stamp in stream units (set av_set_pts_info) */
22 UINT8 *data; 22 UINT8 *data;
23 int size; 23 int size;
24 int stream_index; 24 int stream_index;
25 int flags; 25 int flags;
26 int duration; 26 int duration;
27 void (*destruct)(struct AVPacket *);
28 void *priv;
29 } AVPacket;
27 #define PKT_FLAG_KEY 0x0001 30 #define PKT_FLAG_KEY 0x0001
28 } AVPacket; 31
32 static inline void av_init_packet(AVPacket *pkt)
33 {
34 pkt->pts = AV_NOPTS_VALUE;
35 pkt->flags = 0;
36 pkt->stream_index = 0;
37 }
29 38
30 int av_new_packet(AVPacket *pkt, int size); 39 int av_new_packet(AVPacket *pkt, int size);
31 void av_free_packet(AVPacket *pkt); 40
41 /**
42 * Free a packet
43 *
44 * @param pkt packet to free
45 */
46 static inline void av_free_packet(AVPacket *pkt)
47 {
48 pkt->destruct(pkt);
49 }
32 50
33 /*************************************************/ 51 /*************************************************/
34 /* fractional numbers for exact pts handling */ 52 /* fractional numbers for exact pts handling */
35 53
36 /* the exact value of the fractional number is: 'val + num / den'. num 54 /* the exact value of the fractional number is: 'val + num / den'. num