WebRtc_Word32 -> int32_t in video_render/
BUG=314 Review URL: https://webrtc-codereview.appspot.com/1304006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3810 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
namespace webrtc {
|
||||
|
||||
VideoRenderLinuxImpl::VideoRenderLinuxImpl(
|
||||
const WebRtc_Word32 id,
|
||||
const int32_t id,
|
||||
const VideoRenderType videoRenderType,
|
||||
void* window, const bool fullscreen) :
|
||||
_id(id),
|
||||
@ -37,7 +37,7 @@ VideoRenderLinuxImpl::~VideoRenderLinuxImpl()
|
||||
delete &_renderLinuxCritsect;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::Init()
|
||||
int32_t VideoRenderLinuxImpl::Init()
|
||||
{
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s",
|
||||
__FUNCTION__);
|
||||
@ -61,7 +61,7 @@ WebRtc_Word32 VideoRenderLinuxImpl::Init()
|
||||
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::ChangeUniqueId(const WebRtc_Word32 id)
|
||||
int32_t VideoRenderLinuxImpl::ChangeUniqueId(const int32_t id)
|
||||
{
|
||||
CriticalSectionScoped cs(&_renderLinuxCritsect);
|
||||
|
||||
@ -69,7 +69,7 @@ WebRtc_Word32 VideoRenderLinuxImpl::ChangeUniqueId(const WebRtc_Word32 id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::ChangeWindow(void* window)
|
||||
int32_t VideoRenderLinuxImpl::ChangeWindow(void* window)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s",
|
||||
__FUNCTION__);
|
||||
@ -86,8 +86,8 @@ WebRtc_Word32 VideoRenderLinuxImpl::ChangeWindow(void* window)
|
||||
}
|
||||
|
||||
VideoRenderCallback* VideoRenderLinuxImpl::AddIncomingRenderStream(
|
||||
const WebRtc_UWord32 streamId,
|
||||
const WebRtc_UWord32 zOrder,
|
||||
const uint32_t streamId,
|
||||
const uint32_t zOrder,
|
||||
const float left,
|
||||
const float top,
|
||||
const float right,
|
||||
@ -121,8 +121,8 @@ VideoRenderCallback* VideoRenderLinuxImpl::AddIncomingRenderStream(
|
||||
return renderCallback;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::DeleteIncomingRenderStream(
|
||||
const WebRtc_UWord32 streamId)
|
||||
int32_t VideoRenderLinuxImpl::DeleteIncomingRenderStream(
|
||||
const uint32_t streamId)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s",
|
||||
__FUNCTION__);
|
||||
@ -135,9 +135,9 @@ WebRtc_Word32 VideoRenderLinuxImpl::DeleteIncomingRenderStream(
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::GetIncomingRenderStreamProperties(
|
||||
const WebRtc_UWord32 streamId,
|
||||
WebRtc_UWord32& zOrder,
|
||||
int32_t VideoRenderLinuxImpl::GetIncomingRenderStreamProperties(
|
||||
const uint32_t streamId,
|
||||
uint32_t& zOrder,
|
||||
float& left,
|
||||
float& top,
|
||||
float& right,
|
||||
@ -156,14 +156,14 @@ WebRtc_Word32 VideoRenderLinuxImpl::GetIncomingRenderStreamProperties(
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::StartRender()
|
||||
int32_t VideoRenderLinuxImpl::StartRender()
|
||||
{
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s",
|
||||
__FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::StopRender()
|
||||
int32_t VideoRenderLinuxImpl::StopRender()
|
||||
{
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s",
|
||||
__FUNCTION__);
|
||||
@ -185,29 +185,29 @@ bool VideoRenderLinuxImpl::FullScreen()
|
||||
return false;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::GetGraphicsMemory(
|
||||
WebRtc_UWord64& /*totalGraphicsMemory*/,
|
||||
WebRtc_UWord64& /*availableGraphicsMemory*/) const
|
||||
int32_t VideoRenderLinuxImpl::GetGraphicsMemory(
|
||||
uint64_t& /*totalGraphicsMemory*/,
|
||||
uint64_t& /*availableGraphicsMemory*/) const
|
||||
{
|
||||
WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
|
||||
"%s - not supported on Linux", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::GetScreenResolution(
|
||||
WebRtc_UWord32& /*screenWidth*/,
|
||||
WebRtc_UWord32& /*screenHeight*/) const
|
||||
int32_t VideoRenderLinuxImpl::GetScreenResolution(
|
||||
uint32_t& /*screenWidth*/,
|
||||
uint32_t& /*screenHeight*/) const
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_UWord32 VideoRenderLinuxImpl::RenderFrameRate(const WebRtc_UWord32 /*streamId*/)
|
||||
uint32_t VideoRenderLinuxImpl::RenderFrameRate(const uint32_t /*streamId*/)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::SetStreamCropping(
|
||||
const WebRtc_UWord32 /*streamId*/,
|
||||
int32_t VideoRenderLinuxImpl::SetStreamCropping(
|
||||
const uint32_t /*streamId*/,
|
||||
const float /*left*/,
|
||||
const float /*top*/,
|
||||
const float /*right*/,
|
||||
@ -218,15 +218,15 @@ WebRtc_Word32 VideoRenderLinuxImpl::SetStreamCropping(
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::SetTransparentBackground(const bool /*enable*/)
|
||||
int32_t VideoRenderLinuxImpl::SetTransparentBackground(const bool /*enable*/)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
|
||||
"%s - not supported on Linux", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::ConfigureRenderer(
|
||||
const WebRtc_UWord32 streamId,
|
||||
int32_t VideoRenderLinuxImpl::ConfigureRenderer(
|
||||
const uint32_t streamId,
|
||||
const unsigned int zOrder,
|
||||
const float left,
|
||||
const float top,
|
||||
@ -238,12 +238,12 @@ WebRtc_Word32 VideoRenderLinuxImpl::ConfigureRenderer(
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::SetText(
|
||||
const WebRtc_UWord8 textId,
|
||||
const WebRtc_UWord8* text,
|
||||
const WebRtc_Word32 textLength,
|
||||
const WebRtc_UWord32 textColorRef,
|
||||
const WebRtc_UWord32 backgroundColorRef,
|
||||
int32_t VideoRenderLinuxImpl::SetText(
|
||||
const uint8_t textId,
|
||||
const uint8_t* text,
|
||||
const int32_t textLength,
|
||||
const uint32_t textColorRef,
|
||||
const uint32_t backgroundColorRef,
|
||||
const float left, const float top,
|
||||
const float rigth,
|
||||
const float bottom)
|
||||
@ -253,13 +253,13 @@ WebRtc_Word32 VideoRenderLinuxImpl::SetText(
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoRenderLinuxImpl::SetBitmap(const void* bitMap,
|
||||
const WebRtc_UWord8 pictureId,
|
||||
const void* colorKey,
|
||||
const float left,
|
||||
const float top,
|
||||
const float right,
|
||||
const float bottom)
|
||||
int32_t VideoRenderLinuxImpl::SetBitmap(const void* bitMap,
|
||||
const uint8_t pictureId,
|
||||
const void* colorKey,
|
||||
const float left,
|
||||
const float top,
|
||||
const float right,
|
||||
const float bottom)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id,
|
||||
"%s - not supported on Linux", __FUNCTION__);
|
||||
|
||||
@ -26,17 +26,17 @@ public:
|
||||
* Constructor/destructor
|
||||
*/
|
||||
|
||||
VideoRenderLinuxImpl(const WebRtc_Word32 id,
|
||||
VideoRenderLinuxImpl(const int32_t id,
|
||||
const VideoRenderType videoRenderType,
|
||||
void* window, const bool fullscreen);
|
||||
|
||||
virtual ~VideoRenderLinuxImpl();
|
||||
|
||||
virtual WebRtc_Word32 Init();
|
||||
virtual int32_t Init();
|
||||
|
||||
virtual WebRtc_Word32 ChangeUniqueId(const WebRtc_Word32 id);
|
||||
virtual int32_t ChangeUniqueId(const int32_t id);
|
||||
|
||||
virtual WebRtc_Word32 ChangeWindow(void* window);
|
||||
virtual int32_t ChangeWindow(void* window);
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
@ -45,17 +45,17 @@ public:
|
||||
***************************************************************************/
|
||||
|
||||
virtual VideoRenderCallback
|
||||
* AddIncomingRenderStream(const WebRtc_UWord32 streamId,
|
||||
const WebRtc_UWord32 zOrder,
|
||||
* AddIncomingRenderStream(const uint32_t streamId,
|
||||
const uint32_t zOrder,
|
||||
const float left, const float top,
|
||||
const float right, const float bottom);
|
||||
|
||||
virtual WebRtc_Word32
|
||||
DeleteIncomingRenderStream(const WebRtc_UWord32 streamId);
|
||||
virtual int32_t
|
||||
DeleteIncomingRenderStream(const uint32_t streamId);
|
||||
|
||||
virtual WebRtc_Word32
|
||||
GetIncomingRenderStreamProperties(const WebRtc_UWord32 streamId,
|
||||
WebRtc_UWord32& zOrder,
|
||||
virtual int32_t
|
||||
GetIncomingRenderStreamProperties(const uint32_t streamId,
|
||||
uint32_t& zOrder,
|
||||
float& left, float& top,
|
||||
float& right, float& bottom) const;
|
||||
|
||||
@ -65,9 +65,9 @@ public:
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
virtual WebRtc_Word32 StartRender();
|
||||
virtual int32_t StartRender();
|
||||
|
||||
virtual WebRtc_Word32 StopRender();
|
||||
virtual int32_t StopRender();
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
@ -81,45 +81,43 @@ public:
|
||||
|
||||
virtual bool FullScreen();
|
||||
|
||||
virtual WebRtc_Word32
|
||||
GetGraphicsMemory(WebRtc_UWord64& totalGraphicsMemory,
|
||||
WebRtc_UWord64& availableGraphicsMemory) const;
|
||||
virtual int32_t
|
||||
GetGraphicsMemory(uint64_t& totalGraphicsMemory,
|
||||
uint64_t& availableGraphicsMemory) const;
|
||||
|
||||
virtual WebRtc_Word32
|
||||
GetScreenResolution(WebRtc_UWord32& screenWidth,
|
||||
WebRtc_UWord32& screenHeight) const;
|
||||
virtual int32_t
|
||||
GetScreenResolution(uint32_t& screenWidth,
|
||||
uint32_t& screenHeight) const;
|
||||
|
||||
virtual WebRtc_UWord32 RenderFrameRate(const WebRtc_UWord32 streamId);
|
||||
virtual uint32_t RenderFrameRate(const uint32_t streamId);
|
||||
|
||||
virtual WebRtc_Word32 SetStreamCropping(const WebRtc_UWord32 streamId,
|
||||
const float left, const float top,
|
||||
const float right,
|
||||
const float bottom);
|
||||
virtual int32_t SetStreamCropping(const uint32_t streamId,
|
||||
const float left, const float top,
|
||||
const float right, const float bottom);
|
||||
|
||||
virtual WebRtc_Word32 SetTransparentBackground(const bool enable);
|
||||
virtual int32_t SetTransparentBackground(const bool enable);
|
||||
|
||||
virtual WebRtc_Word32 ConfigureRenderer(const WebRtc_UWord32 streamId,
|
||||
const unsigned int zOrder,
|
||||
const float left, const float top,
|
||||
const float right,
|
||||
const float bottom);
|
||||
virtual int32_t ConfigureRenderer(const uint32_t streamId,
|
||||
const unsigned int zOrder,
|
||||
const float left, const float top,
|
||||
const float right, const float bottom);
|
||||
|
||||
virtual WebRtc_Word32 SetText(const WebRtc_UWord8 textId,
|
||||
const WebRtc_UWord8* text,
|
||||
const WebRtc_Word32 textLength,
|
||||
const WebRtc_UWord32 textColorRef,
|
||||
const WebRtc_UWord32 backgroundColorRef,
|
||||
const float left, const float top,
|
||||
const float rigth, const float bottom);
|
||||
virtual int32_t SetText(const uint8_t textId,
|
||||
const uint8_t* text,
|
||||
const int32_t textLength,
|
||||
const uint32_t textColorRef,
|
||||
const uint32_t backgroundColorRef,
|
||||
const float left, const float top,
|
||||
const float rigth, const float bottom);
|
||||
|
||||
virtual WebRtc_Word32 SetBitmap(const void* bitMap,
|
||||
const WebRtc_UWord8 pictureId,
|
||||
const void* colorKey, const float left,
|
||||
const float top, const float right,
|
||||
const float bottom);
|
||||
virtual int32_t SetBitmap(const void* bitMap,
|
||||
const uint8_t pictureId,
|
||||
const void* colorKey,
|
||||
const float left, const float top,
|
||||
const float right, const float bottom);
|
||||
|
||||
private:
|
||||
WebRtc_Word32 _id;
|
||||
int32_t _id;
|
||||
CriticalSectionWrapper& _renderLinuxCritsect;
|
||||
|
||||
void* _ptrWindow;
|
||||
|
||||
@ -21,7 +21,7 @@ static Display *dispArray[DISP_MAX];
|
||||
static int dispCount = 0;
|
||||
|
||||
|
||||
VideoX11Channel::VideoX11Channel(WebRtc_Word32 id) :
|
||||
VideoX11Channel::VideoX11Channel(int32_t id) :
|
||||
_crit(*CriticalSectionWrapper::CreateCriticalSection()), _display(NULL),
|
||||
_shminfo(), _image(NULL), _window(0L), _gc(NULL),
|
||||
_width(DEFAULT_RENDER_FRAME_WIDTH),
|
||||
@ -43,8 +43,8 @@ VideoX11Channel::~VideoX11Channel()
|
||||
delete &_crit;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Channel::RenderFrame(const WebRtc_UWord32 streamId,
|
||||
I420VideoFrame& videoFrame) {
|
||||
int32_t VideoX11Channel::RenderFrame(const uint32_t streamId,
|
||||
I420VideoFrame& videoFrame) {
|
||||
CriticalSectionScoped cs(&_crit);
|
||||
if (_width != videoFrame.width() || _height
|
||||
!= videoFrame.height()) {
|
||||
@ -55,9 +55,9 @@ WebRtc_Word32 VideoX11Channel::RenderFrame(const WebRtc_UWord32 streamId,
|
||||
return DeliverFrame(videoFrame);
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Channel::FrameSizeChange(WebRtc_Word32 width,
|
||||
WebRtc_Word32 height,
|
||||
WebRtc_Word32 /*numberOfStreams */)
|
||||
int32_t VideoX11Channel::FrameSizeChange(int32_t width,
|
||||
int32_t height,
|
||||
int32_t /*numberOfStreams */)
|
||||
{
|
||||
CriticalSectionScoped cs(&_crit);
|
||||
if (_prepared)
|
||||
@ -72,7 +72,7 @@ WebRtc_Word32 VideoX11Channel::FrameSizeChange(WebRtc_Word32 width,
|
||||
return 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Channel::DeliverFrame(const I420VideoFrame& videoFrame) {
|
||||
int32_t VideoX11Channel::DeliverFrame(const I420VideoFrame& videoFrame) {
|
||||
CriticalSectionScoped cs(&_crit);
|
||||
if (!_prepared) {
|
||||
return 0;
|
||||
@ -93,8 +93,7 @@ WebRtc_Word32 VideoX11Channel::DeliverFrame(const I420VideoFrame& videoFrame) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Channel::GetFrameSize(WebRtc_Word32& width,
|
||||
WebRtc_Word32& height)
|
||||
int32_t VideoX11Channel::GetFrameSize(int32_t& width, int32_t& height)
|
||||
{
|
||||
width = _width;
|
||||
height = _height;
|
||||
@ -102,8 +101,8 @@ WebRtc_Word32 VideoX11Channel::GetFrameSize(WebRtc_Word32& width,
|
||||
return 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Channel::Init(Window window, float left, float top,
|
||||
float right, float bottom)
|
||||
int32_t VideoX11Channel::Init(Window window, float left, float top,
|
||||
float right, float bottom)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _Id, "%s",
|
||||
__FUNCTION__);
|
||||
@ -148,10 +147,10 @@ WebRtc_Word32 VideoX11Channel::Init(Window window, float left, float top,
|
||||
return -1;
|
||||
}
|
||||
|
||||
_xPos = (WebRtc_Word32) (winWidth * left);
|
||||
_yPos = (WebRtc_Word32) (winHeight * top);
|
||||
_outWidth = (WebRtc_Word32) (winWidth * (right - left));
|
||||
_outHeight = (WebRtc_Word32) (winHeight * (bottom - top));
|
||||
_xPos = (int32_t) (winWidth * left);
|
||||
_yPos = (int32_t) (winHeight * top);
|
||||
_outWidth = (int32_t) (winWidth * (right - left));
|
||||
_outHeight = (int32_t) (winHeight * (bottom - top));
|
||||
if (_outWidth % 2)
|
||||
_outWidth++; // the renderer want's sizes that are multiples of two
|
||||
if (_outHeight % 2)
|
||||
@ -172,7 +171,7 @@ WebRtc_Word32 VideoX11Channel::Init(Window window, float left, float top,
|
||||
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Channel::ChangeWindow(Window window)
|
||||
int32_t VideoX11Channel::ChangeWindow(Window window)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _Id, "%s",
|
||||
__FUNCTION__);
|
||||
@ -208,7 +207,7 @@ WebRtc_Word32 VideoX11Channel::ChangeWindow(Window window)
|
||||
return 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Channel::ReleaseWindow()
|
||||
int32_t VideoX11Channel::ReleaseWindow()
|
||||
{
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _Id, "%s",
|
||||
__FUNCTION__);
|
||||
@ -227,8 +226,7 @@ WebRtc_Word32 VideoX11Channel::ReleaseWindow()
|
||||
return 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Channel::CreateLocalRenderer(WebRtc_Word32 width,
|
||||
WebRtc_Word32 height)
|
||||
int32_t VideoX11Channel::CreateLocalRenderer(int32_t width, int32_t height)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _Id, "%s",
|
||||
__FUNCTION__);
|
||||
@ -274,7 +272,7 @@ WebRtc_Word32 VideoX11Channel::CreateLocalRenderer(WebRtc_Word32 width,
|
||||
return 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Channel::RemoveRenderer()
|
||||
int32_t VideoX11Channel::RemoveRenderer()
|
||||
{
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _Id, "%s",
|
||||
__FUNCTION__);
|
||||
@ -297,10 +295,9 @@ WebRtc_Word32 VideoX11Channel::RemoveRenderer()
|
||||
return 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Channel::GetStreamProperties(WebRtc_UWord32& zOrder,
|
||||
float& left, float& top,
|
||||
float& right,
|
||||
float& bottom) const
|
||||
int32_t VideoX11Channel::GetStreamProperties(uint32_t& zOrder,
|
||||
float& left, float& top,
|
||||
float& right, float& bottom) const
|
||||
{
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _Id, "%s",
|
||||
__FUNCTION__);
|
||||
|
||||
@ -29,24 +29,24 @@ class CriticalSectionWrapper;
|
||||
class VideoX11Channel: public VideoRenderCallback
|
||||
{
|
||||
public:
|
||||
VideoX11Channel(WebRtc_Word32 id);
|
||||
VideoX11Channel(int32_t id);
|
||||
|
||||
virtual ~VideoX11Channel();
|
||||
|
||||
virtual WebRtc_Word32 RenderFrame(const WebRtc_UWord32 streamId,
|
||||
I420VideoFrame& videoFrame);
|
||||
virtual int32_t RenderFrame(const uint32_t streamId,
|
||||
I420VideoFrame& videoFrame);
|
||||
|
||||
WebRtc_Word32 FrameSizeChange(WebRtc_Word32 width, WebRtc_Word32 height,
|
||||
WebRtc_Word32 numberOfStreams);
|
||||
WebRtc_Word32 DeliverFrame(const I420VideoFrame& videoFrame);
|
||||
WebRtc_Word32 GetFrameSize(WebRtc_Word32& width, WebRtc_Word32& height);
|
||||
WebRtc_Word32 Init(Window window, float left, float top, float right,
|
||||
float bottom);
|
||||
WebRtc_Word32 ChangeWindow(Window window);
|
||||
WebRtc_Word32
|
||||
GetStreamProperties(WebRtc_UWord32& zOrder, float& left,
|
||||
int32_t FrameSizeChange(int32_t width, int32_t height,
|
||||
int32_t numberOfStreams);
|
||||
int32_t DeliverFrame(const I420VideoFrame& videoFrame);
|
||||
int32_t GetFrameSize(int32_t& width, int32_t& height);
|
||||
int32_t Init(Window window, float left, float top, float right,
|
||||
float bottom);
|
||||
int32_t ChangeWindow(Window window);
|
||||
int32_t
|
||||
GetStreamProperties(uint32_t& zOrder, float& left,
|
||||
float& top, float& right, float& bottom) const;
|
||||
WebRtc_Word32 ReleaseWindow();
|
||||
int32_t ReleaseWindow();
|
||||
|
||||
bool IsPrepared()
|
||||
{
|
||||
@ -55,9 +55,9 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
WebRtc_Word32
|
||||
CreateLocalRenderer(WebRtc_Word32 width, WebRtc_Word32 height);
|
||||
WebRtc_Word32 RemoveRenderer();
|
||||
int32_t
|
||||
CreateLocalRenderer(int32_t width, int32_t height);
|
||||
int32_t RemoveRenderer();
|
||||
|
||||
//FIXME a better place for this method? the GetWidthHeight no longer
|
||||
// supported by common_video.
|
||||
@ -71,14 +71,14 @@ private:
|
||||
XImage* _image;
|
||||
Window _window;
|
||||
GC _gc;
|
||||
WebRtc_Word32 _width; // incoming frame width
|
||||
WebRtc_Word32 _height; // incoming frame height
|
||||
WebRtc_Word32 _outWidth; // render frame width
|
||||
WebRtc_Word32 _outHeight; // render frame height
|
||||
WebRtc_Word32 _xPos; // position within window
|
||||
WebRtc_Word32 _yPos;
|
||||
int32_t _width; // incoming frame width
|
||||
int32_t _height; // incoming frame height
|
||||
int32_t _outWidth; // render frame width
|
||||
int32_t _outHeight; // render frame height
|
||||
int32_t _xPos; // position within window
|
||||
int32_t _yPos;
|
||||
bool _prepared; // true if ready to use
|
||||
WebRtc_Word32 _dispCount;
|
||||
int32_t _dispCount;
|
||||
|
||||
unsigned char* _buffer;
|
||||
float _top;
|
||||
@ -86,7 +86,7 @@ private:
|
||||
float _right;
|
||||
float _bottom;
|
||||
|
||||
WebRtc_Word32 _Id;
|
||||
int32_t _Id;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ VideoX11Render::~VideoX11Render()
|
||||
delete &_critSect;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Render::Init()
|
||||
int32_t VideoX11Render::Init()
|
||||
{
|
||||
CriticalSectionScoped cs(&_critSect);
|
||||
|
||||
@ -36,7 +36,7 @@ WebRtc_Word32 VideoX11Render::Init()
|
||||
return 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Render::ChangeWindow(Window window)
|
||||
int32_t VideoX11Render::ChangeWindow(Window window)
|
||||
{
|
||||
CriticalSectionScoped cs(&_critSect);
|
||||
VideoX11Channel* renderChannel = NULL;
|
||||
@ -60,8 +60,8 @@ WebRtc_Word32 VideoX11Render::ChangeWindow(Window window)
|
||||
}
|
||||
|
||||
VideoX11Channel* VideoX11Render::CreateX11RenderChannel(
|
||||
WebRtc_Word32 streamId,
|
||||
WebRtc_Word32 zOrder,
|
||||
int32_t streamId,
|
||||
int32_t zOrder,
|
||||
const float left,
|
||||
const float top,
|
||||
const float right,
|
||||
@ -99,7 +99,7 @@ VideoX11Channel* VideoX11Render::CreateX11RenderChannel(
|
||||
return renderChannel;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Render::DeleteX11RenderChannel(WebRtc_Word32 streamId)
|
||||
int32_t VideoX11Render::DeleteX11RenderChannel(int32_t streamId)
|
||||
{
|
||||
CriticalSectionScoped cs(&_critSect);
|
||||
|
||||
@ -123,9 +123,9 @@ WebRtc_Word32 VideoX11Render::DeleteX11RenderChannel(WebRtc_Word32 streamId)
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoX11Render::GetIncomingStreamProperties(
|
||||
WebRtc_Word32 streamId,
|
||||
WebRtc_UWord32& zOrder,
|
||||
int32_t VideoX11Render::GetIncomingStreamProperties(
|
||||
int32_t streamId,
|
||||
uint32_t& zOrder,
|
||||
float& left,
|
||||
float& top,
|
||||
float& right,
|
||||
|
||||
@ -28,22 +28,22 @@ public:
|
||||
VideoX11Render(Window window);
|
||||
~VideoX11Render();
|
||||
|
||||
WebRtc_Word32 Init();
|
||||
WebRtc_Word32 ChangeWindow(Window window);
|
||||
int32_t Init();
|
||||
int32_t ChangeWindow(Window window);
|
||||
|
||||
VideoX11Channel* CreateX11RenderChannel(WebRtc_Word32 streamId,
|
||||
WebRtc_Word32 zOrder,
|
||||
const float left,
|
||||
const float top,
|
||||
const float right,
|
||||
const float bottom);
|
||||
VideoX11Channel* CreateX11RenderChannel(int32_t streamId,
|
||||
int32_t zOrder,
|
||||
const float left,
|
||||
const float top,
|
||||
const float right,
|
||||
const float bottom);
|
||||
|
||||
WebRtc_Word32 DeleteX11RenderChannel(WebRtc_Word32 streamId);
|
||||
int32_t DeleteX11RenderChannel(int32_t streamId);
|
||||
|
||||
WebRtc_Word32 GetIncomingStreamProperties(WebRtc_Word32 streamId,
|
||||
WebRtc_UWord32& zOrder,
|
||||
float& left, float& top,
|
||||
float& right, float& bottom);
|
||||
int32_t GetIncomingStreamProperties(int32_t streamId,
|
||||
uint32_t& zOrder,
|
||||
float& left, float& top,
|
||||
float& right, float& bottom);
|
||||
|
||||
private:
|
||||
Window _window;
|
||||
|
||||
Reference in New Issue
Block a user