Beispiel #1
0
/**
 * 
 * @param name
 */
void saveCB(char*name)
{
   if(!video_body->getNbSegment()) 
            return;
   if(A_Save(name))
   {
        ADM_info("Updating last write folder with %s\n",name);
        admCoreUtils::setLastWriteFolder( std::string(name) );
   }
}
JSBool ADM_JSAvidemux::Save(JSContext *cx, JSObject *obj, uintN argc, 
                                       jsval *argv, jsval *rval)
{// begin Save
        ADM_JSAvidemux *p = (ADM_JSAvidemux *)JS_GetPrivate(cx, obj);
        // default return value
        *rval = BOOLEAN_TO_JSVAL(false);
        if(argc != 1)
                return JS_FALSE;
        if(JSVAL_IS_STRING(argv[0]) == false)
                return JS_FALSE;
        char *pTempStr = JS_GetStringBytes(JSVAL_TO_STRING(argv[0]));
        printf("Saving \"%s\"\n",pTempStr);
        enterLock();
        *rval = BOOLEAN_TO_JSVAL(A_Save(pTempStr));
        leaveLock();
        return JS_TRUE;
}// end Save
void save(char*name)
{
	A_Save(name);
}
int ADM_Composer::saveFile(const char *name)
{
	return A_Save(name);
}