Skip to content

Commit

Permalink
ppb_video_capture: implement capturing default device
Browse files Browse the repository at this point in the history
  • Loading branch information
i-rinat committed May 9, 2015
1 parent 390bcbf commit 0d08342
Show file tree
Hide file tree
Showing 3 changed files with 352 additions and 15 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pkg_check_modules(REQ
pangoft2
freetype2
openssl
libv4l2
REQUIRED)

# libdl.so, librt.so, and libm.so
Expand Down
13 changes: 13 additions & 0 deletions src/pp_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <ppapi/c/dev/ppb_file_chooser_dev.h>
#include <ppapi/c/dev/ppb_text_input_dev.h>
#include <ppapi/c/dev/ppp_text_input_dev.h>
#include <ppapi/c/dev/ppp_video_capture_dev.h>

#include <stdlib.h>
#include <X11/Xlib.h>
Expand Down Expand Up @@ -374,6 +375,18 @@ struct pp_printing_s {

struct pp_video_capture_s {
COMMON_STRUCTURE_FIELDS
int fd;
uint32_t width;
uint32_t height;
uint32_t fps;
size_t buffer_size;
uint32_t buffer_count;
PP_Resource *buffers;
char *buffer_is_free;
pthread_t thread;
uint32_t thread_started;
uint32_t terminate_thread;
const struct PPP_VideoCapture_Dev_0_1 *ppp_video_capture_dev;
};

struct pp_audio_input_s {
Expand Down
Loading

0 comments on commit 0d08342

Please sign in to comment.