Skip to content

Commit 59d3be8

Browse files
committed
UI fixes and video quality increased to 2160p with 60Mb bitrate
1 parent 99bf295 commit 59d3be8

File tree

3 files changed

+14
-25
lines changed

3 files changed

+14
-25
lines changed

app/src/main/java/com/googleresearch/capturesync/MainActivity.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,9 +1156,9 @@ private MediaRecorder setUpMediaRecorder(Surface surface, boolean specifyOutput,
11561156
lastVideoPath = getOutputMediaFilePath(prefixText);
11571157
recorder.setOutputFile(lastVideoPath);
11581158

1159-
CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_1080P);
1159+
CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_2160P);
11601160
recorder.setVideoSize(profile.videoFrameWidth, profile.videoFrameHeight);
1161-
recorder.setVideoEncodingBitRate(8000000);
1161+
recorder.setVideoEncodingBitRate(60*1000*1000);
11621162
recorder.setVideoFrameRate(30);
11631163
Log.d(TAG, profile.videoBitRate + " Bitrate");
11641164

@@ -1187,22 +1187,17 @@ public void deleteAllFiles() {
11871187
String csvFilePath = sdcard.getAbsolutePath()+ "/RecSync/";
11881188
File path = new File(videoFilePath);
11891189
File fileList[] = path.listFiles();
1190-
Log.i(TAG,"Video File Path:"+videoFilePath );
1191-
Log.i(TAG,"No of files to delete: "+fileList.length );
11921190
String filename;
11931191
for(int i=0; i< fileList.length; i++){
11941192
filename = fileList[i].getName();
11951193
try{
1196-
Log.i(TAG,"inside deleteall" );
11971194
File vFile = new File(videoFilePath + filename);
11981195
vFile.delete();
1199-
Log.i(TAG,"csv_file_path : " + csvFilePath + filename.split("\\.")[0] + ".csv" );
12001196
File csvFile = new File(csvFilePath + filename.split("\\.")[0] + ".csv");
12011197
csvFile.delete();
12021198
}catch (Exception e){
12031199
e.printStackTrace();
12041200
}
1205-
12061201
}
12071202
}
12081203

app/src/main/java/com/googleresearch/capturesync/SoftwareSyncController.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,23 +221,25 @@ private void setupSoftwareSync() {
221221
);
222222
});
223223
clientRpcs.put(
224-
METHOD_PREFIX_LIST,
224+
METHOD_EMPTY_DEVICE,
225225
payload -> {
226-
Log.v(TAG, "Sending Files List");
226+
Log.v(TAG, "Deleting All Recordings and Related Files");
227227
context.runOnUiThread(
228-
() -> context.sendPrefixList()
228+
() -> context.deleteAllFiles()
229229
);
230230
});
231231

232232
clientRpcs.put(
233-
METHOD_EMPTY_DEVICE,
233+
METHOD_PREFIX_LIST,
234234
payload -> {
235-
Log.v(TAG, "Deleting All Recordings and Related Files");
235+
Log.v(TAG, "Sending Files List");
236236
context.runOnUiThread(
237-
() -> context.deleteAllFiles()
237+
() -> context.sendPrefixList()
238238
);
239239
});
240240

241+
242+
241243
clientRpcs.put(
242244
SyncConstants.METHOD_MSG_OFFSET_UPDATED,
243245
payload ->

remote_control/remote_control.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,27 +137,20 @@ def phaseAlign(self):
137137

138138
def setupUi(self, MainWindow):
139139
# Setup the WEB SOCKET
140-
#self.ws = websocket.WebSocketApp("ws://192.168.5.2:7867/remotecon")
141-
# self.ws = websocket.WebSocket()
142-
# self.ws.connect(CONNECTION_URL)
143-
# f_stop = threading.Event()
144-
# self.asyncTask(f_stop)
140+
self.ws = websocket.WebSocket()
141+
self.ws.connect(CONNECTION_URL)
142+
145143
# Setup the GUI
146144
MainWindow.setObjectName("MainWindow")
147145
MainWindow.resize(800, 800)
148146
self.centralwidget = QtWidgets.QWidget(MainWindow)
149147
self.centralwidget.setObjectName("centralwidget")
150-
self.label = QtWidgets.QLabel(self.centralwidget)
151-
self.label.setGeometry(QtCore.QRect(290, 10, 161, 61))
152148
font = QtGui.QFont()
153-
#font.setFamily("Source Code Pro")
154149
font.setPointSize(19)
155-
self.label.setFont(font)
156-
self.label.setObjectName("label")
157150

158151

159152
self.record_icon_btn = QtWidgets.QPushButton(self.centralwidget)
160-
self.record_icon_btn.setGeometry(QtCore.QRect(300, 120, 120, 61))
153+
self.record_icon_btn.setGeometry(QtCore.QRect(350, 140, 40, 30))
161154
self.record_icon_btn.setFont(font)
162155
self.record_icon_btn.setObjectName("record_icon_btn")
163156

@@ -239,7 +232,6 @@ def setupUi(self, MainWindow):
239232
def retranslateUi(self, MainWindow):
240233
_translate = QtCore.QCoreApplication.translate
241234
MainWindow.setWindowTitle(_translate("MainWindow", "Remote Control App"))
242-
self.label.setText(_translate("MainWindow", "RC APP"))
243235
self.record_icon_btn.setText(_translate("MainWindow", ""))
244236
self.start_btn.setText(_translate("MainWindow", "Start"))
245237
self.stop_btn.setText(_translate("MainWindow", "Stop"))

0 commit comments

Comments
 (0)