Yup, I just found the problem, it was the allocation of the outbuffer. At some point I wound up with two buffers with similar names, one was allocated with the Memory_contig function and one was not. I was passing the one that was not allocated with the contig function, and apparently the VIDENC functions require contiguously allocated memory. Which I think makes sense (now that it is working at least). Thanks, -mat And if anyone is interested I could post this code in a few days, it is basically a library for just capturing and encoding without the multiple threads and ui stuff and instead it will have an api for using it and a FramedSource wrapper for use in liveMedia streaming apps.
On Thu, Oct 9, 2008 at 9:01 AM, Vladimir Pantelic <[EMAIL PROTECTED]>wrote: > Mat Laibowitz wrote: > > Encode Debug: 3 capture buffers were successfully allocated. >> Encode Debug: Capture buffer 0 mapped to address 0x41b5d000 >> Encode Debug: Capture buffer 1 mapped to address 0x4215d000 >> Encode Debug: Capture buffer 2 mapped to address 0x4275d000 >> Encode Debug: Video capture initialized and started >> Encode Debug: Codec Engine opened in video thread >> Encode Debug: Video encoder created >> Encode Debug: Contiguous buffer allocated at physical address 0x8c36a000 >> Encode Debug: Contiguous buffer allocated at physical address 0x8c435000 >> Encode Debug: Entering video main loop. >> CMEMK Error: get_phys: Unable to find phys addr for 0xbedda4f3 >> index 0 >> CMEMK Error: get_phys: get_user_pages() failed: -14 >> CMEMK Error: GETPHYS: Failed to convert virtual 0xbedda4f3 to physical. >> CMEM Error: getPhys: Failed to get physical address of 0xbedda4f3 >> > > so, CMEM is not able to map your virtual address back to a physical one. > can you check what the virtual address is for all the buffers that you have > allocated via CMEM, > the traces above show only the physical ones. > > Encode Error: VIDENC_process() failed with a fatal error (-2 ext: 0x3f9 >> Encode Error: no frame captured >> >> My CMEM insmod from the loadmodules.sh script: >> insmod /lib/modules/cmemk.ko phys_start=0x87800000 phys_end=0x88000000 >> pools=1x3145728,3x829440,1x61440,1x10240 >> > > not the issue, CMEM is allocating, but for some reason you pass a virtual > address that it does not like. > > >> Here is the encodeVideoBuffer function that calls the VIDENC_Process and >> always fails. >> >> static int encodeVideoBuffer(VIDENC_Handle hEncode, char *inBuf, int >> inBufSize, >> char *outBuf, int *outBufSize) >> > > yes, but what is your inbuf/outbuf actually. > > > _______________________________________________ > Davinci-linux-open-source mailing list > [email protected] > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source >
_______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
