Unity3d(U3D) 플랫폼 기반 rtmp/rtsp 생방송 재생단 SDK

최근 많은 개발자들이 유닛3d플랫폼에서 진정한 믿을 만한 저연속 rtmp플레이어나 rtsp플레이어를 찾기 어려운 문제에 직면해 있다.
많은 개발자들이 우리에게 연락해서 저연속 유닛 3d 생방송 플레이어 SDK가 있기를 희망한다. 우리는 기존의 sdk를 봉하여 U3D 안드로이드 인터페이스를 전송한다.다음은 Android 측의 SDK 인터페이스입니다.
    /// 
    /// Init
    /// 
    public int NT_U3D_Init()
    {
        return DANIULIVE_RETURN_OK;
    }

    /// 
    ///   
    ///       
    /// 
    public long NT_U3D_Open()
    {
        if ( 0 != player_obj_.Call("Init", java_obj_cur_activity_) )
        {
            return 0;
        }

        return player_obj_.Call("Open");
    }

    /// 
    /// Register Game Object,      
    /// 
    public int NT_U3D_Set_Game_Object(long handle, string gameObjectName)
    {
        return player_obj_.Call("SetGameObject", handle, gameObjectName);
    }

    /// 
    ///        false      true         false
    /// 
    /// 
    public int NT_U3D_SetVideoDecoderMode(long handle, int isHwDecoder)
    {
        return player_obj_.Call("SetPlayerVideoHWDecoder", handle, isHwDecoder);
    }

    /// 
    ///         : if 0:     ; if with 1: audiotrack  
    /// 
    /// 
    public int NT_U3D_SetAudioOutputType(long handle, int use_audiotrack)
    {
        return player_obj_.Call("SetAudioOutputType", handle, use_audiotrack);
    }

    /// 
    ///          ,   200  
    /// 
    /// 
    public int NT_U3D_SetBuffer(long handle, int buffer)
    {
        return player_obj_.Call("SetBuffer", handle, buffer);
    }

    /// 
    ///        :        ,1:  ; 0:     
    /// 
    /// 
    public int NT_U3D_SetMute(long handle, int is_mute)
    {
        return player_obj_.Call("SetMute", handle, is_mute);
    }

    /// 
    ///   RTSP TCP  , 1: TCP; 0: UDP
    /// 
    /// 
    public int NT_U3D_SetRTSPTcpMode(long handle, int is_using_tcp)
    {
        return player_obj_.Call("SetRTSPTcpMode", handle, is_using_tcp);
    }

    /// 
    ///          false    true     false
    /// 
    /// 
    public int NT_U3D_SetPlayerLowLatencyMode(long handle, int mode)
    {
        return player_obj_.Call("SetPlayerLowLatencyMode", handle, mode);
    }

    /// 
    ///           
    /// is_report: if 1:       , 0:    .
    /// report_interval:     ,     ,>0.
    /// 
    /// 
    /// 
    public int NT_U3D_SetReportDownloadSpeed(long handle, int is_report, int report_interval)
    {
        return player_obj_.Call("SetReportDownloadSpeed", handle, is_report, report_interval);
    }

    /// 
    ///                  
    /// 
    /// 
    public int NT_U3D_SetSaveImageFlag(long handle, int is_save_image)
    {
        return player_obj_.Call("SetSaveImageFlag", handle, is_save_image);
    }

    /// 
    ///           
    /// 
    /// 
    public int NT_U3D_SaveCurImage(long handle, string imageName)
    {
        return player_obj_.Call("SaveCurImage", handle, imageName);
    }

    /// 
    ///         ,    url
    /// 
    /// 
    public int NT_U3D_SwitchPlaybackUrl(long handle, string uri)
    {
        return player_obj_.Call("SwitchPlaybackUrl", handle, uri);
    }

    /// 
    ///         
    /// 
    /// 
    public int NT_U3D_CreateFileDirectory(string path)
    {
        return player_obj_.Call("CreateFileDirectory", path);
    }

    /// 
    ///         
    /// 
    /// 
    public int NT_U3D_SetRecorderDirectory(long handle, string path)
    {
        return player_obj_.Call("SetRecorderDirectory", handle, path);
    }

    /// 
    ///           
    /// 
    /// 
    public int NT_U3D_SetRecorderFileMaxSize(long handle, int size)
    {
        return player_obj_.Call("SetRecorderFileMaxSize", handle, size);
    }

    /// 
    ///       
    /// 
    public int NT_U3D_SetUrl(long handle, string url)
    {
        return player_obj_.Call("SetUrl", handle, url);
    }

    /// 
    ///     
    /// 
    public int NT_U3D_StartPlay(long handle)
    {
        return player_obj_.Call("StartPlay", handle);
    }

    /// 
    ///   YUV  
    /// 
    public AndroidJavaObject NT_U3D_GetVideoFrame(long handle)
    {
        return player_obj_.Call("GetVideoFrame", handle);
    }

    /// 
    ///     
    /// 
    public int NT_U3D_StopPlay(long handle)
    {
        return player_obj_.Call("StopPlay", handle);
    }

    /// 
    ///     
    /// 
    public int NT_U3D_StartRecorder(long handle)
    {
        return player_obj_.Call("StartRecorder", handle);
    }

    /// 
    ///     
    /// 
    public int NT_U3D_StopRecorder(long handle)
    {
        return player_obj_.Call("StopRecorder", handle);
    }

    /// 
    ///     
    /// 
    public int NT_U3D_Close(long handle)
    {
        return player_obj_.Call("Close", handle);
    }

    /// 
    /// UnInit Player
    /// 
    public int NT_U3D_UnInit()
    {
        return DANIULIVE_RETURN_OK;
    }

자세한 내용은https://github.com/daniulive/SmarterStreaming

좋은 웹페이지 즐겨찾기