Ignore:
Timestamp:
08/20/10 04:21:17 (21 months ago)
Author:
shiretu
Message:

-- added event-based signaling to android apple streaming

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/applications/applestreamingclient/src/protocols/timer/scheduletimerprotocol.cpp

    r47 r85  
    2020#include "protocols/timer/scheduletimerprotocol.h" 
    2121#include "clientcontext.h" 
     22#include "applestreamingclient.h" 
     23#include "applestreamingclientapplication.h" 
     24#include "jnihelpers.h" 
    2225 
    2326ScheduleTimerProtocol::ScheduleTimerProtocol(uint32_t contextId) { 
     
    7679        } else if (job["type"] == "consumeAVBuffer") { 
    7780                return ProcessJobConsumeAVBuffer(pContext, job); 
     81        } else if (job["type"] == "testJNICallback") { 
     82                return ProcessJobTestJNICallback(pContext, job); 
    7883        } else { 
    7984                ASSERT("Invalid job:\n%s", STR(job.ToString())); 
     
    9499        return pContext->ConsumeAVBuffer(); 
    95100} 
     101 
     102bool ScheduleTimerProtocol::ProcessJobTestJNICallback(ClientContext *pContext, Variant &job) { 
     103#ifdef ANDROID 
     104        AppleStreamingClientApplication *pApp = pContext->GetApplication(); 
     105        if (pApp == NULL) { 
     106                FATAL("Unable to get the application"); 
     107                return false; 
     108        } 
     109        CallBackInfo &ci = pApp->GetJavaCallBackInterface(); 
     110 
     111        Variant parameters; 
     112        parameters["gigi"] = "spaima"; 
     113        parameters["fane"]["brici"] = 123.456; 
     114        return CallJava(ci, parameters); 
     115#else 
     116        NYIR; 
     117#endif 
     118} 
Note: See TracChangeset for help on using the changeset viewer.