FFmpeg
Loading...
Searching...
No Matches
libavformat
packet_internal.h
Go to the documentation of this file.
1
/*
2
* This file is part of FFmpeg.
3
*
4
* FFmpeg is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
8
*
9
* FFmpeg is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with FFmpeg; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
19
#ifndef AVFORMAT_PACKET_INTERNAL_H
20
#define AVFORMAT_PACKET_INTERNAL_H
21
22
#include "
libavcodec/packet.h
"
23
24
typedef
struct
PacketListEntry
{
25
struct
PacketListEntry
*
next
;
26
AVPacket
pkt
;
27
}
PacketListEntry
;
28
29
typedef
struct
PacketList
{
30
PacketListEntry
*
head
, *
tail
;
31
}
PacketList
;
32
33
#define FF_PACKETLIST_FLAG_PREPEND (1 << 0)
/**< Prepend created AVPacketList instead of appending */
34
35
/**
36
* Append an AVPacket to the list.
37
*
38
* @param list A PacketList
39
* @param pkt The packet being appended. The data described in it will
40
* be made reference counted if it isn't already.
41
* @param copy A callback to copy the contents of the packet to the list.
42
May be null, in which case the packet's reference will be
43
moved to the list.
44
* @return 0 on success, negative AVERROR value on failure. On failure,
45
the packet and the list are unchanged.
46
*/
47
int
ff_packet_list_put
(
PacketList
*list,
AVPacket
*
pkt
,
48
int
(*
copy
)(
AVPacket
*
dst
,
const
AVPacket
*
src
),
49
int
flags
);
50
51
/**
52
* Remove the oldest AVPacket in the list and return it.
53
*
54
* @note The pkt will be overwritten completely on success. The caller
55
* owns the packet and must unref it by itself.
56
*
57
* @param head A pointer to a PacketList struct
58
* @param pkt Pointer to an AVPacket struct
59
* @return 0 on success, and a packet is returned. AVERROR(EAGAIN) if
60
* the list was empty.
61
*/
62
int
ff_packet_list_get
(
PacketList
*list,
AVPacket
*
pkt
);
63
64
/**
65
* Wipe the list and unref all the packets in it.
66
*/
67
void
ff_packet_list_free
(
PacketList
*list);
68
69
#endif
// AVFORMAT_PACKET_INTERNAL_H
dst
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition
dsp.h:87
flags
#define flags(name, subs,...)
Definition
cbs_h264.c:74
pkt
static AVPacket * pkt
Definition
demux_decode.c:55
ff_packet_list_get
int ff_packet_list_get(PacketList *list, AVPacket *pkt)
Remove the oldest AVPacket in the list and return it.
Definition
packet_list.c:89
ff_packet_list_free
void ff_packet_list_free(PacketList *list)
Wipe the list and unref all the packets in it.
Definition
packet_list.c:103
ff_packet_list_put
int ff_packet_list_put(PacketList *list, AVPacket *pkt, int(*copy)(AVPacket *dst, const AVPacket *src), int flags)
Append an AVPacket to the list.
Definition
packet_list.c:40
packet.h
AVPacket
This structure stores compressed data.
Definition
packet.h:580
PacketListEntry
Definition
packet_internal.h:24
PacketListEntry::next
struct PacketListEntry * next
Definition
packet_internal.h:25
PacketListEntry::pkt
AVPacket pkt
Definition
packet_internal.h:26
PacketList
Definition
packet_internal.h:29
PacketList::tail
PacketListEntry * tail
Definition
packet_internal.h:30
PacketList::head
PacketListEntry * head
Definition
packet_internal.h:30
src
#define src
Definition
vp8dsp.c:248
copy
static void copy(const float *p1, float *p2, const int length)
Definition
vf_vaguedenoiser.c:186
Generated on Tue Aug 18 2026 20:20:56 for FFmpeg by
1.13.2