Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
2015-16
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Daniel Fonseca Yarochewsky
2015-16
Merge requests
!39
Updated stitching code with some comments
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Updated stitching code with some comments
ah46657:gui
into
gui
Overview
0
Commits
2
Pipelines
0
Changes
5
Merged
Daniel Fonseca Yarochewsky
requested to merge
ah46657:gui
into
gui
8 years ago
Overview
0
Commits
2
Pipelines
0
Changes
5
Expand
Created by: ah46657
👍
0
👎
0
Merge request reports
Compare
gui
gui (base)
and
latest version
latest version
ec8f52f1
2 commits,
6 years ago
5 files
+
154
−
45
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
Camera/RTSPCameraOne.py
0 → 100644
+
41
−
0
Options
import
sys
import
vlc
import
pygame
#IP Address of camera 1
#Port 554
stream
=
"
rtsp://192.168.1.10:554/user=admin&password=&channel=1&stream=0.sdp
"
pygame
.
init
()
screen
=
pygame
.
display
.
set_mode
((
640
,
360
))
print
"
Using %s renderer
"
%
pygame
.
display
.
get_driver
()
print
'
Playing: %s
'
%
stream
# Create instane of VLC and create reference to movie.
vlcInstance
=
vlc
.
Instance
()
media
=
vlcInstance
.
media_new
(
stream
,
"
:network-caching=300
"
)
# Create new instance of vlc player
player
=
vlcInstance
.
media_player_new
()
# Pass pygame window id to vlc player, so it can render its contents there.
win_id
=
pygame
.
display
.
get_wm_info
()[
'
window
'
]
if
sys
.
platform
==
"
linux2
"
:
# for Linux using the X Server
player
.
set_xwindow
(
win_id
)
elif
sys
.
platform
==
"
win32
"
:
# for Windows
player
.
set_hwnd
(
win_id
)
# Load movie into vlc player instance
player
.
set_media
(
media
)
player
.
video_set_format
(
"
RV32
"
,
1280
,
720
,
0
);
# Start movie playback
player
.
play
()
while
player
.
get_state
()
!=
vlc
.
State
.
Ended
:
for
event
in
pygame
.
event
.
get
():
if
event
.
type
==
pygame
.
QUIT
:
sys
.
exit
(
0
)
Loading