c#¶¨Òåc++½á¹¹ - .NET¼¼Êõ / C#
#define MAX_WIDTH 704
#define MAX_HEIGHT 576
#define Y_size (MAX_WIDTH*MAX_HEIGHT)
#define U_size (MAX_WIDTH*MAX_HEIGHT/4)
#define V_size U_size
typedef struct _YUVDescriptor_t_ {
long long llPts;
BYTE Y[Y_size];
BYTE U[U_size];
BYTE V[V_size];
UINT uiWidth;
UINT uiHeight;
} YUV_DESC;
LVP_SDK_CMI_API BOOL LVP_SDK_CMI_DecodeVideoData(HWND hDecoder,void * pFrame,YUV_DESC *pYUV);
pFrameΪÊäÈë²ÎÊý£¬pYUVΪÊä³ö²ÎÊý
public struct YUV_DESC
{
public int64 llPts;
public fixed byte Y[Y_size];
public fixed byte U[U_size];
public fixed byte V[V_size];
public uint uiWidth;
public uint uiHeight;
};
Ç°ÃæµÄ£º
public const int MAX_WIDTH = 704
public const int MAX_HEIGHT = 576
public const int Y_size = (MAX_WIDTH*MAX_HEIGHT)
public const int U_size = (MAX_WIDTH*MAX_HEIGHT/4)
public const int V_size = U_size
Êä³ö²ÎÊýÔÚC#ÖпÉÒÔʹÓÃout
·ÃÎʵÄÊÇ·ÇÍйÜÄڴ棬¼ÇµÃÔÚÀàµÄ¶¨ÒåÇ°Ãæ¼Óunsafe¹Ø¼ü×Ö£¬Èç
public unsafe class MyProj
{
public const int MAX_WIDTH = 704
...
}
ÔÚÀàÍâ±ß²»Äܶ¨Òå»ù±¾Êý¾ÝÀàÐÍ°É¡£¡£¡£
^_^ ÍüÁËĩβ¼Ó;ºÅÁË
public struct YUV_DESC
{
public int64 llPts;
public fixed byte Y[Y_size];
pu
Ïà¹ØÎÊ´ð£º
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
ÈçÌ⣬C/C++ÖеÄexeclÔõôµ÷ÓÃдºÃµÄjava³ÌÐò£¬
execl("/opt/java1.5/bin/java","MyClass",NULL);
ÕâÑùµÄ²»ÐÐŶ¡£
²»»á.
ÔËÐÐjava³ÌÐò
ÕÒ¹¤¾ß²é¿´Ò»ÏÂÄǸö³ÌÐòµÄÃüÁîÐÐ
ËÑË÷Ï£ºjni ......
ÓÐÒ»10*10¾ØÕ󣬳ýÈ¥µÚÒ»¸öµã£¨0£¬0£©ºÍ×îºóÒ»µã£¨9£¬9£©£¬»¹Óа˸öµãΪ1£¬ÆäËû¶¼Îª0£¬ÒªÇóÓöþάÊý×é±íʾ¡£°Ë¸öµãÊÇËæ»úÉú³ÉµÄ£¬±àдÏà¹Ø³ÌÐò±íʾ¾ØÕóËùÓпÉÄÜÇé¿ö¡£
ÕæÐÄÇó½Ì¸÷λ¸ßÊÖ£¬°¥£¡±¾ÈËÌ«²ËÁË£¡ºÇºÇ£¡
......
´ó¼ÒºÃ£º
ÎÒÏëʵÏÖ¼ì²âµ½²åÈëSD¿¨ºó×Ô¶¯½«SD¿¨¸ñʽ»¯µÄ¹¦ÄÜ£¬²»ÖªC/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý£¿
ÁíÍ⣬ÎÒ²»ÏëʹÓÃSHFormatDrive£¬ÒòΪÕâ¸öº¯Êý»áµ¯³öÊÇ·ñÒª¸ñʽ»¯µÄÌáʾ¿ò£¬ÎÒÐèÒªµÄÊÇϵͳ×Ô¶¯¸ñʽ»¯£¬¶ø²Ù×÷Õß² ......
ÔÚ¸ùĿ¼/libÖдæ·ÅÒ»¸ölog.c£¬log.h£¬²¢ÓÃÏÂÃæµÄÓï¾ä£º
gcc -c log.c
ar crv liblog.a log.o
±àÒë³öÒ»¸öliblog.a¾²Ì¬¿â£¬È»ºóÔÚÎļþ¼Ð£º/testfileÖд´½¨Ò»¸ötest.cºÍtestc.c£¬test.cÖÐÒýÓÃÁËtestc.cÖж¨ÒåµÄ·½·¨ ......