Skip to content
Permalink
Browse files
8247947: Build DirectShow Samples (Base Classes) from source checked …
…into repo

Reviewed-by: kcr, arapte
  • Loading branch information
Alexander Matveev committed Jun 30, 2020
1 parent 527cc2b commit 62f8cee7cfaaf60cd56518b0a9a577bd81682edf
Showing with 38,677 additions and 11 deletions.
  1. +1 −9 build.gradle
  2. +111 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/amextra.cpp
  3. +56 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/amextra.h
  4. +5,358 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/amfilter.cpp
  5. +1,587 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/amfilter.h
  6. +275 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/amvideo.cpp
  7. +360 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/arithutil.cpp
  8. +38 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/baseclasses.sln
  9. +826 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/baseclasses.vcproj
  10. +74 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/cache.h
  11. +120 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/checkbmi.h
  12. +265 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/combase.cpp
  13. +305 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/combase.h
  14. +383 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/cprop.cpp
  15. +95 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/cprop.h
  16. +2,541 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/ctlutil.cpp
  17. +923 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/ctlutil.h
  18. +129 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/ddmm.cpp
  19. +28 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/ddmm.h
  20. +367 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/dllentry.cpp
  21. +693 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/dllsetup.cpp
  22. +46 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/dllsetup.h
  23. +250 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/dxmperf.h
  24. +101 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/fourcc.h
  25. +222 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/measure.h
  26. +120 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/msgthrd.h
  27. +478 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/mtype.cpp
  28. +89 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/mtype.h
  29. +801 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/outputq.cpp
  30. +137 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/outputq.h
  31. +347 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/perflog.cpp
  32. +56 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/perflog.h
  33. +194 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/perfstruct.h
  34. +197 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/pstream.cpp
  35. +114 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/pstream.h
  36. +588 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/pullpin.cpp
  37. +152 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/pullpin.h
  38. +402 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/refclock.cpp
  39. +184 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/refclock.h
  40. +116 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/reftime.h
  41. +2,858 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/renbase.cpp
  42. +478 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/renbase.h
  43. +284 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/schedule.cpp
  44. +128 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/schedule.h
  45. +83 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/seekpt.cpp
  46. +30 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/seekpt.h
  47. +522 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/source.cpp
  48. +172 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/source.h
  49. +202 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/streams.h
  50. +402 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/strmctl.cpp
  51. +157 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/strmctl.h
  52. +74 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/sysclock.cpp
  53. +39 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/sysclock.h
  54. +1,016 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/transfrm.cpp
  55. +304 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/transfrm.h
  56. +974 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/transip.cpp
  57. +250 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/transip.h
  58. +746 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/videoctl.cpp
  59. +168 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/videoctl.h
  60. +468 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/vtrans.cpp
  61. +143 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/vtrans.h
  62. +2,081 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/winctrl.cpp
  63. +224 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/winctrl.h
  64. +2,746 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/winutil.cpp
  65. +419 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/winutil.h
  66. +1,474 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/wxdebug.cpp
  67. +359 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/wxdebug.h
  68. +891 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/wxlist.cpp
  69. +553 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/wxlist.h
  70. +769 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/wxutil.cpp
  71. +532 −0 modules/javafx.media/src/main/native/gstreamer/3rd_party/baseclasses/wxutil.h
  72. +1 −1 modules/javafx.media/src/main/native/gstreamer/projects/win/fxplugins/Makefile
  73. +1 −1 modules/javafx.media/src/main/native/vs_project/plugins/plugins.vcxproj
@@ -2862,15 +2862,7 @@ project(":media") {
"CC=${mediaProperties.compiler}", "AR=${mediaProperties.ar}", "LINKER=${mediaProperties.linker}")

if (t.name == "win") {
Map winEnv = new HashMap(WINDOWS_NATIVE_COMPILE_ENVIRONMENT)

String sdkDir = System.getenv("BASECLASSES_SDK_DIR");
if (sdkDir == null) {
sdkDir = "C:/Program Files/Microsoft SDKs/Windows/v7.1" // Default value
winEnv["BASECLASSES_SDK_DIR"] = sdkDir
}
environment(winEnv)

environment(WINDOWS_NATIVE_COMPILE_ENVIRONMENT)
args("RESOURCE=${nativeOutputDir}/${buildType}/${WIN.media.fxpluginsRcFile}")
}
}
@@ -0,0 +1,111 @@
//------------------------------------------------------------------------------
// File: AMExtra.cpp
//
// Desc: DirectShow base classes - implements CRenderedInputPin class.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------


