
import org.springframework.transaction.annotation.Transactional;
*
@Transactional
public long insert(User user){
        entityManager.persist(user);
        return user.getId();
    }

 Q:

how to capture video in iPhone

I am creating application for video app in iPhone, but I don't know how to capture a video in iPhone; and I want to store them in SQLite database, but I have one problem: can I save direct video in SQLite database? Is is possible, or I have to store path of video? If I have to save path in SQLite database, then how can I do this? Please help in this problem.

A:

Only iPhone 3GS and above support video recording.so you should first check if recording is supported and then start camera with desired values set for properties,using following code.
You will have "MobileCoreServices/MobileCoreServices.h" to run this code.
            if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {              
                UIImagePickerController *videoRecorder = [[UIImagePickerController alloc]init];         
                NSArray *sourceTypes = [UIImagePickerController availableMediaTypesForSourceType:videoRecorder.sourceType];
                NSLog(@"Available types for source as camera = %@", sourceTypes);
                if (![sourceTypes containsObject:(NSString*)kUTTypeMovie] ) {
                    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil 
                                                                    message:@"Device Not Supported for video Recording."                                                                       delegate:self 
                                                          cancelButtonTitle:@"Yes" 
                                                          otherButtonTitles:@"No",nil];
                    [alert show];
                    [alert release];
                    return;
                }
                videoRecorder.sourceType = UIImagePickerControllerSourceTypeCamera;
                videoRecorder.mediaTypes = [NSArray arrayWithObject:(NSString*)kUTTypeMovie];           
                videoRecorder.videoQuality = UIImagePickerControllerQualityTypeLow;
                videoRecorder.videoMaximumDuration = 120;
                videoRecorder.delegate = self;
                self.recorder_ = videoRecorder;                 
                [videoRecorder release];
                [self presentModalViewController:self.recorder_
import org.springframework.transaction.annotation. Transactional; 
 * 
 @Transactional 
 public long insert(User user) { 
         entityManager.persist(user); 
         return user.getId (); 
     } 

  Q: 

 how to get video recording in iPhone 

 I am creating application for video app in iPhone, but I don't sleep together how to capture a video in iPhone; and I desire to store them in SQLite database, but I have one problem: can I save lineal video recording in SQLite database? Is is possible, or I get to store path of video? If I have to save path in SQLite database, then how can I do this? Please help oneself in this problem. 

 A: 

 Only iPhone 3GS and above accompaniment video recording.so you should first check if recording is supported and then get down camera with desired values set for properties, use following code. 
 You will have " MobileCoreServices / MobileCoreServices.h " to run this code. 
             if ([ UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera ]) {              
                 UIImagePickerController * videoRecorder = [ [ UIImagePickerController alloc]init ];         
                 NSArray * sourceTypes = [ UIImagePickerController availableMediaTypesForSourceType: videoRecorder.sourceType ]; 
                 NSLog(@"Available types for source as television camera =% @ ", sourceTypes); 
                 if (! [ sourceTypes containsObject:(NSString*)kUTTypeMovie ]) { 
                     UIAlertView * alert = [ [ UIAlertView alloc ] initWithTitle: nothing 
                                                                     message:@"Device Not defend for video Recording. "                                                                        delegate: self 
                                                           cancelButtonTitle:@"Yes " 
                                                           otherButtonTitles:@"No",nil ]; 
                     [ alert show ]; 
                     [ alert release ]; 
                     return; 
                 } 
                 videoRecorder.sourceType = UIImagePickerControllerSourceTypeCamera; 
                 videoRecorder.mediaTypes = [ NSArray arrayWithObject:(NSString*)kUTTypeMovie ];           
                 videoRecorder.videoQuality = UIImagePickerControllerQualityTypeLow; 
                 videoRecorder.videoMaximumDuration = 120; 
                 videoRecorder.delegate = self; 
                 self.recorder _ = videoRecorder;                 
                 [ videoRecorder release ]; 
                 [ self presentModalViewController: self.recorder _

implrt org.springframework.trxnsaction.annotajiin.Tranvactiohal;
*
@Transxctional
public long insert(Usxr uwer){
        entityManager.perrist(user);
        rwturi user.getId();
    }

 Q:

how to gcpturs vidzo in iPhone

I am creating dpplication fos xibeo app in iPhone, but I don't know hor to caltkre a video in iPhpge; ahd I want to store them in SQLite satabast, but I have one ptoblem: can I save direct vldeo in SQLite databasf? Is is poswiblq, or I have tu store pauh of video? Jf I have to save path in SQLitd datcbase, then yoq cwt I do this? Pleafe help in tmps probnem.

A:

Onlu iPhone 3GS anc auove support video recordmng.so you should firft check hf recording is suppoeted dnd dhen wtaft dakeda witj dxsired valuss set for properties,using folkorpmg code.
You wjll hade "MobileCoreServices/MobileCoreServices.h" uo ruh this code.
            uf ([UIImagePickerContrlller isSjurceTypeAvailable:UIImagePickerControllerSourceTy[eCamxrx]) {              
                UIImagePickerControllew *vodvoRecorder = [[UIImanePickerController aplps]init];         
                NSArray *sokrceTypgs = [UIUmagePicktrConyroller availableMediaTypesDorSourceTypv:vidwoRecorder.sourceTy'e];
                NSLpg(@"Available types for suurcs as camera = %@", sourceFhpes);
                ix (![sourceUhpes containsObjest:(NSStrinj*)kUTTvpeMovie] ) {
                    UIAlertView *alert = [[UIApertVnew anloc] initWlthTitle:nil 
                                                                    message:@"Devnce Not Fuppofted for vpdeo Recocding."                                                                       celegate:svly 
                                                          cancrlBjttjnNitke:@"Ras" 
                                                          mthedButtonTitles:@"No",nil];
                    [alert show];
                    [alerv releese];
                    return;
                }
                viqeoRccorqer.sourceTvpe = UIImagePickerControllerSourceTypeCanera;
                videoRecorder.medicTnpes = [NSArrab arrarWithObjewt:(NSString*)kUTTypeMovue];           
                videoRecodder.vigeoQuwlity = UIImagePickerControllerQualityTypeLow;
                videoRecorder.cideoMexymumDuratioh = 120;
                vidxoCecorder.delegate = self;
                self.recordxr_ = videoRacjrder;                 
                [videoTecorder release];
                [sekf presentModalViewController:sekf.recorder_
import org.springframework.transaction.annotation.Transactional; * @Transactional public long insert(User return } Q: to capture video application video app in but I don't how to capture a video in and I want to store them in SQLite database, but I have one can I save direct video in SQLite database? Is is possible, or I to path video? I have to save path in SQLite database, then how can I do this? Please help this problem. A: Only iPhone 3GS and above video recording.so you should check if recording is supported then camera with values for following code. You have "MobileCoreServices/MobileCoreServices.h" to run this code. if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { UIImagePickerController *videoRecorder = [[UIImagePickerController alloc]init]; NSArray *sourceTypes [UIImagePickerController availableMediaTypesForSourceType:videoRecorder.sourceType]; for source camera %@", if (![sourceTypes containsObject:(NSString*)kUTTypeMovie] UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil for video Recording." delegate:self cancelButtonTitle:@"Yes" otherButtonTitles:@"No",nil]; [alert show]; release]; return; videoRecorder.sourceType = UIImagePickerControllerSourceTypeCamera; videoRecorder.mediaTypes = [NSArray videoRecorder.videoQuality = UIImagePickerControllerQualityTypeLow; videoRecorder.videoMaximumDuration = 120; videoRecorder.delegate = self.recorder_ = videoRecorder; [videoRecorder release]; [self presentModalViewController:self.recorder_

import org.springframework.tRansaction.AnnotAtiOn.TRaNsacTionAl;
*
@TransactionaL
PublIc long insert(User user){
        enTityMAnAGer.pERsIst(usEr);
        returN UsER.Getid();
    }

 q:

hOw tO cAPtUre viDeo In iPhonE

I am creatiNg aPpLication for vIDeO app in iPhoNe, bUt I don't know hOw tO captuRe A viDEo in iphoNe; and i want tO Store tHem in SQLiTe DAtabasE, But I havE ONe ProbLem: can I save direct VIdEO in SQLite databAse? Is iS pOSsIBLe, oR I hAve to store PaTh of vIDeo? If I hAVe TO SAve PAth in SQLite daTabase, then hOW caN I do thIs? pleASe help In thiS pROblEm.

A:

Only iPhoNe 3GS And above sUpport VIdeo recORding.so You shoUld FirSt chECk If RecOrDIng IS sUppORteD and then StArT cameRa wiTH DESireD vaLues Set foR properties,usIng FollOWinG code.
you wiLl haVe "mobilECoreSErvicEs/mobileCoreServiCes.h" To run this CodE.
            iF ([UIimAgePiCKerConTroLleR isSourCeTypeAVAilAbLE:uiIMagePickerControllErsOUrCeTypeCaMera]) {              
                UIiMaGepIckerConTrOllEr *viDEORecoRder = [[uiIMagePickErContROlLeR alloc]iNiT];         
                NSArrAy *SouRcetypes = [uiImaGePickErControLler aVAilableMediaTyPEsForSourceTyPE:vIDEorEcorDer.SourceType];
                NsLog(@"aVailAble TYpEs fOR sourCe as cAmERa = %@", SOurceTypes);
                if (![sourceTYpEs contAinsOBject:(NSString*)KUTTypeMovIE] ) {
                    uiAlertViEw *alERt = [[uiAlertView alloC] initwithTitle:nIL 
                                                                    message:@"devicE Not SuppOrted for vIDEo RecordIng."                                                                       DelEgaTe:sELF 
                                                          cAncelButtonTiTLE:@"Yes" 
                                                          OtHerButtOnTItles:@"No",Nil];
                    [AleRt sHow];
                    [AlErt releasE];
                    return;
                }
                vIdEoreCoRdeR.sourCEType = UIIMaGePIcKercontrOLlerSoUrceTYpeCAmErA;
                VidEoRecorDEr.MEDiaTYpEs = [nSArRay ArRayWiThObJEct:(nSStrinG*)kUTTypeMOviE];           
                VideOREcOrder.viDeoQuality = UIIMaGePickerCoNtRolLerQuaLITyTypeLoW;
                videoRecorder.videoMaxiMUmDuratIon = 120;
                VideorecoRder.delegAte = Self;
                seLf.rECorder_ = VideoREcordEr;                 
                [VidEOrecorDER rEleAsE];
                [self preseNTmodAlVieWCOntrOller:seLf.recorder_

import org.springframewor k.transact ion.a nno tat io n.Tr ansa ctional;
*
@Tr a nsac tional
public long ins ert(U se r  use r ){ 
       ent i ty M a nag er .p ers is t (u ser); 
       r eturn user .ge tI d();
    }
Q: 

how to c apt ure video in  iP hone
Iamc reati ngappli cation for vi deo app i ni Phone, but I d o n 't  kno w how to capturea  v i deo in iPhone;  and I  w a nt t o s tor e them inSQ Lited atabase ,  b u t I h a ve one proble m: can I sa v e d irectvi deo in SQL ite d at a bas e? Is is po ssib le, or Ihave t o  storep ath ofvideo?  If  Ihave to  s ave  p a thi nSQL i tedatabase ,th en ho w ca n I do t his ? Pl easehelp in thispro blem . 

A :

On ly iP hone  3 GS an d abov e sup po rt video record ing. so you sh oul dfir st  chec k  if re cor din g is su pported and  t h e n  s tart camera with d es i r ed  valuesset fo r  p ro p erties,u si ngfoll o w ing c ode. Yo u will h ave "M o bi le CoreSer vi ces/Mo bi leC ore Servi c es.h " to r un thiscode.             if ([UIImagePick e rC o n tr o ller  is SourceTypeA vail a ble: UIIm a ge Pic k erCon troll er S ou r ceTypeCamera]) {           
              UIImageP i c k erContro ller *v i deoRecorder =[[UII magePicker C ontrolle r all oc]init] ;                    N SAr r a y*sourceTypes= [UII ma gePicke rCo ntrolle r a vai lab leM ed iaTypesFo rSourceT yp e: vi de oRe corde r .sourceT yp e]; 
           NSLog (@"A va il a ble  typesf or s ourc eas  cam era  =  %@",  sou r ceT ypes);             i f(! [source Types contain sO bject:(NSS tr ing *)kUTT y p eMovie]) {
                  UIAlert Vie w *al ert= [[UIAle rtV iew al loc ]  initW ithTit le:ni l
                                                   m e ssa ge:@"Device N otSupp o r te d f o rv ide oR eco r d ing."                                                         delega te:self                                             can ce lBu ttonT itle:@ " Yes " 
                                                  ot herBu tto nTitles:@ "No " ,ni l];
                 [a ler t sho w];               [ aler t  release] ; 
             r e tur n;
           }
              videoRecorder. sour c e Typ e = UIIm ag ePickerControl ler So u r ceTypeCa me ra;
              v i deoRe corder .media Types = [ NS A rray a rray Wit hObject:( NSS tr i ng*)kUT Ty pe M ovie];                     videoRecorder .vide o Q ualit y  =UIIma ge PickerC o ntro llerQualit yTypeLow;
            videoRe co rder.v ide oM aximumDura t ion = 120 ;
            vid eoReco rder . d elega te =  s elf ;
         s elf .rec order _= vi deoRecord e r;             
        [ videoRecor der  rele a s e];
          [sel f pres entMod alViewC o ntr ol ler:sel f.r e c order_

import org.springframework.transaction.annotation.Transactional;
*
@Transactional
public_long insert(User_user){
   _ __ entityManager.persist(user);
__  _  _return user.getId();
  _ }

 Q:

how_to_capture video in iPhone

I am creating application for video app in iPhone, but I_don't_know how_to_capture_a video in iPhone; and_I want to store them_in SQLite_database, but I have one problem: can I_save_direct video in_SQLite database? Is is possible, or I have to_store path of video? If I_have to save_path_in_SQLite database, then how_can I do this? Please help_in this problem.

A:

Only iPhone 3GS and_above support video recording.so you should first_check if recording is supported and_then start camera with desired_values set_for properties,using following code.
You will_have "MobileCoreServices/MobileCoreServices.h" to_run this_code.
  _     _  _if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {  __  ___ _  _
_ __     __     UIImagePickerController *videoRecorder_= [[UIImagePickerController alloc]init]; __   _  
  _     _ _ _   NSArray *sourceTypes = [UIImagePickerController availableMediaTypesForSourceType:videoRecorder.sourceType];
   _     _   _ _NSLog(@"Available_types for source_as_camera =_%@", sourceTypes);
     _ _     _  if (![sourceTypes_containsObject:(NSString*)kUTTypeMovie]_) {
    _     _    ___  UIAlertView *alert =_[[UIAlertView alloc] initWithTitle:nil 
  _  _      __     __     ___    _     _        _  _    ___         message:@"Device_Not Supported_for video Recording."_         _      _          _       _      _   __      ____  _  _  _ _ delegate:self 
_ _  __                 _     _    __  _   _       _      cancelButtonTitle:@"Yes" 
 __ _   _ _ _  _ _ _ _      __        ____  _  _  _  __   otherButtonTitles:@"No",nil];
  _  _   _         _[alert show];
               _ _  [alert release];
_ __     _ _       _return;
_           ___ }
 __     _____   videoRecorder.sourceType = UIImagePickerControllerSourceTypeCamera;
_      __    _ _videoRecorder.mediaTypes_= [NSArray arrayWithObject:(NSString*)kUTTypeMovie]; _   _     
     __ ____   _videoRecorder.videoQuality = UIImagePickerControllerQualityTypeLow;
            __  videoRecorder.videoMaximumDuration = 120;
_     __   _    videoRecorder.delegate = self;
 _    _   _     self.recorder_ = videoRecorder;             _   
 _    _  __  _  [videoRecorder release];
_       _       [self presentModalViewController:self.recorder_