Skip to content

Commit 19e40d0

Browse files
committed
Remove unused properties in UsbCam class
Signed-off-by: Alfi Maulana <[email protected]>
1 parent 1091c5b commit 19e40d0

File tree

3 files changed

+2
-33
lines changed

3 files changed

+2
-33
lines changed

include/usb_cam/formats/mjpeg.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
extern "C" {
4343
#define __STDC_CONSTANT_MACROS // Required for libavutil
44+
#include <libavcodec/avcodec.h>
4445
#include "libavutil/imgutils.h"
4546
#include "libavformat/avformat.h"
4647
#include "libavutil/error.h"
@@ -49,7 +50,6 @@ extern "C" {
4950
#include "libswscale/swscale.h"
5051
}
5152

52-
#include "usb_cam/usb_cam.hpp"
5353
#include "usb_cam/formats/pixel_format_base.hpp"
5454
#include "usb_cam/formats/utils.hpp"
5555
#include "usb_cam/formats/av_pixel_format_helper.hpp"

include/usb_cam/usb_cam.hpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
#ifndef USB_CAM__USB_CAM_HPP_
3131
#define USB_CAM__USB_CAM_HPP_
3232

33-
extern "C" {
34-
#include <libavcodec/avcodec.h>
35-
#include <linux/videodev2.h>
36-
}
37-
3833
#include <chrono>
3934
#include <memory>
4035
#include <algorithm>
@@ -290,26 +285,6 @@ class UsbCam
290285
return m_number_of_buffers;
291286
}
292287

293-
inline AVCodec * get_avcodec()
294-
{
295-
return m_avcodec;
296-
}
297-
298-
inline AVDictionary * get_avoptions()
299-
{
300-
return m_avoptions;
301-
}
302-
303-
inline AVCodecContext * get_avcodec_context()
304-
{
305-
return m_avcodec_context;
306-
}
307-
308-
inline AVFrame * get_avframe()
309-
{
310-
return m_avframe;
311-
}
312-
313288
inline bool is_capturing()
314289
{
315290
return m_is_capturing;
@@ -422,11 +397,6 @@ class UsbCam
422397
std::shared_ptr<usb_cam::utils::buffer[]> m_buffers;
423398
image_t m_image;
424399

425-
AVFrame * m_avframe;
426-
AVCodec * m_avcodec;
427-
AVDictionary * m_avoptions;
428-
AVCodecContext * m_avcodec_context;
429-
430400
bool m_is_capturing;
431401
int m_framerate;
432402
const time_t m_epoch_time_shift_us;

src/usb_cam.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ using utils::io_method_t;
6060
UsbCam::UsbCam()
6161
: m_device_name(), m_io(io_method_t::IO_METHOD_MMAP), m_fd(-1),
6262
m_number_of_buffers(4), m_buffers(new usb_cam::utils::buffer[m_number_of_buffers]), m_image(),
63-
m_avframe(NULL), m_avcodec(NULL), m_avoptions(NULL),
64-
m_avcodec_context(NULL), m_is_capturing(false), m_framerate(0),
63+
m_is_capturing(false), m_framerate(0),
6564
m_epoch_time_shift_us(usb_cam::utils::get_epoch_time_shift_us()), m_supported_formats()
6665
{}
6766

0 commit comments

Comments
 (0)