1818import d2d .testing .wifip2p .WifiP2pController ;
1919import d2d .testing .net .packets .DataPacketBuilder ;
2020import d2d .testing .net .threads .selectors .RTSPServerSelector ;
21- import d2d .testing .streaming .video .Session ;
22- import d2d .testing .streaming .video .SessionBuilder ;
21+ import d2d .testing .streaming .sessions .Session ;
22+ import d2d .testing .streaming .sessions .SessionBuilder ;
2323import d2d .testing .streaming .gl .SurfaceView ;
2424import d2d .testing .streaming .rtsp .RtspClient ;
2525
2626
2727public class StreamActivity extends AppCompatActivity implements SurfaceHolder .Callback {
2828
29- private final static String TAG = "MainActivity " ;
29+ private final static String TAG = "StreamActivity " ;
3030
3131 private SurfaceView mSurfaceView ;
3232
@@ -37,8 +37,6 @@ public class StreamActivity extends AppCompatActivity implements SurfaceHolder.C
3737 private FloatingActionButton recordButton ;
3838 public boolean mRecording = false ;
3939
40- private boolean groupOwner = true ;
41-
4240 @ Override
4341 protected void onCreate (Bundle savedInstanceState ) {
4442 super .onCreate (savedInstanceState );
@@ -59,13 +57,6 @@ protected void onCreate(Bundle savedInstanceState) {
5957
6058 mSurfaceView .getHolder ().addCallback (this );
6159
62- //SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(this).edit();
63- //editor.putString(RtspServer.KEY_PORT, String.valueOf(12345));
64- //editor.commit();
65- // Starts the RTSP server
66- //mIntent = new Intent(this, RtspServer.class);
67- //this.startService(mIntent);
68-
6960 recordButton = findViewById (R .id .button_capture );
7061 recordButton .setBackgroundTintList (ColorStateList .valueOf (getResources ().getColor (android .R .color .holo_red_dark )));
7162 recordButton .setOnClickListener (new View .OnClickListener () {
@@ -147,7 +138,9 @@ public void onDestroy(){
147138 //this.stopService(mIntent);
148139 mSesion .stopPreview ();
149140 }
150-
141+ /*
142+ setPath() esto quiza se deberia comprobar en GO en futuro antes de hacer streaming
143+ */
151144 private String setPath (){
152145 ArrayList <StreamDetail > list = WifiP2pController .getInstance ().getMainActivity ().getStreamlist ();
153146
@@ -158,7 +151,7 @@ private String setPath(){
158151 int clietnNumber = 1 ;
159152
160153 if (list .contains (streamDetail )) {
161- for (int i = 2 ; i < 10 ; i ++) {
154+ for (int i = 2 ; i < 100 ; i ++) {
162155 streamDetail .setIp (ip + path + i );
163156 streamDetail .setName (name + i );
164157 if (!list .contains (streamDetail )) {
0 commit comments