我已经做了适当的研究,但仍然没有关于我想要实现的事情的信息.
所以我想编写一个应用程序,用户可以录制视频,并立即(实时)将视频上传到RTP/RTSP服务器.服务器端不会有问题.我不清楚的是如何在手机上实现这一点.
到目前为止我的研究是我必须将录制的视频写入本地套接字而不是文件,因为写入文件的3gp文件无法访问,直到最终确定(当视频停止并且标题信息有已被写入关于长度和其他的视频).
当套接字接收到连续数据时,我需要将其包装成RTP数据包并将其发送到远程服务器.我可能还必须首先进行基本编码(这还不是那么重要).
如果这个理论到目前为止是否有任何人有任何想法.我还想知道是否有人可以指出一些类似方法的代码片段,特别是用于将视频即时发送到服务器.我不知道该怎么做.
非常感谢和最诚挚的问候
我正在开发一个聊天应用程序并完成它.现在我也想实现视频聊天.经过研究很多,我决定选择"WebRTC"库.
我做了什么?
1)能够在本地服务器上运行AppRtcDemo,并且它在浏览器之间正常工作.
参考:http://www.webrtc.org/reference/getting-started
2)能够构建Android AppRtcDemo.But当我运行时说"Cross origin not support".
经过研究,我在webrtc讨论中发现,为了解决这个问题,我需要设置自己的转向服务器.
3)所以我安装了webrtc推荐的最新rfc5766TurnServer.我成功运行了转向服务器.
参考:http://code.google.com/p/rfc5766-turn-server/
我对ApprtcDemo(web)和(Android)进行了以下更改,以便与我的Turn服务器一起使用
1)apprtc.py
更换:
turn_url = 'https://computeengineondemand.appspot.com/'
turn_url = turn_url + 'turn?' + 'username=' + user + '&key=4080218913'
Run Code Online (Sandbox Code Playgroud)
指向我的转弯服务器:
turn_url = 'http://192.168.5.85:3478/?service=turn&username=biraj'
Run Code Online (Sandbox Code Playgroud)
2)index.html
更换:
var pcConfig = {{ pc_config|safe }};
Run Code Online (Sandbox Code Playgroud)
附:
var pcConfig = {"iceServers": [{"url": "stun:stun.l.google.com:19302"}, {"url":"turn:biraj@192.168.5.85:3479", "credential":"0x5b04123c3eec4cf0be64ab909bb2ff5b"}]};
Run Code Online (Sandbox Code Playgroud)
Android的
1)AppRTCDemoActivity.java
更换:
roomInput.setText("https://apprtc.appspot.com/?r=");
Run Code Online (Sandbox Code Playgroud)
使用我的本地apprtc服务器:
roomInput.setText("http://192.168.5.86:8080/?r=");
Run Code Online (Sandbox Code Playgroud)
2)AppRTCClient.java
在private PeerConnection.IceServer requestTurnServer(String url){}功能上
更换:
connection.addRequestProperty("origin", "https://apprtc.appspot.com");
Run Code Online (Sandbox Code Playgroud)
附:
connection.addRequestProperty("origin", "http://192.168.5.86:8080");
Run Code Online (Sandbox Code Playgroud)
3)/assets/channel.html
更换:
<script src="https://apprtc.appspot.com/_ah/channel/jsapi"></script>
Run Code Online (Sandbox Code Playgroud)
附: …
我不明白为什么 locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);返回位置null.我给了所有的许可,但它的悔改null.
if (isGPSEnabled) {
if (location == null) {
locationManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER,
MIN_TIME_BW_UPDATES,
MIN_DISTANCE_CHANGE_FOR_UPDATES, this);
Log.d("GPS", "GPS Enabled");
if (locationManager != null) {
location = locationManager
.getLastKnownLocation(LocationManager.GPS_PROVIDER);
if (location != null) {
latitude = location.getLatitude();
longitude = location.getLongitude();
}
}
}
}
Run Code Online (Sandbox Code Playgroud) 我是移动应用程序的新手.我基本上来自一个Web开发平台.我只是在玩App Framework,LungoJS,Jquery Mobile,kendo等移动框架,以获得这方面的一些知识.
我正在开发的应用程序仍处于UI级别.我只需要从服务器获取数据并填入我的应用程序.
我需要一些想法来建立智能设备和服务器之间的服务器通信.我的问题是
android mobile-application appframework jquery-mobile kendo-mobile
我正在开发Android onlineShopping应用程序.我必须应用一些动画.
请帮帮我.
提前致谢.
更新:
我尝试将图像从一个地方移动到另一个地方.
TranslateAnimation anim = new TranslateAnimation(0,0,200,200);
anim.setDuration(3000);
img.startAnimation(anim);
Run Code Online (Sandbox Code Playgroud)
这个图像我想从触摸位置动画到右上角.

