LCOV - code coverage report
Current view: top level - dom/media/ipc - MediaIPCUtils.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 17 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
       3             : /* This Source Code Form is subject to the terms of the Mozilla Public
       4             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       5             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       6             : 
       7             : #ifndef mozilla_dom_media_MediaIPCUtils_h
       8             : #define mozilla_dom_media_MediaIPCUtils_h
       9             : 
      10             : #include "ipc/IPCMessageUtils.h"
      11             : #include "mozilla/GfxMessageUtils.h"
      12             : #include "PlatformDecoderModule.h"
      13             : 
      14             : namespace IPC {
      15             :   template<>
      16             :   struct ParamTraits<mozilla::VideoInfo>
      17             :   {
      18             :     typedef mozilla::VideoInfo paramType;
      19             : 
      20           0 :     static void Write(Message* aMsg, const paramType& aParam)
      21             :     {
      22             :       // TrackInfo
      23           0 :       WriteParam(aMsg, aParam.mMimeType);
      24             : 
      25             :       // VideoInfo
      26           0 :       WriteParam(aMsg, aParam.mDisplay);
      27           0 :       WriteParam(aMsg, aParam.mStereoMode);
      28           0 :       WriteParam(aMsg, aParam.mImage);
      29           0 :       WriteParam(aMsg, aParam.ImageRect());
      30           0 :     }
      31             : 
      32           0 :     static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
      33             :     {
      34           0 :       nsIntRect imageRect;
      35           0 :       if (ReadParam(aMsg, aIter, &aResult->mMimeType) &&
      36           0 :           ReadParam(aMsg, aIter, &aResult->mDisplay) &&
      37           0 :           ReadParam(aMsg, aIter, &aResult->mStereoMode) &&
      38           0 :           ReadParam(aMsg, aIter, &aResult->mImage) &&
      39           0 :           ReadParam(aMsg, aIter, &imageRect)) {
      40           0 :         aResult->SetImageRect(imageRect);
      41           0 :         return true;
      42             :       }
      43           0 :       return false;
      44             :     }
      45             :   };
      46             : } // namespace IPC
      47             : 
      48             : #endif // mozilla_dom_media_MediaIPCUtils_h

Generated by: LCOV version 1.13