summaryrefslogtreecommitdiff
path: root/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.h
blob: bfed59dc70e64ec4bdfd95c1dcd3bb24fec49628 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/**********************************************************************
 *
 * HDFF firmware command interface library
 *
 * Copyright (C) 2011  Andreas Regel
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the
 * Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 *********************************************************************/

#ifndef HDFFCMD_AV_H
#define HDFFCMD_AV_H

typedef enum HdffAvContainerType_t
{
    HDFF_AV_CONTAINER_PES,
    HDFF_AV_CONTAINER_PES_DVD
} HdffAvContainerType_t;

typedef enum HdffAudioStreamType_t
{
    HDFF_AUDIO_STREAM_INVALID = -1,
    HDFF_AUDIO_STREAM_MPEG1 = 0,
    HDFF_AUDIO_STREAM_MPEG2,
    HDFF_AUDIO_STREAM_AC3,
    HDFF_AUDIO_STREAM_AAC,
    HDFF_AUDIO_STREAM_HE_AAC,
    HDFF_AUDIO_STREAM_PCM,
    HDFF_AUDIO_STREAM_EAC3,
    HDFF_AUDIO_STREAM_DTS
} HdffAudioStreamType_t;

typedef enum HdffVideoStreamType_t
{
    HDFF_VIDEO_STREAM_INVALID = -1,
    HDFF_VIDEO_STREAM_MPEG1 = 0,
    HDFF_VIDEO_STREAM_MPEG2,
    HDFF_VIDEO_STREAM_H264,
    HDFF_VIDEO_STREAM_MPEG4_ASP,
    HDFF_VIDEO_STREAM_VC1
} HdffVideoStreamType_t;

typedef enum HdffTvFormat_t
{
    HDFF_TV_FORMAT_4_BY_3,
    HDFF_TV_FORMAT_16_BY_9
} HdffTvFormat_t;

typedef enum HdffVideoConversion_t
{
    HDFF_VIDEO_CONVERSION_AUTOMATIC,
    HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9,
    HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9,
    HDFF_VIDEO_CONVERSION_PILLARBOX,
    HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT,
    HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9,
    HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9
} HdffVideoConversion_t;

typedef struct HdffVideoFormat_t
{
    int AutomaticEnabled;
    int AfdEnabled;
    HdffTvFormat_t TvFormat;
    HdffVideoConversion_t VideoConversion;
} HdffVideoFormat_t;

typedef enum HdffVideoOutputMode_t
{
    HDFF_VIDEO_OUTPUT_CLONE,
    HDFF_VIDEO_OUTPUT_HD_ONLY
} HdffVideoOutputMode_t;

typedef enum HdffAudioDownmixMode_t
{
    HDFF_AUDIO_DOWNMIX_OFF,
    HDFF_AUDIO_DOWNMIX_ANALOG,
    HDFF_AUDIO_DOWNMIX_ALWAYS,
    HDFF_AUDIO_DOWNMIX_AUTOMATIC,
    HDFF_AUDIO_DOWNMIX_HDMI_ONLY
} HdffAudioDownmixMode_t;


int HdffCmdAvSetPlayMode(int OsdDevice, uint8_t PlayMode, int Realtime);

int HdffCmdAvSetVideoPid(int OsdDevice, uint8_t DecoderIndex, uint16_t Pid,
                         HdffVideoStreamType_t StreamType);

int HdffCmdAvSetAudioPid(int OsdDevice, uint8_t DecoderIndex, uint16_t Pid,
                         HdffAudioStreamType_t StreamType,
                         HdffAvContainerType_t ContainerType);

int HdffCmdAvSetPcrPid(int OsdDevice, uint8_t DecoderIndex, uint16_t Pid);

int HdffCmdAvSetTeletextPid(int OsdDevice, uint8_t DecoderIndex, uint16_t Pid);

int HdffCmdAvSetVideoWindow(int OsdDevice, uint8_t DecoderIndex, int Enable,
                            uint16_t X, uint16_t Y, uint16_t Width,
                            uint16_t Height);

int HdffCmdAvShowStillImage(int OsdDevice, uint8_t DecoderIndex,
                            const uint8_t * StillImage, int Size,
                            HdffVideoStreamType_t StreamType);

int HdffCmdAvSetDecoderInput(int OsdDevice, uint8_t DecoderIndex,
                             uint8_t DemultiplexerIndex);

int HdffCmdAvSetDemultiplexerInput(int OsdDevice, uint8_t DemultiplexerIndex,
                                   uint8_t TsInputIndex);

int HdffCmdAvSetVideoFormat(int OsdDevice, uint8_t DecoderIndex,
                            const HdffVideoFormat_t * VideoFormat);

int HdffCmdAvSetVideoOutputMode(int OsdDevice, uint8_t DecoderIndex,
                                HdffVideoOutputMode_t OutputMode);

int HdffCmdAvSetStc(int OsdDevice, uint8_t DecoderIndex, uint64_t Stc);

int HdffCmdAvFlushBuffer(int OsdDevice, uint8_t DecoderIndex, int FlushAudio,
                         int FlushVideo);

int HdffCmdAvEnableSync(int OsdDevice, uint8_t DecoderIndex, int SyncAudio,
                        int SyncVideo);

int HdffCmdAvSetVideoSpeed(int OsdDevice, uint8_t DecoderIndex, int32_t Speed);

int HdffCmdAvSetAudioSpeed(int OsdDevice, uint8_t DecoderIndex, int32_t Speed);

int HdffCmdAvEnableVideoAfterStop(int OsdDevice, uint8_t DecoderIndex,
                                  int EnableVideoAfterStop);

int HdffCmdAvSetAudioDelay(int OsdDevice, int16_t Delay);

int HdffCmdAvSetAudioDownmix(int OsdDevice,
                             HdffAudioDownmixMode_t DownmixMode);

int HdffCmdAvSetAudioChannel(int OsdDevice, uint8_t AudioChannel);

int HdffCmdAvSetSyncShift(int OsdDevice, int16_t SyncShift);

#endif /* HDFFCMD_AV_H */