Skip to content

Commit

Permalink
removing extra comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mantissa committed Oct 30, 2015
1 parent c8f59f3 commit c915b11
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/DSUncompressedSampleGrabber.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ ULONG CBaseFilter::NonDelegatingRelease(void)
DSUncompressedSampleGrabber::DSUncompressedSampleGrabber(IUnknown * pOuter, HRESULT * phr, BOOL ModifiesData)
: CVideoTransformFilter(FILTERNAME, (IUnknown*)pOuter, CLSID_SampleGrabber) {
callback = NULL;
printf("DSUncompressedSampleGrabber()\n");
//printf("DSUncompressedSampleGrabber()\n");
}

DSUncompressedSampleGrabber::~DSUncompressedSampleGrabber() {
callback = NULL;
}

CUnknown *WINAPI DSUncompressedSampleGrabber::CreateInstance(LPUNKNOWN punk, HRESULT *phr) {
printf("CreateInstance()\n");
//printf("CreateInstance()\n");
HRESULT hr;
if (!phr)
phr = &hr;
Expand Down Expand Up @@ -70,11 +70,11 @@ HRESULT STDMETHODCALLTYPE DSUncompressedSampleGrabber::SetMediaType(const AM_MED
HRESULT DSUncompressedSampleGrabber::SetMediaType(PIN_DIRECTION direction, const CMediaType *pmt)
{

printf("SetMediaType()\n");
printf("major type %i, subtype %i\n", pmt->majortype, pmt->subtype);
printf("matching major type %i, matching subtype %i\n", (pmt->majortype == MEDIATYPE_Video), pmt->subtype == MEDIASUBTYPE_Avi);
printf("formattype %i\n", pmt->formattype == FORMAT_VideoInfo);
printf("cbformat %i, null %i\n", pmt->cbFormat >= sizeof(VIDEOINFOHEADER), pmt->pbFormat != NULL);
//printf("SetMediaType()\n");
//printf("major type %i, subtype %i\n", pmt->majortype, pmt->subtype);
//printf("matching major type %i, matching subtype %i\n", (pmt->majortype == MEDIATYPE_Video), pmt->subtype == MEDIASUBTYPE_Avi);
//printf("formattype %i\n", pmt->formattype == FORMAT_VideoInfo);
//printf("cbformat %i, null %i\n", pmt->cbFormat >= sizeof(VIDEOINFOHEADER), pmt->pbFormat != NULL);

HRESULT hr = S_OK;

Expand Down Expand Up @@ -160,17 +160,17 @@ HRESULT DSUncompressedSampleGrabber::Transform(IMediaSample * pIn, IMediaSample

HRESULT DSUncompressedSampleGrabber::CheckTransform(const CMediaType* mtIn, const CMediaType* mtOut){

printf("DSUncompressedSampleGrabber::CheckTransform\n");
//printf("DSUncompressedSampleGrabber::CheckTransform\n");

if (mtIn->formattype == FORMAT_VideoInfo){

printf("FORMAT_VideoInfo\n");
//printf("FORMAT_VideoInfo\n");

//VIDEOINFOHEADER2 * vih2 = (VIDEOINFOHEADER*)mtIn->Format();

BITMAPINFOHEADER * pbih = &((VIDEOINFOHEADER*)mtIn->Format())->bmiHeader;

printf("Dim %i %i\n", (int)pbih->biWidth, (int)pbih->biHeight);
//printf("Dim %i %i\n", (int)pbih->biWidth, (int)pbih->biHeight);


}
Expand All @@ -188,7 +188,7 @@ HRESULT DSUncompressedSampleGrabber::DecideBufferSize(IMemAllocator *pAlloc, ALL
ASSERT(pProperties);
HRESULT hr = NOERROR;

printf("sample size %i\n", m_pInput->CurrentMediaType().GetSampleSize());
//printf("sample size %i\n", m_pInput->CurrentMediaType().GetSampleSize());

pProperties->cBuffers = 1;
pProperties->cbBuffer = 1; // 1920 * 1080 * 4;
Expand Down Expand Up @@ -288,7 +288,7 @@ HRESULT STDMETHODCALLTYPE DSUncompressedSampleGrabber::GetCurrentSample(IMediaSa

HRESULT STDMETHODCALLTYPE DSUncompressedSampleGrabber::SetCallback(ISampleGrabberCB *pCallback, long WhichMethodToCallback)
{
printf("SetCallback()\n");
//printf("SetCallback()\n");
this->pCallback = pCallback;

return S_OK;
Expand Down
7 changes: 7 additions & 0 deletions src/DSUncompressedSampleGrabber.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ class DSUncompressedSampleGrabber : public CVideoTransformFilter, public ISample
HRESULT DecideBufferSize(IMemAllocator * pAlloc, ALLOCATOR_PROPERTIES * pProperties);
HRESULT GetMediaType(int iPosition, CMediaType * pMediaType);

/*
STDMETHODIMP_(ULONG) Release(){
delete this;
return 0;
}
*/

HRESULT STDMETHODCALLTYPE SetOneShot(BOOL OneShot);
HRESULT STDMETHODCALLTYPE SetMediaType(const AM_MEDIA_TYPE *pType);
HRESULT STDMETHODCALLTYPE GetConnectedMediaType(AM_MEDIA_TYPE *pType);
Expand Down

0 comments on commit c915b11

Please sign in to comment.