FFmpeg
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 AVCODEC_PACKET_INTERNAL_H
20 #define AVCODEC_PACKET_INTERNAL_H
21 
22 #include <stdint.h>
23 
24 #include "packet.h"
25 
26 
27 /**
28  * Append an AVPacket to the list.
29  *
30  * @param head List head element
31  * @param tail List tail element
32  * @param pkt The packet being appended. The data described in it will
33  * be made reference counted if it isn't already.
34  * @param copy A callback to copy the contents of the packet to the list.
35  May be null, in which case the packet's reference will be
36  moved to the list.
37  * @return 0 on success, negative AVERROR value on failure. On failure,
38  the packet and the list are unchanged.
39  */
41  AVPacket *pkt,
42  int (*copy)(AVPacket *dst, const AVPacket *src),
43  int flags);
44 
45 /**
46  * Remove the oldest AVPacket in the list and return it.
47  *
48  * @note The pkt will be overwritten completely on success. The caller
49  * owns the packet and must unref it by itself.
50  *
51  * @param head List head element
52  * @param tail List tail element
53  * @param pkt Pointer to an AVPacket struct
54  * @return 0 on success, and a packet is returned. AVERROR(EAGAIN) if
55  * the list was empty.
56  */
58  AVPacket *pkt);
59 
60 /**
61  * Wipe the list and unref all the packets in it.
62  *
63  * @param head List head element
64  * @param tail List tail element
65  */
67 
68 int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type);
69 
70 int ff_side_data_set_prft(AVPacket *pkt, int64_t timestamp);
71 
72 #endif // AVCODEC_PACKET_INTERNAL_H
static void copy(const float *p1, float *p2, const int length)
static AVPacket pkt
static void error(const char *err)
int ff_side_data_set_prft(AVPacket *pkt, int64_t timestamp)
Definition: avpacket.c:821
int avpriv_packet_list_put(AVPacketList **head, AVPacketList **tail, AVPacket *pkt, int(*copy)(AVPacket *dst, const AVPacket *src), int flags)
Append an AVPacket to the list.
Definition: avpacket.c:729
#define src
Definition: vp8dsp.c:254
int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type)
Definition: avpacket.c:796
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about quality
void avpriv_packet_list_free(AVPacketList **head, AVPacketList **tail)
Wipe the list and unref all the packets in it.
Definition: avpacket.c:782
int avpriv_packet_list_get(AVPacketList **head, AVPacketList **tail, AVPacket *pkt)
Remove the oldest AVPacket in the list and return it.
Definition: avpacket.c:766
#define flags(name, subs,...)
Definition: cbs_av1.c:560
This structure stores compressed data.
Definition: packet.h:340