changeset 37193:82a15e343f94

dmo: print messages to stderr instead of stdout.
author reimar
date Sat, 27 Sep 2014 18:44:47 +0000
parents 277b0288b0f9
children d773c8901dd8
files loader/dmo/DMO_VideoDecoder.c loader/dmo/dmo.c
diffstat 2 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/loader/dmo/DMO_VideoDecoder.c	Sat Sep 27 18:44:46 2014 +0000
+++ b/loader/dmo/DMO_VideoDecoder.c	Sat Sep 27 18:44:47 2014 +0000
@@ -178,7 +178,7 @@
 
 	if (!this->m_pDMO_Filter)
 	{
-	    printf("Failed to create DMO filter\n");
+	    fprintf(stderr, "Failed to create DMO filter\n");
 	    return 0;
 	}
 
@@ -190,7 +190,7 @@
 	    result = this->m_pDMO_Filter->m_pMedia->vt->SetOutputType(this->m_pDMO_Filter->m_pMedia, 0, &this->m_sDestType, DMO_SET_TYPEF_TEST_ONLY);
 	    if (result)
 	    {
-		printf("Decoder does not support upside-down RGB frames\n");
+		fprintf(stderr, "Decoder does not support upside-down RGB frames\n");
 		this->iv.m_obh.biHeight *= -1;
 		this->m_sVhdr2->bmiHeader.biHeight = this->iv.m_obh.biHeight;
 	    }
@@ -220,7 +220,7 @@
 
 	    this->m_Caps = CAP_NONE;
 
-	    printf("Decoder supports the following formats: ");
+	    fprintf(stderr, "Decoder supports the following formats: ");
 	    for (c = check; c->bits; c++)
 	    {
 		this->m_sVhdr2->bmiHeader.biBitCount = c->bits;
@@ -232,16 +232,16 @@
 		{
 		    this->m_Caps = (this->m_Caps | c->cap);
 		    if (c->name)
-			printf("%s ", c->name);
+			fprintf(stderr, "%s ", c->name);
 		    else
-			printf("%.4s ", (char*) &c->fcc);
+			fprintf(stderr, "%.4s ", (char*) &c->fcc);
 		}
 	    }
-	    printf("\n");
+	    fprintf(stderr, "\n");
 	}
 
 	if (this->m_Caps != CAP_NONE)
-	    printf("Decoder is capable of YUV output (flags 0x%x)\n", (int)this->m_Caps);
+	    fprintf(stderr, "Decoder is capable of YUV output (flags 0x%x)\n", (int)this->m_Caps);
 
 	this->m_sVhdr2->bmiHeader.biBitCount = 24;
 	this->m_sVhdr2->bmiHeader.biCompression = 0;
@@ -326,9 +326,9 @@
     {
         /* something for process */
 	if (result != S_FALSE)
-	    printf("ProcessInputError  r:0x%x=%d (keyframe: %d)\n", result, result, is_keyframe);
+	    fprintf(stderr, "ProcessInputError  r:0x%x=%d (keyframe: %d)\n", result, result, is_keyframe);
 	else
-	    printf("ProcessInputError  FALSE ?? (keyframe: %d)\n", is_keyframe);
+	    fprintf(stderr, "ProcessInputError  FALSE ?? (keyframe: %d)\n", is_keyframe);
 	return size;
     }
 
@@ -342,9 +342,9 @@
 						   1, &db, &status);
     //m_pDMO_Filter->m_pMedia->vt->Lock(m_pDMO_Filter->m_pMedia, 0);
     if ((unsigned)result == DMO_E_NOTACCEPTING)
-	printf("ProcessOutputError: Not accepting\n");
+	fprintf(stderr, "ProcessOutputError: Not accepting\n");
     else if (result)
-	printf("ProcessOutputError: r:0x%x=%d  %ld  stat:%ld\n", result, result, status, db.dwStatus);
+	fprintf(stderr, "ProcessOutputError: r:0x%x=%d  %ld  stat:%ld\n", result, result, status, db.dwStatus);
 
     ((IMediaBuffer*)db.pBuffer)->vt->Release((IUnknown*)db.pBuffer);
 
@@ -516,9 +516,9 @@
     if (result != 0)
     {
 	if (csp)
-	    printf("Warning: unsupported color space\n");
+	    fprintf(stderr, "Warning: unsupported color space\n");
 	else
-	    printf("Warning: unsupported bit depth\n");
+	    fprintf(stderr, "Warning: unsupported bit depth\n");
 
 	this->m_sDestType.lSampleSize = this->iv.m_decoder.biSizeImage;
 	memcpy(&(this->m_sVhdr2->bmiHeader), &this->iv.m_decoder, sizeof(this->iv.m_decoder));
--- a/loader/dmo/dmo.c	Sat Sep 27 18:44:46 2014 +0000
+++ b/loader/dmo/dmo.c	Sat Sep 27 18:44:47 2014 +0000
@@ -88,15 +88,15 @@
             /* query for some extra available interface */
 	    HRESULT r = object->vt->QueryInterface(object, &IID_IMediaObjectInPlace, (void*)&This->m_pInPlace);
             if (r == 0 && This->m_pInPlace)
-		printf("DMO dll supports InPlace - PLEASE REPORT to developer\n");
+		fprintf(stderr, "DMO dll supports InPlace - PLEASE REPORT to developer\n");
 	    r = object->vt->QueryInterface(object, &IID_IDMOVideoOutputOptimizations, (void*)&This->m_pOptim);
 	    if (r == 0 && This->m_pOptim)
 	    {
                 unsigned long flags;
 		r = This->m_pOptim->vt->QueryOperationModePreferences(This->m_pOptim, 0, &flags);
-		printf("DMO dll supports VO Optimizations %ld %lx\n", r, flags);
+		fprintf(stderr, "DMO dll supports VO Optimizations %ld %lx\n", r, flags);
 		if (flags & DMO_VOSF_NEEDS_PREVIOUS_SAMPLE)
-		    printf("DMO dll might use previous sample when requested\n");
+		    fprintf(stderr, "DMO dll might use previous sample when requested\n");
 	    }
 	}
 	object->vt->Release((IUnknown*)object);
@@ -159,7 +159,7 @@
     if (em)
     {
         DMO_Filter_Destroy(This);
-	printf("IMediaObject ERROR: %p  %s (0x%lx : %ld)\n", em, em ? em : "", hr, hr);
+	fprintf(stderr, "IMediaObject ERROR: %p  %s (0x%lx : %ld)\n", em, em ? em : "", hr, hr);
 	This = 0;
     }
     return This;