×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    May 2007
    Location
    India
    Posts
    197

    Thumbs down Problem with DevVideo API

    Hi ,

    I have seen that Nokia is providing MMF DevVideoRecord API as part of plug-in pack.

    But I am facing too many issues with the API. I really doubt that for what reason they have given this API as a free one?

    With the API I have found a very basic problem in devvideobase.h that they are providing following class,
    class TPictureData
    {
    public:
    /**
    The image data format. The validity of the rest of the fields depends on the data format used.
    */
    TImageDataFormat iDataFormat;

    /**
    Image data size in pixels. In decoder output pictures the actual active picture area may be smaller,
    this is indicated using TVideoPicture.iCropRect.
    */
    TSize iDataSize;

    union
    {
    /**
    Pointer to raw image data. Valid if iDataFormat is ERgbRawData or iYuvRawData.
    The data layout depends on the format used.
    */
    TPtr8* iRawData;

    /**
    Pointer to an RGB bitmap. Valid if iDataFormat is ERgbFbsBitmap.
    */
    CFbsBitmap* iRgbBitmap;
    };
    };
    As per my understanding, this clearly means that there is no way to access either iRawData or iRgbBitmap.

    Tell me if I am wrong.

    If this is the case, then how can one person use this class? and withour using this class, It will not be possible to initialize H.264 encoder which is not supporting direct camera input.

    If there is any solution, please help...

    Experts: If this is just an API which is useless, if possible, please make some note somewhere so that it can save time of other developers till they find this kind of dead-end.

    Thanks,
    Digish

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Problem with DevVideo API

    Hi,

    I think you are wrong - this is just an anonymous union. You can treat it as if the union didn't exist and its members are just normal members of the class from a syntax perspective. The only difference is that you mustn't use both of them at the same time, just one format or the other.

    Mark

  3. #3
    Registered User
    Join Date
    May 2007
    Location
    India
    Posts
    197

    Re: Problem with DevVideo API

    Thanks very much for the help!

    -Digish
    Last edited by Digish; 2009-02-28 at 06:22.

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Problem with DevVideo API

    Quote Originally Posted by Digish View Post
    But it is giving me compilation errors.
    what error you are getting. can you show us you command window output.

  5. #5
    Registered User
    Join Date
    May 2007
    Location
    India
    Posts
    197

    Re: Problem with DevVideo API

    Hi skumar_rao,

    Thanks for quick response...

    I actually was getting some other error which was on the same line so i thought of it being error because of it.

    aneways, thanks for help... it was just my mistake.

    By the way,

    I tried following code.



    Code:
    	TUncompressedVideoFormat lUncompressedVideoFormat;
    
    //	TSize					 lInputPictureSize(640,480);
    //	TSize					 lInputPictureSize(352,288);
    	TSize					 lInputPictureSize(176,144);
    	
    	lUncompressedVideoFormat.iDataFormat = EYuvRawData;
    	TYuvFormat lYuvFormat;
    
    	TYuvCoefficients lCoef = EYuvRange1;
    	TYuvSamplingPattern lPattern = EYuv420Chroma3;
    	TYuvDataLayout lDataLayout = EYuvDataPlanar;
    	
    	lYuvFormat.iCoefficients = lCoef;
    	lYuvFormat.iPattern = lPattern;
    	lYuvFormat.iDataLayout = lDataLayout;
    	lYuvFormat.iRgb2YuvMatrix = NULL;
    	lYuvFormat.iYuv2RgbMatrix = NULL;
    	lYuvFormat.iAspectRatioNum = 1;
    	lYuvFormat.iAspectRatioDenom = 1;
    	
    	lUncompressedVideoFormat.iYuvFormat = lYuvFormat; 
    	
    	TRAPD(err2,iRecord->SetInputFormatL(iEncoderId,lUncompressedVideoFormat,lInputPictureSize););
    	
    	LOG(_L("Set input formate err = %d "),err2);
    	if(err2 != KErrNone) break;
    But I am getting continuosly err -5 .

    and hence I am not able to initialize my H.264 encoder.

    I had set

    TBuf8<60> lMime(_L8("video/H264; profile-level-id=42900B"));
    TBuf8<60> lMime(_L8("video/H264; profile-level-id=42800A"));
    TBuf8<60> lMime(_L8("video/H264"));

    one by one for trial to find out proper encoder but in not even single case,
    I got any success.

    Can anyone please help me?

    -Thanks,
    Digish

  6. #6
    Registered User
    Join Date
    May 2007
    Location
    India
    Posts
    197

    Re: Problem with DevVideo API

    Replying my own post so others can get around if needed.

    I had to set EYuvBt709Range1 in place of

    TYuvCoefficients lCoef = EYuvRange1;

    Now initialization is not creating problem

    Thanks
    -Digish

  7. #7
    Registered User
    Join Date
    May 2007
    Location
    India
    Posts
    197

    Re: Problem with DevVideo API

    Hello friends,

    Here I am facing a different problem but still as it is related, I am continueing in the same thread.

    After initialization, when I am writing video data through,

    iRecord->WritePictureL(iPicture);

    I am getting no errors but there is no data being encoded.

    When I am retriving buffer status,

    Code:
    iRecord->NumDataBuffers()
    It always returns 0.

    My MdvroNewBuffers() is never being called.

    Code:
    iRecord->NextBufferL();
    Always returns NULL

    and
    Code:
    iRecord->GetOutputBufferStatus(lbuffers,lbytes);
    always returns same value, 2 buffers and 81942 bytes.


    I am not able to get what should i try now..

    please help!

    -Digish

  8. #8
    Regular Contributor
    Join Date
    Mar 2009
    Location
    Strasbourg - France
    Posts
    110

    Re: Problem with DevVideo API

    Hello Digish, there are always the same person on DevVideo API thread..
    did you manage to use RGB like input format ?
    Regards and Peace.

    Cartouche67.

  9. #9
    Registered User
    Join Date
    Aug 2007
    Posts
    41

    Thumbs down Re: Problem with DevVideo API

    Hi, guys!
    Has anyone managed to use built-in h.264 codec on the Nokia 5800? The problem is that I initialize successfully encoder for the video/h264 output, but after MdvroNewBuffers() is never being called. Tried to play around with SetGlobalReferenceOptions(), doesn't help

Similar Threads

  1. Problem with Camera API (S60 2.0)
    By tpikkara in forum Symbian
    Replies: 20
    Last Post: 2008-05-26, 06:39
  2. Skins API: Theme change caching problem?
    By dangeross in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-03-07, 07:48
  3. POSIX file API fseek() problem
    By prasanta_sadhukhan in forum Symbian
    Replies: 5
    Last Post: 2007-04-27, 10:58
  4. PIM API adding new contacts problem
    By hoppelmoppel in forum Mobile Java General
    Replies: 3
    Last Post: 2007-04-22, 17:12
  5. Camera API problem
    By pmdr05 in forum Symbian
    Replies: 2
    Last Post: 2007-03-06, 11:15

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×