modules/media/src/main/native/jfxmedia/MediaManagement/MediaManager.cpp

Print this page
rev 9520 : imported patch 9-cpu-1601.patch

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -32,10 +32,14 @@
 
 #include <platform/gstreamer/GstMediaManager.h>
 #include <Utils/JfxCriticalSection.h>
 #include <jfxmedia_errors.h>
 
+#if TARGET_OS_WIN32
+#include <Utils/win32/WinExceptionHandler.h>
+#endif
+
 CMediaManager::MMSingleton CMediaManager::s_Singleton;
 
 //*************************************************************************************************
 //********** Empty content types list in case PipelineFactory is not available.
 //*************************************************************************************************

@@ -72,10 +76,14 @@
 {
 #if ENABLE_PLATFORM_GSTREAMER
 #if !defined(TARGET_OS_WIN32) && !defined(TARGET_OS_MAC) && !defined(TARGET_OS_LINUX)
     return ERROR_OS_UNSUPPORTED;
 #else
+#if TARGET_OS_WIN32
+    SetExceptionHandler();
+#endif
+
     CGstMediaManager* pGstManager = new(nothrow) CGstMediaManager();
     if (NULL == pGstManager)
         return ERROR_MEMORY_ALLOCATION;
 
     if (ERROR_NONE != (pGstManager->m_uInternalError = pGstManager->Init()))