diff options
author | Jochen Dolze <vdr@dolze.de> | 2010-05-25 19:23:47 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2010-05-25 19:23:47 +0200 |
commit | 4c668726b7de321f0411064dcb286ed6ad05a307 (patch) | |
tree | 4c7556b13b9042e3b4f3478d1a0dbc56f4392193 /command/video.cpp | |
parent | bfdd9d54165fc1d9897d71d8b9c94c32291e882c (diff) | |
download | vdr-plugin-markad-4c668726b7de321f0411064dcb286ed6ad05a307.tar.gz vdr-plugin-markad-4c668726b7de321f0411064dcb286ed6ad05a307.tar.bz2 |
Added Clear()-function to demuxer,paket classes
Added marks DelAll, DelTill functions
Diffstat (limited to 'command/video.cpp')
-rw-r--r-- | command/video.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/command/video.cpp b/command/video.cpp index 92c834d..03ecba5 100644 --- a/command/video.cpp +++ b/command/video.cpp @@ -34,8 +34,6 @@ cMarkAdLogo::cMarkAdLogo(MarkAdContext *maContext) GY[2][1] = -2; GY[2][2] = -1; - memset(&area,0,sizeof(area)); - LOGOHEIGHT=LOGO_DEFHEIGHT; if (maContext->Info.VPid.Type==MARKAD_PIDTYPE_VIDEO_H264) { @@ -46,11 +44,13 @@ cMarkAdLogo::cMarkAdLogo(MarkAdContext *maContext) LOGOWIDTH=LOGO_DEFWIDTH; } - area.status=UNINITIALIZED; + Clear(); } -cMarkAdLogo::~cMarkAdLogo() +void cMarkAdLogo::Clear() { + memset(&area,0,sizeof(area)); + area.status=UNINITIALIZED; } int cMarkAdLogo::Load(char *directory, char *file) @@ -409,6 +409,11 @@ cMarkAdBlackBordersHoriz::cMarkAdBlackBordersHoriz(MarkAdContext *maContext) { macontext=maContext; + Clear(); +} + +void cMarkAdBlackBordersHoriz::Clear() +{ borderstatus=UNINITIALIZED; borderiframe=-1; } @@ -527,14 +532,13 @@ cMarkAdVideo::cMarkAdVideo(MarkAdContext *maContext) { macontext=maContext; - aspectratio.Num=0; - aspectratio.Den=0; mark.Comment=NULL; mark.Position=0; mark.Type=0; hborder=new cMarkAdBlackBordersHoriz(maContext); logo = new cMarkAdLogo(maContext); + Clear(); } cMarkAdVideo::~cMarkAdVideo() @@ -544,6 +548,14 @@ cMarkAdVideo::~cMarkAdVideo() if (logo) delete logo; } +void cMarkAdVideo::Clear() +{ + aspectratio.Num=0; + aspectratio.Den=0; + if (hborder) hborder->Clear(); + if (logo) logo->Clear(); +} + void cMarkAdVideo::ResetMark() { if (mark.Comment) free(mark.Comment); |