2 * $Id: CompositionObject.h 3720 2011-09-12 00:30:00Z aleksoid $
4 * (C) 2006-2010 see AUTHORS
6 * This file is part of mplayerc.
8 * Mplayerc is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * Mplayerc is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #include "Rasterizer.h"
34 BYTE T
; // HDMV rule : 0 transparent, 255 opaque (compatible DirectX)
39 class CompositionObject
: Rasterizer
42 SHORT m_object_id_ref
;
44 bool m_object_cropped_flag
;
45 bool m_forced_on_flag
;
46 BYTE m_version_number
;
49 SHORT m_horizontal_position
;
50 SHORT m_vertical_position
;
54 SHORT m_cropping_horizontal_position
;
55 SHORT m_cropping_vertical_position
;
56 SHORT m_cropping_width
;
57 SHORT m_cropping_height
;
59 REFERENCE_TIME m_rtStart
;
60 REFERENCE_TIME m_rtStop
;
65 void SetRLEData(BYTE
* pBuffer
, int nSize
, int nTotalSize
);
66 void AppendRLEData(BYTE
* pBuffer
, int nSize
);
67 int GetRLEDataSize() {
68 return m_nRLEDataSize
;
70 bool IsRLEComplete() {
71 return m_nRLEPos
>= m_nRLEDataSize
;
73 void RenderHdmv(SubPicDesc
& spd
);
74 void RenderDvb(SubPicDesc
& spd
, SHORT nX
, SHORT nY
);
75 void WriteSeg (SubPicDesc
& spd
, SHORT nX
, SHORT nY
, SHORT nCount
, SHORT nPaletteIndex
);
76 void SetPalette (int nNbEntry
, HDMV_PALETTE
* pPalette
, bool bIsHD
);
77 void SetPalette (int nNbEntry
, DWORD
* dwColors
);
79 return m_nColorNumber
>0;
89 void DvbRenderField(SubPicDesc
& spd
, CGolombBuffer
& gb
, SHORT nXStart
, SHORT nYStart
, SHORT nLength
);
90 void Dvb2PixelsCodeString(SubPicDesc
& spd
, CGolombBuffer
& gb
, SHORT
& nX
, SHORT
& nY
);
91 void Dvb4PixelsCodeString(SubPicDesc
& spd
, CGolombBuffer
& gb
, SHORT
& nX
, SHORT
& nY
);
92 void Dvb8PixelsCodeString(SubPicDesc
& spd
, CGolombBuffer
& gb
, SHORT
& nX
, SHORT
& nY
);