stream.h revision 41050cdb033641ddf26831d9272c0930f7b40a2d
1
2/*
3 ** Copyright 2003-2010, VisualOn, Inc.
4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
8 **
9 **     http://www.apache.org/licenses/LICENSE-2.0
10 **
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 */
17
18
19/***********************************************************************
20File:		stream.h
21
22Contains:       VOME API Buffer Operator Implement Header
23
24************************************************************************/
25#ifndef __STREAM_H__
26#define __STREAM_H__
27
28#include "voMem.h"
29#define Frame_Maxsize  1024 * 2  //Work Buffer 10K
30#define Frame_MaxByte  640        //AMR_WB Encoder one frame 320 samples = 640 Bytes
31#define MIN(a,b)	 ((a) < (b)? (a) : (b))
32
33typedef struct{
34	unsigned char *set_ptr;
35	unsigned char *frame_ptr;
36	unsigned char *frame_ptr_bk;
37	int  set_len;
38	int  framebuffer_len;
39	int  frame_storelen;
40	int  used_len;
41}FrameStream;
42
43void voAWB_UpdateFrameBuffer(FrameStream *stream, VO_MEM_OPERATOR *pMemOP);
44void voAWB_InitFrameBuffer(FrameStream *stream);
45void voAWB_FlushFrameBuffer(FrameStream *stream);
46#endif //__STREAM_H__
47
48