#include <streams.h> // DirectShow base class definitions
#include <mmsystem.h> // Needed for definition of timeGetTime
#include <limits.h> // Standard data type limit definitions
#include <measure.h> // Used for time critical log functions

#include "amextra.h"

#pragma warning(disable:4355)

// Implements CRenderedInputPin class

CRenderedInputPin::CRenderedInputPin(__in_opt LPCTSTR pObjectName,
__in CBaseFilter *pFilter,
__in CCritSec *pLock,
__inout HRESULT *phr,
__in_opt LPCWSTR pName) :
CBaseInputPin(pObjectName, pFilter, pLock, phr, pName),
m_bAtEndOfStream(FALSE),
m_bCompleteNotified(FALSE)
{
}
#ifdef UNICODE
CRenderedInputPin::CRenderedInputPin(__in_opt LPCSTR pObjectName,
__in CBaseFilter *pFilter,
__in CCritSec *pLock,
__inout HRESULT *phr,
__in_opt LPCWSTR pName) :
CBaseInputPin(pObjectName, pFilter, pLock, phr, pName),
m_bAtEndOfStream(FALSE),
m_bCompleteNotified(FALSE)
{
}
#endif

// Flush end of stream condition - caller should do any
// necessary stream level locking before calling this

STDMETHODIMP CRenderedInputPin::EndOfStream()
{
HRESULT hr = CheckStreaming();

// Do EC_COMPLETE handling for rendered pins
if (S_OK == hr && !m_bAtEndOfStream) {
m_bAtEndOfStream = TRUE;
FILTER_STATE fs;
EXECUTE_ASSERT(SUCCEEDED(m_pFilter->GetState(0, &fs)));
if (fs == State_Running) {
DoCompleteHandling();
}
}
return hr;
}


// Called to complete the flush

STDMETHODIMP CRenderedInputPin::EndFlush()
{
CAutoLock lck(m_pLock);

// Clean up renderer state
m_bAtEndOfStream = FALSE;
m_bCompleteNotified = FALSE;

return CBaseInputPin::EndFlush();
}


// Notify of Run() from filter

HRESULT CRenderedInputPin::Run(REFERENCE_TIME tStart)
{
UNREFERENCED_PARAMETER(tStart);
m_bCompleteNotified = FALSE;
if (m_bAtEndOfStream) {
DoCompleteHandling();
}
return S_OK;
}


// Clear status on going into paused state

HRESULT CRenderedInputPin::Active()
{
m_bAtEndOfStream = FALSE;
m_bCompleteNotified = FALSE;
return CBaseInputPin::Active();
}


// Do stuff to deliver end of stream

void CRenderedInputPin::DoCompleteHandling()
{
ASSERT(m_bAtEndOfStream);
if (!m_bCompleteNotified) {
m_bCompleteNotified = TRUE;
m_pFilter->NotifyEvent(EC_COMPLETE, S_OK, (LONG_PTR)(IBaseFilter *)m_pFilter);
}
}

@@ -0,0 +1,56 @@
//------------------------------------------------------------------------------
// File: AMExtra.h
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------


#ifndef __AMEXTRA__
#define __AMEXTRA__

// Simple rendered input pin
//
// NOTE if your filter queues stuff before rendering then it may not be
// appropriate to use this class
//
// In that case queue the end of stream condition until the last sample
// is actually rendered and flush the condition appropriately

class CRenderedInputPin : public CBaseInputPin
{
public:

CRenderedInputPin(__in_opt LPCTSTR pObjectName,
__in CBaseFilter *pFilter,
__in CCritSec *pLock,
__inout HRESULT *phr,
__in_opt LPCWSTR pName);
#ifdef UNICODE
CRenderedInputPin(__in_opt LPCSTR pObjectName,
__in CBaseFilter *pFilter,
__in CCritSec *pLock,
__inout HRESULT *phr,
__in_opt LPCWSTR pName);
#endif

// Override methods to track end of stream state
STDMETHODIMP EndOfStream();
STDMETHODIMP EndFlush();

HRESULT Active();
HRESULT Run(REFERENCE_TIME tStart);

protected:

// Member variables to track state
BOOL m_bAtEndOfStream; // Set by EndOfStream
BOOL m_bCompleteNotified; // Set when we notify for EC_COMPLETE

private:
void DoCompleteHandling();
};

#endif // __AMEXTRA__

0 comments on commit 62f8cee

Please sign in to comment.