vdr  1.7.27
hdffcmd_av.h
Go to the documentation of this file.
00001 /**********************************************************************
00002  *
00003  * HDFF firmware command interface library
00004  *
00005  * Copyright (C) 2011  Andreas Regel
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011 
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016 
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the
00019  * Free Software Foundation, Inc.,
00020  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00021  *
00022  *********************************************************************/
00023 
00024 #ifndef HDFFCMD_AV_H
00025 #define HDFFCMD_AV_H
00026 
00027 typedef enum HdffAvContainerType_t
00028 {
00029     HDFF_AV_CONTAINER_PES,
00030     HDFF_AV_CONTAINER_PES_DVD
00031 } HdffAvContainerType_t;
00032 
00033 typedef enum HdffAudioStreamType_t
00034 {
00035     HDFF_AUDIO_STREAM_INVALID = -1,
00036     HDFF_AUDIO_STREAM_MPEG1 = 0,
00037     HDFF_AUDIO_STREAM_MPEG2,
00038     HDFF_AUDIO_STREAM_AC3,
00039     HDFF_AUDIO_STREAM_AAC,
00040     HDFF_AUDIO_STREAM_HE_AAC,
00041     HDFF_AUDIO_STREAM_PCM,
00042     HDFF_AUDIO_STREAM_EAC3,
00043     HDFF_AUDIO_STREAM_DTS
00044 } HdffAudioStreamType_t;
00045 
00046 typedef enum HdffVideoStreamType_t
00047 {
00048     HDFF_VIDEO_STREAM_INVALID = -1,
00049     HDFF_VIDEO_STREAM_MPEG1 = 0,
00050     HDFF_VIDEO_STREAM_MPEG2,
00051     HDFF_VIDEO_STREAM_H264,
00052     HDFF_VIDEO_STREAM_MPEG4_ASP,
00053     HDFF_VIDEO_STREAM_VC1
00054 } HdffVideoStreamType_t;
00055 
00056 typedef enum HdffTvFormat_t
00057 {
00058     HDFF_TV_FORMAT_4_BY_3,
00059     HDFF_TV_FORMAT_16_BY_9
00060 } HdffTvFormat_t;
00061 
00062 typedef enum HdffVideoConversion_t
00063 {
00064     HDFF_VIDEO_CONVERSION_AUTOMATIC,
00065     HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9,
00066     HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9,
00067     HDFF_VIDEO_CONVERSION_PILLARBOX,
00068     HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT,
00069     HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9,
00070     HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9
00071 } HdffVideoConversion_t;
00072 
00073 typedef struct HdffVideoFormat_t
00074 {
00075     int AutomaticEnabled;
00076     int AfdEnabled;
00077     HdffTvFormat_t TvFormat;
00078     HdffVideoConversion_t VideoConversion;
00079 } HdffVideoFormat_t;
00080 
00081 typedef enum HdffVideoOutputMode_t
00082 {
00083     HDFF_VIDEO_OUTPUT_CLONE,
00084     HDFF_VIDEO_OUTPUT_HD_ONLY
00085 } HdffVideoOutputMode_t;
00086 
00087 typedef enum HdffAudioDownmixMode_t
00088 {
00089     HDFF_AUDIO_DOWNMIX_OFF,
00090     HDFF_AUDIO_DOWNMIX_ANALOG,
00091     HDFF_AUDIO_DOWNMIX_ALWAYS,
00092     HDFF_AUDIO_DOWNMIX_AUTOMATIC,
00093     HDFF_AUDIO_DOWNMIX_HDMI_ONLY
00094 } HdffAudioDownmixMode_t;
00095 
00096 
00097 int HdffCmdAvSetPlayMode(int OsdDevice, uint8_t PlayMode, int Realtime);
00098 
00099 int HdffCmdAvSetVideoPid(int OsdDevice, uint8_t DecoderIndex, uint16_t Pid,
00100                          HdffVideoStreamType_t StreamType);
00101 
00102 int HdffCmdAvSetAudioPid(int OsdDevice, uint8_t DecoderIndex, uint16_t Pid,
00103                          HdffAudioStreamType_t StreamType,
00104                          HdffAvContainerType_t ContainerType);
00105 
00106 int HdffCmdAvSetPcrPid(int OsdDevice, uint8_t DecoderIndex, uint16_t Pid);
00107 
00108 int HdffCmdAvSetTeletextPid(int OsdDevice, uint8_t DecoderIndex, uint16_t Pid);
00109 
00110 int HdffCmdAvSetVideoWindow(int OsdDevice, uint8_t DecoderIndex, int Enable,
00111                             uint16_t X, uint16_t Y, uint16_t Width,
00112                             uint16_t Height);
00113 
00114 int HdffCmdAvShowStillImage(int OsdDevice, uint8_t DecoderIndex,
00115                             const uint8_t * StillImage, int Size,
00116                             HdffVideoStreamType_t StreamType);
00117 
00118 int HdffCmdAvSetDecoderInput(int OsdDevice, uint8_t DecoderIndex,
00119                              uint8_t DemultiplexerIndex);
00120 
00121 int HdffCmdAvSetDemultiplexerInput(int OsdDevice, uint8_t DemultiplexerIndex,
00122                                    uint8_t TsInputIndex);
00123 
00124 int HdffCmdAvSetVideoFormat(int OsdDevice, uint8_t DecoderIndex,
00125                             const HdffVideoFormat_t * VideoFormat);
00126 
00127 int HdffCmdAvSetVideoOutputMode(int OsdDevice, uint8_t DecoderIndex,
00128                                 HdffVideoOutputMode_t OutputMode);
00129 
00130 int HdffCmdAvSetStc(int OsdDevice, uint8_t DecoderIndex, uint64_t Stc);
00131 
00132 int HdffCmdAvFlushBuffer(int OsdDevice, uint8_t DecoderIndex, int FlushAudio,
00133                          int FlushVideo);
00134 
00135 int HdffCmdAvEnableSync(int OsdDevice, uint8_t DecoderIndex, int SyncAudio,
00136                         int SyncVideo);
00137 
00138 int HdffCmdAvSetVideoSpeed(int OsdDevice, uint8_t DecoderIndex, int32_t Speed);
00139 
00140 int HdffCmdAvSetAudioSpeed(int OsdDevice, uint8_t DecoderIndex, int32_t Speed);
00141 
00142 int HdffCmdAvEnableVideoAfterStop(int OsdDevice, uint8_t DecoderIndex,
00143                                   int EnableVideoAfterStop);
00144 
00145 int HdffCmdAvSetAudioDelay(int OsdDevice, int16_t Delay);
00146 
00147 int HdffCmdAvSetAudioDownmix(int OsdDevice,
00148                              HdffAudioDownmixMode_t DownmixMode);
00149 
00150 int HdffCmdAvSetAudioChannel(int OsdDevice, uint8_t AudioChannel);
00151 
00152 #endif /* HDFFCMD_AV_H */