return write_pos;
}
+bool Demuxer::scanForVideo(UCHAR* buf, UINT len)
+{
+ UINT pos = 3;
+ UINT pattern;
+ if (len < 4) return false;
+ pattern = (buf[0] << 16) | (buf[1] << 8) | (buf[2]);
+ while (pos < len)
+ {
+ pattern = ((pattern & 0xFFFFFF) << 8) | buf[pos++];
+ if (pattern >= (0x100|PESTYPE_VID0) && pattern <= (0x100|PESTYPE_VIDMAX))
+ return true;
+ }
+ return false;
+}
+
bool* Demuxer::getmpAudioChannels()
{
return avail_mpaudchan;
// *static function*
static UINT stripAudio(UCHAR* buf, UINT len);
+ // Scan a buffer to see if video packets are present.
+ // Returns true if video exists; false if not.
+ // *static function*
+ static bool scanForVideo(UCHAR* buf, UINT len);
+
protected:
// General demuxer objects and status indicators
static Demuxer* instance;