📄 ihxtlogsystem.h
字号:
/* ***** BEGIN LICENSE BLOCK ***** * Source last modified: $Id: ihxtlogsystem.h,v 1.1.2.3 2004/07/09 01:45:13 hubbe Exp $ * * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. * * The contents of this file, and the files included with this file, * are subject to the current version of the RealNetworks Public * Source License (the "RPSL") available at * http://www.helixcommunity.org/content/rpsl unless you have licensed * the file under the current version of the RealNetworks Community * Source License (the "RCSL") available at * http://www.helixcommunity.org/content/rcsl, in which case the RCSL * will apply. You may also obtain the license terms directly from * RealNetworks. You may not use this file except in compliance with * the RPSL or, if you have a valid RCSL with RealNetworks applicable * to this file, the RCSL. Please see the applicable RPSL or RCSL for * the rights, obligations and limitations governing use of the * contents of the file. * * Alternatively, the contents of this file may be used under the * terms of the GNU General Public License Version 2 or later (the * "GPL") in which case the provisions of the GPL are applicable * instead of those above. If you wish to allow use of your version of * this file only under the terms of the GPL, and not to allow others * to use your version of this file under the terms of either the RPSL * or RCSL, indicate your decision by deleting the provisions above * and replace them with the notice and other provisions required by * the GPL. If you do not delete the provisions above, a recipient may * use your version of this file under the terms of any one of the * RPSL, the RCSL or the GPL. * * This file is part of the Helix DNA Technology. RealNetworks is the * developer of the Original Code and owns the copyrights in the * portions it created. * * This file, and the files included with this file, is distributed * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET * ENJOYMENT OR NON-INFRINGEMENT. * * Technology Compatibility Kit Test Suite(s) Location: * http://www.helixcommunity.org/content/tck * * Contributor(s): * * ***** END LICENSE BLOCK ***** */#ifndef IHXTLOGSYSTEM_H#define IHXTLOGSYSTEM_H#include "hlxclib/stdarg.h"enum EHXTLogCode{ // Producer log codes // // Messages that application end-users or // 3rd party SDK developers will see LC_APP_DIAG = 0x000000F0, // Less important/diagnostic messages (only interesting if something goes wrong) LC_APP_INFO = 0x7F000000, // Very important messages (always want to see these messages) LC_APP_WARN = 0x00FF0000, // There was a problem, but it was handled and everything is probably ok LC_APP_ERROR = 0x0000FF00, // There was a problem -- it wasn't handled // Messages that SDK users will see -- // ok to mention IHX/IHXT interfaces LC_SDK_DIAG = 0x000000F2, // Less important/diagnostic messages (only interesting if something goes wrong) LC_SDK_INFO = 0x7f000002, // Very important messages (always want to see these messages) LC_SDK_WARN = 0x00FF0002, // There was a problem, but it was handled and everything is probably ok LC_SDK_ERROR = 0x0000FF02, // There was a problem -- it wasn't handled // Messages that are only useful with the // corresponding source code -- ok to mention // internal classnames LC_DEV_DIAG = 0x000000F1, // Less important/diagnostic messages (only interesting if something goes wrong) LC_DEV_INFO = 0x7f000001, // Very important messages (always want to see these messages) LC_DEV_WARN = 0x00FF0001, // There was a problem, but it was handled and everything is probably ok LC_DEV_ERROR = 0x0000FF01, // There was a problem -- it wasn't handled // Client-related log codes LC_CLIENT_LEVEL1 = 0x00000001, LC_CLIENT_LEVEL2 = 0x00000002, LC_CLIENT_LEVEL3 = 0x00000004, LC_CLIENT_LEVEL4 = 0x00000008};enum EHXTLogCodeFilterMask{ SDK_MESSAGE_MASK = 0x00000002, DIAG_MESSAGE_MASK = 0x000000F0, ERROR_MESSAGE_MASK = 0x0000FF00, WARN_MESSAGE_MASK = 0x00FF0000, INFO_MESSAGE_MASK = 0x7F000000, CLIENT_MSGMASK_ALL = 0x0000000F, CLIENT_MSGMASK_L1_2 = 0x00000003, CLIENT_MSGMASK_L1_3 = 0x00000007};// Note: Only add new items to the end of the// list -- otherwise the FAs will get out of sync// with already compiled/released code and logmessages.xmlenum EHXTLogFuncArea{ // Producer-related functional areas NONE = 0, ACTIVEX, AUDCODEC, AUDPREFIL, BCAST, CAPTURE, CMDLINE, FILEOUT, FILEREAD, GUI, JOBFILE, LIC, POSFIL, REMOTE, FA_SDK_CONFIG, // SDK config objects (typically rmsession) FA_SDK_ENCODE, // SDK encoding (typically encpipeline, streammanager) FA_SDK_CORE, // RSCore, RSUtil, RSGraphManager stuff FA_GEN_FILTER, // Generic filter msgs STATS, VIDCODEC, VIDPREFIL, VIDRENDR, MEDIASAMPLES, PUB, // Client-related functional areas HXLOG_GENE = 0x47454E45, // Generic HXLOG_TRAN = 0x5452414E, // Transport HXLOG_ASMX = 0x41534D58, // ASM HXLOG_BAND = 0x42414E44, // Bandwidth manager HXLOG_AUDI = 0x41554449, // RealAudio HXLOG_VIDE = 0x56494445, // RealVideo HXLOG_PIXX = 0x50495858, // RealPix HXLOG_JPEG = 0x4A504547, // JPEG HXLOG_GIFX = 0x47494658, // GIF HXLOG_SWFX = 0x53574658, // Flash HXLOG_SMIL = 0x534D494C, // SMIL HXLOG_TURB = 0x54555242, // TurboPlay HXLOG_SITE = 0x53495445, // Site HXLOG_AUTO = 0x4155544F, // Auto-Update HXLOG_RECO = 0x5245434F, // Reconnect HXLOG_AUTH = 0x41555448, // Authentication HXLOG_CORE = 0x434F5245, // Core load time HXLOG_RTSP = 0x52545350, // RTSP HXLOG_STRE = 0x53545245, // Stream source map HXLOG_EVEN = 0x4556454E, // RealEvents HXLOG_BUFF = 0x42554646, // Buffer Control HXLOG_MP3X = 0x4D503358 // MP3};#include "hxtsmartpointer.h"/**************************************************************************** * * Interface: * * IHXTLogObserver * * Purpose: * * IID_IHXTLogObserver: * * This interface must be implemented by and object registering with the log * system to receive log messages. * * // {EA6ABCF4-66EB-11d4-931A-00D0B749DE42} * */DEFINE_GUID(IID_IHXTLogObserver, 0xea6abcf4, 0x66eb, 0x11d4, 0x93, 0x1a, 0x0, 0xd0, 0xb7, 0x49, 0xde, 0x42);#undef INTERFACE#define INTERFACE IHXTLogObserverDECLARE_INTERFACE_(IHXTLogObserver, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /************************************************************************ * Method: * IHXTLogObserverManager::OnEndService * Purpose: * The observer will receive this call as notification that the log system * is shutting down, and that all log messages have been delivered. * Parameters: * NONE * Returns: * Ignored. */ STDMETHOD(OnEndService) (THIS) PURE; /************************************************************************ * Method: * IHXTLogObserverManager::ReceiveMsg * Purpose: * Method called on an observer when a log message is sent to the log * system that passes the observers filter. * Parameters: * szNamespace - [in] The namespace used to qualify the functional area * and translated messge. * nCode - [in] The important level of the message. * unFuncArea - [in] numeric value used in the message as the functional area * szFuncArea - [in] The translated string for the numeric functional area, if * one was found. * nTimeStamp - [in] The time (in milliseconds since midnight, Jan.1, 1970) at * which the log message was sent to the log system. * nMsg - [in] The numeric value used to identify the message for translation. * szMsg - [in] The actual message text, either translation or the text sent * to the LogMessage method. * szJobName - [in] The name of the job from which the message originated. * Returns: * Ignored. */ STDMETHOD(ReceiveMsg) (THIS_ const char* /*IN*/ szNamespace, EHXTLogCode /*IN*/ nCode, UINT32 /*IN*/ unFuncArea, const char* /*IN*/ szFuncArea, INT32 /*IN*/ nTimeStamp, UINT32 /*IN*/ nMsg, const char* /*IN*/ szMsg, const char* /*IN*/ szJobName) PURE; };HXT_MAKE_SMART_PTR(IHXTLogObserver)/**************************************************************************** * * Interface: * * IHXTLogObserver2 * * Purpose: * * IID_IHXTLogObserver2: * * This interface must be implemented by an object registering with the log * system to receive log messages & support flusing. * * // {68AFE313-BE30-4b46-BFAD-6F035E624C8A} * */ // {68AFE313-BE30-4b46-BFAD-6F035E624C8A}DEFINE_GUID(IID_IHXTLogObserver2, 0x68afe313, 0xbe30, 0x4b46, 0xbf, 0xad, 0x6f, 0x3, 0x5e, 0x62, 0x4c, 0x8a);#undef INTERFACE#define INTERFACE IHXTLogObserverDECLARE_INTERFACE_(IHXTLogObserver2, IHXTLogObserver){ /************************************************************************ * Method: * IHXTLogObserver2::Flush
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -