Skip to content

Commit

Permalink
correct spell of prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Jun 23, 2013
1 parent 7ae37f0 commit cd657d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/QtAV/VideoDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Q_EXPORT VideoDecoder : public AVDecoder
DPTR_DECLARE_PRIVATE(VideoDecoder)
public:
VideoDecoder();
//virtual bool prepare();
virtual bool decode(const QByteArray &encoded);
//TODO: new api: originalVideoSize()(inSize()), decodedVideoSize()(outSize())
//size: the decoded(actually then resized in ImageConverter) frame size
Expand Down
4 changes: 2 additions & 2 deletions src/QtAV/private/XVRenderer_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class XVRendererPrivate : public VideoRendererPrivate
XFree(xv_image_formats);
return false;
}
bool prepairDeviceResource() {
bool prepareDeviceResource() {
gc = XCreateGC(display, q_func().winId(), 0, 0);
if (!gc) {
available = false;
Expand All @@ -130,7 +130,7 @@ class XVRendererPrivate : public VideoRendererPrivate
return true;
}

bool prepairImage(int w, int h) {
bool prepareImage(int w, int h) {
//TODO: check shm
if (xv_image_width == w && xv_image_height == h && xv_image)
return true;
Expand Down
4 changes: 2 additions & 2 deletions src/XVRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ QPaintEngine* XVRenderer::paintEngine() const
void XVRenderer::convertData(const QByteArray &data)
{
DPTR_D(XVRenderer);
if (!d.prepairImage(d.src_width, d.src_height))
if (!d.prepareImage(d.src_width, d.src_height))
return;
//TODO: if date is deep copied, mutex can be avoided
QMutexLocker locker(&d.img_mutex);
Expand Down Expand Up @@ -144,7 +144,7 @@ void XVRenderer::showEvent(QShowEvent *event)
* When Qt::WindowStaysOnTopHint changed, window will hide first then show. If you
* don't do anything here, the widget content will never be updated.
*/
d.prepairDeviceResource();
d.prepareDeviceResource();
}

bool XVRenderer::write()
Expand Down

0 comments on commit cd657d7

Please sign in to comment.