我在点击片段中的ListView项目时遇到问题.我编写了代码,因此片段指向所有内容的布局文件,而2个布局内部是ListViews,它从strings.xml中的字符串数组中的项检索其条目.由于我编写代码的方式,我找不到在我的情况下为每个ListView项实现setOnItemClickListener的方法.
MainActivity.java
package com.example.test_app;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.view.ViewPager;
import android.view.Menu;
public class MainActivity extends FragmentActivity{
ViewPager ViewPager = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ViewPager= (ViewPager) findViewById(R.id.pager);
FragmentManager fragmentManager=getSupportFragmentManager();
ViewPager.setAdapter(new AdapterActivity(fragmentManager));
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
Run Code Online (Sandbox Code Playgroud)
AdapterActivity.java
package com.example.test_app;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.view.LayoutInflater;
import …Run Code Online (Sandbox Code Playgroud) android listview android-listview android-fragments onclicklistener
我试过,也搜索了这些东西,但没有得到答案
我正在点击一个视图点击现在我想解雇膨胀的视图,但这里没有发生的是我的来源...
icon1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
LayoutInflater inflater = (LayoutInflater)screen.getSystemService(screen.LAYOUT_INFLATER_SERVICE);
layout = inflater.inflate(R.layout.image_popup,null);
AlertDialog.Builder builder = new AlertDialog.Builder(Actvity.this);
builder.setCancelable(true);
builder.setView(layout);
Run Code Online (Sandbox Code Playgroud)
我不想添加正面或负面按钮
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
dialog.dismiss();
}
});
final AlertDialog alertDialog = builder.create();
alertDialog.setIcon(R.drawable.icon1);
alertDialog.show();
}
});
Run Code Online (Sandbox Code Playgroud) 我这次使用的是Serializable Interface.我想将ArrayList从一个活动传递到另一个活动,但它给了我这个错误"无法编组值",代码是,
//发送活动:
public class LogIn extends Activity implements OnClickListener
{
ProgressDialog pd;
ImageButton logIn,registr;
EditText userName,Password;
public static String usrName,passwrd;
String TAG=LogIn.class.getName();
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
userName=(EditText)findViewById(R.id.logIn_etuserName);
Password=(EditText)findViewById(R.id.logIn_etpaswrd);
logIn=(ImageButton)findViewById(R.id.logIn_B_logIn);
registr=(ImageButton)findViewById(R.id.logIn_B_registration);
logIn.setOnClickListener(this);
registr.setOnClickListener(this);
}
@Override
public void onClick(View v)
{
String respns="";
switch (v.getId())
{
case R.id.logIn_B_logIn:
try
{
usrName=userName.getText().toString();
passwrd=Password.getText().toString();
if(usrName.contentEquals("") && passwrd.contentEquals(""))
{
Toast.makeText(getApplicationContext(), "Enter userName",Toast.LENGTH_LONG).show();
}
// else if(passwrd.contentEquals(""))
// {
// Toast.makeText(getApplicationContext(), "Enter password",Toast.LENGTH_LONG).show();
// }
else
{
pd=ProgressDialog.show(LogIn.this, "LogIn", "Logging");
new …Run Code Online (Sandbox Code Playgroud) android ×9
animation ×1
appframework ×1
apprtcdemo ×1
bundle ×1
dismiss ×1
geolocation ×1
kendo-mobile ×1
listview ×1
location ×1
popup ×1
rtsp ×1
rtsp-client ×1
serializable ×1
viewanimator ×1
webrtc ×1