Merged branch 'egfx' of github.com:awakecoding/FreeRDP into egfx
authorMike McDonald <Mike.McDonald@software.dell.com>
Fri, 4 Jul 2014 07:16:55 +0000 (03:16 -0400)
committerMike McDonald <Mike.McDonald@software.dell.com>
Fri, 4 Jul 2014 07:16:55 +0000 (03:16 -0400)
1  2 
libfreerdp/codec/h264.c

@@@ -213,7 -214,10 +214,14 @@@ void h264_context_reset(H264_CONTEXT* h
  
  H264_CONTEXT* h264_context_new(BOOL Compressor)
  {
++<<<<<<< HEAD
++      H264_CONTEXT* h264;
++=======
+       long status;
        H264_CONTEXT* h264;
+       SDecodingParam sDecParam;
+       static EVideoFormatType videoFormat = videoFormatI420;
++>>>>>>> 5c5386fe042de2a638a03e856afa3ec89f9d1a12
  
        h264 = (H264_CONTEXT*) calloc(1, sizeof(H264_CONTEXT));
  
        {
                h264->Compressor = Compressor;
  
++<<<<<<< HEAD
 +#ifdef WITH_OPENH264
++=======
+               WelsCreateDecoder(&h264->pDecoder);
+               if (!h264->pDecoder)
+               {
+                       printf("Failed to create OpenH264 decoder\n");
+                       goto EXCEPTION;
+               }
+               ZeroMemory(&sDecParam, sizeof(sDecParam));
+               sDecParam.iOutputColorFormat = videoFormatARGB;
+               status = (*h264->pDecoder)->Initialize(h264->pDecoder, &sDecParam);
+               if (status != 0)
+               {
+                       printf("Failed to initialize OpenH264 decoder (status=%ld)\n", status);
+                       goto EXCEPTION;
+               }
+               status = (*h264->pDecoder)->SetOption(h264->pDecoder, DECODER_OPTION_DATAFORMAT, &videoFormat);
+               if (status != 0)
++>>>>>>> 5c5386fe042de2a638a03e856afa3ec89f9d1a12
                {
 -                      printf("Failed to set data format option on OpenH264 decoder (status=%ld)\n", status);
 +                      static EVideoFormatType videoFormat = videoFormatI420;
 +
 +                      SDecodingParam sDecParam;
 +                      long status;
 +
 +                      WelsCreateDecoder(&h264->pDecoder);
 +
 +                      if (!h264->pDecoder)
 +                      {
 +                              printf("Failed to create OpenH264 decoder\n");
 +                              goto EXCEPTION;
 +                      }
 +
 +                      ZeroMemory(&sDecParam, sizeof(sDecParam));
 +                      sDecParam.iOutputColorFormat = videoFormatARGB;
 +                      status = (*h264->pDecoder)->Initialize(h264->pDecoder, &sDecParam);
 +                      if (status != 0)
 +                      {
 +                              printf("Failed to initialize OpenH264 decoder (status=%ld)\n", status);
 +                              goto EXCEPTION;
 +                      }
 +
 +                      status = (*h264->pDecoder)->SetOption(h264->pDecoder, DECODER_OPTION_DATAFORMAT, &videoFormat);
 +                      if (status != 0)
 +                      {
 +                              printf("Failed to set data format option on OpenH264 decoder (status=%ld)\n", status);
 +                      }
                }
 +#endif
                        
                h264_context_reset(h264);
        }