base_code_define.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * nt_base_code_define.cs
  3. * nt_base_code_define
  4. *
  5. * Github: https://github.com/daniulive/SmarterStreaming
  6. *
  7. * Created by DaniuLive on 2015/05/08.
  8. * Copyright © 2014~2017 DaniuLive. All rights reserved.
  9. */
  10. using System;
  11. namespace Vinno.vCloud.FIS.CrossPlatform.Windows.RTMPSDK
  12. {
  13. public static class NTBaseCodeDefine
  14. {
  15. /* 基本错误码定义 */
  16. public const UInt32 NT_ERC_OK = 0x00000000;
  17. /* 错误码
  18. *
  19. * {XX,XX,XX,XX}, 所有描述从左到右,最左边为第一个字节,以此类推。
  20. * {XX}, 对于一个字节来说,左边X是高四位,右边X为低四位
  21. * 错误码模块定义:第一个字节的低四位和第二个字节, 具体错误原因占后两个字节
  22. * 对于通用错误,{90, 00, XX, XX},也就是说通用错误模块ID为 {0, 00}
  23. */
  24. public const UInt32 NT_ERC_BASE = 0x90000000;
  25. /* 下面的定义是通用错误 */
  26. public const UInt32 NT_ERC_FAILED = 0x90000001;
  27. public const UInt32 NT_ERC_NULL_POINTER = 0x90000002; // 空指针错误
  28. /* SmartLog 错误码 */
  29. public const UInt32 NT_ERC_SMART_LOG = 0x90010000;
  30. /* SmartClientSDK 错误码 */
  31. public const UInt32 NT_ERC_SMART_CLIENT_SDK = 0x90020000;
  32. /* SmartPlayerSDK 错误码 */
  33. public const UInt32 NT_ERC_SMART_PLAYER_SDK = 0x90030000;
  34. /* SmartRenderSDK 错误码*/
  35. public const UInt32 NT_ERC_SMART_RENDER_SDK = 0x90040000;
  36. /* SmartPublisherSDK 错误码*/
  37. public const UInt32 NT_ERC_SMART_PUBLISHER_SDK = 0x90050000;
  38. /* 其他模块请继续定义 */
  39. /*参数ID, 主要为SetParam和GetParam接口服务 */
  40. public const UInt32 NT_PARAM_ID_BASE = 0x00000000;
  41. /*参数ID,模块划分规则,使用前两个字节作区分模块id, 公用参数,前两个字节为0*/
  42. public const UInt32 NT_PARAM_ID_COMMON_BASE = (NT_PARAM_ID_BASE);
  43. /* SmartLog 参数ID */
  44. public const UInt32 NT_PARAM_ID_SMART_LOG = 0x00010000;
  45. /*SmartClientSDK 参数ID*/
  46. public const UInt32 NT_PARAM_ID_SMART_CLIENT_SDK = 0x00020000;
  47. /*SmartPlayerSDK 参数ID*/
  48. public const UInt32 NT_PARAM_ID_SMART_PLAYER_SDK = 0x00030000;
  49. /*SmartRenderSDK 参数ID*/
  50. public const UInt32 NT_PARAM_ID_SMART_RENDER_SDK = 0x00040000;
  51. /* SmartPublisherSDK 参数ID */
  52. public const UInt32 NT_PARAM_ID_SMART_PUBLISHER_SDK = 0x00050000;
  53. /*事件ID*/
  54. /*一些通用的事件ID*/
  55. public const UInt32 NT_EVENT_ID_COMMON_BASE = 0x00000000;
  56. /*SmartPlayerSDK 事件ID*/
  57. public const UInt32 NT_EVENT_ID_SMART_PLAYER_SDK = 0x01000000;
  58. /*SmartPublisherSDK 事件ID*/
  59. public const UInt32 NT_EVENT_ID_SMART_PUBLISHER_SDK = 0x02000000;
  60. }
  61. }