source: trunk/src/testing/app/hd-video-player/output_sail.h @ 4

Revision 4, 3.5 KB checked in by ajaworski, 13 years ago (diff)

Added modified SAGE sources

Line 
1/******************************************************************************
2 * SAGE - Scalable Adaptive Graphics Environment
3 *
4 * Copyright (C) 2004 Electronic Visualization Laboratory,
5 * University of Illinois at Chicago
6 *
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 *  * Redistributions of source code must retain the above copyright
13 *    notice, this list of conditions and the following disclaimer.
14 *  * Redistributions in binary form must reproduce the above
15 *    copyright notice, this list of conditions and the following disclaimer
16 *    in the documentation and/or other materials provided with the distribution.
17 *  * Neither the name of the University of Illinois at Chicago nor
18 *    the names of its contributors may be used to endorse or promote
19 *    products derived from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 * Direct questions, comments etc about SAGE to http://www.evl.uic.edu/cavern/forum/
34 *
35 *****************************************************************************/
36
37/* Output Pixel Format Define */
38#ifndef _OUTPUT_SAIL_
39#define _OUTPUT_SAIL_
40
41//#include <stdio.h>
42
43#include "sail.h"
44#include "misc.h"
45
46#define RGB16     90
47#define RGB24     91
48#define RGB32     92
49#define YUV               93
50
51#define FR10              100
52#define FR15              115
53#define FR20              120
54#define FR25              125
55#define FR30              130
56
57extern int FrameRate;
58
59class C_Output_sail {
60        int m_width;
61        int m_height;
62        int m_byte_pixel;
63        int m_color_mode;
64        int m_flag_empty;
65        unsigned char* m_frame_buf;
66        bool m_sailstarted;
67
68        char* m_execConfigName;
69        int m_nwID;
70
71        sail *sageInf;
72
73        int m_flag_notinit;
74        char* m_output_addr;
75        int m_output_port;
76
77        bool m_audioOn;                         // audio on/off flag
78#if defined (SAGE_AUDIO)
79        sageAudioMode m_audioMode;      // audio mode : capture, play, read, write
80        sageSampleFmt m_sampleFmt;      // audio sampling format : float, short, char, unsigned char
81#endif
82        int  m_audioPort;                               // audio port number
83        int  m_audioDeviceNum;          // device number
84        long m_samplingRate;                    // audio sampling rate : default-44100
85        int  m_channels;                                // number of audio channel
86        int  m_framePerBuffer;          // audio frames per buffer
87        int m_abuffsize;
88
89        void SetZero(void);
90        int sailInit(void);
91
92public :
93
94        C_Output_sail ();
95        virtual ~C_Output_sail ();
96
97        int init(int width, int height, int color_mode,char* output_addr, int output_port);
98        void setSailEnv(char* execConfigName, int nwID);
99        int push_data(unsigned char* buf , int buf_len);
100        int push_audiodata(unsigned char* buf, int buf_len);
101        void setAudioOn(bool on);
102        int init(int size);
103        int initAudioCaptureMode();
104        void shutdown();
105
106};
107
108
109
110#endif
Note: See TracBrowser for help on using the repository browser.