Livecast

cn.tee3.avd

## 类 Livecast

- java.lang.Object
- - cn.tee3.avd.Livecast

- 直接已知子类:
    LivecastViewer, MainBroadcaster

      public class Livecast
      extends java.lang.Object

  直播接口类 直播接口定义了直播对象创建和释放、直播功能操作。

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `static interface` | `Livecast.Listener` 直播回调接口类 直播回调接口定义了直播对象操作的异步返回，直播状态通知等。
    `protected class` | `Livecast.ListenerHandler`
    `static class` | `Livecast.LivecastStatus` 客户端直播状态定义
    `protected class` | `Livecast.SDKListener`

  - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected cn.tee3.avd.Livecast.NetworkProberLister` | `_netProber`
    `protected Livecast.Listener` | `listener4cb`
    `protected Livecast.SDKListener` | `listener4native`
    `protected android.os.Handler` | `listenerHandler`
    `protected int` | `msg_onDialogueResult`
    `protected int` | `msg_onLivecastStatus`
    `protected int` | `msg_onPublishResult`
    `protected int` | `msg_onRtmpPlay`
    `protected int` | `msg_onRtmpStop`
    `protected long` | `nativeListener`
    `protected long` | `nativeobj`
    `protected static java.util.List<Livecast>` | `rooms`

  - ### 构造器概要

    构造器
    限定符 | 构造器和说明
    --- | ---
    `protected` | `Livecast(java.lang.String roomId, boolean isMainBroadcaster)`

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected void` | `beginNetProber()`
    `int` | `captureImage(java.lang.String fileName, int quality)` 抓取直播图像
    `protected static void` | `clearRooms()`
    `static void` | `destoryRoom(Livecast room)` 释放房间接口
    `protected void` | `dispose()`
    `Livecast.LivecastStatus` | `getLiveStatus()` 获取直播房间状态
    `java.lang.String` | `getOption(Room.Option type)` 获取房间选项
    `java.lang.String` | `getRoomId()` 获取直播房间Id
    `MUserManager` | `getUserManager()` 获取用户管理接口
    `int` | `hangup()` 挂断连麦对话
    `protected boolean` | `initHandler()`
    `boolean` | `isDialogue()` 判断是否连麦状态
    `int` | `muteMicrophone(boolean isMute)` 本地麦克风静默及取消
    `protected int` | `nativeaddLiveSubVideo(java.lang.String deviceId, int zorder, float x, float y, float w, float h)`
    `protected int` | `nativeautoLayoutParams(boolean isTopdown, float w, float h, float x_begin, float y_begin)`
    `protected int` | `nativecaptureImage(java.lang.String fileDir, int quality)`
    `protected void` | `nativeclearLiveSubVideos()`
    `protected static long` | `nativeCreateListener(Livecast.Listener listener)`
    `protected int` | `nativedialogue()`
    `protected static void` | `nativeFreeListener(long nativeListener)`
    `protected Livecast.LivecastStatus` | `nativegetLiveStatus()`
    `protected long` | `nativegetMUserManager()`
    `protected java.util.List<VideoDevice>` | `nativegetPublishedVideos()`
    `protected java.lang.String` | `nativegetRoomId()`
    `protected int` | `nativehangup()`
    `protected boolean` | `nativeisDialogue()`
    `protected int` | `nativekickoutUser(int reason, java.lang.String userId)`
    `protected int` | `nativemainbdsetListener2(long nativerender)`
    `protected int` | `nativemuteMicrophone(boolean isMute)`
    `protected static long` | `nativeobtain(java.lang.String roomId, boolean isMainBroadcaster)`
    `protected int` | `nativepublish(java.lang.String playUrl, long nativerender)`
    `protected int` | `nativereConnect()`
    `protected static void` | `nativerelease(long nativeRoom)`
    `protected void` | `nativeremoveLiveSubVideo(java.lang.String deviceId)`
    `protected java.lang.String` | `nativergetOption(int type)`
    `protected int` | `nativersetOption(int type, java.lang.String svalue)`
    `protected int` | `nativerswitchCamera()`
    `protected int` | `nativesetBroadcasterId(java.lang.String svalue)`
    `protected int` | `nativesetListener(long nativelistener)`
    `protected int` | `nativesetLiveMainVideo(java.lang.String deviceId)`
    `protected int` | `nativesetLiveVideoBackgroud(java.lang.String background)`
    `protected int` | `nativesetLiveVideoScaleType(int scale)`
    `protected int` | `nativesetLiveVideoTypeaSize(int layout, int width, int height)`
    `protected int` | `nativesetVideoSource(long nativeobj)`
    `protected int` | `nativeunpublish()`
    `protected int` | `nativeupdateLiveSubVideo(java.lang.String deviceId, int zorder, float x, float y, float w, float h)`
    `protected int` | `nativeviewersetListener2(long nativerender)`
    `protected int` | `nativewatchRoom(java.lang.String playUrl, long nativerender)`
    `protected static Livecast` | `obtain(java.lang.String roomId)` 获取或创建房间接口
    `int` | `setListener(Livecast.Listener listener)` 设置房间回调接口
    `int` | `setOption(Room.Option type, java.lang.String svalue)` 设置房间选项
    `int` | `setVideoSource(FakeVideoCapturer vcapturer)` 开启直播（主播）或对讲（观众）前: 设置视频的输入数据源
    `int` | `switchCamera()` 直播切换摄像头

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### nativeobj

          protected long nativeobj

    - #### nativeListener

          protected long nativeListener

    - #### listener4cb

          protected Livecast.Listener listener4cb

    - #### listenerHandler

          protected android.os.Handler listenerHandler

    - #### listener4native

          protected Livecast.SDKListener listener4native

    - #### rooms

          protected static java.util.List<Livecast> rooms

    - #### _netProber

          protected cn.tee3.avd.Livecast.NetworkProberLister _netProber

    - #### msg_onLivecastStatus

          protected final int msg_onLivecastStatus

      另请参阅:
        常量字段值

    - #### msg_onPublishResult

          protected final int msg_onPublishResult

      另请参阅:
        常量字段值

    - #### msg_onDialogueResult

          protected final int msg_onDialogueResult

      另请参阅:
        常量字段值

    - #### msg_onRtmpPlay

          protected final int msg_onRtmpPlay

      另请参阅:
        常量字段值

    - #### msg_onRtmpStop

          protected final int msg_onRtmpStop

      另请参阅:
        常量字段值

  - ### 构造器详细资料

    - #### Livecast

          protected Livecast(java.lang.String roomId,
                             boolean isMainBroadcaster)

  - ### 方法详细资料

    - #### obtain

          protected static Livecast obtain(java.lang.String roomId)

      获取或创建房间接口
      返回:
        返回房间接口指针。

    - #### clearRooms

          protected static void clearRooms()

    - #### destoryRoom

          public static void destoryRoom(Livecast room)

      释放房间接口

    - #### setListener

          public int setListener(Livecast.Listener listener)

      设置房间回调接口
      返回:
        返回错误代码。
      另请参阅:
        `Livecast.Listener`

    - #### isDialogue

          public boolean isDialogue()

      判断是否连麦状态

    - #### hangup

          public int hangup()

      挂断连麦对话

    - #### captureImage

          public int captureImage(java.lang.String fileName,
                                  int quality)

      抓取直播图像
      返回:
        返回错误代码。

    - #### getUserManager

          public MUserManager getUserManager()

      获取用户管理接口

    - #### getLiveStatus

          public Livecast.LivecastStatus getLiveStatus()

      获取直播房间状态
      返回:
        返回直播房间状态。

    - #### getRoomId

          public java.lang.String getRoomId()

      获取直播房间Id
      返回:
        返回直播房间Id。

    - #### muteMicrophone

          public int muteMicrophone(boolean isMute)

      本地麦克风静默及取消
      返回:
        返回错误代码。

    - #### switchCamera

          public int switchCamera()

      直播切换摄像头
      返回:
        返回错误代码。

    - #### setVideoSource

          public int setVideoSource(FakeVideoCapturer vcapturer)

      开启直播（主播）或对讲（观众）前: 设置视频的输入数据源
      返回:
        返回错误代码。

    - #### setOption

          public int setOption(Room.Option type,
                               java.lang.String svalue)

      设置房间选项
      返回:
        返回错误代码。

    - #### getOption

          public java.lang.String getOption(Room.Option type)

      获取房间选项
      返回:
        返回房间选项值。

    - #### nativeobtain

          protected static long nativeobtain(java.lang.String roomId,
                                             boolean isMainBroadcaster)

    - #### nativerelease

          protected static void nativerelease(long nativeRoom)

    - #### nativeCreateListener

          protected static long nativeCreateListener(Livecast.Listener listener)

    - #### nativeFreeListener

          protected static void nativeFreeListener(long nativeListener)

    - #### nativesetListener

          protected int nativesetListener(long nativelistener)

    - #### nativereConnect

          protected int nativereConnect()

    - #### nativemainbdsetListener2

          protected int nativemainbdsetListener2(long nativerender)

    - #### nativepublish

          protected int nativepublish(java.lang.String playUrl,
                                      long nativerender)

    - #### nativeunpublish

          protected int nativeunpublish()

    - #### nativekickoutUser

          protected int nativekickoutUser(int reason,
                                          java.lang.String userId)

    - #### nativegetPublishedVideos

          protected java.util.List<VideoDevice> nativegetPublishedVideos()

    - #### nativesetLiveVideoTypeaSize

          protected int nativesetLiveVideoTypeaSize(int layout,
                                                    int width,
                                                    int height)

    - #### nativesetLiveVideoScaleType

          protected int nativesetLiveVideoScaleType(int scale)

    - #### nativesetLiveVideoBackgroud

          protected int nativesetLiveVideoBackgroud(java.lang.String background)

    - #### nativeclearLiveSubVideos

          protected void nativeclearLiveSubVideos()

    - #### nativesetLiveMainVideo

          protected int nativesetLiveMainVideo(java.lang.String deviceId)

    - #### nativeautoLayoutParams

          protected int nativeautoLayoutParams(boolean isTopdown,
                                               float w,
                                               float h,
                                               float x_begin,
                                               float y_begin)

    - #### nativeaddLiveSubVideo

          protected int nativeaddLiveSubVideo(java.lang.String deviceId,
                                              int zorder,
                                              float x,
                                              float y,
                                              float w,
                                              float h)

    - #### nativeupdateLiveSubVideo

          protected int nativeupdateLiveSubVideo(java.lang.String deviceId,
                                                 int zorder,
                                                 float x,
                                                 float y,
                                                 float w,
                                                 float h)

    - #### nativeremoveLiveSubVideo

          protected void nativeremoveLiveSubVideo(java.lang.String deviceId)

    - #### nativeviewersetListener2

          protected int nativeviewersetListener2(long nativerender)

    - #### nativesetBroadcasterId

          protected int nativesetBroadcasterId(java.lang.String svalue)

    - #### nativewatchRoom

          protected int nativewatchRoom(java.lang.String playUrl,
                                        long nativerender)

    - #### nativedialogue

          protected int nativedialogue()

    - #### nativeisDialogue

          protected boolean nativeisDialogue()

    - #### nativehangup

          protected int nativehangup()

    - #### nativegetLiveStatus

          protected Livecast.LivecastStatus nativegetLiveStatus()

    - #### nativegetRoomId

          protected java.lang.String nativegetRoomId()

    - #### nativerswitchCamera

          protected int nativerswitchCamera()

    - #### nativemuteMicrophone

          protected int nativemuteMicrophone(boolean isMute)

    - #### nativesetVideoSource

          protected int nativesetVideoSource(long nativeobj)

    - #### nativecaptureImage

          protected int nativecaptureImage(java.lang.String fileDir,
                                           int quality)

    - #### nativersetOption

          protected int nativersetOption(int type,
                                         java.lang.String svalue)

    - #### nativergetOption

          protected java.lang.String nativergetOption(int type)

    - #### nativegetMUserManager

          protected long nativegetMUserManager()

    - #### dispose

          protected void dispose()

    - #### beginNetProber

          protected void beginNetProber()

    - #### initHandler

          protected boolean initHandler()