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

  • Home
  • SEARCH
  • 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 8998569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:03:13+00:00 2026-06-16T00:03:13+00:00

I am trying to grab the frames captured by the camera, encode them and

  • 0

I am trying to grab the frames captured by the camera,
encode them and finally send them using RTP/RTSP.

To do the capturing I am using the CameraSource class of stagefright.
The preview on the screen (Surface passed from Java) is great.
But when I try to extract the frames I get frames of 20 bytes.

What am I doing wrong ?

Size videoSize;
videoSize.width = 352;
videoSize.height = 288;
sp<CameraSource> myCamera = CameraSource::CreateFromCamera(NULL, NULL, 
                             1 /*front camera*/, videoSize, 25, mySurface, true);
myCamera->start();

//the following is from a reader thread.
status_t err = OK;
MediaBuffer* pBuffer;
while ((err = myCamera->read(&pBuffer)) == OK)
{
    // if not getting a valid buffer from source, then exit
    if (pBuffer == NULL)
    {
        return;
    }
    else
    {
        LOGD("The Size of the returned buffer is: %d", pBuffer->size() );
    }
    pBuffer->release();
    pBuffer = NULL;
}
  • 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-06-16T00:03:14+00:00Added an answer on June 16, 2026 at 12:03 am

    You are doing everything correctly, but Samsung decided not to support the route you tried to implement. The only way to use CameraSource on Galaxy S2 (and many other Samsung devices) is to connect it directly to the hardware encoder.

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

Sidebar

Related Questions

I am trying to grab consecutive frames from android using opencv VideoCapture class. Actually
I am trying to grab the closest link with the class a.tariff-link and send
I'm trying to grab frames from a web cam using OpenCV. I also tried
I am trying to grab all the id's that are part_number and feed them
Hi I am trying to grab a div from another website using JS. I
I'm trying to grab out some information from Active Directory using Powershell, but I
So I'm trying to grab the current URL of the page using Java's request
Im trying to grab the entire DOM from a page using document.getElementsByTagName('html')[0].innerHTML but I
I am trying to grab images using MIL library and I wanted to render
I'm trying to grab some data using Selenium and xpaths. The following xpath works

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.