Skip to content

Commit

Permalink
Flip Camera
Browse files Browse the repository at this point in the history
  • Loading branch information
SippieCup committed Apr 13, 2020
1 parent d88ab4e commit bcd04b6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions selfdrive/camerad/cameras/camera_webcam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ void camera_release_buffer(void *cookie, int buf_idx) {

void open_gl_stream_def(CameraState * s, char* camera_id, int width, int height, char ** strm_def) {
printf("OPENGLSTREAM");
std::string strm_template="v4l2src device=/dev/v4l/by-id/%s ! video/x-raw,width=%d,height=%d,framerate=%d/1,format=YUY2 !"
std::string strm_template="v4l2src device=/dev/v4l/by-id/%s !"
" video/x-raw,width=%d,height=%d,framerate=%d/1,format=YUY2 !"
" nvvidconv ! video/x-raw(memory:NVMM),format=I420 !"
" nvvidconv ! video/x-raw,format=BGRx !"
" videoconvert ! video/x-raw,format=BGR !"
" videoscale ! video/x-raw,width=%d,height=%d !"
" appsink ";
" videoflip method=rotate-180 !"
" videoscale ! video/x-raw,width=%d,height=%d !"
" appsink ";
* strm_def = (char*)calloc(600,1);
sprintf(*strm_def,strm_template.c_str(),camera_id, width, height, s->fps, s->ci.frame_width, s->ci.frame_height);
printf(" GL Stream :[%s]\n",*strm_def);
Expand Down

0 comments on commit bcd04b6

Please sign in to comment.