Skip to content

Commit

Permalink
renamed h264_cam -> rpi_cam
Browse files Browse the repository at this point in the history
  • Loading branch information
shortstheory committed May 22, 2020
1 parent 8a92c22 commit ac2dee5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ b/
cmake-build-debug
scripts/
screenshots/
apstreamline.code-workspace
2 changes: 1 addition & 1 deletion src/Common/DeviceDatatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using namespace std;

enum CameraType {MJPG_CAM, UVC_CAM, H264_CAM, JETSON_CAM};
enum CameraType {MJPG_CAM, UVC_CAM, RPI_CAM, JETSON_CAM};
enum ResolutionPresets {LOW, MED, HIGH};
enum FramePresets {FRAME_320x240, FRAME_640x480, FRAME_1280x720, FRAME_COUNT};
enum VideoPresets {VIDEO_320x240x15, VIDEO_640x480x15, VIDEO_1280x720x15,
Expand Down
8 changes: 4 additions & 4 deletions src/Common/PipelineManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PipelineManager::PipelineManager(string _device, int quality, CameraType type) :
video_presets[ResolutionPresets::MED] = RAW_CAPS_FILTERS[VIDEO_640x480x30];
video_presets[ResolutionPresets::HIGH] = RAW_CAPS_FILTERS[VIDEO_1280x720x30];
break;
case CameraType::H264_CAM:
case CameraType::RPI_CAM:
case CameraType::UVC_CAM:
video_presets[ResolutionPresets::LOW] = H264_CAPS_FILTERS[VIDEO_320x240x30];
video_presets[ResolutionPresets::MED] = H264_CAPS_FILTERS[VIDEO_640x480x30];
Expand Down Expand Up @@ -159,7 +159,7 @@ void PipelineManager::set_encoding_bitrate(guint32 bitrate)
g_object_set(G_OBJECT(text_overlay), "text", stats.c_str(), NULL);
}
break;
case H264_CAM:
case RPI_CAM:
int v4l2_cam_fd;
g_object_get(camera, "device-fd", &v4l2_cam_fd, NULL);
if (v4l2_cam_fd > 0) {
Expand Down Expand Up @@ -226,7 +226,7 @@ bool PipelineManager::get_element_references()
} else {
return false;
}
case H264_CAM:
case RPI_CAM:
int v4l2_cam_fd;
if (camera) {
g_object_get(camera, "device-fd", &v4l2_cam_fd, NULL);
Expand Down Expand Up @@ -296,7 +296,7 @@ void PipelineManager::set_quality(int _quality)
src_caps = gst_caps_from_string(caps_filter_string.c_str());
g_object_set(G_OBJECT(src_capsfilter), "caps", src_caps, NULL);
break;
case CameraType::H264_CAM:
case CameraType::RPI_CAM:
int v4l2_cam_fd;
g_object_get(camera, "device-fd", &v4l2_cam_fd, NULL);
if (v4l2_cam_fd > 0)
Expand Down
2 changes: 1 addition & 1 deletion src/RTSPStreamServer/RTSPAdaptiveStreaming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void RTSPAdaptiveStreaming::init_media_factory()
" ! h264parse"
" ! rtph264pay name=pay0";
break;
case H264_CAM:
case RPI_CAM:
resolution_caps = (quality == AUTO_PRESET) ? H264_CAPS_FILTERS[VIDEO_320x240x30] : H264_CAPS_FILTERS[quality];
launch_string = "v4l2src name=src device=" + device +
" ! queue"
Expand Down
2 changes: 1 addition & 1 deletion src/RTSPStreamServer/RTSPStreamServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void RTSPStreamServer::get_v4l2_devices_info()
if (h264_index != -1) {
fmt.index = h264_index;
if (check_h264_ioctls(fd)) {
info.camera_type = H264_CAM;
info.camera_type = RPI_CAM;
} else {
info.camera_type = UVC_CAM;
}
Expand Down

0 comments on commit ac2dee5

Please sign in to comment.