You'll want to go and download Chris Green's Script Vertex to Point. Then depending on your object you can use that along with Null Objects and Pick Whips to achieve your desired effect.

If your entire line is moving and you want it to track the entire line, not just a vertex then you could do it without the script just by using Null Objects and Pick Whip.

Another way without needing a script, if its a straight line, would be to use Null Objects and Generate Beam. The Beam becomes your line while giving you full usage of X/Y coordinates to Pick Whip to.

AE: Parent Element to a point of a path?
In my application i am using  AVCaptureSession to record video.

When recording done,I m getting video is of size 360 X 480.

I have set recording layer size is 320 X 568.

I am missing something, I tried but not getting where.

Can anyone guide me where should i change to get recording video with size of 320 X 568  

Here is my code,

Initialization

AVCaptureDevice* device = nil;
AVCaptureDeviceInput *captureInput = [AVCaptureDeviceInput deviceInputWithDevice:device error:nil];
AVCaptureVideoDataOutput *captureOutput = [[AVCaptureVideoDataOutput alloc] init];
captureOutput.alwaysDiscardsLateVideoFrames = YES; 



dispatch_queue_t queue;
queue = dispatch_queue_create("cameraQueue", NULL);
[captureOutput setSampleBufferDelegate:self queue:queue];
dispatch_release(queue);


// Set the video output to store frame in BGRA

NSString* key = (NSString*)kCVPixelBufferPixelFormatTypeKey; 
NSNumber* value = [NSNumber numberWithUnsignedInt:kCVPixelFormatType_32BGRA]; 
NSDictionary* videoSettings = [NSDictionary dictionaryWithObject:value forKey:key]; 
[captureOutput setVideoSettings:videoSettings]; 


//And we create a capture session

self.captureSession = [[AVCaptureSession alloc] init];
self.captureSession.sessionPreset = AVCaptureSessionPresetMedium;

if([self.captureSession respondsToSelector:@selector(addInput:)])
        [self.captureSession addInput:captureInput];
    if([self.captureSession respondsToSelector:@selector(addOutput:)])
        [self.captureSession addOutput:captureOutput];

/*We add the Custom Layer (We need to change the orientation of the layer so that the video is displayed correctly)*/
self.customLayer = [CALayer layer];
self.customLayer.frame = self.view.bounds;

self.customLayer.transform = CATransform3DRotate(CATransform3DIdentity, M_PI/2.0f, 0, 0, 1);
    self.customLayer.transform = CATransform3DScale(self.customLayer.transform,.7,.7,1);
    self.customLayer.transform = CATransform3DTranslate(self.customLayer.transform,-23,0,0);

self.customLayer.contentsGravity = kCAGravityResizeAspectFill;
[self.view.layer addSublayer:self.customLayer];
[self.captureSession startRunning];


//Initialization Over
