#include "stdafx.h"#include#include"vlc/vlc.h"#include#include#include#includeQMutex g_mutex;bool g_isInit = false;int IMG_WIDTH = 640;int IMG_HEIGHT = 480;char in_buffer[640*480*4];char out_buffer[640*480*4];
FILE*local;int frameNum = 0;const char* TestFile = "b040_20170106.dat";//
static void *lock(void *data, void **p_pixels)
{
g_mutex.lock();*p_pixels = out_buffer; /*tell VLC to put decoded data to this buffer*/
return 0; /*picture identifier, not needed here*/}/*##get the argb picture AND save to file*/
static void unlock(void *data, void *id, void *const *p_pixels)
{
QImage image((unsignedchar*)out_buffer,640,480,QImage::Format_ARGB32);
std::ostringstream oss;
oss<< "d:/img"
<
frameNum++;
image.save(oss.str().c_str());
g_mutex.unlock(