Mercurial > libavcodec.hg
comparison avcodec.h @ 9357:2108342734cc libavcodec
Move av_packet_*() functions from libavformat/ to libavcodec/, where the
AVPacket structure now resides also.
Patch by Thilo Borgmann thilo.borgmann googlemail com, see the mailinglist
thread "Google Summer of Code participation" for additional discussion.
author | rbultje |
---|---|
date | Tue, 07 Apr 2009 18:31:14 +0000 |
parents | 54bc8a2727b0 |
children | f978e4a699c5 |
comparison
equal
deleted
inserted
replaced
9356:2983bd7deaf5 | 9357:2108342734cc |
---|---|
2626 uint32_t end_display_time; /* relative to packet pts, in ms */ | 2626 uint32_t end_display_time; /* relative to packet pts, in ms */ |
2627 unsigned num_rects; | 2627 unsigned num_rects; |
2628 AVSubtitleRect **rects; | 2628 AVSubtitleRect **rects; |
2629 } AVSubtitle; | 2629 } AVSubtitle; |
2630 | 2630 |
2631 /* packet functions */ | |
2632 | |
2633 void av_destruct_packet_nofree(AVPacket *pkt); | |
2634 | |
2635 /** | |
2636 * Default packet destructor. | |
2637 */ | |
2638 void av_destruct_packet(AVPacket *pkt); | |
2639 | |
2640 /** | |
2641 * Initialize optional fields of a packet with default values. | |
2642 * | |
2643 * @param pkt packet | |
2644 */ | |
2645 void av_init_packet(AVPacket *pkt); | |
2646 | |
2647 /** | |
2648 * Allocate the payload of a packet and initialize its fields with | |
2649 * default values. | |
2650 * | |
2651 * @param pkt packet | |
2652 * @param size wanted payload size | |
2653 * @return 0 if OK, AVERROR_xxx otherwise | |
2654 */ | |
2655 int av_new_packet(AVPacket *pkt, int size); | |
2656 | |
2657 /** | |
2658 * @warning This is a hack - the packet memory allocation stuff is broken. The | |
2659 * packet is allocated if it was not really allocated. | |
2660 */ | |
2661 int av_dup_packet(AVPacket *pkt); | |
2662 | |
2663 /** | |
2664 * Free a packet. | |
2665 * | |
2666 * @param pkt packet to free | |
2667 */ | |
2668 static inline void av_free_packet(AVPacket *pkt) | |
2669 { | |
2670 if (pkt && pkt->destruct) { | |
2671 pkt->destruct(pkt); | |
2672 } | |
2673 } | |
2631 | 2674 |
2632 /* resample.c */ | 2675 /* resample.c */ |
2633 | 2676 |
2634 struct ReSampleContext; | 2677 struct ReSampleContext; |
2635 struct AVResampleContext; | 2678 struct AVResampleContext; |