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

📄 wavaudiofileservermediasubsession.h

📁 rtsp协议的主要实现代码.对开发流媒体
💻 H
字号:
// WAVAudioFileServerMediaSubsession.h: interface for the WAVAudioFileServerMediaSubsession class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_WAVAUDIOFILESERVERMEDIASUBSESSION_H__021610DB_5FB7_4CB0_847B_BA08C14E6C0B__INCLUDED_)
#define AFX_WAVAUDIOFILESERVERMEDIASUBSESSION_H__021610DB_5FB7_4CB0_847B_BA08C14E6C0B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ServerMediaSubsession.h"
#include "WAVAudioFileSource.h"

class WAVAudioFileServerMediaSubsession : public ServerMediaSubsession  
{
public:
	static WAVAudioFileServerMediaSubsession*
		createNew(const char * fileName, Boolean reuseFirstSource,
		const char * SDPMediaTypeString,Boolean convertToULaw = False);
	// If "convertToULaw" is True, 16-bit audio streams are converted to
	// 8-bit u-law audio prior to streaming.
	virtual ~WAVAudioFileServerMediaSubsession();
	virtual RTPSink* createNewRTPSink(unsigned char rtpPayloadTypeIfDynamic,
				    FramedSource* inputSource);
	virtual FramedSource* createNewStreamSource(unsigned clientSessionId,
		unsigned& estBitrate);
	WAVAudioFileServerMediaSubsession(char const* fileName, Boolean reuseFirstSource,
		const char * SDPMediaTypeString,Boolean convertToULaw = False);
	virtual float duration();
	virtual unsigned GetEstBitrate()
	{
		return festBitrate;
	}
private:
	// The following parameters of the input stream are set after
	// "createNewStreamSource" is called:
	unsigned char fBitsPerSample;
	unsigned fSamplingFrequency;
	unsigned fNumChannels;
	float fFileDuration;
	Boolean fConvertToULaw;
	unsigned festBitrate;
};

#endif // !defined(AFX_WAVAUDIOFILESERVERMEDIASUBSESSION_H__021610DB_5FB7_4CB0_847B_BA08C14E6C0B__INCLUDED_)

⌨️ 快捷键说明

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