media: Remove debug.h, finalize MediaDebug.h

* Funny rust from 0 AD.
This commit is contained in:
Barrett17 2018-10-23 15:19:14 +02:00
parent a668e42088
commit b84955d416
62 changed files with 65 additions and 117 deletions

View File

@ -2,7 +2,7 @@
#define _MEDIA_DEBUG_OLD_H_
#ifndef DEBUG
#define DEBUG 1
#define DEBUG 0
#endif
#include <Debug.h>
@ -18,8 +18,8 @@
inline void PRINT(int level, const char *fmt, ...) { va_list ap; if (level > DEBUG) return; va_start(ap, fmt); vprintf(fmt, ap); va_end(ap); }
#define PRINT_FORMAT(_text, _fmt) do { char _buf[300]; string_for_format((_fmt), _buf, sizeof(_buf)); printf("%s %s\n", (_text), (_buf)); } while (0)
#define PRINT_INPUT(_text, _in) do { char _buf[300]; string_for_format((_in).format, _buf, sizeof(_buf)); printf("%s node(node %ld, port %ld); source(port %ld, id %ld); dest(port %ld, id %ld); fmt(%s); name(%s)\n", (_text), (_in).node.node, (_in).node.port, (_in).source.port, (_in).source.id, (_in).destination.port, (_in).destination.id, _buf, (_in).name); } while (0)
#define PRINT_OUTPUT(_text, _out) do { char _buf[300]; string_for_format((_out).format, _buf, sizeof(_buf)); printf("%s node(node %ld, port %ld); source(port %ld, id %ld); dest(port %ld, id %ld); fmt(%s); name(%s)\n", (_text), (_out).node.node, (_out).node.port, (_out).source.port, (_out).source.id, (_out).destination.port, (_out).destination.id, _buf, (_out).name); } while (0)
#define PRINT_INPUT(_text, _in) do { char _buf[300]; string_for_format((_in).format, _buf, sizeof(_buf)); printf("%s node(node %" B_PRId32 ", port %" B_PRId32 "); source(port %" B_PRId32 ", id %" B_PRId32 "); dest(port %" B_PRId32 ", id %" B_PRId32 "); fmt(%s); name(%s)\n", (_text), (_in).node.node, (_in).node.port, (_in).source.port, (_in).source.id, (_in).destination.port, (_in).destination.id, _buf, (_in).name); } while (0)
#define PRINT_OUTPUT(_text, _out) do { char _buf[300]; string_for_format((_out).format, _buf, sizeof(_buf)); printf("%s node(node %" B_PRId32 ", port %" B_PRId32 "); source(port %" B_PRId32 ", id %" B_PRId32 "); dest(port %" B_PRId32 ", id %" B_PRId32 "); fmt(%s); name(%s)\n", (_text), (_out).node.node, (_out).node.port, (_out).source.port, (_out).source.id, (_out).destination.port, (_out).destination.id, _buf, (_out).name); } while (0)
#if DEBUG >= 2
#define BROKEN() printf("BROKEN %s\n",__PRETTY_FUNCTION__)
@ -40,11 +40,11 @@
#define PRINT_FORMAT(_text, _fmt) ((void)0)
#define PRINT_INPUT(_text, _in) ((void)0)
#define PRINT_OUTPUT(_text, _out) ((void)0)
#define UNIMPLEMENTED() ((void)0)
#define UNIMPLEMENTED() printf("UNIMPLEMENTED %s\n",__PRETTY_FUNCTION__)
#define BROKEN() ((void)0)
#define CALLED() ((void)0)
#define PRINT(l, a...) ((void)0)
#define ERROR(a...) ((void)0)
#define ERROR(a...) fprintf(stderr, a)
#define TRACE(a...) ((void)0)
#endif

View File

