Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎÊ´ð£º

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

execlÔõôµ÷ÓÃjava³ÌÐò - C/C++ / CÓïÑÔ

ÈçÌ⣬C/C++ÖеÄexeclÔõôµ÷ÓÃдºÃµÄjava³ÌÐò£¬
execl("/opt/java1.5/bin/java","MyClass",NULL);
ÕâÑùµÄ²»ÐÐŶ¡£

²»»á.

ÔËÐÐjava³ÌÐò
ÕÒ¹¤¾ß²é¿´Ò»ÏÂÄǸö³ÌÐòµÄÃüÁîÐÐ

ËÑË÷Ï£ºjni ......

Çó½Ìc/c++ÓïÑÔÏà¹ØÎÊÌâ - C/C++ / CÓïÑÔ

ÓÐÒ»10*10¾ØÕ󣬳ýÈ¥µÚÒ»¸öµã£¨0£¬0£©ºÍ×îºóÒ»µã£¨9£¬9£©£¬»¹Óа˸öµãΪ1£¬ÆäËû¶¼Îª0£¬ÒªÇóÓöþάÊý×é±íʾ¡£°Ë¸öµãÊÇËæ»úÉú³ÉµÄ£¬±àдÏà¹Ø³ÌÐò±íʾ¾ØÕóËùÓпÉÄÜÇé¿ö¡£
ÕæÐÄÇó½Ì¸÷λ¸ßÊÖ£¬°¥£¡±¾ÈËÌ«²ËÁË£¡ºÇºÇ£¡
......

C/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý - C/C++ / C++ ÓïÑÔ

´ó¼ÒºÃ£º
ÎÒÏëʵÏÖ¼ì²âµ½²åÈëSD¿¨ºó×Ô¶¯½«SD¿¨¸ñʽ»¯µÄ¹¦ÄÜ£¬²»ÖªC/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý£¿
ÁíÍ⣬ÎÒ²»ÏëʹÓÃSHFormatDrive£¬ÒòΪÕâ¸öº¯Êý»áµ¯³öÊÇ·ñÒª¸ñʽ»¯µÄÌáʾ¿ò£¬ÎÒÐèÒªµÄÊÇϵͳ×Ô¶¯¸ñʽ»¯£¬¶ø²Ù×÷Õß² ......

c¾²Ì¬±àÒëÁíÒ»¸öÎļþ¼ÐµÄ¿âº¯Êý - C/C++ / CÓïÑÔ

ÔÚ¸ùĿ¼/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Öж¨ÒåµÄ·½·¨ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