return ((mData[5] & 0x3) > 0);
}
+/////////////////////////////
+/** implement MlpInfo **/
+/////////////////////////////
MlpInfo::MlpInfo(pByte data, int offset)
{
UInt32 marker = 0xffffffff;
return 0x00;
}
-// implement class AC3Info : ElementaryParse
+///////////////////////////////////
+/** implement class AC3Info **/
+///////////////////////////////////
readonly int AC3Info::len48k[] = {
128, 128, 160, 160, 192, 192, 224, 224,
256, 256, 320, 320, 384, 384, 448, 448,
return VF_Reserved;
}
-// implement class DtsInfo : ElementaryParse
+/////////////////////////////////
+/** implement class DtsInfo **/
+/////////////////////////////////
DtsInfo::DtsInfo(pByte data, int offset)
{
UInt32 marker = 0xffffffff;
return ret;
}
-/*
-byte DtsInfo::GetSamplingFrequency(void)
+byte DtsInfo::GetSampleFreq(void)
{
indicator = 34;
byte ret = 0;
ret <<= 1;
ret |= GetNextBit();
}
- return ret;
+ return (SamplingFrequency)ret;
}
-*/
bool DtsInfo::GetExtAudio(void)
{
return VF_Reserved;
}
+///////////////////////////////////
+/** implement class Mpeg2Info **/
+///////////////////////////////////
/*
-// implement class Mpeg2Info : ElementaryParse
Mpeg2Info::Mpeg2Info(void)
{
private class Mpeg2Ext : ElementaryParse
{
- public Mpeg2Ext(byte[] data, int offset)
- : base()
- {
- UInt32 marker = 0xffffffff;
- for (; offset < data.Length - 1; offset++)
- {
- marker = (UInt32)marker << 8;
- marker &= 0xffffff00;
- marker += data[offset];
- if (marker == Constants.MPEG2_SEQ_EXT)
- {
- if((data[offset + 1] & 0xf0) == 0x10)
- break;
- }
- }
- offset++;
- if (offset < data.Length)
- {
- // sequence header
- mData = new byte[data.Length - offset];
- for (int i = 0; offset < data.Length; i++, offset++)
- mData[i] = data[offset];
- }
- else
- mData = null;
- }
public override AspectRatio AspectRatio
{
{
get { throw new Exception("The method or operation is not implemented."); }
}
- public bool Progressive
- {
- get
- {
- indicator = 12;
- if (GetNextBit() == 1)
- return true;
- return false;
- }
}
+*/
Mpeg2Info::Mpeg2Info(pByte data, int offset)
{
mData = pByte(new byte[sizeof(data.get()) - offset]);
for(int i = 0; offset < sizeof(data.get()); i++, offset++)
mData[i] = data[offset];
- mpgext = new Mpeg2Ext(data, oldOffset);
+ mpgext = Mpeg2Ext(data, oldOffset);
}
else
mData.reset();
}
-Mpeg2Info::~Mpeg2Info(void)
-{
- delete mpgext;
-}
-
AspectRatio Mpeg2Info::GetAspectRatio(void)
{
switch (GetAspect())
bool Mpeg2Info::GetProgressive(void)
{
- if (mpgext.mValid() && mpgext.GetProgressive())
+ if (mpgext.mValid && mpgext.GetProgressive())
return true;
return false;
}
-*/
// implement class H264Info : ElementaryParse
H264Info::H264Info(pByte data, int offset)
return (ushort)(GetLength() - 13 - GetProgramDescriptorsLength());
}
-
-// implement class BluRayOutput
+//////////////////////////////////////
+/** implement class BluRayOutput **/
+//////////////////////////////////////
readonly byte BluRayOutput::index_bdmv[] = {
0x49, 0x4e, 0x44, 0x58, 0x30, 0x31, 0x30, 0x30, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x78,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
virtual SamplingFrequency GetSamplingFrequency(void);
virtual void SetSamplingFrequency(SamplingFrequency samplingFrequency);
virtual pByte GetElementaryDescriptors(void);
+ bool mValid;
protected:
byte GetNextBit(void);
pByte mData;
int indicator;
- bool mValid;
VideoFormat mVideoFormat;
FrameRate mFrameRate;
AspectRatio mAspectRatio;
AspectRatio GetAspectRatio(void);
FrameRate GetFrameRate(void);
AudioPresentationType GetAudioPresentationType(void);
- SamplingFrequency GetSamplingFrequency(void);
+ byte GetSampleFreq(void);
pByte GetElementaryDescriptors(void);
ushort GetFrameSize(void);
byte GetExtAudioId(void);
byte GetAmode(void);
- byte GetGetSamplingFrequency(void);
+ SamplingFrequency GetSamplingFrequency(void);
};
class MlpInfo : ElementaryParse {
byte GetFrameRateCode(void);
bool GetProgressive(void);
private:
- class Mpeg2Ext :ElementaryParse {
+ class Mpeg2Ext : public ElementaryParse {
public:
Mpeg2Ext(void);
- Mpeg2Ext(pByte data, int offset);
+ Mpeg2Ext(pByte data, int offset) {
+ UInt32 marker = 0xffffffff;
+ for (; offset < sizeof(data.get()) - 1; offset++)
+ {
+ marker = (UInt32)marker << 8;
+ marker &= 0xffffff00;
+ marker += data[offset];
+ if (marker == Constants::MPEG2_SEQ_EXT)
+ {
+ if((data[offset + 1] & 0xf0) == 0x10)
+ break;
+ }
+ }
+ offset++;
+ if (offset < sizeof(data.get()))
+ {
+ // sequence header
+ mData = pByte(new byte[sizeof(data.get()) - offset]);
+ for (int i = 0; offset < sizeof(data.get()); i++, offset++)
+ mData[i] = data[offset];
+ }
+ else
+ mData.reset();
+ };
AspectRatio GetAspectRatio(void);
AudioPresentationType GetAudioPresentationType(void);
pByte GetElementaryDescriptors(void);
FrameRate GetFrameRate(void);
SamplingFrequency GetSamplingFrequency(void);
VideoFormat GetVideoFormat(void);
- bool GetProgressive(void);
+ bool GetProgressive(void){
+ indicator = 12;
+ if (GetNextBit() == 1)
+ return true;
+ return false;
+ };
};
Mpeg2Ext mpgext;
};