From 4da4784afa15541671d1afb7e3883f81eb3c3ce6 Mon Sep 17 00:00:00 2001 From: Marcus Overhagen Date: Fri, 17 Dec 2010 22:35:44 +0000 Subject: [PATCH] added come debugging code git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39884 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../media/media-add-ons/dvb/MediaFormat.cpp | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/add-ons/media/media-add-ons/dvb/MediaFormat.cpp b/src/add-ons/media/media-add-ons/dvb/MediaFormat.cpp index 80aaed9f3d..e14b190e6d 100644 --- a/src/add-ons/media/media-add-ons/dvb/MediaFormat.cpp +++ b/src/add-ons/media/media-add-ons/dvb/MediaFormat.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2007 Marcus Overhagen + * Copyright (c) 2004-2010 Marcus Overhagen * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -56,13 +56,22 @@ GetHeaderFormatAc3Audio(media_format *out_format, const uint8 *header, size_t si BMediaFormats formats; status = formats.InitCheck(); - if (status) + if (status) { + printf("formats.InitCheck failed, error %lu\n", status); return status; + } - return formats.GetFormatFor(desc, out_format); + status = formats.GetFormatFor(desc, out_format); + if (status) { + printf("formats.GetFormatFor failed, error %lu\n", status); + return status; + } + + return B_OK; } + static status_t GetHeaderFormatDtsAudio(media_format *out_format, const uint8 *header, size_t size) { @@ -99,12 +108,16 @@ GetHeaderFormatMpegAudio(media_format *out_format, const uint8 *header, size_t s BMediaFormats formats; status = formats.InitCheck(); - if (status) + if (status) { + printf("formats.InitCheck failed, error %lu\n", status); return status; + } status = formats.GetFormatFor(desc, out_format); - if (status) + if (status) { + printf("formats.GetFormatFor failed, error %lu\n", status); return status; + } out_format->u.encoded_audio.output.frame_rate = 48000; out_format->u.encoded_audio.output.channel_count = 2; @@ -125,10 +138,18 @@ GetHeaderFormatMpegVideo(media_format *out_format, const uint8 *header, size_t s BMediaFormats formats; status = formats.InitCheck(); - if (status) + if (status) { + printf("formats.InitCheck failed, error %lu\n", status); return status; + } - return formats.GetFormatFor(desc, out_format); + status = formats.GetFormatFor(desc, out_format); + if (status) { + printf("formats.GetFormatFor failed, error %lu\n", status); + return status; + } + + return B_OK; } @@ -170,4 +191,3 @@ GetHeaderFormat(media_format *out_format, const void *header, size_t size, int s } return status; } -