1. Transplant target
The H.264 decoder is ported to the OPhone operating system (NDK+C), and a test program (Ophonesdk+java) is written to test the decoder library for normal operation, and the following is a screenshot of the decoding:
The OPhone simulator, like the mobile simulator, simulates the arm instruction, and unlike the Symbian simulator, it is less efficient to simulate than the real phone, and the decoder has been optimized to run on the Nokia 6600 (quite low-end of a mobile phone, CPU frequency only 120Hz) on the online playback.
2. Crowd-oriented
This article is for some mobile phone application development experience (such as: S60/MOBILE/MTK) and a certain number of mobile phone platform porting experience to help them understand the core of an enterprise (c/s) is how to transplant to ophone.
3. Assuming that the premises
1 familiar with java/c/c++ language;
2 familiar with Java JNI technology;
3 have certain experience of porting mobile phone platform;
4 A set of portable source code library, here to H.264 decoding library for example, in order to protect our knowledge of copyright, here can only open the header file:
#ifndef __h264decode_h__
#define __H264DECODE_H__
#if defined (__symbian32__)//S602RD/3RD/UIQ
#include <e32base.h>
#include <libc "Stdio.h>
#include <libc" STDLIB.H>
#include <libc "String.h>
#else//windows/mobile/mtk/ophone
#include <stdio. H>
#include <stdlib.h>
#include <string.h>
#endif
class H264decode
{
Public:
/***************************************************************************/
/* Construct decoder */
/* @return H264decode Decoder instance */
/***************************************************************************/
Static H264Decode *H26 4DecodeConstruct ();
/***************************************************************************/
/* Decodes a frame */
/* @pInBuffer video stream pointing to H264 */
/* @iInSiz e H264 Video Stream size */
/* @pOutBuffer video Video after decoding */
/* @iOutSize the decoded video size */
/* @return The size of the decoded H264 video stream */
/***************************************************************************/
int decodeoneframe (unsigned char *pinbuffer,unsigned int iinsize,unsigned char *poutbuffer,unsigned int &ioutsi Ze);
~h264decode ();
};
#endif//__h264decode_h__
You don't have to be familiar with the OPhone platform, everything starts from scratch, because before that, I am not familiar with.