Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sms
c-player
Commits
2fe389f4
Commit
2fe389f4
authored
Nov 24, 2015
by
user
Browse files
some adm stuff?
parent
308a4a0c
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/Makefile
View file @
2fe389f4
...
...
@@ -8,7 +8,7 @@ CFLAGS= -O0 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variab
#-std=c99
# -Werror -Wconversion -Wsign-conversion
all
:
c-player c-player-
0.10
c-player-
debug
snowControl
all
:
c-player c-player-
debug
c-player-
cli
snowControl
#rot13: rot13.c
# gcc -DTESTING -DGTK -g rot13.c -o rot13 `pkg-config --cflags --libs libevent gstreamer-interfaces-0.10 gstreamer-pbutils-0.10 gtk+-2.0 gstreamer-0.10` $(CFLAGS)
...
...
@@ -36,14 +36,14 @@ c-player-debug : main.c c-player.c snowbin.c teebin.c wraps.c common.h c-player.
c-player-np
:
main.c c-player.c snowbin.c teebin.c wraps.c common.h
$(CC)
-DGTK
-DGST1
-g
main.c c-player.c wraps.c snowbin.c teebin.c
-o
c-player-np
`
pkg-config
--cflags
--libs
gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0
`
$(CFLAGS)
c-player
:
main.c c-player.c snowbin.c teebin.c wraps.c common.h c-player.h snowbin.h
c-player
:
main.c c-player.c snowbin.c teebin.c wraps.c common.h c-player.h snowbin.h
playlist.c playlist.h
$(CC)
-DSNOWBIN
-DFP
-DPL
-DGTK
-DGST1
-g
main.c c-player.c wraps.c playlist.c snowbin.c teebin.c
-o
c-player
`
pkg-config
--cflags
--libs
gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0
`
$(CFLAGS)
c-player-ns
:
main.c c-player.c snowbin.c teebin.c wraps.c common.h c-player.h snowbin.h
$(CC)
-DFP
-DPL
-DGTK
-DGST1
-g
main.c c-player.c wraps.c playlist.c snowbin.c teebin.c
-o
c-player-ns
`
pkg-config
--cflags
--libs
gtk+-2.0 gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0
`
$(CFLAGS)
c-player-cli
:
main.c c-player.c wraps.c snowbin.c teebin.c common.h
c-player-cli
:
main.c c-player.c wraps.c snowbin.c teebin.c common.h
playlist.c playlist.h
$(CC)
-DGETOPTS_LONG
-DSNOWBIN
-DGST1
-g
main.c c-player.c wraps.c snowbin.c teebin.c
-o
c-player-cli
`
pkg-config
--cflags
--libs
gstreamer-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0
`
$(CFLAGS)
...
...
src/c-player.c
View file @
2fe389f4
...
...
@@ -875,20 +875,16 @@ extern void player_init_media(PlayerData *data)
/*set snowaudiobin as sink */
audiosink
=
get_snowaudiobin
(
pData
->
snow
);
g_object_set
(
pData
->
playbin2
,
"audio-sink"
,
audiosink
,
NULL
);
#else
g_print
(
"autosink
\n
"
);
audiosink
=
gst_element_factory_make
(
"autoaudiosink"
,
"autoaudiosink"
);
// audiosink = gst_element_factory_make ("fakesink", "fakesink");
g_object_set
(
pData
->
playbin2
,
"video-sink"
,
videosink
,
NULL
);
g_object_set
(
pData
->
playbin2
,
"audio-sink"
,
audiosink
,
NULL
);
g_print
(
" SNOWBIN is not defined, so we are not using it!
\n
"
);
g_print
(
" SNOWBIN is not defined, so we are not using it!
\n
"
);
#endif
g_object_set
(
pData
->
playbin2
,
"audio-sink"
,
audiosink
,
NULL
);
if
(
!
pData
->
playbin2
)
{
g_printerr
(
"Not all elements could be created.
\n
"
);
...
...
src/getvars.sh
View file @
2fe389f4
#!/bin/bash
#!/bin/bash
# Deliver mixer1 output to dummy.
set
-e
SM
=
/crypthome/hark/src/Snowmix-0.4.5/
SM
=
"
`
git rev-parse
--show-toplevel
`
/../snowmix"
export
SM
# IMPORTANT >>>>>You need to get port, ip and feed_id right<<<<<
port
=
9999
...
...
src/main.c
View file @
2fe389f4
...
...
@@ -110,7 +110,7 @@ main (int argc, char *argv[])
/* <option> and a ':' means it's marked as required_argument, make sure to do that.
* or optional_argument if it's optional.
* You can pass NULL as the last argument if it's not needed. */
while
((
c
=
getopt_long
(
argc
,
argv
,
"vhi:f:s:
u
a"
,
opts
,
&
optidx
))
!=
-
1
)
{
while
((
c
=
getopt_long
(
argc
,
argv
,
"vhi:f:s:a
:u
"
,
opts
,
&
optidx
))
!=
-
1
)
{
switch
(
c
)
{
case
'v'
:
print_version
();
break
;
case
'h'
:
opthelp
(
argv
[
0
]);
break
;
...
...
@@ -124,7 +124,9 @@ main (int argc, char *argv[])
pData
->
feedid
=
atoi
(
optarg
);
break
;
case
's'
:
if
(
strncmp
(
optarg
,
"snowmix"
,
7
)
==
0
)
printf
(
"case s
\n
"
);
if
(
strncmp
(
optarg
,
"snowmix"
,
4
)
==
0
)
{
pData
->
sink
=
SNOWMIX
;
...
...
@@ -138,8 +140,10 @@ main (int argc, char *argv[])
break
;
#ifdef SNOWBIN
case
'a'
:
if
(
strncmp
(
optarg
,
"snowmix"
,
7
)
==
0
)
printf
(
"case a
\n
"
);
if
(
strncmp
(
optarg
,
"snowmix"
,
4
)
==
0
)
{
printf
(
"a = snowmix
\n
"
);
pData
->
snow
->
audiosink
=
SNOWMIX
;
}
else
if
(
strncmp
(
optarg
,
"jack"
,
4
)
==
0
)
...
...
@@ -176,6 +180,9 @@ main (int argc, char *argv[])
++
optind
;
}
#ifdef SNOWBIN
snowbin_get_vars
(
pData
);
#endif
#ifdef GTK
#ifdef TT
if
(
!
g_thread_supported
()
)
...
...
src/playlist.c
View file @
2fe389f4
...
...
@@ -999,7 +999,13 @@ playlist_init_gtk ()
discoverer_init
();
#ifdef FP
/* put some stuff in playlist */
playlist_add_item
(
"file:///crypthome/hark/media/pinknoise/vloek/video/De Vloek Defends Autonomous Zone From Eviction (Interview)-SD.mp4"
);
playlist_add_item
(
"file:///home/user/media/sheep/dr.ogv"
);
playlist_add_item
(
"file:///home/user/media/sheep/sheep1.ogv"
);
playlist_add_item
(
"file:///home/user/media/sheep/sheep2.ogv"
);
playlist_add_item
(
"file:///home/user/media/sheep/sheep3.ogv"
);
playlist_add_item
(
"file:///crypthome/hark/media/pinknoise/vloek/video/De Vloek Defends Autonomous Zone From Eviction (Interview)-SD.mp4"
);
playlist_add_item
(
"file:///crypthome/hark/media/pinknoise/vloek/Mini Documentaire over de ontruiming van de Vloek op Scheveningen."
);
playlist_add_item
(
"file:///crypthome/hark/media/pinknoise/vloek/input/input/mob5-1441765927-09-Sep-15-04:32:07.flv"
);
playlist_add_item
(
"http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.ogg"
);
...
...
src/snowbin.c
View file @
2fe389f4
...
...
@@ -100,7 +100,7 @@ get_vars (snowMixer *mixer, snowFeed *feed, PlayerData *data)
size_t
nmatch
=
3
;
regmatch_t
pmatch
[
3
];
char
key
[
100
],
value
[
100
];
char
getvars
[
100
];
/* Compile regular expression */
// retsnow = regcomp(®ex, "^Snowmix[[:print:]]*", 0);
// retsnow = regcomp(®ex, "^[_[:alnum:]]*[[:punct:]][[:blank:]][[:alnum:]]*", REG_EXTENDED);
...
...
@@ -113,7 +113,9 @@ get_vars (snowMixer *mixer, snowFeed *feed, PlayerData *data)
}
/* Open the command for reading. */
fp
=
popen
(
"./getvars.sh 1"
,
"r"
);
snprintf
(
getvars
,
sizeof
(
getvars
),
"./getvars.sh %u"
,
data
->
feedid
);
printf
(
">>>>> executing: %s
\n
"
,
getvars
);
fp
=
popen
(
getvars
,
"r"
);
if
(
fp
==
NULL
)
{
printf
(
"Failed to run command
\n
"
);
exit
(
1
);
...
...
@@ -361,7 +363,6 @@ get_jacksink (int feedid)
char
*
feedname
=
"feedfuck"
;
js
=
gst_element_factory_make
(
"jackaudiosink"
,
"jackaudiosink"
);
/* check for jackportpattern */
if
(
g_object_class_find_property
(
G_OBJECT_GET_CLASS
(
js
),
"port-pattern"
))
...
...
@@ -430,11 +431,11 @@ snowbin_init_snowData (PlayerData *data)
mixer
->
width
=
0
;
mixer
->
height
=
0
;
feed
=
(
snowFeed
*
)
malloc
(
sizeof
(
struct
snowFeed
));
feed
->
id
=
23232323
;
feed
->
id
=
0
;
feed
->
control_pipe
=
NULL
;
//feed_control_pipe
feed
->
width
=
0
;
feed
->
height
=
0
;
get_vars
(
mixer
,
feed
,
data
);
//
get_vars(mixer, feed, data);
// set audiosink
sd
->
audiosink
=
SNOWMIX
;
...
...
@@ -447,6 +448,15 @@ snowbin_init_snowData (PlayerData *data)
return
0
;
}
extern
void
snowbin_get_vars
(
PlayerData
*
data
)
{
struct
snowMixer
*
mixer
;
struct
snowFeed
*
feed
;
mixer
=
data
->
snow
->
mixer
;
feed
=
data
->
snow
->
currentFeed
;
get_vars
(
mixer
,
feed
,
data
);
}
extern
GstElement
*
get_snowaudiobin
(
snowData
*
sd
)
...
...
@@ -465,7 +475,7 @@ get_snowaudiobin (snowData *sd)
if
(
sd
->
audiosink
==
JACK
)
{
printf
(
"JACK
\n
"
);
printf
(
"
>>>>
JACK
\n
"
);
//jack
audiosink
=
get_jacksink
(
sd
->
currentFeed
->
id
);
if
(
audiosink
==
NULL
)
{
e_exit
(
" could not create element jacksink "
);
}
...
...
@@ -504,7 +514,7 @@ get_snowaudiobin (snowData *sd)
gst_element_link_many
(
audioconvert
,
audiosink
,
NULL
);
}
else
if
(
sd
->
audiosink
==
AUTO
)
{
//
fake
//
auto
audiosink
=
gst_element_factory_make
(
"autoaudiosink"
,
"autoaudiosink123"
);
gst_bin_add_many
(
GST_BIN
(
snowaudiobin
),
audioconvert
,
audiosink
,
...
...
src/snowbin.h
View file @
2fe389f4
...
...
@@ -21,5 +21,6 @@
extern
GstBin
*
get_snowvideobin
(
snowData
*
);
extern
GstBin
*
get_snowaudiobin
(
snowData
*
);
extern
snowData
*
snowbin_init_snowData
(
PlayerData
*
);
extern
void
snowbin_get_vars
(
PlayerData
*
);
extern
void
print_snowFeed
(
snowFeed
*
);
extern
void
print_snowMixer
(
snowMixer
*
);
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