objective c - Does video recording supports in iphone 3g(programatically) in iphone sdk? -
objective c - Does video recording supports in iphone 3g(programatically) in iphone sdk? -
i using code below recording video worked smoothly in iphone 3gs , iphone 4.but in iphone 3g not working.
- (void)imagepickercontroller:(uiimagepickercontroller *)picker1 didfinishpickingmediawithinfo:(nsdictionary *)info { printf("\n inside......didfinishpickingmediawithinfo"); nsstring *mediatype = [info objectforkey:uiimagepickercontrollermediatype]; printf("\n mediatype = %s",[mediatype utf8string]); if ([mediatype isequaltostring:@"public.movie"]) { nslog(@"got movie"); videourl = [info objectforkey:uiimagepickercontrollermediaurl]; newurl = [videourl copy]; nslog(@"video url = %@",videourl); movieplayer = [[mpmovieplayercontroller alloc] initwithcontenturl:newurl]; if (movieplayer) { //[movieplayer setcontrolstyle:mpmoviecontrolstylefullscreen]; //[movieplayer setfullscreen:yes]; //[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(handledurationavailablenotification:) // name:mpmoviedurationavailablenotification //object:movieplayer]; ////movieplayer.useapplicationaudiosession = no; //uiimage *image = [movieplayer thumbnailimageattime:(nstimeinterval)1.0 timeoption: mpmovietimeoptionnearestkeyframe]; //nsdata *imgdata = uiimagepngrepresentation(image); //thumbnaildata =[imgdata copy]; //printf("\n length of thumbnailimage data...%d",[imgdata length]); } nsdata *webdata = [nsdata datawithcontentsofurl:videourl]; webdata1 = [webdata copy]; myalertview = [[uialertview alloc] initwithtitle:@"enter message title" message:@"................." delegate:self cancelbuttontitle:@"no title" otherbuttontitles:@"ok",nil]; cgaffinetransform mytransform = cgaffinetransformmaketranslation(0.0, 80.0); [myalertview settransform:mytransform]; [myalertview addsubview:messagetitletextfield]; [messagetitletextfield setfont:[uifont boldsystemfontofsize:14]]; messagetitletextfield.returnkeytype = uireturnkeydone; messagetitletextfield.keyboardappearance = uikeyboardappearancedefault; messagetitletextfield.keyboardtype = uikeyboardtypedefault; messagetitletextfield.delegate = self; [myalertview show]; //[mview addsubview:myalertview]; uilabel *thetitle = [myalertview valueforkey:@"_titlelabel"]; [thetitle settextcolor:[uicolor orangecolor]]; uilabel *thebody = [myalertview valueforkey:@"_bodytextlabel"]; [thebody settextcolor:[uicolor whitecolor]]; uiimage *theimage2 = [uiimage imagenamed:@"voicebg.png"]; theimage2 = [theimage2 stretchableimagewithleftcapwidth:16 topcapheight:16]; cgsize thesize = [myalertview frame].size; uigraphicsbeginimagecontext(thesize); [theimage2 drawinrect:cgrectmake(0, 0, thesize.width, thesize.height)]; theimage2 = uigraphicsgetimagefromcurrentimagecontext(); uigraphicsendimagecontext(); myalertview.layer.contents = (id)[theimage2 cgimage]; [myalertview release]; //[webdata release]; [picker1 dismissmodalviewcontrolleranimated:yes]; } } guy's please help me issue.
thanks all, monish.
the 3g has still capture capabilities. developers have got round capturing multiple pictures in quick succession , converting video.
this blog has article on video options avaliable, it's year old able understand did.
iphone objective-c camera uiimagepickercontroller
Comments
Post a Comment