91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 12.55MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-07-01
  • 語(yǔ)言: Matlab
  • 標(biāo)簽: MATLAB??mmread??

資源簡(jiǎn)介

MATLAB工具包mmread函數(shù)mmread.zip

資源截圖

代碼片段和文件信息

/***************************************************
This?is?the?main?Grabber?code.??It?uses?AVbin?and?ffmpeg
to?capture?video?and?audio?from?video?and?audio?files.

The?code?supports?any?number?of?audio?or?video?streams?and
is?a?cross?platform?solution?to?replace?DDGrab.cpp.

This?code?was?intended?to?be?used?inside?of?a?matlab?interface
but?can?be?used?as?a?generic?grabber?class?for?anyone?who?needs
one.

Copyright?2008?Micah?Richert

This?file?is?part?of?mmread.
**************************************************/

#ifdef?MATLAB_MEX_FILE
#include?“mex.h“
#define?FFprintf(...)?mexPrintf(__VA_ARGS__)
#else
#define?FFprintf(...)?printf(__VA_ARGS__)
#endif

//#ifndef?mwSize
//#define?mwSize?int
//#endif

#define?DEBUG?0

extern?“C“?{
#include?
#include?

struct?_AVbinFile?{
????AVFormatContext?*context;
????AVPacket?*packet;
};

struct?_AVbinStream?{
int?type;
AVFormatContext?*format_context;
AVCodecContext?*codec_context;
AVframe?*frame;
};
}

#include?
#include?
#include?
#include?
using?namespace?std;

#include?
#include?
#include?

map?keyframes;
unsigned?int?startDecodingAt;

class?Grabber
{
public:
Grabber(bool?isAudio?AVbinStream*?stream?bool?trySeeking?double?rate?int?bytesPerWORD?AVbinStreamInfo?info?AVbinTimestamp?start_time)
{
this->stream?=?stream;
frameNr?=?0;
packetNr?=?0;
done?=?false;
this->bytesPerWORD?=?bytesPerWORD;
this->rate?=?rate;
startTime?=?0;
stopTime?=?0;
this->isAudio?=?isAudio;
this->info?=?info;
this->trySeeking?=?trySeeking;
this->start_time?=?start_time>0?start_time:0;
};

~Grabber()
{
//?clean?up?any?remaining?memory...
if?(DEBUG)?FFprintf(“freeing?frame?data...\n“);
for?(vector::iterator?i=frames.begin();i?!=?frames.end();?i++)?free(*i);
}

AVbinStream*?stream;
AVbinStreamInfo?info;
AVbinTimestamp?start_time;

vector?frames;
vector?frameBytes;
vector?frameTimes;

vector?frameNrs;

unsigned?int?frameNr;
unsigned?int?packetNr;
bool?done;
bool?isAudio;
bool?trySeeking;

int?bytesPerWORD;
double?rate;
double?startTime?stopTime;

int?Grab(AVbinPacket*?packet)
{
if?(done)?return?0;
if?(!packet->data)?return?1;

frameNr++;
packetNr++;
if?(DEBUG)?FFprintf(“frameNr?%d?%d?%d\n“frameNrpacketNrpacket->size);
int?offset=0?len=0;
double?timestamp?=?(packet->timestamp-start_time)/1000.0/1000.0;
if?(DEBUG)?FFprintf(“time?%lld?%lld?%lf\n“packet->timestampstart_timetimestamp);

//?either?no?frames?are?specified?(capture?all)?or?we?have?time?specified
if?(stopTime)
{
if?(isAudio)
{
//?time?is?being?used...
if?(timestamp?>=?startTime)
{
//?if?we‘ve?reached?the?start...
offset?=?max(0((int)((startTime-ti

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????28788??2009-10-15?20:28??FFGrab.cpp
?????文件???????44571??2009-10-15?19:49??FFGrab.mexa64
?????文件???????42230??2009-10-15?20:06??FFGrab.mexglx
?????文件???????39196??2009-10-15?20:20??FFGrab.mexmac
?????文件???????42192??2009-10-15?20:20??FFGrab.mexmaci
?????文件???????39328??2009-10-15?20:20??FFGrab.mexmaci64
?????文件??????137998??2009-10-15?20:14??FFGrab.mexw32
?????文件??????756917??2009-11-12?19:11??FFGrab.mexw64
?????文件?????3077178??2009-05-18?18:37??avbin.dll
?????文件?????4660639??2009-05-19?18:44??avbin64.dll
?????文件?????9536816??2009-05-18?15:20??libavbin.dylib
?????文件?????4326671??2009-09-25?19:35??libavbin.so
?????文件?????4326470??2009-10-10?03:34??libavbin.so.32
?????文件?????3711574??2009-10-10?03:44??libavbin.so.64
?????文件???????10131??2007-07-28?02:24??mexDDGrab.cpp
?????文件???????77824??2008-10-13?14:36??mexDDGrab.dll
?????文件???????77824??2008-10-13?14:36??mexDDGrab.mexw32
?????文件??????106496??2008-04-28?19:12??mexDDGrab.mexw64
?????文件???????25976??2009-10-15?20:08??mmread.m
?????文件????????3205??2008-12-02?02:36??processframe.m
?????文件????????1313??2014-02-12?12:59??license.txt

評(píng)論

共有 條評(píng)論

相關(guān)資源