当前位置: 首页>>代码示例>>Java>>正文


Java IngestServer类代码示例

本文整理汇总了Java中tv.twitch.broadcast.IngestServer的典型用法代码示例。如果您正苦于以下问题:Java IngestServer类的具体用法?Java IngestServer怎么用?Java IngestServer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IngestServer类属于tv.twitch.broadcast包,在下文中一共展示了IngestServer类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: func_153036_a

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
protected boolean func_153036_a(IngestServer p_153036_1_)
{
    this.field_153056_n = true;
    this.field_153050_h = 0L;
    this.field_153051_i = RTMPState.Idle;
    this.field_153059_q = p_153036_1_;
    this.field_176008_y = true;
    this.func_153034_a(IngestServerTester.IngestTestState.ConnectingToServer);
    ErrorCode errorcode = this.field_153045_c.start(this.field_153052_j, this.audioParameters, p_153036_1_, StartFlags.TTV_Start_BandwidthTest, true);

    if (ErrorCode.failed(errorcode))
    {
        this.field_176008_y = false;
        this.field_153056_n = false;
        this.func_153034_a(IngestServerTester.IngestTestState.DoneTestingServer);
        return false;
    }
    else
    {
        this.field_153064_v = this.field_153050_h;
        p_153036_1_.bitrateKbps = 0.0F;
        this.field_153063_u = 0;
        return true;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:26,代码来源:IngestServerTester.java

示例2: func_153035_b

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
protected void func_153035_b(IngestServer p_153035_1_)
{
    if (this.field_176008_y)
    {
        this.field_153061_s = true;
    }
    else if (this.field_176009_x)
    {
        this.field_176007_z = true;
        ErrorCode errorcode = this.field_153045_c.stop(true);

        if (ErrorCode.failed(errorcode))
        {
            this.field_176005_A.stopCallback(ErrorCode.TTV_EC_SUCCESS);
            System.out.println("Stop failed: " + errorcode.toString());
        }

        this.field_153045_c.pollStats();
    }
    else
    {
        this.field_176005_A.stopCallback(ErrorCode.TTV_EC_SUCCESS);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:25,代码来源:IngestServerTester.java

示例3: BroadcastController

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
public BroadcastController()
{
    this.field_152879_o = BroadcastController.BroadcastState.Uninitialized;
    this.field_152880_p = null;
    this.field_152881_q = null;
    this.field_152882_r = null;
    this.field_152883_s = new IngestList(new IngestServer[0]);
    this.field_152884_t = null;
    this.field_152885_u = new AuthToken();
    this.field_152886_v = new ChannelInfo();
    this.field_152887_w = new UserInfo();
    this.field_152888_x = new StreamInfo();
    this.field_152889_y = new ArchivingState();
    this.field_152890_z = 0L;
    this.field_152860_A = null;
    this.field_152872_h = new Core(new StandardCoreAPI());
    this.field_152873_i = new Stream(new DesktopStreamAPI());
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:19,代码来源:BroadcastController.java

示例4: func_153036_a

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
protected boolean func_153036_a(IngestServer p_153036_1_)
{
    this.field_153056_n = true;
    this.field_153050_h = 0L;
    this.field_153051_i = RTMPState.Idle;
    this.field_153059_q = p_153036_1_;
    this.func_153034_a(IngestServerTester.IngestTestState.ConnectingToServer);
    this.field_153067_y = true;
    ErrorCode errorcode = this.field_153045_c.start(this.field_153052_j, this.field_153053_k, p_153036_1_, StartFlags.TTV_Start_BandwidthTest, true);

    if (ErrorCode.failed(errorcode))
    {
        this.field_153056_n = false;
        this.func_153034_a(IngestServerTester.IngestTestState.DoneTestingServer);
        return false;
    }
    else
    {
        this.field_153064_v = this.field_153050_h;
        p_153036_1_.bitrateKbps = 0.0F;
        this.field_153063_u = 0;
        return true;
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:25,代码来源:IngestServerTester.java

示例5: func_152833_s

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
public IngestServer func_152833_s()
{
    return this.field_152884_t;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:BroadcastController.java

示例6: func_152824_a

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
public void func_152824_a(IngestServer p_152824_1_)
{
    this.field_152884_t = p_152824_1_;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:BroadcastController.java

示例7: func_152925_v

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
public IngestServer[] func_152925_v()
{
    return new IngestServer[0];
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:NullStream.java

示例8: func_152930_t

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
public void func_152930_t()
{
    GameSettings gamesettings = this.mc.gameSettings;
    VideoParams videoparams = this.broadcastController.func_152834_a(formatStreamKbps(gamesettings.streamKbps), formatStreamFps(gamesettings.streamFps), formatStreamBps(gamesettings.streamBytesPerPixel), (float)this.mc.displayWidth / (float)this.mc.displayHeight);

    switch (gamesettings.streamCompression)
    {
        case 0:
            videoparams.encodingCpuUsage = EncodingCpuUsage.TTV_ECU_LOW;
            break;

        case 1:
            videoparams.encodingCpuUsage = EncodingCpuUsage.TTV_ECU_MEDIUM;
            break;

        case 2:
            videoparams.encodingCpuUsage = EncodingCpuUsage.TTV_ECU_HIGH;
    }

    if (this.framebuffer == null)
    {
        this.framebuffer = new Framebuffer(videoparams.outputWidth, videoparams.outputHeight, false);
    }
    else
    {
        this.framebuffer.createBindFramebuffer(videoparams.outputWidth, videoparams.outputHeight);
    }

    if (gamesettings.streamPreferredServer != null && gamesettings.streamPreferredServer.length() > 0)
    {
        for (IngestServer ingestserver : this.func_152925_v())
        {
            if (ingestserver.serverUrl.equals(gamesettings.streamPreferredServer))
            {
                this.broadcastController.func_152824_a(ingestserver);
                break;
            }
        }
    }

    this.targetFPS = videoparams.targetFps;
    this.field_152957_i = gamesettings.streamSendMetadata;
    this.broadcastController.func_152836_a(videoparams);
    LOGGER.info(STREAM_MARKER, "Streaming at {}/{} at {} kbps to {}", new Object[] {Integer.valueOf(videoparams.outputWidth), Integer.valueOf(videoparams.outputHeight), Integer.valueOf(videoparams.maxKbps), this.broadcastController.func_152833_s().serverUrl});
    this.broadcastController.func_152828_a((String)null, "Minecraft", (String)null);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:47,代码来源:TwitchStream.java

示例9: func_152925_v

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
public IngestServer[] func_152925_v()
{
    return this.broadcastController.func_152855_t().getServers();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:TwitchStream.java

示例10: func_153040_c

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
public IngestServer func_153040_c()
{
    return this.field_153059_q;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:IngestServerTester.java

示例11: func_153029_c

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
protected boolean func_153029_c(IngestServer p_153029_1_)
{
    if (!this.field_153061_s && !this.field_153060_r && this.func_153037_m() < this.field_153048_f)
    {
        if (!this.field_176008_y && !this.field_176007_z)
        {
            ErrorCode errorcode = this.field_153045_c.submitVideoFrame((FrameBuffer)this.field_153055_m.get(this.field_153063_u));

            if (ErrorCode.failed(errorcode))
            {
                this.field_153056_n = false;
                this.func_153034_a(IngestServerTester.IngestTestState.DoneTestingServer);
                return false;
            }
            else
            {
                this.field_153063_u = (this.field_153063_u + 1) % this.field_153055_m.size();
                this.field_153045_c.pollStats();

                if (this.field_153051_i == RTMPState.SendVideo)
                {
                    this.func_153034_a(IngestServerTester.IngestTestState.TestingServer);
                    long i = this.func_153037_m();

                    if (i > 0L && this.field_153050_h > this.field_153064_v)
                    {
                        p_153029_1_.bitrateKbps = (float)(this.field_153050_h * 8L) / (float)this.func_153037_m();
                        this.field_153064_v = this.field_153050_h;
                    }
                }

                return true;
            }
        }
        else
        {
            return true;
        }
    }
    else
    {
        this.func_153034_a(IngestServerTester.IngestTestState.DoneTestingServer);
        return true;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:46,代码来源:IngestServerTester.java

示例12: drawSlot

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
    IngestServer ingestserver = this.mc.getTwitchStream().func_152925_v()[entryID];
    String s = ingestserver.serverUrl.replaceAll("\\{stream_key\\}", "");
    String s1 = (int)ingestserver.bitrateKbps + " kbps";
    String s2 = null;
    IngestServerTester ingestservertester = this.mc.getTwitchStream().func_152932_y();

    if (ingestservertester != null)
    {
        if (ingestserver == ingestservertester.func_153040_c())
        {
            s = EnumChatFormatting.GREEN + s;
            s1 = (int)(ingestservertester.func_153030_h() * 100.0F) + "%";
        }
        else if (entryID < ingestservertester.func_153028_p())
        {
            if (ingestserver.bitrateKbps == 0.0F)
            {
                s1 = EnumChatFormatting.RED + "Down!";
            }
        }
        else
        {
            s1 = EnumChatFormatting.OBFUSCATED + "1234" + EnumChatFormatting.RESET + " kbps";
        }
    }
    else if (ingestserver.bitrateKbps == 0.0F)
    {
        s1 = EnumChatFormatting.RED + "Down!";
    }

    p_180791_2_ = p_180791_2_ - 15;

    if (this.isSelected(entryID))
    {
        s2 = EnumChatFormatting.BLUE + "(Preferred)";
    }
    else if (ingestserver.defaultServer)
    {
        s2 = EnumChatFormatting.GREEN + "(Default)";
    }

    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, ingestserver.serverName, p_180791_2_ + 2, p_180791_3_ + 5, 16777215);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s, p_180791_2_ + 2, p_180791_3_ + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT + 5 + 3, 3158064);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s1, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s1), p_180791_3_ + 5, 8421504);

    if (s2 != null)
    {
        GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s2, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s2), p_180791_3_ + 5 + 3 + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT, 8421504);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:53,代码来源:GuiIngestServers.java

示例13: func_152930_t

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
public void func_152930_t()
{
    GameSettings gamesettings = this.field_152953_e.gameSettings;
    VideoParams videoparams = this.field_152951_c.func_152834_a(func_152946_b(gamesettings.field_152403_M), func_152948_a(gamesettings.field_152404_N), func_152947_c(gamesettings.field_152400_J), (float)this.field_152953_e.displayWidth / (float)this.field_152953_e.displayHeight);

    switch (gamesettings.field_152405_O)
    {
        case 0:
            videoparams.encodingCpuUsage = EncodingCpuUsage.TTV_ECU_LOW;
            break;
        case 1:
            videoparams.encodingCpuUsage = EncodingCpuUsage.TTV_ECU_MEDIUM;
            break;
        case 2:
            videoparams.encodingCpuUsage = EncodingCpuUsage.TTV_ECU_HIGH;
    }

    if (this.field_152956_h == null)
    {
        this.field_152956_h = new Framebuffer(videoparams.outputWidth, videoparams.outputHeight, false);
    }
    else
    {
        this.field_152956_h.createBindFramebuffer(videoparams.outputWidth, videoparams.outputHeight);
    }

    if (gamesettings.field_152407_Q != null && gamesettings.field_152407_Q.length() > 0)
    {
        IngestServer[] aingestserver = this.func_152925_v();
        int i = aingestserver.length;

        for (int j = 0; j < i; ++j)
        {
            IngestServer ingestserver = aingestserver[j];

            if (ingestserver.serverUrl.equals(gamesettings.field_152407_Q))
            {
                this.field_152951_c.func_152824_a(ingestserver);
                break;
            }
        }
    }

    this.field_152958_j = videoparams.targetFps;
    this.field_152957_i = gamesettings.field_152406_P;
    this.field_152951_c.func_152836_a(videoparams);
    field_152950_b.info(field_152949_a, "Streaming at {}/{} at {} kbps to {}", new Object[] {Integer.valueOf(videoparams.outputWidth), Integer.valueOf(videoparams.outputHeight), Integer.valueOf(videoparams.maxKbps), this.field_152951_c.func_152833_s().serverUrl});
    this.field_152951_c.func_152828_a((String)null, "Minecraft", (String)null);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:50,代码来源:TwitchStream.java

示例14: func_152925_v

import tv.twitch.broadcast.IngestServer; //导入依赖的package包/类
public IngestServer[] func_152925_v()
{
    return this.field_152951_c.func_152855_t().getServers();
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:5,代码来源:TwitchStream.java


注:本文中的tv.twitch.broadcast.IngestServer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。