source: trunk/FrameBuffer.h @ 1038

Revision 1038, 2.2 KB checked in by astrange, 5 years ago (diff)

Add LGPL license headers to all files (or MIT where appropriate)
Get rid of "All rights reserved" which is LGPL-incompatible.

I didn't touch the Apple sample code, but they should've taken it out too...

Line 
1/*
2 * FrameBuffer.h
3 * Created by Graham Booker on 1/30/07.
4 *
5 * This file is part of Perian.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22typedef struct FrameData_s FrameData;
23typedef struct FFusionData_s FFusionData;
24
25struct FrameData_s
26{
27        uint8_t                 *buffer;
28        unsigned int    dataSize;
29        long                    frameNumber;
30        short                   type;
31        short                   skippabble;
32        short                   decoded;
33        FrameData               *prereqFrame;  /* This is the frame's data which must be decoded to fully display this frame */
34        FrameData               *nextFrame; /* This is the next frame to decode if this one is already decoded.  This is for predictive decoding */
35        FFusionData             *data;
36};
37
38typedef struct DataRingBuffer_s {
39} DataRingBuffer;
40
41struct FFusionData_s
42{
43        FrameData               unparsedFrames;
44        /* private */
45        unsigned int    frameSize;
46        unsigned int    frameRead;
47        unsigned int    frameWrite;
48        FrameData               *frames;
49        unsigned int    ringSize;
50        unsigned int    ringRead;
51        unsigned int    ringWrite;
52        uint8_t                 *ringBuffer;
53        FFusionData             *previousData;
54};
55
56void FFusionDataSetup(FFusionData *data, int dataSize, int bufferSize);
57void FFusionDataFree(FFusionData *data);
58uint8_t *FFusionCreateEntireDataBuffer(FFusionData *data, uint8_t *buffer, int bufferSize);
59FrameData *FFusionDataAppend(FFusionData *data, uint8_t *buffer, int dataSize, int type);
60void FFusionDataSetUnparsed(FFusionData *data, uint8_t *buffer, int bufferSize);
61void FFusionDataMarkRead(FrameData *toData);
62FrameData *FFusionDataFind(FFusionData *data, int frameNumber);
63
64FrameData *FrameDataCheckPrereq(FrameData *toData);
Note: See TracBrowser for help on using the repository browser.