Changeset 7305 in vbox for trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
- Timestamp:
- Mar 5, 2008 1:02:53 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r7302 r7305 62 62 do { \ 63 63 Log (("VBoxHeadless: ERROR: " m " [rc=0x%08X]\n", rc)); \ 64 RTPrintf ( m " (rc = 0x%08X)\n", rc); \64 RTPrintf ("%s", m); \ 65 65 } while (0) 66 66 … … 672 672 if (fFFMPEG) 673 673 { 674 int rrc = VINF_SUCCESS, rcc = S_OK; 675 674 676 Log2(("VBoxHeadless: loading VBoxFFmpegFB shared library\n")); 675 r c = RTLdrLoad("VBoxFFmpegFB", &hLdrFFmpegFB);676 677 if ( rc == VINF_SUCCESS)677 rrc = RTLdrLoad("VBoxFFmpegFB", &hLdrFFmpegFB); 678 679 if (RT_SUCCESS(rrc)) 678 680 { 679 681 Log2(("VBoxHeadless: looking up symbol VBoxRegisterFFmpegFB\n")); 680 rc = RTLdrGetSymbol(hLdrFFmpegFB, "VBoxRegisterFFmpegFB", 681 reinterpret_cast<void **>(&pfnRegisterFFmpegFB)); 682 683 if (rc == VINF_SUCCESS) 684 { 685 Log2(("VBoxHeadless: calling pfnRegisterFFmpegFB\n")); 686 rc = pfnRegisterFFmpegFB(ulFrameWidth, ulFrameHeight, ulBitRate, 687 pszMPEGFile, &pFramebuffer); 688 689 if (rc == S_OK) 690 { 691 Log2(("VBoxHeadless: Registering framebuffer\n")); 692 pFramebuffer->AddRef(); 693 display->RegisterExternalFramebuffer(pFramebuffer); 694 } 695 else 696 LogError("Failed to initialise video capturing - make sure that the file format\n" 697 "you wish to use is supported on your system\n", 1); 698 } 699 } 682 rrc = RTLdrGetSymbol(hLdrFFmpegFB, "VBoxRegisterFFmpegFB", 683 reinterpret_cast<void **>(&pfnRegisterFFmpegFB)); 684 if (RT_FAILURE(rrc)) 685 LogError("Failed to load the video capture extension, possibly due to a damaged file\n", rrc); 686 } 687 else 688 LogError("Failed to load the video capture extension\n", rrc); 689 if (RT_SUCCESS(rrc)) 690 { 691 Log2(("VBoxHeadless: calling pfnRegisterFFmpegFB\n")); 692 rcc = pfnRegisterFFmpegFB(ulFrameWidth, ulFrameHeight, ulBitRate, 693 pszMPEGFile, &pFramebuffer); 694 if (rcc != S_OK) 695 LogError("Failed to initialise video capturing - make sure that the file format\n" 696 "you wish to use is supported on your system\n", rcc); 697 } 698 if (RT_SUCCESS(rrc) && (S_OK == rcc)) 699 { 700 Log2(("VBoxHeadless: Registering framebuffer\n")); 701 pFramebuffer->AddRef(); 702 display->RegisterExternalFramebuffer(pFramebuffer); 703 } 704 if (!RT_SUCCESS(rrc) || (rcc != S_OK)) 705 rc = E_FAIL; 700 706 } 701 707 if (rc != S_OK) 702 708 { 703 LogError ("Failed to set up video capturing\n", 1);704 709 return -1; 705 710 }
Note:
See TracChangeset
for help on using the changeset viewer.