st/vdpau: remove unnecessary tracing and adjust tracing levels a bit
authorChristian König <deathsimple@vodafone.de>
Fri, 10 Feb 2012 11:34:22 +0000 (12:34 +0100)
committerChristian König <deathsimple@vodafone.de>
Tue, 21 Feb 2012 10:13:11 +0000 (11:13 +0100)
Tracing function entry/exits is a bit pointless
when VDPAU_TRACE=1 does the same thing.

v2: use WARN instead of ERR for application problems

Signed-off-by: Christian König <deathsimple@vodafone.de>
src/gallium/state_trackers/vdpau/decode.c
src/gallium/state_trackers/vdpau/device.c
src/gallium/state_trackers/vdpau/mixer.c
src/gallium/state_trackers/vdpau/output.c
src/gallium/state_trackers/vdpau/presentation.c
src/gallium/state_trackers/vdpau/query.c
src/gallium/state_trackers/vdpau/surface.c

index de9835f5847b877ec5dbedc69a23441a30139896..c45abb81799433bd4892da917e7f9a35bd1dc684 100644 (file)
@@ -50,8 +50,6 @@ vlVdpDecoderCreate(VdpDevice device,
    VdpStatus ret;
    bool supported;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating decoder\n");
-
    if (!decoder)
       return VDP_STATUS_INVALID_POINTER;
    *decoder = 0;
@@ -104,8 +102,6 @@ vlVdpDecoderCreate(VdpDevice device,
       goto error_handle;
    }
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Decoder created succesfully\n");
-
    return VDP_STATUS_OK;
 
 error_handle:
@@ -125,8 +121,6 @@ vlVdpDecoderDestroy(VdpDecoder decoder)
 {
    vlVdpDecoder *vldecoder;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying decoder\n");
-
    vldecoder = (vlVdpDecoder *)vlGetDataHTAB(decoder);
    if (!vldecoder)
       return VDP_STATUS_INVALID_HANDLE;
@@ -149,8 +143,6 @@ vlVdpDecoderGetParameters(VdpDecoder decoder,
 {
    vlVdpDecoder *vldecoder;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Decoder get parameters called\n");
-
    vldecoder = (vlVdpDecoder *)vlGetDataHTAB(decoder);
    if (!vldecoder)
       return VDP_STATUS_INVALID_HANDLE;
@@ -403,8 +395,6 @@ vlVdpDecoderRender(VdpDecoder decoder,
       struct pipe_h264_picture_desc h264;
    } desc;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Decoding\n");
-
    if (!(picture_info && bitstream_buffers))
       return VDP_STATUS_INVALID_POINTER;
 
index cc49bd470dfb74bbad3c1a1fbe0efbb8bf1ca91c..7b23863d120b1fb4abf9fe256a84080cde8fbf26 100644 (file)
@@ -79,7 +79,6 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
    vl_compositor_init(&dev->compositor, dev->context->pipe);
 
    *get_proc_address = &vlVdpGetProcAddress;
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Device created succesfully\n");
 
    return VDP_STATUS_OK;
 
@@ -105,8 +104,6 @@ vlVdpPresentationQueueTargetCreateX11(VdpDevice device, Drawable drawable,
    vlVdpPresentationQueueTarget *pqt;
    VdpStatus ret;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating PresentationQueueTarget\n");
-
    if (!drawable)
       return VDP_STATUS_INVALID_HANDLE;
 
@@ -142,8 +139,6 @@ vlVdpPresentationQueueTargetDestroy(VdpPresentationQueueTarget presentation_queu
 {
    vlVdpPresentationQueueTarget *pqt;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying PresentationQueueTarget\n");
-
    pqt = vlGetDataHTAB(presentation_queue_target);
    if (!pqt)
       return VDP_STATUS_INVALID_HANDLE;
@@ -160,8 +155,6 @@ vlVdpPresentationQueueTargetDestroy(VdpPresentationQueueTarget presentation_queu
 VdpStatus
 vlVdpDeviceDestroy(VdpDevice device)
 {
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying device\n");
-
    vlVdpDevice *dev = vlGetDataHTAB(device);
    if (!dev)
       return VDP_STATUS_INVALID_HANDLE;
@@ -173,8 +166,6 @@ vlVdpDeviceDestroy(VdpDevice device)
    FREE(dev);
    vlDestroyHTAB();
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Device destroyed successfully\n");
-
    return VDP_STATUS_OK;
 }
 
index 3a879281a7b77199d257a4490e25bc1b62b2bb6a..f1c5a57d33e0a72307caa5b4cf48698e2070d53e 100644 (file)
@@ -52,8 +52,6 @@ vlVdpVideoMixerCreate(VdpDevice device,
    unsigned max_width, max_height, i;
    enum pipe_video_profile prof = PIPE_VIDEO_PROFILE_UNKNOWN;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating VideoMixer\n");
-
    vlVdpDevice *dev = vlGetDataHTAB(device);
    if (!dev)
       return VDP_STATUS_INVALID_HANDLE;
@@ -128,19 +126,19 @@ vlVdpVideoMixerCreate(VdpDevice device,
    }
    ret = VDP_STATUS_INVALID_VALUE;
    if (vmixer->max_layers > 4) {
-      VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Max layers > 4 not supported\n", vmixer->max_layers);
+      VDPAU_MSG(VDPAU_WARN, "[VDPAU] Max layers > 4 not supported\n", vmixer->max_layers);
       goto no_params;
    }
    max_width = screen->get_video_param(screen, prof, PIPE_VIDEO_CAP_MAX_WIDTH);
    max_height = screen->get_video_param(screen, prof, PIPE_VIDEO_CAP_MAX_HEIGHT);
    if (vmixer->video_width < 48 ||
        vmixer->video_width > max_width) {
-      VDPAU_MSG(VDPAU_TRACE, "[VDPAU] 48 < %u < %u not valid for width\n", vmixer->video_width, max_width);
+      VDPAU_MSG(VDPAU_WARN, "[VDPAU] 48 < %u < %u not valid for width\n", vmixer->video_width, max_width);
       goto no_params;
    }
    if (vmixer->video_height < 48 ||
        vmixer->video_height > max_height) {
-      VDPAU_MSG(VDPAU_TRACE, "[VDPAU] 48 < %u < %u  not valid for height\n", vmixer->video_height, max_height);
+      VDPAU_MSG(VDPAU_WARN, "[VDPAU] 48 < %u < %u  not valid for height\n", vmixer->video_height, max_height);
       goto no_params;
    }
    vmixer->luma_key_min = 0.f;
@@ -164,8 +162,6 @@ vlVdpVideoMixerDestroy(VdpVideoMixer mixer)
 {
    vlVdpVideoMixer *vmixer;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying VideoMixer\n");
-
    vmixer = vlGetDataHTAB(mixer);
    if (!vmixer)
       return VDP_STATUS_INVALID_HANDLE;
index cca69c4373eb60fbf57d9528dba16286b5312238..17ce0373dbaa2d234ee0a0054774aef51183216f 100644 (file)
@@ -51,7 +51,6 @@ vlVdpOutputSurfaceCreate(VdpDevice device,
 
    vlVdpOutputSurface *vlsurface = NULL;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating output surface\n");
    if (!(width && height))
       return VDP_STATUS_INVALID_SIZE;
 
@@ -127,8 +126,6 @@ vlVdpOutputSurfaceDestroy(VdpOutputSurface surface)
 {
    vlVdpOutputSurface *vlsurface;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying output surface\n");
-
    vlsurface = vlGetDataHTAB(surface);
    if (!vlsurface)
       return VDP_STATUS_INVALID_HANDLE;
@@ -152,8 +149,6 @@ vlVdpOutputSurfaceGetParameters(VdpOutputSurface surface,
 {
    vlVdpOutputSurface *vlsurface;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Getting output surface parameters\n");
-        
    vlsurface = vlGetDataHTAB(surface);
    if (!vlsurface)
       return VDP_STATUS_INVALID_HANDLE;
@@ -218,8 +213,6 @@ vlVdpOutputSurfacePutBitsIndexed(VdpOutputSurface surface,
    struct pipe_box box;
    struct pipe_video_rect dst_rect;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Uploading indexed output surface\n");
-
    vlsurface = vlGetDataHTAB(surface);
    if (!vlsurface)
       return VDP_STATUS_INVALID_HANDLE;
@@ -455,8 +448,6 @@ vlVdpOutputSurfaceRenderOutputSurface(VdpOutputSurface destination_surface,
 
    void *blend;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Composing output surfaces\n");
-
    dst_vlsurface = vlGetDataHTAB(destination_surface);
    if (!dst_vlsurface)
       return VDP_STATUS_INVALID_HANDLE;
index 25a6c861115d78601e073e6b2ac0c519ed4ab097..13025d2115664f3a5f68c04f4b73e1f0c43325cd 100644 (file)
@@ -47,8 +47,6 @@ vlVdpPresentationQueueCreate(VdpDevice device,
    vlVdpPresentationQueue *pq = NULL;
    VdpStatus ret;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating PresentationQueue\n");
-
    if (!presentation_queue)
       return VDP_STATUS_INVALID_POINTER;
 
@@ -99,8 +97,6 @@ vlVdpPresentationQueueDestroy(VdpPresentationQueue presentation_queue)
 {
    vlVdpPresentationQueue *pq;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Destroying PresentationQueue\n");
-
    pq = vlGetDataHTAB(presentation_queue);
    if (!pq)
       return VDP_STATUS_INVALID_HANDLE;
@@ -123,8 +119,6 @@ vlVdpPresentationQueueSetBackgroundColor(VdpPresentationQueue presentation_queue
    vlVdpPresentationQueue *pq;
    union pipe_color_union color;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Setting background color\n");
-
    if (!background_color)
       return VDP_STATUS_INVALID_POINTER;
 
@@ -152,8 +146,6 @@ vlVdpPresentationQueueGetBackgroundColor(VdpPresentationQueue presentation_queue
    vlVdpPresentationQueue *pq;
    union pipe_color_union color;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Getting background color\n");
-
    if (!background_color)
       return VDP_STATUS_INVALID_POINTER;
 
@@ -181,8 +173,6 @@ vlVdpPresentationQueueGetTime(VdpPresentationQueue presentation_queue,
    vlVdpPresentationQueue *pq;
    struct timespec ts;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Getting queue time\n");
-
    if (!current_time)
       return VDP_STATUS_INVALID_POINTER;
 
@@ -266,7 +256,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
 
       sprintf(cmd, "xwd -id %d -out vdpau_frame_%08d.xwd", (int)pq->drawable, ++framenum);
       if (system(cmd) != 0)
-         VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Dumping surface %d failed.\n", surface);
+         VDPAU_MSG(VDPAU_ERR, "[VDPAU] Dumping surface %d failed.\n", surface);
    }
 
    pipe_surface_reference(&drawable_surface, NULL);
index 8bb2078e0a50fa76a4917654c0f32d3359bd86ae..c5f7037594abe63fc50d7b2452ca14377e686ff1 100644 (file)
@@ -72,8 +72,6 @@ vlVdpVideoSurfaceQueryCapabilities(VdpDevice device, VdpChromaType surface_chrom
    struct pipe_screen *pscreen;
    uint32_t max_2d_texture_level;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpVideoSurface capabilities\n");
-
    if (!(is_supported && max_width && max_height))
       return VDP_STATUS_INVALID_POINTER;
 
@@ -111,8 +109,6 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp
    vlVdpDevice *dev;
    struct pipe_screen *pscreen;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpVideoSurface get/put bits YCbCr capabilities\n");
-
    if (!is_supported)
       return VDP_STATUS_INVALID_POINTER;
 
@@ -146,8 +142,6 @@ vlVdpDecoderQueryCapabilities(VdpDevice device, VdpDecoderProfile profile,
    struct pipe_screen *pscreen;
    enum pipe_video_profile p_profile;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpDecoder capabilities\n");
-
    if (!(is_supported && max_level && max_macroblocks && max_width && max_height))
       return VDP_STATUS_INVALID_POINTER;
 
@@ -192,8 +186,6 @@ vlVdpOutputSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba
    struct pipe_screen *pscreen;
    enum pipe_format format;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpOutputSurface capabilities\n");
-
    dev = vlGetDataHTAB(device);
    if (!dev)
       return VDP_STATUS_INVALID_HANDLE;
@@ -238,8 +230,6 @@ VdpStatus
 vlVdpOutputSurfaceQueryGetPutBitsNativeCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format,
                                                     VdpBool *is_supported)
 {
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpOutputSurface get/put bits native capabilities\n");
-
    if (!is_supported)
       return VDP_STATUS_INVALID_POINTER;
 
@@ -257,8 +247,6 @@ vlVdpOutputSurfaceQueryPutBitsIndexedCapabilities(VdpDevice device,
                                                   VdpColorTableFormat color_table_format,
                                                   VdpBool *is_supported)
 {
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpOutputSurface put bits indexed capabilities\n");
-
    if (!is_supported)
       return VDP_STATUS_INVALID_POINTER;
 
@@ -274,8 +262,6 @@ vlVdpOutputSurfaceQueryPutBitsYCbCrCapabilities(VdpDevice device, VdpRGBAFormat
                                                 VdpYCbCrFormat bits_ycbcr_format,
                                                 VdpBool *is_supported)
 {
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpOutputSurface put bits YCbCr capabilities\n");
-
    if (!is_supported)
       return VDP_STATUS_INVALID_POINTER;
 
@@ -289,8 +275,6 @@ VdpStatus
 vlVdpBitmapSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format,
                                     VdpBool *is_supported, uint32_t *max_width, uint32_t *max_height)
 {
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Querying VdpBitmapSurface capabilities\n");
-
    if (!(is_supported && max_width && max_height))
       return VDP_STATUS_INVALID_POINTER;
 
index 5774a8378ae5ff532aa1fc252281262f6b6ec894..84467fdc0d237d07cbc5cbc8ea4e5a9f0ef7f374 100644 (file)
@@ -48,8 +48,6 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type,
    vlVdpSurface *p_surf;
    VdpStatus ret;
 
-   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Creating a surface\n");
-
    if (!(width && height)) {
       ret = VDP_STATUS_INVALID_SIZE;
       goto inv_size;