@ -1,7 +1,7 @@
#ifndef _MEDIA_T_LIST_H
#define _MEDIA_T_LIST_H
#include "debug.h"
#include "MediaDebug.h"
template<class value> class List
{

View File

@ -2,7 +2,7 @@
#define _MEDIA_T_MAP_H
#include "debug.h"
#include "MediaDebug.h"
template<class key, class value> class Map
{

View File

@ -1,52 +0,0 @@
#ifndef _MEDIA_DEBUG_OLD_H_
#define _MEDIA_DEBUG_OLD_H_
#ifndef DEBUG
#define DEBUG 0
#endif
#include <Debug.h>
#include <stdio.h>
#undef TRACE
#undef PRINT
#if DEBUG > 0
#define UNIMPLEMENTED() printf("UNIMPLEMENTED %s\n",__PRETTY_FUNCTION__)
inline void ERROR(const char *fmt, ...) { va_list ap; va_start(ap, fmt); printf("### ERROR: "); vprintf(fmt, ap); va_end(ap); }
inline void PRINT(int level, const char *fmt, ...) { va_list ap; if (level > DEBUG) return; va_start(ap, fmt); vprintf(fmt, ap); va_end(ap); }
#define PRINT_FORMAT(_text, _fmt) do { char _buf[300]; string_for_format((_fmt), _buf, sizeof(_buf)); printf("%s %s\n", (_text), (_buf)); } while (0)
#define PRINT_INPUT(_text, _in) do { char _buf[300]; string_for_format((_in).format, _buf, sizeof(_buf)); printf("%s node(node %" B_PRId32 ", port %" B_PRId32 "); source(port %" B_PRId32 ", id %" B_PRId32 "); dest(port %" B_PRId32 ", id %" B_PRId32 "); fmt(%s); name(%s)\n", (_text), (_in).node.node, (_in).node.port, (_in).source.port, (_in).source.id, (_in).destination.port, (_in).destination.id, _buf, (_in).name); } while (0)
#define PRINT_OUTPUT(_text, _out) do { char _buf[300]; string_for_format((_out).format, _buf, sizeof(_buf)); printf("%s node(node %" B_PRId32 ", port %" B_PRId32 "); source(port %" B_PRId32 ", id %" B_PRId32 "); dest(port %" B_PRId32 ", id %" B_PRId32 "); fmt(%s); name(%s)\n", (_text), (_out).node.node, (_out).node.port, (_out).source.port, (_out).source.id, (_out).destination.port, (_out).destination.id, _buf, (_out).name); } while (0)
#if DEBUG >= 2
#define BROKEN() printf("BROKEN %s\n",__PRETTY_FUNCTION__)
#define TRACE printf
#else
#define BROKEN() ((void)0)
#define TRACE(a...) ((void)0)
#endif
#if DEBUG >= 3
#define CALLED() printf("CALLED %s\n",__PRETTY_FUNCTION__)
#else
#define CALLED() ((void)0)
#endif
#else
#define PRINT_FORMAT(_text, _fmt) ((void)0)
#define PRINT_INPUT(_text, _in) ((void)0)
#define PRINT_OUTPUT(_text, _out) ((void)0)
#define UNIMPLEMENTED() printf("UNIMPLEMENTED %s\n",__PRETTY_FUNCTION__)
#define BROKEN() ((void)0)
#define CALLED() ((void)0)
#define PRINT(l, a...) ((void)0)
#define ERROR(a...) fprintf(stderr, a)
#define TRACE(a...) ((void)0)
#endif
#endif /* _MEDIA_DEBUG_H_ */

View File

@ -23,7 +23,7 @@
#include <image.h>
#include <Path.h>
#include "debug.h"
#include "MediaDebug.h"
#include "FormatManager.h"
#include "MetaFormat.h"

View File

@ -37,7 +37,7 @@
#include <AppMisc.h>
#include <MediaDefs.h>
#include "debug.h"
#include "MediaDebug.h"
#include "DataExchange.h"
#include "SharedBufferList.h"

View File

@ -12,7 +12,7 @@
#include <Buffer.h>
#include "debug.h"
#include "MediaDebug.h"
namespace BPrivate {

View File

@ -39,7 +39,7 @@
#include <Buffer.h>
#include <TimeSource.h>
#include <debug.h>
#include <MediaDebug.h>
#include <MediaMisc.h>
#include <DataExchange.h>

View File

@ -32,7 +32,7 @@
#include <Buffer.h>
#include "debug.h"
#include "MediaDebug.h"
#include "DataExchange.h"
#include "SharedBufferList.h"

View File

@ -10,7 +10,7 @@
#include <BufferGroup.h>
#include <BufferProducer.h>
#include "debug.h"
#include "MediaDebug.h"
#include "DataExchange.h"
#include "MediaMisc.h"

View File

@ -10,7 +10,7 @@
#include <stdlib.h>
#include <string.h>
#include "debug.h"
#include "MediaDebug.h"
// #pragma mark -

View File

@ -41,7 +41,7 @@
#include <Roster.h>
#include <TimeSource.h>
#include <debug.h>
#include <MediaDebug.h>
#include <DataExchange.h>
#include <Notifications.h>

View File

@ -12,7 +12,7 @@
#include <Messenger.h>
#include <OS.h>
#include <debug.h>
#include <MediaDebug.h>
#include <MediaMisc.h>

View File

@ -22,7 +22,7 @@
#include <TextControl.h>
#include <Window.h>
#include "debug.h"
#include "MediaDebug.h"
using namespace BPrivate;

View File

@ -56,7 +56,7 @@
#include <Entry.h>
#include <Path.h>
#include <debug.h>
#include <MediaDebug.h>
#include <MediaMisc.h>
#include <ServerInterface.h>
#include <DataExchange.h>

View File

@ -10,7 +10,7 @@
*
*/
#include "debug.h"
#include "MediaDebug.h"
#include "DataExchange.h"
#include <string.h>
#include <FileInterface.h>

View File

@ -17,7 +17,7 @@
#include <Autolock.h>
#include "debug.h"
#include "MediaDebug.h"
#define TIMEOUT 5000000LL

View File

@ -32,7 +32,7 @@
#include <string.h>
#include <stdlib.h>
#include <new>
#include "debug.h"
#include "MediaDebug.h"
#include "DataExchange.h"

View File

@ -7,7 +7,7 @@
#include <DecoderPlugin.h>
#include <new>
#include "PluginManager.h"
#include "debug.h"
#include "MediaDebug.h"
/*************************************************************
* public BMediaDecoder

View File

@ -28,7 +28,7 @@
#include "AddOnManager.h"
#include "DataExchange.h"
#include "debug.h"
#include "MediaDebug.h"
#include "MediaMisc.h"
#include "MediaRosterEx.h"

View File

@ -14,7 +14,7 @@
#include <new>
#include "debug.h"
#include "MediaDebug.h"
/*************************************************************
* public BMediaEncoder

View File

@ -33,7 +33,7 @@
#include <scheduler.h>
#include <Buffer.h>
#include <ServerInterface.h>
#include "debug.h"
#include "MediaDebug.h"
/*************************************************************
* protected BMediaEventLooper

View File

@ -16,7 +16,7 @@
#include <Autolock.h>
#include "ChunkCache.h"
#include "debug.h"
#include "MediaDebug.h"
#include "PluginManager.h"

View File

@ -15,7 +15,7 @@
#include <MediaTrack.h>
#include <Url.h>
#include "debug.h"
#include "MediaDebug.h"
#include "MediaExtractor.h"
#include "MediaStreamer.h"

View File

@ -12,7 +12,7 @@
#include <AppMisc.h>
#include <DataExchange.h>
#include <debug.h>
#include <MediaDebug.h>
const char BMediaFiles::B_SOUNDS[] = "Sounds";

View File

@ -12,7 +12,7 @@
#include "DataExchange.h"
#include "FormatManager.h"
#include "MetaFormat.h"
#include "debug.h"
#include "MediaDebug.h"
#include <MediaFormats.h>
#include <ObjectList.h>

View File

@ -41,7 +41,7 @@
#include <string.h>
#include "DataExchange.h"
#include "debug.h"
#include "MediaDebug.h"
#include "MediaMisc.h"
#include "MediaRosterEx.h"
#include "Notifications.h"

View File

@ -61,7 +61,7 @@ char __dont_remove_copyright_from_binary[] = "Copyright (c) 2002-2006 Marcus "
#include <AppMisc.h>
#include <DataExchange.h>
#include <debug.h>
#include <MediaDebug.h>
#include <DormantNodeManager.h>
#include <MediaMisc.h>
#include <MediaRosterEx.h>

View File

@ -9,7 +9,7 @@
#include <stdio.h>
#include <string.h>
#include "debug.h"
#include "MediaDebug.h"
#include "PluginManager.h"

View File

@ -9,7 +9,7 @@
#include "DefaultMediaTheme.h"
#include "debug.h"
#include "MediaDebug.h"
#include <MediaTheme.h>
#include <StringView.h>

View File

@ -13,7 +13,7 @@
#include <Autolock.h>
#include "debug.h"
#include "MediaDebug.h"
#include "PluginManager.h"

View File

@ -44,7 +44,7 @@
#include <AppMisc.h>
#include "debug.h"
#include "MediaDebug.h"
#include "DataExchange.h"

View File

@ -23,7 +23,7 @@
#include <MediaRoster.h>
#include "DataExchange.h"
#include "debug.h"
#include "MediaDebug.h"
#include "MediaMisc.h"

View File

@ -9,7 +9,7 @@
#include <Entry.h>
#include <PlaySound.h>
#include "debug.h"
#include "MediaDebug.h"
sound_handle play_sound(const entry_ref *soundRef,
bool mix,

View File

@ -18,7 +18,7 @@
#include "AddOnManager.h"
#include "PluginManager.h"
#include "DataExchange.h"
#include "debug.h"
#include "MediaDebug.h"
PluginManager gPluginManager;

View File

@ -21,7 +21,7 @@
#include <Buffer.h>
#include <Locker.h>
#include <debug.h>
#include <MediaDebug.h>
#include <DataExchange.h>

View File

@ -12,7 +12,7 @@
#include "TrackReader.h"
#include <debug.h>
#include <MediaDebug.h>
#include <new>
#include <string.h>

View File

@ -9,7 +9,7 @@
#include <string.h>
#include "debug.h"
#include "MediaDebug.h"
/*************************************************************
* public BSoundFile

View File

@ -20,7 +20,7 @@
#include <TimeSource.h>
#include <MediaRoster.h>
#include "debug.h"
#include "MediaDebug.h"
#define SEND_NEW_BUFFER_EVENT (BTimedEventQueue::B_USER_EVENT + 1)

View File

@ -21,7 +21,7 @@
#include "SoundPlayNode.h"
#include "debug.h"
#include "MediaDebug.h"
// Flags used internally in BSoundPlayer

View File

@ -4,7 +4,7 @@
* DESCR: Handles all TimeCode functions.
***********************************************************************/
#include <TimeCode.h>
#include "debug.h"
#include "MediaDebug.h"
#include <string.h>
status_t us_to_timecode(bigtime_t micros, int * hours, int * minutes, int * seconds, int * frames, const timecode_info * code)

View File

@ -14,7 +14,7 @@
#include <string.h>
#include "debug.h"
#include "MediaDebug.h"
#include "DataExchange.h"
#include "ServerInterface.h"
#include "TimeSourceObject.h"

View File

@ -18,7 +18,7 @@
#include <OS.h>
#include <MediaMisc.h>
#include <debug.h>
#include <MediaDebug.h>
#include "TimeSourceObjectManager.h"

View File

@ -16,7 +16,7 @@
#include <Autolock.h>
#include <MediaRoster.h>
#include <debug.h>
#include <MediaDebug.h>
#include <MediaMisc.h>
#include "TimeSourceObject.h"

View File

@ -7,7 +7,7 @@
#include <TimedEventQueue.h>
#include <string.h>
#include "TimedEventQueuePrivate.h"
#include "debug.h"
#include "MediaDebug.h"
/*************************************************************
* struct media_timed_event

View File

@ -40,7 +40,7 @@
#include "TimedEventQueuePrivate.h"
#include "Debug.h"
#include "debug.h"
#include "MediaDebug.h"
_event_queue_imp::_event_queue_imp() :
fLock(new BLocker("BTimedEventQueue locker")),

View File

@ -10,7 +10,7 @@
#include <MediaDefs.h>
#include <Locker.h>
#include "debug.h"
#include "MediaDebug.h"
struct _event_queue_imp
{

View File

@ -37,7 +37,7 @@
#include <MediaFile.h>
#include <string.h>
#include "TrackReader.h"
#include "debug.h"
#include "MediaDebug.h"
namespace BPrivate
{

View File

@ -10,7 +10,7 @@
#include <string.h>
#include "debug.h"
#include "MediaDebug.h"
#define TIMEOUT_QUANTA 100000

View File

@ -12,7 +12,7 @@
#include "MediaClientNode.h"
#include "debug.h"
#include "MediaDebug.h"
namespace BPrivate { namespace media {

View File

@ -8,7 +8,7 @@
#include <string.h>
#include "debug.h"
#include "MediaDebug.h"
media_client_id

View File

@ -13,7 +13,7 @@
#include <string.h>
#include "debug.h"
#include "MediaDebug.h"
#define B_NEW_BUFFER (BTimedEventQueue::B_USER_EVENT + 1)

View File

@ -9,7 +9,7 @@
#include "MediaClientNode.h"
#include "debug.h"
#include "MediaDebug.h"
BMediaConnection::BMediaConnection(media_connection_kinds kinds,

View File

@ -5,7 +5,7 @@
#include <SimpleMediaClient.h>
#include <debug.h>
#include <MediaDebug.h>
BSimpleMediaClient::BSimpleMediaClient(const char* name,

View File

@ -5,7 +5,7 @@
* All return codes are guessed!!! (void most times means it's still wrong)
***********************************************************************/
#include <MediaTrack.h>
#include "debug.h"
#include "MediaDebug.h"
#if 0
// SoundPlay 4.8 is evil, uses undocumented media kit API

View File

@ -12,7 +12,7 @@
#include "OldAudioModule.h"
#include <debug.h>
#include <MediaDebug.h>
/*************************************************************

View File

@ -12,7 +12,7 @@
#include "OldAudioStream.h"
#include <debug.h>
#include <MediaDebug.h>
/*************************************************************

View File

@ -12,7 +12,7 @@
#include "OldBufferStream.h"
#include <debug.h>
#include <MediaDebug.h>
#include <new>

View File

@ -12,7 +12,7 @@
#include "OldBufferStreamManager.h"
#include <debug.h>
#include <MediaDebug.h>
/*************************************************************

View File

@ -12,7 +12,7 @@
#include "OldMediaModule.h"
#include <debug.h>
#include <MediaDebug.h>
/*************************************************************

View File

@ -12,7 +12,7 @@
#include "OldSubscriber.h"
#include "debug.h"
#include "MediaDebug.h"
/*************************************************************

View File

@ -12,7 +12,7 @@
#include <Locker.h>
#include <DataExchange.h>
#include <debug.h>
#include <MediaDebug.h>
namespace BPrivate {