⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rmfftype.h

📁 linux下的一款播放器
💻 H
📖 第 1 页 / 共 4 页
字号:
/* ***** BEGIN LICENSE BLOCK ***** * Source last modified: $Id: rmfftype.h,v 1.5.8.4 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	PMC_PREDEFINED_TYPES#define	PMC_PREDEFINED_TYPEStypedef char*	pmc_string;struct buffer {	 UINT32	len;	 INT8*	data;};#endif/*PMC_PREDEFINED_TYPES*/// realvideo cooment...// one more RV comment.....#ifndef _RMFFTYPES_#define _RMFFTYPES_#if !(defined REAL_MEDIA_FILE_SERVER_PORT)#include "hxtypes.h"#else#include "machdep.h"#include "types.h"#endif /* !(defined REAL_MEDIA_FILE_SERVER_PORT) */#include <string.h>		// for memcpy's#include "rule2flg.h" // /For class RuleToFlagMap#if (!defined(_BEOS))#define int8	char#define int16	INT16#define int32	LONG32#endif#define u_int8	UCHAR#define u_int16 UINT16#define u_int32 ULONG32// Event stuff#define RAE_FILE_VERSION 2#define RAE_FILE_MAGIC_SIZE 5#define RAE_FILE_VERSION_SIZE 2     #define RAE_FILE_HEADER_SIZE (RAE_FILE_MAGIC_SIZE + RAE_FILE_VERSION_SIZE)#define RAE_EVENT_HEADER_SIZE (sizeof(ULONG32) + sizeof(ULONG32) + sizeof(UINT16))#define RA_MEDIA_DATA					0x4D444941		// 'MDIA'#define RA_EVENT_DATA					0x45564E54		//  'EVNT'#define RM_HEADER_OBJECT				0x2E524D46		// '.RMF' 	#define RMS_HEADER_OBJECT				0x2E524D53		// '.RMS' 	#define RM_PROPERTIES_OBJECT			0x50524F50		// 'PROP' 	#define RM_MEDIA_PROPERTIES_OBJECT		0x4D445052		// 'MDPR' 	#define RM_CONTENT_OBJECT				0x434F4E54		// 'CONT' 	#define RM_DATA_OBJECT					0x44415441		// 'DATA' 	#define RM_INDEX_OBJECT					0x494E4458		// 'INDX' 		// 'DATA' 	#define RM_MULTIHEADER_OBJECT				0x4D4C5449	// 'MLTI'#define RM_FILE_OBJECT_VERSION				0#define RM_PROPERTIES_OBJECT_VERSION		0#define RM_MEDIAPROPERTIES_OBJECT_VERSION	0#define RM_CONTENT_OBJECT_VERSION			0#define RM_DATA_OBJECT_VERSION				0#define RM_INDEX_OBJECT_VERSION				0#define RM_PACKET_OBJECT_VERSION			0#define RM_INDEXRECORD_OBJECT_VERSION		0#define HX_SAVE_ENABLED					0x0001#define HX_PERFECT_PLAY_ENABLED			0x0002#define HX_LIVE_BROADCAST				0x0004#define HX_MOBILE_PLAY_ENABLED			0x0008#if (defined( _WIN32 ) || defined( _WINDOWS )) && defined(_M_IX86)#pragma pack(1)//	disable warning on: zero-sized array in struct/union#pragma warning( disable : 4200 )#endif#ifdef _MACINTOSH// modify packing of VideoTypeSpecificData to match // hxcodec.h's packing of HX_FORMAT_VIDEO// cr grobbinsky cf rlovejoy#pragma options align=mac68k#endif#include "hxinline.h"class RMGenericHeader{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 10;}    UINT32	object_id;    UINT32	size;    UINT16	object_version;};typedef RMGenericHeader * RMGenericHeaderPtr;class RMFileHeader{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 18;}    UINT32	object_id;    UINT32	size;    UINT16	object_version;    UINT32	file_version;    UINT32	num_headers;};typedef RMFileHeader * RMFileHeaderPtr;class Properties{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 50;}    UINT32	object_id;    UINT32	size;    UINT16	object_version;    UINT32	max_bit_rate;    UINT32	avg_bit_rate;    UINT32	max_packet_size;    UINT32	avg_packet_size;    UINT32	num_interleave_packets;    UINT32	duration;    UINT32	preroll;    UINT32	index_offset;    UINT32	data_offset;    UINT16	num_streams;    UINT16	flags;};typedef Properties * PropertiesPtr;class MediaProperties{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 46;}    UINT32	object_id;    UINT32	size;    UINT16	object_version;    UINT16	stream_number;    UINT32	max_bit_rate;    UINT32	avg_bit_rate;    UINT32	max_packet_size;    UINT32	avg_packet_size;    UINT32	start_time;    UINT32	preroll;    UINT32	duration;    UINT8	stream_name_size;    UINT8	*stream_name;    UINT8	mime_type_size;    UINT8	*mime_type;    UINT32	type_specific_len;    UINT8	*type_specific_data;};typedef MediaProperties * MediaPropertiesPtr;//// Can be used to crack open ra4 type specific// data. Might also work on a portion of ra5// data as well, but I would not count on it.// Should be using classes defined over in// raform4.pm instead.//class AudioTypeSpecificData{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 73;}    UINT32	theID;    UINT16	AudioSpecificVersion;    UINT16	AudioSpecificRevision;    UINT32	raID;    UINT32	RaChunkSize;    UINT16	version;    UINT16	revision;    UINT16	headerBytesTotal;    UINT16	compressionType;    UINT32	granularity;    UINT32	bytesTotal;    UINT32	bytesPerMinute;    UINT32	bytesPerMinute2;    UINT16	interleaveFactor;    UINT16	interleaveBlockSize;    UINT32	userData;    UINT32	sampleRate;    UINT16	sampleSize;    UINT16	numChannels;    UINT8	InterleaveCode[5];    UINT8	CompressionCode[5];    UINT8	isInterleaved;    UINT8	copyByte;    UINT8	streamType;    UINT8	title_len;    UINT8	*title;    UINT8	author_len;    UINT8	*author;    UINT8	copyright_len;    UINT8	*copyright;    UINT8	app_len;    UINT8	*app;};class VideoTypeSpecificData{public:    VideoTypeSpecificData();    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 26;}    UINT32	cbLength;    UINT32	moftag;    UINT32	submoftag;    UINT16	uiWidth;    UINT16	uiHeight;    UINT16	uiBitCount;    UINT16	uiPadWidth;    UINT16	uiPadHeight;    UINT32	framesPerSecond;    UINT32      ulSPOExtra;    UINT32      ulStreamVersion;};class MultiStreamHeader{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 8;}    UINT32	object_id;    UINT16	num_rules;    UINT16	*rule_to_header_map;    UINT16	num_headers;};class NameValueProperty{public:    NameValueProperty();    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 13;}    UINT32	size;    UINT16	object_version;    UINT8	name_length;    UINT8	*name;    UINT32	type;    UINT16	value_length;    UINT8	*value_data;};//// Use this for packing/unpacking// a single 32 bit integer.//class Unsigned32BitInteger{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 4;}    UINT32	value;};//// enum defining valid values for "type" in// NameValueProperty structure//enum{	PROP_INTEGER,	PROP_BUFFER,	PROP_STRING};class LogicalStream{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 12;}    UINT32	size;    UINT16	object_version;    UINT16	num_physical_streams;    UINT16	*physical_stream_numbers;    UINT32	*data_offsets;    UINT16	num_rules;    UINT16	*rule_to_physical_stream_number_map;    UINT16	num_properties;    NameValueProperty	*properties;};class MetaInformation{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 8;}    UINT32	size;    UINT16	object_version;    UINT16	num_properties;    NameValueProperty	*properties;};//// BUGBUG// XXX// PMC can't generate a declaration for this constructor.// So, the generated .h file will not build until the// declaration is added by hand.//class Content{public:    Content();    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 18;}    UINT32	object_id;    UINT32	size;    UINT16	object_version;    UINT16	title_len;    UINT8	*title;    UINT16	author_len;    UINT8	*author;    UINT16	copyright_len;    UINT8	*copyright;    UINT16	comment_len;    UINT8	*comment;};typedef  Content * ContentPtr;class DataHeader{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 18;}    UINT32	object_id;    UINT32	size;    UINT16	object_version;    UINT32	num_interleave_packets;    UINT32	next_data_header;};typedef DataHeader * DataHeaderPtr;class IndexHeader{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 20;}    UINT32	object_id;    UINT32	size;    UINT16	object_version;    UINT32	num_indices;    UINT16	stream_number;    UINT32	next_index_header;};typedef IndexHeader * IndexHeaderPtr;class IndexRecord{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 14;}    UINT16	object_version;    UINT32	timestamp;    UINT32	offset;    UINT32	num_interleave_packets;};typedef IndexRecord * IndexRecordPtr;//// The PacketHeader has changed with version 1.// So, there are a couple of new structures.// Use PacketHeaderBase to figure out what// packet version/size you've got, and then// create the appropriate PacketHeader version// struct to really unpack the buffer. We could// also have done this by embedding if (object_version == xx)// into the PacketHeader struct, but this lets us// use the static_size() function to get the// actual packed size of the struct in question.//class PacketHeaderBase{public:    UINT8*	pack(UINT8* buf, UINT32 &len);    UINT8*	unpack(UINT8* buf, UINT32 len);    const UINT32	static_size() {return 4;}    UINT16	object_version;    UINT16	length;};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -