Skip to content

Commit

Permalink
feat(iafpacket): add setProtected api
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Jun 11, 2020
1 parent d745c3c commit 8ff9bf0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions framework/base/media/AVAFPacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ class AVAFPacket : public IAFPacket {
return mIsProtected;
}

void setProtected() override
{
mIsProtected = true;
}

std::unique_ptr<IAFPacket> clone() override;

int64_t getSize() override;
Expand Down
1 change: 1 addition & 0 deletions framework/base/media/IAFPacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class CICADA_CPLUS_EXTERN IAFPacket {
{
return false;
}
virtual void setProtected() = 0;

packetInfo &getInfo();

Expand Down
3 changes: 3 additions & 0 deletions framework/base/media/subTitlePacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class subTitlePacket : public IAFPacket {

int64_t getSize() override;

void setProtected() override
{}

private:
uint8_t *mpBuffer{};
int64_t mSize;
Expand Down

0 comments on commit 8ff9bf0

Please sign in to comment.