Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3309422
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:38:20+00:00 2026-05-17T21:38:20+00:00

Hey folks. Trying to get started with iPhone video capture stuff, and having a

  • 0

Hey folks. Trying to get started with iPhone video capture stuff, and having a terrible time getting it going.

At the moment, working with an exact copy of the sample code from this Apple Developer Q&A: qa1702; not going to re-paste it here, since it’s a relatively big blob of code.

In any case, I copied and pasted that code into an otherwise-empty project, threw in a call to setupCaptureSession into a custom UIView, and figured I should be good to go:

- (void)awakeFromNib {
    NSLog(@"init");
    [self setupCaptureSession]; 
}

Unfortunately, when I run the code, my delegate never seems to be called:

- (void)captureOutput:(AVCaptureOutput *)captureOutput 
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer 
       fromConnection:(AVCaptureConnection *)connection
{ 
    NSLog(@"New Image!");
}

I’d expect to be seeing a flood of “New Image!” getting dumped to the log, but I’m getting absolutely nothing. I do know that all the initialization code is being run (I threw a few NSLog statements here and there within setupCaptureSession, and they all print).

So, I’d either A) like to figure out what I’m doing wrong or B) see some very simple capture code embedded into a UIView that actually works (the less code, the better). Ideally, the sample code would use the setupCaptureSession code as described in the Apple developer site above.

Note that this code is being tested on an iPhone 3GS running the newest version of iOS 4.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:38:20+00:00Added an answer on May 17, 2026 at 9:38 pm

    I copied and pasted the same code into a new project and it works fine for me.
    Here is what I did:

    I created a View Based application in XCode.

    I added the following frameworks:CoreMedia, CoreVideo,AVFoundation

    I imported AVFoundation into my viewcontroller’s header file

    I specified my view controller to use the AVCaptureVideoDataOutputSampleBufferDelegate protocol in its interface definition

    In the implementation I copied the code from the app document you specified in your question

    I commented out this:

     [self setSession:session]
    

    I commented out this:

    UIImage *image = [self imageFromSampleBuffer:sampleBuffer];
    

    and added this:

    NSLog(@"here");
    

    In the viewDidLoad method i put

     [self setupCaptureSession];
    

    Build. Run.
    The “here” gets printed repeatedly to the console.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey folks, hoping you can help me get started with IronRuby. I have several
Hey folks, I'm trying to get these bits of syntax to make sense to
hey folks I'm having a bit of an issue trying to deploy my rails
Hey folks I am trying to implement a search functionality in a website using
Hey Folks i am trying to compile this C++ program: #include <stdio.h> #include <string.h>
Hey trying to get a validation check working on a boolean field called 'activated'.
Hey folks - I'm writing a pretty simple iPhone application. The data comes from
Hey all. Newbie question time. I'm trying to setup JMXQuery to connect to my
Hey Folks am seemingly having problems with .htaccess files. The problem: I have a
Hey folks, I am trying to import a database (.sql) file using phpmy admin

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.