mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
lib/libcoolstream: restore nevis headers
Origin commit data
------------------
Branch: ni/coolstream
Commit: 94c7e6854c
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-01-11 (Fri, 11 Jan 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -56,7 +56,6 @@ typedef enum
|
||||
HDMI_AUDIO_FMT_ATRAC
|
||||
} HDMI_AUDIO_FORMAT;
|
||||
|
||||
#define CS_MAX_AUDIO_DECODERS 1
|
||||
#define CS_MAX_AUDIO_FORMATS 10
|
||||
|
||||
typedef struct cs_audio_format {
|
||||
@@ -69,17 +68,10 @@ typedef struct cs_audio_caps {
|
||||
cs_audio_format_t formats[CS_MAX_AUDIO_FORMATS];
|
||||
} cs_audio_caps_t;
|
||||
|
||||
class cDemux;
|
||||
class cVideo;
|
||||
|
||||
class cAudio {
|
||||
private:
|
||||
static cAudio *instance[CS_MAX_AUDIO_DECODERS];
|
||||
unsigned int unit;
|
||||
cDemux *demux;
|
||||
cVideo *video;
|
||||
CS_AUDIO_PDATA *privateData;
|
||||
//unsigned int cEncodedDataOnSPDIF, cEncodedDataOnHDMI;
|
||||
unsigned int cEncodedDataOnSPDIF, cEncodedDataOnHDMI;
|
||||
bool muted;
|
||||
|
||||
AUDIO_FORMAT streamType;
|
||||
@@ -100,8 +92,6 @@ private:
|
||||
bool spdifDD;
|
||||
bool hasMuteScheduled;
|
||||
bool analogOut;
|
||||
//
|
||||
cAudio(unsigned int Unit);
|
||||
public:
|
||||
/* construct & destruct */
|
||||
cAudio(void *hBuffer, void *encHD, void *encSD);
|
||||
@@ -158,10 +148,6 @@ public:
|
||||
bool GetHdmiAudioCaps(cs_audio_caps_t &caps);
|
||||
bool IsHdmiAudioFormatSupported(HDMI_AUDIO_FORMAT format);
|
||||
void SetHdmiDD(HDMI_ENCODED_MODE type);
|
||||
bool IsHdmiDTSSupported(void);
|
||||
void SetDemux(cDemux *Demux);
|
||||
void SetVideo(cVideo *Video);
|
||||
static cAudio *GetDecoder(unsigned int Unit);
|
||||
};
|
||||
|
||||
#endif //__AUDIO_CS_H_
|
||||
|
@@ -11,8 +11,8 @@
|
||||
#define __CA_CS_H_
|
||||
|
||||
#include <OpenThreads/Thread>
|
||||
#include <vector>
|
||||
#include "cs_types.h"
|
||||
#include <vector>
|
||||
|
||||
enum CA_INIT_MASK {
|
||||
CA_INIT_SC = 1,
|
||||
@@ -23,7 +23,7 @@ enum CA_INIT_MASK {
|
||||
enum CA_SLOT_TYPE {
|
||||
CA_SLOT_TYPE_SMARTCARD,
|
||||
CA_SLOT_TYPE_CI,
|
||||
CA_SLOT_TYPE_ALL,
|
||||
CA_SLOT_TYPE_ALL
|
||||
};
|
||||
|
||||
enum CA_MESSAGE_FLAGS {
|
||||
@@ -49,7 +49,7 @@ enum CA_MESSAGE_FLAGS {
|
||||
CA_MESSAGE_HAS_PARAM1_LONG = (1 << 19),
|
||||
CA_MESSAGE_HAS_PARAM2_LONG = (1 << 20),
|
||||
CA_MESSAGE_HAS_PARAM3_LONG = (1 << 21),
|
||||
CA_MESSAGE_HAS_PARAM4_LONG = (1 << 22),
|
||||
CA_MESSAGE_HAS_PARAM4_LONG = (1 << 22)
|
||||
};
|
||||
|
||||
enum CA_MESSAGE_MSGID {
|
||||
@@ -72,7 +72,7 @@ enum CA_MESSAGE_MSGID {
|
||||
CA_MESSAGE_MSG_EMM_ARRIVED,
|
||||
CA_MESSAGE_MSG_CHANNEL_CHANGE,
|
||||
CA_MESSAGE_MSG_GUI_READY,
|
||||
CA_MESSAGE_MSG_EXIT,
|
||||
CA_MESSAGE_MSG_EXIT
|
||||
};
|
||||
|
||||
typedef struct CA_MESSAGE {
|
||||
|
@@ -1,5 +1,3 @@
|
||||
#ifndef __CNXTFB_H__
|
||||
#define __CNXTFB_H__
|
||||
/****************************************************************************/
|
||||
/* $Id:
|
||||
****************************************************************************/
|
||||
@@ -16,22 +14,19 @@
|
||||
|
||||
|
||||
/* assign an accelerator type (we have no official, so we do not add them to linux/fb.h */
|
||||
#define FB_ACCEL_PNX849X 0x90 /* Trident PNX849X */
|
||||
|
||||
struct fb_info;
|
||||
#define FB_ACCEL_CX2450X 0x90 /* Trident CX2450X */
|
||||
|
||||
/*
|
||||
* structure which contains the image handle
|
||||
*/
|
||||
typedef struct _cnxtfb_handles
|
||||
typedef struct _cnxtfb_handle
|
||||
{
|
||||
void *hImage;
|
||||
void *hVPP_SD;
|
||||
void *hDRM_SD;
|
||||
void *hTvEnc_SD;
|
||||
void *hVPP;
|
||||
void *hDRM;
|
||||
void *hTvEnc;
|
||||
void *hImage_SD;
|
||||
} cnxtfb_handles;
|
||||
} cnxtfb_handle;
|
||||
|
||||
typedef struct _cnxtfb_resolution
|
||||
{
|
||||
@@ -40,193 +35,22 @@ typedef struct _cnxtfb_resolution
|
||||
|
||||
} cnxtfb_resolution;
|
||||
|
||||
/* To use with ioctl FBIO_CHANGEOUTPUTFORMAT */
|
||||
typedef enum {
|
||||
CNXTFB_VIDEO_STANDARD_ATSC_1080I = 0,
|
||||
CNXTFB_VIDEO_STANDARD_NTSC_M,
|
||||
CNXTFB_VIDEO_STANDARD_ATSC_480P,
|
||||
CNXTFB_VIDEO_STANDARD_ATSC_720P,
|
||||
CNXTFB_VIDEO_STANDARD_PAL_B_WEUR,
|
||||
CNXTFB_VIDEO_STANDARD_SECAM_L,
|
||||
CNXTFB_VIDEO_STANDARD_ATSC_576P,
|
||||
CNXTFB_VIDEO_STANDARD_ATSC_720P_50HZ,
|
||||
CNXTFB_VIDEO_STANDARD_ATSC_1080I_50HZ
|
||||
} CNXTFB_VIDEO_STANDARD;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CNXTFB_BLEND_MODE_PER_PIXEL = 0,
|
||||
CNXTFB_BLEND_MODE_UNIFORM_ALPHA,
|
||||
/* Reordered for compatability .. */
|
||||
CNXTFB_BLEND_MODE_ALPHA_MULTIPLIED,
|
||||
CNXTFB_BLEND_MODE_GLOBAL_ALPHA = 0, /* Global / Region Alpha */
|
||||
CNXTFB_BLEND_MODE_PIXEL_ALPHA, /* Alpha from pixel */
|
||||
CNXTFB_BLEND_MODE_ALPHA_MULTIPLIED, /* Global alpha multiplied with pixel alpha */
|
||||
} CNXTFB_BLEND_MODE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CNXTFB_INVALID = -1,
|
||||
CNXTFB_480I = 0,
|
||||
CNXTFB_480P,
|
||||
CNXTFB_576I,
|
||||
CNXTFB_576P,
|
||||
CNXTFB_720P,
|
||||
CNXTFB_720P_50,
|
||||
CNXTFB_1080I,
|
||||
CNXTFB_1080I_50,
|
||||
CNXTFB_1080P,
|
||||
CNXTFB_1080P_50,
|
||||
CNXTFB_1080P_24,
|
||||
CNXTFB_1080P_25,
|
||||
CNXTFB_DISPLAY_MODE_LAST = CNXTFB_1080P_25,
|
||||
} cnxtfb_displaymode;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CNXTFB_TYPE_SD = 1, /* 1 << 0 */
|
||||
CNXTFB_TYPE_HD = 2 /* 1 << 1 */
|
||||
} CNXTFB_FB_TYPE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char Type; /* Bitmask of type CNXTFB_FB_TYPE */
|
||||
cnxtfb_displaymode SDMode;
|
||||
cnxtfb_displaymode HDMode;
|
||||
} CNXTFB_OUTPUT_FORMAT_CHANGE;
|
||||
|
||||
/*
|
||||
* structure which contains the image handle
|
||||
*/
|
||||
typedef struct _cnxtfb_handle
|
||||
{
|
||||
/* CNXT_IMAGE_HANDLE hImage; */
|
||||
void *hImage;
|
||||
} cnxtfb_handle;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CNXTFB_VSYNC_NOTIFICATION = 0x1000,
|
||||
CNXTFB_BUF_REELASE_NOTIFICATION,
|
||||
CNXTFB_DISPLAY_MODE_NOTIFICATION
|
||||
}cnxtfb_event;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 uRed;
|
||||
u8 uGreen;
|
||||
u8 uBlue;
|
||||
u8 uAlpha;
|
||||
} CNXTFB_RGB_COLOR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 uY;
|
||||
u8 uCb;
|
||||
u8 uCr;
|
||||
u8 uAlpha;
|
||||
} CNXTFB_YCC_COLOR;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CNXTFB_COLOR_RGB = 0, /* RGB format */
|
||||
CNXTFB_COLOR_YCC, /* YCC format */
|
||||
CNXTFB_COLOR_PAL_INDEX, /* Palette index or u_int32 representation of color*/
|
||||
CNXTFB_COLOR_TYPE_LAST = CNXTFB_COLOR_PAL_INDEX
|
||||
} CNXTFB_COLOR_TYPE;
|
||||
|
||||
typedef union
|
||||
{
|
||||
u_int32_t uValue; /* Palette index or u_int32 representation of color */
|
||||
CNXTFB_RGB_COLOR RGB;
|
||||
CNXTFB_YCC_COLOR YCC;
|
||||
} CNXTFB_COLOR_ENTRY;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CNXTFB_YCC_BASIC = 0, /* Pure YCbCr for MPEG-1 decodes */
|
||||
CNXTFB_YCC_SD_BT470, /* ITU-R BT470-2 System M */
|
||||
CNXTFB_YCC_SD_BT470_BG, /* ITU-R BT470-2 System B/G */
|
||||
CNXTFB_YCC_SMPTE_170M, /* SMPTE 170M */
|
||||
CNXTFB_YCC_SMPTE_240M, /* SMPTE 240M */
|
||||
CNXTFB_YCC_GEN_FILM, /* Generic Film(Color filters using Illuminant C) */
|
||||
CNXTFB_YCC_HD_BT709,
|
||||
CNXTFB_RGB,
|
||||
CNXTFB_COLOR_SPACE_LAST = CNXTFB_RGB
|
||||
} CNXTFB_COLOR_SPACE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CNXTFB_COLOR_SPACE ColorSpace;
|
||||
CNXTFB_COLOR_ENTRY Color;
|
||||
} CNXTFB_COLOR_SPEC;
|
||||
|
||||
|
||||
/* Enumeration for types of chroma key configurations. */
|
||||
typedef enum
|
||||
{
|
||||
CNXTFB_REGION_CHROMAKEY_SRC,
|
||||
CNXTFB_REGION_CHROMAKEY_DST
|
||||
} CNXTFB_REGION_CHROMAKEY_TYPE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CNXTFB_COLOR_SPEC ColorKeyLower;
|
||||
CNXTFB_COLOR_SPEC ColorKeyUpper;
|
||||
} CNXTFB_REGION_CHROMAKEY_CFG;
|
||||
|
||||
typedef struct _cnxtfb_chromakey_cfg{
|
||||
bool bEnable;
|
||||
CNXTFB_REGION_CHROMAKEY_TYPE Type;
|
||||
CNXTFB_REGION_CHROMAKEY_CFG *pCfg;
|
||||
} cnxtfb_chromakey_cfg;
|
||||
|
||||
typedef void (*cnxtfb_notify)(cnxtfb_event event, void *cookie);
|
||||
|
||||
extern void cnxtfb_register_client(struct fb_info *fb_info, cnxtfb_notify pfnotify, void *cookie);
|
||||
extern void cnxtfb_get_image_handle(struct fb_info *fb_info, void **phImage);
|
||||
extern void cnxtfb_get_handles(struct fb_info *fb_info, cnxtfb_handles *phandles);
|
||||
extern void cnxtfb_register_evnt_clbk(cnxtfb_notify pfnotify);
|
||||
|
||||
#define CNXTFB_IO(type) _IO('F', type)
|
||||
#define CNXTFB_IOW(type, dtype) _IOW('F', type, dtype)
|
||||
#define CNXTFB_IOR(type, dtype) _IOR('F', type, dtype)
|
||||
|
||||
|
||||
#define FB_TEST_HW_ACCELERATION
|
||||
|
||||
#define FBIOGET_CNXTFBHANDLE 0x4620
|
||||
#define FBIO_WAITFORVSYNC 0x4621
|
||||
#define FBIO_STARTDISPLAY 0x4622
|
||||
#define FBIO_STOPDISPLAY 0x4623
|
||||
#define FBIO_SETBLENDMODE 0x4624
|
||||
#define FBIO_CHANGEOUTPUTFORMAT 0x4625
|
||||
#define FBIO_GETFBRESOLUTION 0x4626
|
||||
|
||||
#ifdef FB_TEST_HW_ACCELERATION
|
||||
#define FBIO_FILL_RECT 0x4627
|
||||
#define FBIO_COPY_AREA 0x4628
|
||||
#define FBIO_IMAGE_BLT 0x4629
|
||||
#define FBIO_STRETCH_COPY 0x4630
|
||||
#endif
|
||||
|
||||
#define FBIO_SETOPACITY 0x4631
|
||||
#define FBIO_FLIPBUFFER 0x4632
|
||||
|
||||
#ifdef FB_TEST_HW_ACCELERATION
|
||||
#define FBIO_JPEG_RENDER 0x4633
|
||||
#endif
|
||||
|
||||
#define FBIO_SCALE_SD_OSD 0x4634
|
||||
#define FBIO_CHROMAKEY_CFG 0x4635
|
||||
#define FBIO_DELAY_BUF_RELEASE 0x4636
|
||||
/* CST Mod */
|
||||
#define FBIO_GETCNXTFBHANDLES 0x4640
|
||||
|
||||
|
||||
#if 0
|
||||
#ifndef FBIO_WAITFORVSYNC
|
||||
#define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t)
|
||||
#endif
|
||||
|
||||
#define FBIO_GETCNXTFBHANDLE CNXTFB_IOR(0x21, cnxtfb_handle) // 0x4620
|
||||
#define FBIO_GETCNXTFBHANDLE CNXTFB_IOR(0x21, cnxtfb_handle)
|
||||
#define FBIO_STARTDISPLAY CNXTFB_IO(0x22)
|
||||
#define FBIO_STOPDISPLAY CNXTFB_IO(0x23)
|
||||
#define FBIO_SETOPACITY CNXTFB_IOW(0x24, u_int8_t)
|
||||
@@ -234,13 +58,9 @@ extern void cnxtfb_register_evnt_clbk(cnxtfb_notify pfnotify);
|
||||
#define FBIO_CHANGEOUTPUTFORMAT CNXTFB_IOW(0x26, u_int32_t)
|
||||
#define FBIO_GETFBRESOLUTION CNXTFB_IOR(0x27, cnxtfb_resolution)
|
||||
#define FBIO_SETFLICKERFILTER CNXTFB_IOW(0x28, u_int8_t)
|
||||
#define FBIO_SCALE_SD_OSD CNXTFB_IO(0x28)
|
||||
|
||||
#ifdef FB_TEST_HW_ACCELERATION
|
||||
#define FBIO_FILL_RECT CNXTFB_IOW(0x29, struct fb_fillrect)
|
||||
#define FBIO_COPY_AREA CNXTFB_IOW(0x2a, struct fb_copyarea)
|
||||
#define FBIO_IMAGE_BLT CNXTFB_IOW(0x2b, struct fb_image)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __CNXTFB_H__ */
|
||||
|
@@ -5,15 +5,12 @@
|
||||
/* */
|
||||
/* (C) 2010 CoolStream International */
|
||||
/* */
|
||||
/* $Id:: $ */
|
||||
/*******************************************************************************/
|
||||
#ifndef __CS_API_H_
|
||||
#define __CS_API_H_
|
||||
|
||||
#include <coolstream/control.h>
|
||||
#include <control.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef void (*cs_messenger) (unsigned int msg, unsigned int data);
|
||||
|
||||
@@ -33,7 +30,7 @@ enum CS_LOG_MODULE {
|
||||
CS_LOG_POWER_CLK,
|
||||
CS_LOG_MEM,
|
||||
CS_LOG_API,
|
||||
CS_LOG_CA,
|
||||
CS_LOG_CA
|
||||
};
|
||||
|
||||
// Initialization
|
||||
@@ -61,18 +58,12 @@ void cs_log_module_message(enum CS_LOG_MODULE module, const char *fmt, ...);
|
||||
// TS Routing
|
||||
unsigned int cs_get_ts_output(void);
|
||||
int cs_set_ts_output(unsigned int port);
|
||||
int cs_set_ts_ci_clock(unsigned int speed);
|
||||
int cs_get_ts_ci_clock(unsigned int *speed);
|
||||
int cs_set_ts_config(unsigned int port, tsrouter_hsdp_config_t *hsdp_config);
|
||||
int cs_get_ts_config(unsigned int port, tsrouter_hsdp_config_t *hsdp_config);
|
||||
int cs_set_tsp_config(unsigned int port, tsrouter_tsp_config_t *tsp_config);
|
||||
int cs_get_tsp_config(unsigned int port, tsrouter_tsp_config_t *tsp_config);
|
||||
|
||||
// Serial nr and revision accessors
|
||||
unsigned long long cs_get_serial(void);
|
||||
unsigned int cs_get_revision(void);
|
||||
|
||||
unsigned int cs_get_chip_id(void);
|
||||
unsigned int cs_get_chip_rev_id(void);
|
||||
|
||||
#endif //__CS_API_H_
|
||||
|
@@ -1,12 +1,3 @@
|
||||
/*******************************************************************************/
|
||||
/* */
|
||||
/* libcoolstream/cs_types.h */
|
||||
/* Public header file for CoolStream Public API */
|
||||
/* */
|
||||
/* (C) 2010 CoolStream International */
|
||||
/* */
|
||||
/* $Id:: $ */
|
||||
/*******************************************************************************/
|
||||
#ifndef __CS_TYPES_H_
|
||||
#define __CS_TYPES_H_
|
||||
|
||||
|
@@ -11,8 +11,6 @@
|
||||
#define __DEMUX_CS_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <video_cs.h>
|
||||
#include "cs_types.h"
|
||||
|
||||
#define DEMUX_POLL_TIMEOUT 0 // timeout in ms
|
||||
@@ -36,12 +34,8 @@ typedef enum {
|
||||
} DMX_CHANNEL_TYPE;
|
||||
|
||||
class cDemuxData;
|
||||
class cVideo;
|
||||
class cAudio;
|
||||
|
||||
class cDemux {
|
||||
friend class cVideo;
|
||||
friend class cAudio;
|
||||
private:
|
||||
DMX_CHANNEL_TYPE type;
|
||||
int timeout;
|
||||
@@ -60,8 +54,6 @@ public:
|
||||
bool Start(bool record = false);
|
||||
bool Stop(void);
|
||||
int Read(unsigned char *buff, int len, int Timeout = 0);
|
||||
|
||||
bool SetVideoFormat(VIDEO_FORMAT VideoFormat);
|
||||
bool SetSource(int source);
|
||||
|
||||
bool sectionFilter(unsigned short Pid, const unsigned char * const Tid, const unsigned char * const Mask, int len, int Timeout = DEMUX_POLL_TIMEOUT, const unsigned char * const nMask = NULL);
|
||||
@@ -72,7 +64,7 @@ public:
|
||||
void SetSyncMode(AVSYNC_TYPE SyncMode);
|
||||
void *getBuffer(void);
|
||||
void *getChannel(void);
|
||||
void getSTC(s64 *STC);
|
||||
void getSTC(int64_t *STC);
|
||||
|
||||
DMX_CHANNEL_TYPE getChannelType(void) { return type; };
|
||||
int getUnit(void) { return unit; };
|
||||
|
@@ -1,12 +1,3 @@
|
||||
/*******************************************************************************/
|
||||
/* */
|
||||
/* libcoolstream/mmi.h */
|
||||
/* Public header file for CoolStream Public CA MMI API */
|
||||
/* */
|
||||
/* (C) 2010 CoolStream International */
|
||||
/* */
|
||||
/* $Id:: $ */
|
||||
/*******************************************************************************/
|
||||
#ifndef __MMI_H_
|
||||
#define __MMI_H_
|
||||
|
||||
@@ -14,28 +5,6 @@
|
||||
#define MAX_MMI_TEXT_LEN 255
|
||||
#define MAX_MMI_CHOICE_TEXT_LEN 255
|
||||
|
||||
typedef enum {
|
||||
MMI_TOP_MENU_SUBS = 1,
|
||||
MMI_TOP_MENU_EVENTS,
|
||||
MMI_TOP_MENU_TOKENS,
|
||||
MMI_TOP_MENU_PIN,
|
||||
MMI_TOP_MENU_MATURE,
|
||||
MMI_TOP_MENU_ABOUT
|
||||
} MMI_MENU_CURRENT;
|
||||
|
||||
typedef enum {
|
||||
MMI_MENU_LEVEL_MAIN = 0,
|
||||
MMI_MENU_LEVEL_MATURE,
|
||||
MMI_MENU_LEVEL_ASK_PIN_MATURE
|
||||
} MMI_MENU_LEVEL;
|
||||
|
||||
typedef enum {
|
||||
MMI_PIN_LEVEL_ASK_OLD = 0,
|
||||
MMI_PIN_LEVEL_CHECK_CURRENT,
|
||||
MMI_PIN_LEVEL_ASK_REPEAT,
|
||||
MMI_PIN_LEVEL_CHECK_AND_CHANGE
|
||||
} MMI_PIN_LEVEL;
|
||||
|
||||
typedef struct {
|
||||
int choice_nb;
|
||||
char title[MAX_MMI_TEXT_LEN];
|
||||
|
@@ -11,7 +11,6 @@
|
||||
#define __PLAYBACK_CS_H_
|
||||
|
||||
#include <string>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum {
|
||||
PLAYMODE_TS = 0,
|
||||
|
@@ -5,7 +5,6 @@
|
||||
/* */
|
||||
/* (C) 2010 CoolStream International */
|
||||
/* */
|
||||
/* $Id:: $ */
|
||||
/*******************************************************************************/
|
||||
#ifndef __PWRMNGR_H_
|
||||
#define __PWRMNGR_H_
|
||||
@@ -27,7 +26,7 @@ public:
|
||||
unsigned long GetDelta(void);
|
||||
//
|
||||
cCpuFreqManager(void);
|
||||
~cCpuFreqManager();
|
||||
|
||||
};
|
||||
|
||||
// -- cPowerManageger ----------------------------------------------------------
|
||||
@@ -46,6 +45,7 @@ private:
|
||||
bool opened;
|
||||
PWR_STATE powerState;
|
||||
//
|
||||
static void ApplicationCallback(void * /*hHandle*/, void */*pUserData*/, signed long /*eEvent*/, void */*pEventData*/, void */*pTag*/) {}
|
||||
bool SetState(PWR_STATE PowerState);
|
||||
public:
|
||||
bool Open(void);
|
||||
|
@@ -5,60 +5,38 @@
|
||||
/* */
|
||||
/* (C) 2008 CoolStream International */
|
||||
/* */
|
||||
/* $Id:: $ */
|
||||
/*******************************************************************************/
|
||||
#ifndef __VIDEO_CS_H_
|
||||
#define __VIDEO_CS_H_
|
||||
|
||||
#include <coolstream/cs_frontpanel.h>
|
||||
#include <coolstream/control.h>
|
||||
#include <cs_vfd.h>
|
||||
#include <control.h>
|
||||
|
||||
#include "cs_types.h"
|
||||
|
||||
#define CS_MAX_VIDEO_DECODERS 16
|
||||
|
||||
#ifndef CS_VIDEO_PDATA
|
||||
#define CS_VIDEO_PDATA void
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
// Video modes
|
||||
ANALOG_xD_CVBS = (1 << 0), // Turns off fastblank on SCART
|
||||
ANALOG_SD_RGB = (1 << 1), // Output SD in RGB format
|
||||
ANALOG_SD_YPRPB = (1 << 2), // Output SD in YPbPr format (component)
|
||||
ANALOG_HD_RGB = (1 << 3), // Output HD in RGB format
|
||||
ANALOG_HD_YPRPB = (1 << 4), // Output HD in YPbPr format (component)
|
||||
// Output types
|
||||
ANALOG_xD_SCART = (1 << 8), // Output is SCART
|
||||
ANALOG_xD_CINCH = (1 << 9), // Output is Cinch
|
||||
ANALOG_xD_BOTH = (3 << 8), // Output cannot individually control scart, cinch outputs
|
||||
// due to limited amount of DACs (ie TANK, Trinity)
|
||||
ANALOG_SD_RGB_CINCH = 0x00,
|
||||
ANALOG_SD_YPRPB_CINCH,
|
||||
ANALOG_HD_RGB_CINCH,
|
||||
ANALOG_HD_YPRPB_CINCH,
|
||||
ANALOG_SD_RGB_SCART = 0x10,
|
||||
ANALOG_SD_YPRPB_SCART,
|
||||
ANALOG_HD_RGB_SCART,
|
||||
ANALOG_HD_YPRPB_SCART,
|
||||
ANALOG_SCART_MASK = 0x10
|
||||
} analog_mode_t;
|
||||
|
||||
#define ANALOG_MODE(conn, def, sys) (ANALOG_##def##_##sys | ANALOG_xD_##conn)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
VIDEO_FORMAT_MPEG2 = 0,
|
||||
VIDEO_FORMAT_MPEG4, /* H264 */
|
||||
VIDEO_FORMAT_MPEG4,
|
||||
VIDEO_FORMAT_VC1,
|
||||
VIDEO_FORMAT_JPEG,
|
||||
VIDEO_FORMAT_GIF,
|
||||
VIDEO_FORMAT_PNG,
|
||||
VIDEO_FORMAT_DIVX,/* DIVX 3.11 */
|
||||
VIDEO_FORMAT_MPEG4PART2,/* MPEG4 SVH, MPEG4 SP, MPEG4 ASP, DIVX4,5,6 */
|
||||
VIDEO_FORMAT_REALVIDEO8,
|
||||
VIDEO_FORMAT_REALVIDEO9,
|
||||
VIDEO_FORMAT_ON2_VP6,
|
||||
VIDEO_FORMAT_ON2_VP8,
|
||||
VIDEO_FORMAT_SORENSON_SPARK,
|
||||
VIDEO_FORMAT_H263,
|
||||
VIDEO_FORMAT_H263_ENCODER,
|
||||
VIDEO_FORMAT_H264_ENCODER,
|
||||
VIDEO_FORMAT_MPEG4PART2_ENCODER,
|
||||
VIDEO_FORMAT_AVS,
|
||||
VIDEO_FORMAT_VIP656,
|
||||
VIDEO_FORMAT_UNSUPPORTED
|
||||
VIDEO_FORMAT_PNG
|
||||
} VIDEO_FORMAT;
|
||||
|
||||
typedef enum {
|
||||
@@ -144,17 +122,10 @@ typedef enum
|
||||
VIDEO_CONTROL_MAX = VIDEO_CONTROL_SHARPNESS
|
||||
} VIDEO_CONTROL;
|
||||
|
||||
class cDemux;
|
||||
class cAudio;
|
||||
|
||||
class cVideo {
|
||||
friend class cAudio;
|
||||
private:
|
||||
static cVideo *instance[CS_MAX_VIDEO_DECODERS];
|
||||
|
||||
unsigned int unit;
|
||||
CS_VIDEO_PDATA *privateData;
|
||||
VIDEO_FORMAT streamType;
|
||||
VIDEO_FORMAT StreamType;
|
||||
VIDEO_DEFINITION VideoDefinition;
|
||||
DISPLAY_AR DisplayAR;
|
||||
VIDEO_PLAY_MODE playMode;
|
||||
@@ -165,7 +136,7 @@ private:
|
||||
VIDEO_FRAME_RATE FrameRate;
|
||||
VIDEO_HDMI_CEC_MODE hdmiCECMode;
|
||||
bool Interlaced;
|
||||
unsigned int uVPPDisplayDelay;
|
||||
unsigned int uDRMDisplayDelay;
|
||||
unsigned int uVideoPTSDelay;
|
||||
int StcPts;
|
||||
bool started;
|
||||
@@ -175,23 +146,21 @@ private:
|
||||
bool auto_format;
|
||||
int uFormatIndex;
|
||||
bool vbi_started;
|
||||
bool receivedVPPDelay;
|
||||
bool receivedDRMDelay;
|
||||
bool receivedVideoDelay;
|
||||
int cfd; // control driver fd
|
||||
analog_mode_t analog_mode_cinch;
|
||||
analog_mode_t analog_mode_scart;
|
||||
fp_icon mode_icon;
|
||||
cDemux *demux;
|
||||
vfd_icon mode_icon;
|
||||
//
|
||||
int SelectAutoFormat();
|
||||
void ScalePic();
|
||||
cVideo(unsigned int Unit);
|
||||
public:
|
||||
/* constructor & destructor */
|
||||
cVideo(int mode, void * hChannel, void * hBuffer);
|
||||
~cVideo(void);
|
||||
|
||||
void * GetVPP(void);
|
||||
void * GetDRM(void);
|
||||
void * GetTVEnc();
|
||||
void * GetTVEncSD();
|
||||
void * GetHandle();
|
||||
@@ -209,7 +178,7 @@ public:
|
||||
/* stream source */
|
||||
int getSource(void);
|
||||
int setSource(void);
|
||||
int GetStreamType(void);
|
||||
int GetStreamType(void) { return StreamType; };
|
||||
|
||||
/* blank on freeze */
|
||||
int getBlank(void);
|
||||
@@ -217,10 +186,10 @@ public:
|
||||
|
||||
/* get play state */
|
||||
int getPlayState(void);
|
||||
void SetVPPDelay(unsigned int delay) { uVPPDisplayDelay = delay;};
|
||||
void SetDRMDelay(unsigned int delay) { uDRMDisplayDelay = delay;};
|
||||
void SetVideoDelay(unsigned int delay) { uVideoPTSDelay = delay;};
|
||||
/* Notification handlers */
|
||||
void HandleVPPMessage(int Event, void *pData);
|
||||
void HandleDRMMessage(int Event, void *pData);
|
||||
void HandleVideoMessage(void * hHandle, int Event, void *pData);
|
||||
void HandleEncoderMessage(void *hHandle, int Event, void *pData);
|
||||
VIDEO_DEFINITION GetVideoDef(void) { return VideoDefinition; }
|
||||
@@ -247,9 +216,9 @@ public:
|
||||
void Standby(bool bOn);
|
||||
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600);
|
||||
void SetControl(int num, int val);
|
||||
bool ReceivedVPPDelay(void) { return receivedVPPDelay; }
|
||||
bool ReceivedDRMDelay(void) { return receivedDRMDelay; }
|
||||
bool ReceivedVideoDelay(void) { return receivedVideoDelay; }
|
||||
void SetReceivedVPPDelay(bool Received) { receivedVPPDelay = Received; }
|
||||
void SetReceivedDRMDelay(bool Received) { receivedDRMDelay = Received; }
|
||||
void SetReceivedVideoDelay(bool Received) { receivedVideoDelay = Received; }
|
||||
void SetFastBlank(bool onoff);
|
||||
void SetTVAV(bool onoff);
|
||||
@@ -262,8 +231,6 @@ public:
|
||||
int StartVBI(unsigned short pid);
|
||||
int StopVBI(void);
|
||||
bool GetScreenImage(unsigned char * &data, int &xres, int &yres, bool get_video = true, bool get_osd = false, bool scale_to_video = false);
|
||||
void SetDemux(cDemux *Demux);
|
||||
static cVideo *GetDecoder(unsigned int Unit);
|
||||
};
|
||||
|
||||
#endif // __VIDEO_CS_H_
|
||||
|
Reference in New Issue
Block a user