Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
60bd4215
Commit
60bd4215
authored
Dec 12, 2014
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt video http basic authentication added
parent
b66e7642
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
1 deletion
+42
-1
src/wbl/pwrb/src/pwrb_td_videooptionsmask.wb_load
src/wbl/pwrb/src/pwrb_td_videooptionsmask.wb_load
+20
-0
xtt/lib/xtt/gtk/xtt_stream_gtk.cpp
xtt/lib/xtt/gtk/xtt_stream_gtk.cpp
+22
-1
No files found.
src/wbl/pwrb/src/pwrb_td_videooptionsmask.wb_load
View file @
60bd4215
...
...
@@ -121,6 +121,26 @@ SObject pwrb:Type
Attr Value = 64
EndBody
EndObject
!/**
! Http basic authentication.
!*/
Object HttpBasicAuthentication $Bit
Body SysBody
Attr PgmName = "HttpBasicAuthentication"
Attr Text = "HttpBasicAuthentication"
Attr Value = 128
EndBody
EndObject
!/**
! Cgi parameter authentication.
!*/
Object CgiParameterAuthentication $Bit
Body SysBody
Attr PgmName = "CgiParameterAuthentication"
Attr Text = "CgiParameterAuthentication"
Attr Value = 256
EndBody
EndObject
EndObject
EndSObject
...
...
xtt/lib/xtt/gtk/xtt_stream_gtk.cpp
View file @
60bd4215
...
...
@@ -558,7 +558,28 @@ XttStreamGtk::XttStreamGtk( GtkWidget *st_parent_wid, void *st_parent_ctx, const
}
/* Set the URI to play, eg "http://192.168.67.248/mjpg/video.mjpg" */
g_object_set
(
playbin2
,
"uri"
,
uri
,
NULL
);
pwr_tURL
luri
;
char
*
s
;
if
(
options
&
pwr_mVideoOptionsMask_HttpBasicAuthentication
)
{
if
(
strcmp
(
user
,
""
)
!=
0
&&
strcmp
(
password
,
""
)
!=
0
&&
(
s
=
strstr
(
uri
,
"://"
)))
{
unsigned
long
int
offs
=
s
-
(
char
*
)
uri
+
3
;
strncpy
(
luri
,
uri
,
offs
);
luri
[
offs
]
=
0
;
strcat
(
luri
,
user
);
strcat
(
luri
,
":"
);
strcat
(
luri
,
password
);
strcat
(
luri
,
"@"
);
strcat
(
luri
,
&
uri
[
offs
]);
}
else
strcpy
(
luri
,
uri
);
}
else
if
(
options
&
pwr_mVideoOptionsMask_CgiParameterAuthentication
)
snprintf
(
luri
,
sizeof
(
luri
),
"%s?user=%s&pwd=%s"
,
uri
,
user
,
password
);
else
strcpy
(
luri
,
uri
);
g_object_set
(
playbin2
,
"uri"
,
luri
,
NULL
);
/* Connect to interesting signals in playbin2 */
g_signal_connect
(
G_OBJECT
(
playbin2
),
"video-tags-changed"
,(
GCallback
)
tags_cb
,
this
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment