Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/usb_cam/formats/mjpeg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

extern "C" {
#define __STDC_CONSTANT_MACROS // Required for libavutil
#include <libavcodec/avcodec.h>
#include "libavutil/imgutils.h"
#include "libavformat/avformat.h"
#include "libavutil/error.h"
Expand All @@ -49,7 +50,6 @@ extern "C" {
#include "libswscale/swscale.h"
}

#include "usb_cam/usb_cam.hpp"
#include "usb_cam/formats/pixel_format_base.hpp"
#include "usb_cam/formats/utils.hpp"
#include "usb_cam/formats/av_pixel_format_helper.hpp"
Expand Down
30 changes: 0 additions & 30 deletions include/usb_cam/usb_cam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
#ifndef USB_CAM__USB_CAM_HPP_
#define USB_CAM__USB_CAM_HPP_

extern "C" {
#include <libavcodec/avcodec.h>
#include <linux/videodev2.h>
}

#include <chrono>
#include <memory>
#include <algorithm>
Expand Down Expand Up @@ -290,26 +285,6 @@ class UsbCam
return m_number_of_buffers;
}

inline AVCodec * get_avcodec()
{
return m_avcodec;
}

inline AVDictionary * get_avoptions()
{
return m_avoptions;
}

inline AVCodecContext * get_avcodec_context()
{
return m_avcodec_context;
}

inline AVFrame * get_avframe()
{
return m_avframe;
}

inline bool is_capturing()
{
return m_is_capturing;
Expand Down Expand Up @@ -422,11 +397,6 @@ class UsbCam
std::shared_ptr<usb_cam::utils::buffer[]> m_buffers;
image_t m_image;

AVFrame * m_avframe;
AVCodec * m_avcodec;
AVDictionary * m_avoptions;
AVCodecContext * m_avcodec_context;

bool m_is_capturing;
int m_framerate;
const time_t m_epoch_time_shift_us;
Expand Down
3 changes: 1 addition & 2 deletions src/usb_cam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ using utils::io_method_t;
UsbCam::UsbCam()
: m_device_name(), m_io(io_method_t::IO_METHOD_MMAP), m_fd(-1),
m_number_of_buffers(4), m_buffers(new usb_cam::utils::buffer[m_number_of_buffers]), m_image(),
m_avframe(NULL), m_avcodec(NULL), m_avoptions(NULL),
m_avcodec_context(NULL), m_is_capturing(false), m_framerate(0),
m_is_capturing(false), m_framerate(0),
m_epoch_time_shift_us(usb_cam::utils::get_epoch_time_shift_us()), m_supported_formats()
{}

Expand Down