File indexing completed on 2025-01-18 10:04:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _Media_Packet_HeaderFile
0016 #define _Media_Packet_HeaderFile
0017
0018 #include <Standard_Transient.hxx>
0019 #include <Standard_Type.hxx>
0020
0021 struct AVPacket;
0022
0023
0024 class Media_Packet : public Standard_Transient
0025 {
0026 DEFINE_STANDARD_RTTIEXT(Media_Packet, Standard_Transient)
0027 public:
0028
0029
0030 Standard_EXPORT Media_Packet();
0031
0032
0033 Standard_EXPORT virtual ~Media_Packet();
0034
0035
0036 Standard_EXPORT void Unref();
0037
0038
0039 const AVPacket* Packet() const { return myPacket; }
0040
0041
0042 AVPacket* ChangePacket() { return myPacket; }
0043
0044
0045 Standard_EXPORT const uint8_t* Data() const;
0046
0047
0048 Standard_EXPORT uint8_t* ChangeData();
0049
0050
0051 Standard_EXPORT int Size() const;
0052
0053
0054 Standard_EXPORT int64_t Pts() const;
0055
0056
0057 Standard_EXPORT int64_t Dts() const;
0058
0059
0060 Standard_EXPORT int64_t Duration() const;
0061
0062
0063 double DurationSeconds() const { return myDurationSec; }
0064
0065
0066 void SetDurationSeconds (double theDurationSec) { myDurationSec = theDurationSec; }
0067
0068
0069 Standard_EXPORT int StreamIndex() const;
0070
0071
0072 Standard_EXPORT bool IsKeyFrame() const;
0073
0074
0075 Standard_EXPORT void SetKeyFrame();
0076
0077 protected:
0078
0079 AVPacket* myPacket;
0080 double myDurationSec;
0081
0082 };
0083
0084 #endif