public interface

IVideoCallLayoutFactory

com.c2call.sdk.pub.video.IVideoCallLayoutFactory
Known Indirect Subclasses

Class Overview

This interface is used to specify the layout of group video calls. In particular it sets a group of OpenGL vertices for each video slot. E.g. in 4-way video chat these vertices may look like this

          -1/1------- 0/1-------- 1/1
          |            |           |
          |       2    |      1    |
          |            |           |
          -1/0------- 0/0-------- 1/0
          |            |           |
          |       3    |      4    |
          |            |           |
          -1/-1------ 0/-1------- 1/-1


 private static float[] slot1 = new float[] { 0f, 1f, 0f,
                                             0f, 0f, 0f,
                                             1f, 0f, 0f,
                                             1f, 1f, 0f,
 };

 private static float[] slot2 = new float[] { -1f, 1f, 0f,
                                             -1f, 0f, 0f,
                                             0f, 0f, 0f,
                                             0f, 1f, 0f,
 };

 private static float[] slot3 = new float[] { -1f, 0f, 0f,
                                             -1f, -1f, 0f,
                                             0f, -1f, 0f,
                                             0f, 0f, 0f,
 };

 private static float[] slot4 = new float[] { 0f, 0f, 0f,
                                             0f, -1f, 0f,
                                             1f, -1f, 0f,
                                             1f, 0f, 0f,
 };

 ArrayList<float[]> slots = new ArrayList<float[]>();
 slots.add(slot1);
 slots.add(slot2);
 slots.add(slot3);
 slots.add(slot4);
 
An implementation if this interface has to be set in the singleton of C2CallSdk

Summary

Public Methods
abstract ArrayList<float[]> getLayoutForGroup(int memberCount, boolean isLandscape)
Get the layout for the specified member count and orientation

Public Methods

public abstract ArrayList<float[]> getLayoutForGroup (int memberCount, boolean isLandscape)

Get the layout for the specified member count and orientation

Parameters
memberCount The count of members to get a layout for
isLandscape Whether this is a landscape layout
Returns
  • The List of vertices for each slot.