Changeset 83


Ignore:
Timestamp:
08/20/10 01:45:00 (18 months ago)
Author:
gene
Message:

-- videocallbacks added

Location:
trunk/builders/androidapplestreaming/src
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/builders/androidapplestreaming/src/com/rtmpd/CommandsInterface.java

    r77 r83  
    2323 
    2424public class CommandsInterface { 
    25         public native void EnvRun(String ip, int port); 
     25  
     26        public native void EnvRun(VideoCallbacks callbackHandler, String ip, int port); 
    2627 
    2728        public native void EnvStop(); 
  • trunk/builders/androidapplestreaming/src/org/apache/android/media/VideoViewDemo.java

    r82 r83  
    4242import com.rtmpd.*; 
    4343 
    44 public class VideoViewDemo extends Activity { 
     44public class VideoViewDemo extends Activity implements VideoCallbacks { 
    4545    private static final String TAG = "VideoViewDemo"; 
    4646 
     
    5555 
    5656    private RetryHandler mRetryHandler = new RetryHandler(); 
     57    private VideoCallbacks callbackObj; 
    5758 
    5859    @Override 
     
    6364 
    6465        _ci = new CommandsInterface(); 
     66        callbackObj = this; 
    6567                 
    6668        _thread = new Thread() { 
    6769                public void run() { 
    68                     _ci.EnvRun("68.246.67.43", 5544); 
     70                    _ci.EnvRun(callbackObj, "0.0.0.0", 55544); 
    6971                } 
    7072            }; 
     
    207209            } 
    208210 
    209             final String path = "rtsp://68.246.67.43:5544/" + msgInfoListStreams.getStreamName(0); 
     211            final String path = "rtsp://127.0.0.1:55544/" + msgInfoListStreams.getStreamName(0); 
    210212            Log.v(TAG, "path: " + path); 
    211213            if (path == null || path.length() == 0) { 
     
    228230    } 
    229231 
     232    public void EventAvailable(HashMap<Object, Object> event) { 
     233        Toast.makeText(getApplicationContext(), "got event!", Toast.LENGTH_SHORT).show(); 
     234    } 
     235 
    230236    static { 
    231237        System.loadLibrary("crtmpserver_dynamic"); 
Note: See TracChangeset for help on using the changeset viewer.