Skip to content

Commit

Permalink
Fix various typos and incorrect comments
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Jones <[email protected]>
  • Loading branch information
PeeJay committed Oct 16, 2017
1 parent 10cc5d9 commit 5d826b0
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 20 deletions.
3 changes: 1 addition & 2 deletions common/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
OpenPnp-Capture: a video capture subsystem.
Platform independent context class to keep track
of the global state.
Platform independent context class to keep track of the global state.
Copyright (c) 2017 Jason von Nieda, Niels Moseley.
Expand Down
2 changes: 1 addition & 1 deletion common/libmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
OpenPnp-Capture: a video capture subsystem.
Windows platform code
Platform independent library entry.
Copyright (c) 2017 Jason von Nieda, Niels Moseley.
Expand Down
2 changes: 1 addition & 1 deletion common/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <stdarg.h>
#include "logging.h"

/* In their infinite "wisdom" Microsoft have declared snprintf deprecated
/* In their infinite "wisdom" Microsoft have declared snprintf is deprecated
and we must therefore resort to a macro to fix something that shouldn't
be a problem */
#ifdef _MSC_VER
Expand Down
4 changes: 2 additions & 2 deletions linux/mjpeghelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bool MJPEGHelper::decompressFrame(const uint8_t *inBuffer,
size_t inBytes, uint8_t *outBuffer,
uint32_t outBufWidth, uint32_t outBufHeight)
{
// note: the jpeg-turbo library apparently uses non-const
// note: the jpeg-turbo library apparently uses a non-const
// buffer pointer to the incoming JPEG data.
// Hopefully, the lib does not change the JPEG data buffer.
// so, for now, we'll cast it to a non-const pointer.
Expand All @@ -39,7 +39,7 @@ bool MJPEGHelper::decompressFrame(const uint8_t *inBuffer,
if (tjDecompress2(m_decompressHandle, jpegPtr, inBytes, outBuffer,
width, 0/*pitch*/, height, TJPF_RGB, TJFLAG_FASTDCT) != 0)
{
// A lot of cameras produce incorrect but decoding JPEG data
// A lot of cameras produce incorrect but decodable JPEG data
// and produce warnings that fill the console,
// such as 'extraneous bytes before marker' etc.
//
Expand Down
3 changes: 0 additions & 3 deletions linux/platformcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ class PlatformContext : public Context

/** Enumerate V4L capture devices and put their
information into the m_devices array
Implement this function in a platform-dependent
derived class.
*/
virtual bool enumerateDevices();

Expand Down
2 changes: 1 addition & 1 deletion linux/platformstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ void captureThreadFunctionAsync(PlatformStream *stream, int fd, size_t bufferSiz
} // while

// Note: the destruction of the PlatformHelper
// by the scoped pointer will automaticall
// by the scoped pointer will automatically
// turn off streaming and remove the
// memory mapped buffers from the system.
LOG(LOG_DEBUG, "captureThreadFunctionAsync exited\n");
Expand Down
7 changes: 2 additions & 5 deletions mac/platformcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PlatformContext : public Context
{
public:
/** Create a context for the library.
Device enumeration is perform in the constructor,
Device enumeration is performed in the constructor,
so all devices must be present in the system when
the Context is created or devices will not be found.
Expand All @@ -23,11 +23,8 @@ class PlatformContext : public Context
virtual ~PlatformContext();

protected:
/** Enumerate V4L capture devices and put their
/** Enumerate AVCaptureDevices and put their
information into the m_devices array
Implement this function in a platform-dependent
derived class.
*/
virtual bool enumerateDevices();

Expand Down
3 changes: 1 addition & 2 deletions mac/platformcontext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "platformcontext.h"
#import <AVFoundation/AVFoundation.h>


// a platform factory function needed by
// libmain.cpp
Context* createPlatformContext()
Expand Down Expand Up @@ -53,7 +52,7 @@

LOG(LOG_DEBUG, "USB : vid=%04X pid=%04X\n", deviceInfo->m_vid, deviceInfo->m_pid);

// he unique ID seem to be comprised of a 10-character PCI/USB location address
// the unique ID seem to be comprised of a 10-character PCI/USB location address
// followed by the VID and PID in hex, e.g. 0x26210000046d0825
deviceInfo->m_busLocation = 0;
if (device.uniqueID.length == 18)
Expand Down
2 changes: 1 addition & 1 deletion mac/platformstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "uvcctrl.h"

class Context; // pre-declaration
class Context; // pre-declaration
class PlatformStream; // pre-declaration

/** An OBJC++ interface to handle callbacks from the
Expand Down
2 changes: 1 addition & 1 deletion win/platformcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PlatformContext : public Context
{
public:
/** Create a context for the library.
Device enumeration is perform in the constructor,
Device enumeration is performed in the constructor,
so all devices must be present in the system when
the Context is created or devices will not be found.
Expand Down
2 changes: 1 addition & 1 deletion win/platformstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "samplegrabber.h"


class Context; // pre-declaration
class Context; // pre-declaration
class PlatformStream; // pre-declaration

/** A class to handle callbacks from the video subsystem,
Expand Down

0 comments on commit 5d826b0

Please sign in to comment.