common.h
来自「1. 8623L平台」· C头文件 代码 · 共 617 行 · 第 1/2 页
H
617 行
RMbool isNero; struct RMNeroChapterEntry chapterList[NERO_MAX_CHAPTERS]; RMuint32 duration; // in seconds} RMMP4StreamInfo;typedef struct RMAVIStreamInfo { RMuint32 videoStreams; RMuint32 audioStreams; RMbool trickModesAllowed; RMuint32 duration; // in seconds} RMAVIStreamInfo;typedef struct RMFileStreamInfo { enum RMStreamInfoType streamType; union { struct RMMP4StreamInfo mp4Info; struct RMAVIStreamInfo aviInfo; } data;} RMFileStreamInfo;#ifdef WITH_MONO#include "main_apps.h"#endifRM_EXTERN_C_BLOCKSTARTRMuint64 get_ustime(void);RMstatus process_key(struct dcc_context *dcc_info, RMuint32 *cmd, RMuint32 keyflags);RMstatus handle_key(struct dcc_context *dcc_info, RMuint32 *cmd, RMuint32 keyflags, RMascii key);// ----void muteAudio(struct dcc_context *dcc_info);void unMuteAudio(struct dcc_context *dcc_info);void routeAudioTimerToDisplayPTS(struct dcc_context *dcc_info, RMbool enable);enum RM_PSM_State RM_PSM_GetState(struct RM_PSM_Context *PSMcontext, struct dcc_context *dcc_info_array[]);void RM_PSM_SetState(struct RM_PSM_Context *PSMcontext, struct dcc_context *dcc_info_array[], enum RM_PSM_State newstate);RMstatus process_command(struct RM_PSM_Context *PSMcontext, struct dcc_context *dcc_info_array[], struct RM_PSM_Actions *actions);RMstatus WaitForEOSWithCommand(struct RM_PSM_Context *PSMcontext, struct dcc_context *dcc_info_array[], struct RM_PSM_Actions *pActions, RMuint32 eos_bit_field);// ----void display_key_usage(RMuint32 keyflags);RMuint32 audio_dump_getFullness(struct audio_cmdline *options, struct dcc_context *dcc_info);RMstatus open_capture_fifo(struct audio_cmdline *options, struct dcc_context *dcc_info);RMstatus close_capture_fifo(struct audio_cmdline *options, struct dcc_context *dcc_info);RMstatus audio_dump_channel(struct audio_cmdline *options, struct dcc_context *dcc_info);void set_default_out_window(struct EMhwlibDisplayWindow *window);void show_display_options(void);RMstatus GetTVStandard(RMascii *StandardName, enum EMhwlibTVStandard *Standard);RMstatus GetTVStandardName(enum EMhwlibTVStandard Standard, RMascii **StandardName);RMstatus PrintTVStandardNames(void);const RMascii *GetColorSpaceName(enum EMhwlibColorSpace ColorSpace);RMstatus apply_hdcp(struct dcc_context *dcc_info, struct display_cmdline *options);RMstatus update_hdmi(struct dcc_context *dcc_info, struct display_cmdline *disp_opt, struct audio_cmdline *audio_opt);RMstatus set_component_videomode_from_edmode(struct dcc_context *dcc_info, struct display_cmdline *options);RMstatus set_videomode_from_EDID(struct dcc_context *dcc_info, struct display_cmdline *options);RMstatus load_edid_block_from_file(RMfile fd, RMuint32 *mode, RMuint8 *data);RMstatus upload_edid_file(struct display_cmdline *options);RMstatus download_edid_file(struct display_cmdline *options);RMstatus force_edid_file(struct display_cmdline *options);RMstatus parse_video_mode_file(RMascii *filename, struct EMhwlibTVFormatDigital *pDig, struct EMhwlibTVFormatAnalog *pAna);RMstatus apply_videomode_from_vmf_file(struct dcc_context *dcc_info, RMascii *vidmode_filename);RMstatus display_edid(struct display_cmdline *options);RMstatus apply_display_options(struct dcc_context *dcc_info, struct display_cmdline *options);RMstatus clear_display_options(struct dcc_context *dcc_info, struct display_cmdline *options);RMstatus clear_video_options(struct dcc_context *dcc_info, struct video_cmdline *options);RMstatus set_display_out_window(struct dcc_context *dcc_info);RMstatus apply_osd_picture(struct dcc_context *dcc_info, struct osd_picture_info *osd, struct DCCOSDProfile *profile, struct DCCVideoSource **osd_source);RMstatus apply_osd_pictureX(struct dcc_context *dcc_info, struct osd_picture_info *osd, struct DCCOSDProfile *osd_profile, struct DCCVideoSource **osd_source, struct display_cmdline *options);RMstatus apply_genlock(struct RUA *pRUA, struct display_cmdline *disp_opt);RMstatus setup_dummy_capture(struct RUA *pRUA, struct DCC *pDCC, struct display_cmdline *disp_opt, RMuint32 TimerNumber);RMstatus close_dummy_capture(struct display_cmdline *disp_opt);RMstatus set_scaler_source_zoom( struct RUA *pRUA, RMuint32 ScalerModuleID, RMuint32 x, RMuint32 y, RMuint32 w, RMuint32 h);RMascii *get_afd_name(enum EMhwlibActiveFormat ActiveFormat);RMstatus apply_active_format_abs( struct EMhwlibActiveFormatDescription content_afd, struct EMhwlibAspectRatio output_ar, RMbool output_variable_ar, // TRUE: output can be both, 16:9 and 4:3 struct EMhwlibActiveFormatDescription *output_afd, RMuint32 *x, RMuint32 *y, RMuint32 *w, RMuint32 *h, RMbool *update_zoom);RMstatus apply_active_format_rel( struct EMhwlibActiveFormatDescription content_afd, struct EMhwlibAspectRatio output_ar, RMbool output_variable_ar, // TRUE: output can be both, 16:9 and 4:3 struct EMhwlibActiveFormatDescription *output_afd, RMuint32 *x, RMuint32 *y, RMuint32 *w, RMuint32 *h, RMbool *update_zoom);RMstatus get_scaler_output_aspect_ratio(struct RUA *pRUA, RMuint32 ScalerModuleID, // scaler module ID RMuint32 MixerModuleID, // module ID of the scaler's mixer struct EMhwlibAspectRatio *scaler_ar, RMbool *variable_output);/** Apply active format and frame aspect ratio to a scaler *//* If output_afd is used, and different from previuous one, apply to output with apply_active_format_output() */RMstatus apply_active_format_input(struct RUA *pRUA, RMuint32 ScalerModuleID, // scaler module ID of the content surface RMuint32 MixerModuleID, // module ID of the scaler's mixer struct EMhwlibActiveFormatDescription content_afd, // active format description of the content and picture aspect ratio of the input frame RMbool zoom_abs, // TRUE: sets scaler input window with absolute pixel values, current input window needs to be set to full frame and absolute; FALSE: sets scaler input window with relative values, uses complete input frame RMuint32 *x_abs, // for zoom_abs=TRUE, these full frame window values will be used, unless they are NULL. RMuint32 *y_abs, // if not NULL, these values will be filled with the new zoom window for set_scaler_source_zoom() RMuint32 *w_abs, RMuint32 *h_abs, RMbool output_variable_ar, // TRUE: output is capable of both, 4:3 and 16:9 (e.g. 480i, 480p); FALSE: output only supports current aspect ratio struct EMhwlibActiveFormatDescription *output_afd); // new active format and frame aspect ratio for the output (needs to be applied to output by caller)/** Apply active format and frame aspect ratio to output (as returned by apply_active_format_input()) */RMstatus apply_active_format_output_module(struct RUA *pRUA, RMuint32 OutputModuleID, struct DH_control *pDH, struct EMhwlibActiveFormatDescription output_afd);/** Apply active format and frame aspect ratio to all outputs of a mixer (as returned by apply_active_format_input()) */RMstatus apply_active_format_output(struct RUA *pRUA, RMuint32 MixerModuleID, // module ID of the output's mixer struct DH_control *pDH, // current HDMI output handle, or NULL struct EMhwlibActiveFormatDescription output_afd); // active format and frame aspect ratio for the outputRMstatus get_output_variable_aspect_ratio( enum EMhwlibTVStandard TVStandard, RMbool *output_variable_ar);RMstatus update_output_afd_settings( struct dcc_context *dcc_info, struct display_cmdline *disp_opt, RMbool *pUpdate);RMstatus apply_active_format( struct RUA *pRUA, struct display_cmdline *disp_opt, struct EMhwlibActiveFormatDescription ContentAFD, // active format description of the content and picture aspect ratio of the input frame RMuint32 ScalerModuleID); // scaler module ID of the content surfaceRMstatus dump_dvi_init(struct dcc_context *dcc_info, struct display_cmdline *options);//RMstatus parse_wmapro_intermediate(int fd, struct audio_cmdline *options);void show_capture_options(void);void reduce_aspect_ratio(RMuint32 *X, RMuint32 *Y, RMuint32 boundary);void get_aspect_ratio_from_video_mode( enum EMhwlibTVStandard TVStandard, struct EMhwlibTVFormatDigital *pTVFormat, // optional, can be NULL RMbool wide, // ambiguous modes (SDTV,EDTV): FALSE=4:3, TRUE=16:9 anamorphic RMuint32 *asp_x, RMuint32 *asp_y);RMstatus setup_capture( struct dcc_context *dcc_info, struct DCCVideoSource **ppVideoSource, struct capture_cmdline *options, RMuint16 **ppVBIData, struct ReceiveObject_type **ppR, struct RUABufferPool **ppDmaReceive, RMuint32 TimerNumber, RMbool use_gpio, RMbool inv_fid);RMstatus apply_capture_options( struct dcc_context *dcc_info, struct DCCVideoSource **ppVideoSource, struct capture_cmdline *options, RMuint16 **ppVBIData, struct ReceiveObject_type **ppR, struct RUABufferPool **ppDmaReceive, RMuint32 TimerNumber, RMbool use_gpio, RMbool inv_fid);RMstatus guess_capture_format( struct dcc_context *dcc_info, struct capture_cmdline *options);RMstatus close_capture( struct dcc_context *dcc_info, struct DCCVideoSource **ppVideoSource, struct capture_cmdline *capture_opt, RMuint16 **ppVBIData, struct ReceiveObject_type **ppR, struct RUABufferPool **ppDmaReceive);void show_video_options(void);RMstatus apply_video_decoder_options(struct dcc_context *dcc_info, struct video_cmdline *options);void show_audio_options(void);RMstatus apply_audio_engine_options_with_handle(struct dcc_context *dcc_info, struct audio_cmdline *options, struct DCCAudioSourceHandle *pSingleAudioSourceHandle);RMstatus apply_audio_engine_options(struct dcc_context *dcc_info, struct audio_cmdline *options);RMstatus apply_audio_decoder_options_with_handle(struct dcc_context *dcc_info, struct audio_cmdline *options, struct DCCAudioSourceHandle *pSingleAudioSourceHandle);RMstatus apply_audio_decoder_options(struct dcc_context *dcc_info, struct audio_cmdline *options);RMstatus apply_audio_decoder_options_onthefly_with_handle(struct dcc_context *dcc_info, struct audio_cmdline *options, struct DCCAudioSourceHandle *pSingleAudioSourceHandle);RMstatus apply_audio_decoder_options_onthefly(struct dcc_context *dcc_info, struct audio_cmdline *options);/** @param dcc_info @param options The audio options @param AudioCP TRUE: set copy protection bit in SPDIF and HDMI IEC 60958-3 header (Bit 2, 'C')*/RMstatus set_audio_cp_bit(struct dcc_context *dcc_info, struct audio_cmdline *options, RMbool AudioCP, RMuint32 engine);RMstatus set_audio_channel_status(struct dcc_context *dcc_info, struct AudioEngine_ChannelStatus_type cs, RMuint32 engine);/** @param dcc_info @param options The audio options @param NumChannel Number of audio channels (2..8: force channel number, 0: detect from options->OutputChannels) @param LowFreqChannel_3 TRUE if low frequency audio is on channel 3 @param FrontCenterChannel_4 TRUE if Front Center audio is on channel 4 @param FrontLeftRightCenterChannels_7_8 If LeftCenter/RightCenter channels exist, are they in the Front(TRUE) or Rear(FALSE)? See EIA/CEA-861-B Table 22 for possible channel assignments*/RMstatus apply_dvi_hdmi_audio_options( struct dcc_context *dcc_info, struct audio_cmdline *options, RMuint32 NumChannel, RMbool LowFreqChannel_3, RMbool FrontCenterChannel_4, RMbool FrontLeftRightCenterChannels_7_8);/* retrieve the current audio block settings, which are neeeded to set up the HDMI audio */RMstatus query_current_hdmi_audio_options(struct audio_cmdline *audio_opt, RMbool *update);RMstatus update_hdmi_audio(struct dcc_context *dcc_info, struct audio_cmdline *audio_opt);void show_playback_options(void);RMstatus setup_disk_control_parameters(struct dcc_context *dcc_info, struct playback_cmdline *play_opt, struct audio_cmdline *audio_opt, struct video_cmdline *video_opt, struct demux_cmdline *demux_opt);RMstatus refresh_soft_cc(struct dcc_context *dcc_info);RMstatus flush_cc_fifo(struct dcc_context *dcc_info);RMstatus video_profile_to_codec(enum MPEG_Profile profile, enum EMhwlibVideoCodec *pvcodec, RMuint32 *pprofile, RMuint32 *plevel, RMuint32 *pextra_buffers, RMuint32 *pwidth, RMuint32 *pheight);RMstatus open_save_files(struct playback_cmdline *options);RMstatus close_save_files(struct playback_cmdline *options);RMstatus dump_data_into_file(struct playback_cmdline *options, RMvdemuxDataType dataType, RMuint8 *buf, RMuint32 size, RMuint64 PTS, RMbool PTSValid, RMuint32 first_access_unit_pointer);RMstatus apply_playback_options(struct dcc_context *dcc_info, struct playback_cmdline *options);RMstatus WaitForRuaEvents(struct dcc_context *dcc_info, struct RUAEvent** ppEventsIn, RMuint32* pnEvents, RMuint32 timeout);RMstatus CommonWaitForEOS(struct dcc_context *dcc_info, RMuint32 *pcmd, RMuint32 eos_bit_field, RMuint32 key_flags);/* RMstatus load_osd_file(RMascii *filename, struct dcc_context *dcc_info, struct DCCOSDProfile *osd_profile, RMuint32 *ppLut, struct RMBitmapFileOptions *opts, struct EMhwlibDisplayWindow *window); */RMstatus dumpBitmapInfo(struct dcc_context *dcc_info, struct DCCVideoSource *pOSDSource, struct DCCOSDProfile *osd_profile, RMuint32 lutAddr, RMascii *dir_name);extern RMstatus get_profile_profile(const char* prof, enum MPEG_Profile* profile);extern RMstatus get_profile_codec(const char* prof, enum VideoDecoder_Codec_type* type);#define SEQUENCE_START_CODE 0x01000163#define FRAME_START_CODE 0xB800ABCD#define TILE_START_CODE 0xAA009AA9typedef struct _tagSeqHeader { RMuint32 nChannels; RMuint32 nSamplesPerSec; RMuint32 nSampleFrame; RMuint32 nValidBitsPerSample; RMuint32 nChannelMask; RMuint32 encoder_options;} SEQUENCE_HEADER;/*----------------------------------------------------------------------------*/#ifndef LITTLE_ENDIAN#define SWAP_DWORD(x) ((((x) & 0xff000000) >> 24) | \ (((x) & 0x00ff0000) >> 8) | \ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x000000ff) << 24))#else#define SWAP_DWORD(x) ((x))#endif/*----------------------------------------------------------------------------*/RMbool parse_WMV9_video_sequence_header(RMuint32 wmv9SequenceHeader);RM_EXTERN_C_BLOCKEND#endif // __COMMON_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?