OSDN Git Service

implement PesPacket in Utils
[tsremuxcpp/developing01.git] / src / Utils.h
index 9c039cb..9f276bc 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <string>
 #include <list>
+#include <vector>
 #include <stdexcept>
 // #include "BlueMux.h"
 #include "tsremuxcpp_define.h"
@@ -372,23 +373,26 @@ class PesHeader {
 class PesPacket {
  public:
   PesPacket(byte* buff, int offset, int length, ushort pid);
-  bool Priority;
+  bool GetPriority(void);
+  void SetPriority(bool priority);
   byte* GetData(void);
   byte* GetPayload(void);
   byte GetByte(int i);
   void SetByte(byte dat);
-  ushort PID;
-  bool Complete;
-  PesHeader GetHeader(void);
-  void AddData(std::list<byte> moredata);
+  ushort GetPID(void);
+  void SetPID(ushort id);
+  bool GetComplete(void);
+  void SetComplete(bool value);
+  PesHeader* GetHeader(void);
+  void AddData(std::vector<byte> moredata);
   void AddData(byte* buff, int offset, int length);
   byte BaseId;
   byte ExtendedId;
   UInt32 ExtendedType;
  private:
-  std::list<byte> data;
-  ushort pid;
-  bool priority;
+  std::vector<byte> mData;
+  bool mPriority;
+  ushort mPID;
 };
 
 class VC1SequenceInfo {