Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/Plugins/Input/in_dshow/header_mpg.h
2024-09-24 14:54:57 +02:00

43 lines
693 B
C++

#ifndef _HEADER_MPG_H
#define _HEADER_MPG_H
#include <stdio.h>
#include "Header.h"
class HeaderMpg : public Header
{
public:
HeaderMpg();
int getInfos(const wchar_t *filename, bool checkMetadata=false);
int video_bitrate,audio_bitrate;
private:
HANDLE fh;
int decodeHeader();
unsigned char buf[8192*8];
unsigned char *pbuf;
unsigned char *end;
int sync_packet() {
// sync packet:
while(1){
if(pbuf>=end) return 0;
if(pbuf[0]==0 && pbuf[1]==0 && pbuf[2]==1) break; // synced
pbuf++;
}
return 0x100|pbuf[3];
}
int mp3headerFromInt(unsigned long dwHdrBits);
int m_BitrateNdx;
int m_SampleRateNdx;
int m_Layer;
int m_Id;
int m_Mode;
int m_Idex;
};
#endif