本文整理匯總了Java中android.net.LocalSocket.setSendBufferSize方法的典型用法代碼示例。如果您正苦於以下問題:Java LocalSocket.setSendBufferSize方法的具體用法?Java LocalSocket.setSendBufferSize怎麽用?Java LocalSocket.setSendBufferSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.net.LocalSocket
的用法示例。
在下文中一共展示了LocalSocket.setSendBufferSize方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import android.net.LocalSocket; //導入方法依賴的package包/類
public void init() {
try {
localLoop = new LocalServerSocket("videoserver");
localReceiver = new LocalSocket();
localReceiver.connect(localLoop.getLocalSocketAddress());
localReceiver.setReceiveBufferSize(LOCAL_BUFF_SIZE);
localReceiver.setSendBufferSize(LOCAL_BUFF_SIZE);
localSender = localLoop.accept();
localSender.setReceiveBufferSize(LOCAL_BUFF_SIZE);
localSender.setSendBufferSize(LOCAL_BUFF_SIZE);
Log.d(LOG_TAG, "Done: init()");
}catch(IOException e) {
Log.e(LOG_TAG, "Error in initializing local socket: " + e);
}
}
示例2: initializeLocalSocket
import android.net.LocalSocket; //導入方法依賴的package包/類
private boolean initializeLocalSocket(){
receiver = new LocalSocket();
try {
lss = new LocalServerSocket("VideoCamera");
receiver.connect(new LocalSocketAddress("VideoCamera"));
receiver.setReceiveBufferSize(500000);
receiver.setSendBufferSize(500000);
sender = lss.accept();
sender.setReceiveBufferSize(500000);
sender.setSendBufferSize(500000);
} catch (IOException e) {
return false;
}
return true;
}
示例3: initLocalSocket
import android.net.LocalSocket; //導入方法依賴的package包/類
private void initLocalSocket() {
LocalSocket receiver = new LocalSocket();
try {
LocalServerSocket lss = new LocalServerSocket("H264");
receiver.connect(new LocalSocketAddress("H264"));
receiver.setReceiveBufferSize(500000);
receiver.setSendBufferSize(500000);
sender = lss.accept();
sender.setReceiveBufferSize(500000);
sender.setSendBufferSize(500000);
} catch (IOException e1) {
e1.printStackTrace();
}
}
示例4: onResume
import android.net.LocalSocket; //導入方法依賴的package包/類
@Override
public void onResume() {
if (!Sipdroid.release) Log.i("SipUA:","on resume");
justplay = intent.hasExtra("justplay");
if (!justplay) {
receiver = new LocalSocket();
try {
lss = new LocalServerSocket("Sipdroid");
receiver.connect(new LocalSocketAddress("Sipdroid"));
receiver.setReceiveBufferSize(500000);
receiver.setSendBufferSize(500000);
sender = lss.accept();
sender.setReceiveBufferSize(500000);
sender.setSendBufferSize(500000);
} catch (IOException e1) {
if (!Sipdroid.release) e1.printStackTrace();
super.onResume();
finish();
return;
}
checkForCamera();
mVideoPreview.setVisibility(View.VISIBLE);
if (!mMediaRecorderRecording) initializeVideo();
startVideoRecording();
} else if (Receiver.engine(mContext).getRemoteVideo() != 0 && PreferenceManager.getDefaultSharedPreferences(this).getString(org.sipdroid.sipua.ui.Settings.PREF_SERVER, org.sipdroid.sipua.ui.Settings.DEFAULT_SERVER).equals(org.sipdroid.sipua.ui.Settings.DEFAULT_SERVER)) {
mVideoFrame.setVideoURI(Uri.parse("rtsp://"+Receiver.engine(mContext).getRemoteAddr()+"/"+
Receiver.engine(mContext).getRemoteVideo()+"/sipdroid"));
mVideoFrame.setMediaController(mMediaController = new MediaController(this));
mVideoFrame.setOnErrorListener(this);
mVideoFrame.requestFocus();
mVideoFrame.start();
}
mRecordingTimeView.setText("");
mRecordingTimeView.setVisibility(View.VISIBLE);
mHandler.removeMessages(UPDATE_RECORD_TIME);
mHandler.sendEmptyMessage(UPDATE_RECORD_TIME);
super.onResume();
}