Beispiel #1
0
        /// <summary>
        /// Convert this AVC444v2BitmapStream to RFX_AVC444V2_BITMAP_STREAM
        /// </summary>
        public RFX_AVC444V2_BITMAP_STREAM To_RFX_AVC444V2_BITMAP_STREAM()
        {
            RFX_AVC420_BITMAP_STREAM stream1 = null;

            if (AVC420EncodedBitstream1 != null)
            {
                stream1 = AVC420EncodedBitstream1.To_RFX_AVC420_BITMAP_STREAM();
            }
            RFX_AVC420_BITMAP_STREAM stream2 = null;

            if (AVC420EncodedBitstream2 != null)
            {
                stream2 = AVC420EncodedBitstream2.To_RFX_AVC420_BITMAP_STREAM();
            }
            return(new RFX_AVC444V2_BITMAP_STREAM((AVC444LCValue)LCCode, stream1, stream2));
        }
 public RFX_AVC444_BITMAP_STREAM(AVC444LCValue lc, RFX_AVC420_BITMAP_STREAM avc420EncodedBitstream1, RFX_AVC420_BITMAP_STREAM avc420EncodedBitstream2)
 {
     this.LC = lc;
     this.avc420EncodedBitstream1 = avc420EncodedBitstream1;
     this.avc420EncodedBitstream2 = avc420EncodedBitstream2;
 }
        /// <summary>
        /// Send bitmap data in H264 AVC444 codec
        /// </summary>
        /// <param name="sId">This is used to indicate the target surface id</param>
        /// <param name="pixFormat">This is used to indicate the pixel format to fill target surface.</param>
        /// <param name="bmRect">The rectangle of whole Image</param>
        /// <param name="lcValue">Code specifies how data is encoded in the avc420EncodedBitstream1 and avc420EncodedBitstream2 fields</param>
        /// <param name="stream1NumRects">Number of rects of avc420EncodedBitstream1</param>
        /// <param name="steam1RegionRects">Rect list of avc420EncodedBitstream1</param>
        /// <param name="stream1QuantQualityVals">Quality list of avc420EncodedBitstream1</param>
        /// <param name="avc420EncodedBitstream1">encoded H264 AVC420 data stream of avc420EncodedBitstream1</param>
        /// <param name="stream2NumRects">Number of rects of avc420EncodedBitstream2</param>
        /// <param name="steam2RegionRects">Rect list of avc420EncodedBitstream2</param>
        /// <param name="stream2QuantQualityVals">Quality list of avc420EncodedBitstream2</param>
        /// <param name="avc420EncodedBitstream2">encoded H264 AVC420 data stream of avc420EncodedBitstream2</param>
        /// <param name="baseImage">Base Image used to verify output</param>
        /// <returns></returns>
        public uint SendImageWithH264AVC444Codec(ushort sId, PixelFormat pixFormat, RDPGFX_RECT16 bmRect, AVC444LCValue lcValue,
            uint stream1NumRects, RDPGFX_RECT16[] steam1RegionRects, RDPGFX_AVC420_QUANT_QUALITY[] stream1QuantQualityVals, byte[] avc420EncodedBitstream1,
            uint stream2NumRects, RDPGFX_RECT16[] steam2RegionRects, RDPGFX_AVC420_QUANT_QUALITY[] stream2QuantQualityVals, byte[] avc420EncodedBitstream2,
            Image baseImage)
        {
            uint fid = MakeStartFramePdu();
            RFX_AVC420_METABLOCK avc420MetaData = new RFX_AVC420_METABLOCK();
            avc420MetaData.numRegionRects = stream1NumRects;
            avc420MetaData.regionRects = steam1RegionRects;
            avc420MetaData.quantQualityVals = stream1QuantQualityVals;
            RFX_AVC420_BITMAP_STREAM avc420Stream1 = new RFX_AVC420_BITMAP_STREAM(avc420MetaData, avc420EncodedBitstream1);

            RFX_AVC420_BITMAP_STREAM avc420Stream2 = null;
            if (stream2NumRects != 0 && avc420EncodedBitstream2 != null)
            {
                avc420MetaData = new RFX_AVC420_METABLOCK();
                avc420MetaData.numRegionRects = stream2NumRects;
                avc420MetaData.regionRects = steam2RegionRects;
                avc420MetaData.quantQualityVals = stream2QuantQualityVals;
                avc420Stream2 = new RFX_AVC420_BITMAP_STREAM(avc420MetaData, avc420EncodedBitstream2);
            }

            RFX_AVC444_BITMAP_STREAM avc444Stream = new RFX_AVC444_BITMAP_STREAM(lcValue, avc420Stream1, avc420Stream2);
            MakeWireToSurfacePdu1(sId, CodecType.RDPGFX_CODECID_AVC444, pixFormat, bmRect, avc444Stream.Encode());
            MakeEndFramePdu(fid);

            PackAndSendServerPdu();

            if (this.bcgrAdapter.SimulatedScreen != null)
            {
                if (baseImage == null)
                {
                    Site.Assume.Inconclusive("Cannot verify the output since base image is not find, check the existance and format of BaseImage element in test data file.");
                }
                this.bcgrAdapter.SimulatedScreen.RenderUncompressedImage(sId, baseImage, bmRect.left, bmRect.top);
            }

            return fid;
        }
        /// <summary>
        /// Send bitmap data in H264 AVC420 codec
        /// </summary>
        /// <param name="sId">This is used to indicate the target surface id</param>
        /// <param name="pixFormat">This is used to indicate the pixel format to fill target surface.</param>
        /// <param name="bmRect">The rectangle of whole Image</param>
        /// <param name="avc420BitmapStream">A RFX_AVC420_BITMAP_STREAM structure for encoded information</param>
        /// <param name="baseImage">Base Image used to verify output</param>
        /// <returns></returns>
        public uint SendImageWithH264AVC420Codec(ushort sId, PixelFormat pixFormat, RDPGFX_RECT16 bmRect, RFX_AVC420_BITMAP_STREAM avc420BitmapStream, Image baseImage)
        {
            uint fid = MakeStartFramePdu();
            MakeWireToSurfacePdu1(sId, CodecType.RDPGFX_CODECID_AVC420, pixFormat, bmRect, avc420BitmapStream.Encode());
            MakeEndFramePdu(fid);
            PackAndSendServerPdu();

            if (this.bcgrAdapter.SimulatedScreen != null)
            {
                if (baseImage == null)
                {
                    Site.Assume.Inconclusive("Cannot verify the output since base image is not find, check the existance and format of BaseImage element in test data file.");
                }
                this.bcgrAdapter.SimulatedScreen.RenderUncompressedImage(sId, baseImage, bmRect.left, bmRect.top);
            }

            return fid;
        }
Beispiel #5
0
 public RFX_AVC444V2_BITMAP_STREAM(AVC444LCValue lc, RFX_AVC420_BITMAP_STREAM avc420EncodedBitstream1, RFX_AVC420_BITMAP_STREAM avc420EncodedBitstream2)
 {
     this.LC = lc;
     this.avc420EncodedBitstream1 = avc420EncodedBitstream1;
     this.avc420EncodedBitstream2 = avc420EncodedBitstream2;
 }