You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
124 lines
4.8 KiB
124 lines
4.8 KiB
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2020. All rights reserved.
|
|
* Description: nxmedia common define
|
|
* Author: NxPlayer software group
|
|
* Create: 2019-07-15
|
|
*/
|
|
#ifndef NXMEDIADEFINE_H
|
|
#define NXMEDIADEFINE_H
|
|
|
|
#include <log/log.h>
|
|
|
|
/* log tag */
|
|
#define NMP_VIP_TAG "NP_VIP"
|
|
#define NMR_VIP_TAG "NR_VIP"
|
|
|
|
#define HLOGV(format, ...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, \
|
|
"[%d][%s:%d]: " format, this->m_instIdx, __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
|
#define HLOGD(format, ...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, \
|
|
"[%d][%s:%d]: " format, this->m_instIdx, __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
|
#define HLOGI(format, ...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, \
|
|
"[%d][%s:%d]: " format, this->m_instIdx, __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
|
#define HLOGW(format, ...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, \
|
|
"[%d][%s:%d]: " format, this->m_instIdx, __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
|
#define HLOGE(format, ...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, \
|
|
"[%d][%s:%d]: " format, this->m_instIdx, __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
|
|
|
namespace android {
|
|
using NxPlayerEventType = enum {
|
|
MEDIA_SEEK_START = 10,
|
|
MEDIA_FAST_FORWORD_COMPLETE = 20,
|
|
MEDIA_FAST_BACKWORD_COMPLETE = 21,
|
|
|
|
MEDIA_INFO_HTTP_RESPONSE_CODE = 706,
|
|
MEDIA_INFO_BUFFERED_DATA_LEN = 707,
|
|
MEDIA_INFO_PREPARE_PROGRESS = 710,
|
|
MEDIA_INFO_QUALITY_SELECTOR = 856,
|
|
/* network erro/unknown */
|
|
MEDIA_INFO_NETWORK = 1002,
|
|
/* time out */
|
|
MEDIA_INFO_TIMEOUT = 1003,
|
|
/* media not support */
|
|
MEDIA_INFO_NOT_SUPPORT = 1004,
|
|
/* net-player buffer is empty */
|
|
MEDIA_INFO_BUFFER_EMPTY = 1005,
|
|
|
|
/* net-player buffer is full */
|
|
MEDIA_INFO_BUFFER_FULL = 1008,
|
|
/* net-player buffer download finish */
|
|
MEDIA_INFO_BUFFER_DOWNLOAD_FIN = 1009,
|
|
/* The Fist frame time */
|
|
MEDIA_INFO_FIRST_FRAME_TIME = 1010,
|
|
/* I frame error */
|
|
MEDIA_INFO_STREAM_IFRAME_ERROR = 1012,
|
|
/* update file info */
|
|
MEDIA_INFO_UPDATE_FILE_INFO = 1014,
|
|
/* fast backword complete */
|
|
MEDIA_INFO_FAST_BACKWORD_COMPLETE = 1015,
|
|
/* system mem size */
|
|
MEDIA_INFO_SYSTEM_MEM_SIZE = 1016,
|
|
/* first frame after seek */
|
|
MEDIA_INFO_FIRST_FRAME_AFTER_SEEK = 1017,
|
|
/* mpeg ts pmt changed */
|
|
MEDIA_INFO_MPEGTS_PMT_CHANGED = 1018,
|
|
/* the result of setting the subtitle transcoding type */
|
|
MEDIA_INFO_CODETYPE_CHANGED = 1019,
|
|
|
|
MEDIA_INFO_AUDIO_DISCARD_FRAME,
|
|
MEDIA_INFO_VIDEO_DISCARD_FRAME,
|
|
MEDIA_INFO_AUDIO_PTS_ERROR,
|
|
MEDIA_INFO_VIDEO_PTS_ERROR,
|
|
MEDIA_INFO_ADEC_UNDERFLOW,
|
|
MEDIA_INFO_VDEC_UNDERFLOW,
|
|
MEDIA_INFO_AUDIO_FRAME_ERROR,
|
|
|
|
/* for miracast application */
|
|
MEDIA_INFO_AUDIO_DISFLUENCY_REPORT = 3804,
|
|
MEDIA_INFO_VIDEO_DISFLUENCY_REPORT = 3805,
|
|
MEDIA_INFO_PTS_DIFF_REPORT = 3806,
|
|
|
|
#if (defined PRODUCT_STB_MOBILE)
|
|
MEDIA_INFO_EXTEND_BUFFER_LENGTH = 5000,
|
|
MEDIA_INFO_EXTEND_FIRST_FRAME_TIME = 5001,
|
|
#endif
|
|
MEDIA_INFO_EXTEND_NETWORK_ADJUST_BITRATE = 5002,
|
|
MEDIA_INFO_UNLOAD_START,
|
|
MEDIA_INFO_UNLOAD_END,
|
|
MEDIA_INFO_BLURREDSCREEN_START,
|
|
MEDIA_INFO_BLURREDSCREEN_END,
|
|
MEDIA_INFO_SOFTDETECT_BUFFER_START,
|
|
/* mpeg ts pat changed */
|
|
MEDIA_INFO_MPEGTS_PAT_CHANGED = 5010,
|
|
MEDIA_INFO_AUDIO_FIRST_FRAME_DECODED,
|
|
MEDIA_INFO_MIRACAST_EVENT_REPORT = 5012,
|
|
MEDIA_INFO_BLACK_EDGE_INFO = 5013,
|
|
MEDIA_INFO_RMEVENT_CB = 5014,
|
|
|
|
/* nxplayer Video INFO string,set only */
|
|
KEY_PARAMETER_VIDEO_POSITION_INFO = 6009,
|
|
|
|
/* 5xxxx for guangdongyidong */
|
|
MEDIA_ERROR_NO_STREAM = 54000,
|
|
MEDIA_ERROR_UNKNOWN_STREAM_FORMAT = 54004,
|
|
MEDIA_ERROR_OPERATION_FAIL = 54006,
|
|
MEDIA_ERROR_OTHER_ERROR = 54009,
|
|
};
|
|
|
|
/* see nxmediaplayer/hal/invoke/NxmediaInvokeDefine.h */
|
|
using CmdTypeE = enum {
|
|
CMD_INVOKE_BASE = 5000, // notise: if modify, need Sync "CMD_INVOKE_BASE" of NxMediaPlayer.java
|
|
CMD_GET_VIDEO_INFO = CMD_INVOKE_BASE + 33,
|
|
CMD_SET_USER_ID = CMD_INVOKE_BASE + 39, /* set user ID to sdk */
|
|
CMD_SET_VIDEO_ROTATION = CMD_INVOKE_BASE + 402, /* param is int , means rotation angel:0/90/180/270 available */
|
|
CMD_GET_WIN_HANDLE = CMD_INVOKE_BASE + 520, /* get vo window handle for sideband */
|
|
CMD_GET_SWITCH_MODE = CMD_INVOKE_BASE + 521, /* get switch mode for sideband */
|
|
CMD_GET_DEFAULT_BUFFERING_SETTING = CMD_INVOKE_BASE + 522, /* get switch mode for sideband */
|
|
CMD_GET_BUFFERING_SETTING = CMD_INVOKE_BASE + 523, /* get buffering setting */
|
|
CMD_SET_BUFFERING_SETTING = CMD_INVOKE_BASE + 524, /* set buffering setting */
|
|
CMD_SET_USE_SUB_SCREEN = CMD_INVOKE_BASE + 525, /* set whether display on sub screen */
|
|
CMD_SET_SURFACE_UNIQUE_ID = CMD_INVOKE_BASE + 534, /* set surface unique id to nxmediaplayer */
|
|
CMD_TYPE_BUTT = CMD_INVOKE_BASE + 10000, /* unsurport ID */
|
|
};
|
|
};
|
|
#endif
|