[MPlayer-cvslog] r37289 - in trunk/loader/dmo: DMO_VideoDecoder.c dmo.c

reimar subversion at mplayerhq.hu
Sat Sep 27 20:44:47 CEST 2014


Author: reimar
Date: Sat Sep 27 20:44:47 2014
New Revision: 37289

Log:
dmo: print messages to stderr instead of stdout.

Modified:
   trunk/loader/dmo/DMO_VideoDecoder.c
   trunk/loader/dmo/dmo.c

Modified: trunk/loader/dmo/DMO_VideoDecoder.c
==============================================================================
--- trunk/loader/dmo/DMO_VideoDecoder.c	Sat Sep 27 20:44:46 2014	(r37288)
+++ trunk/loader/dmo/DMO_VideoDecoder.c	Sat Sep 27 20:44:47 2014	(r37289)
@@ -178,7 +178,7 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open
 
 	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 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open
 	    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 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open
 
 	    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 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open
 		{
 		    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 @@ int DMO_VideoDecoder_DecodeInternal(DMO_
     {
         /* 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 @@ int DMO_VideoDecoder_DecodeInternal(DMO_
 						   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 @@ int DMO_VideoDecoder_SetDestFmt(DMO_Vide
     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));

Modified: trunk/loader/dmo/dmo.c
==============================================================================
--- trunk/loader/dmo/dmo.c	Sat Sep 27 20:44:46 2014	(r37288)
+++ trunk/loader/dmo/dmo.c	Sat Sep 27 20:44:47 2014	(r37289)
@@ -88,15 +88,15 @@ DMO_Filter* DMO_FilterCreate(const char*
             /* 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 @@ DMO_Filter* DMO_FilterCreate(const char*
     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;


More information about the MPlayer-cvslog mailing list