Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Okay, just reproduced the sign-on restriction one more time before bed. Did the same as last time with the same result (although this time I didn't wait for the files to start downloading but just hit q as soon as mlbviewer displayed the player command). I backed up the cookie file after each attempt and they're all the same. I don't see any sessionkey or any other session-looking files anywhere at any point.
That's all for me today, I'll probably have some time to test again tomorrow so just let me know if there's something you'd like me to check.
I just tried the same stream at least half a dozen times with no errors. Have you removed ~/.mlb/cookie and ~/.mlb/sessionkey since this patch and tried again?
Are you reusing the ipid, fprt, and ftmu cookies? From my testing, you only need to get those once via the login/workflow url's and they will have an expire time associated with them (in epoch time). As long as the expire time is still valid, you don't need to login or fetch the workflow url, you only need to fetch the "findUserVerifiedEvent" URL with the cookie data. It's been my experience that fetching the workflow URL too many times will cause the sign-on restrictions. The cookies can be saved to disk and reused between stops/starts of MLBViewer. Also, creating a base64 url cache (keyed off the event and content ID's) would probably help reduce the amount calls to mlb.tv.
Are you reusing the ipid, fprt, and ftmu cookies? From my testing, you only need to get those once via the login/workflow url's and they will have an expire time associated with them (in epoch time). As long as the expire time is still valid, you don't need to login or fetch the workflow url, you only need to fetch the "findUserVerifiedEvent" URL with the cookie data. It's been my experience that fetching the workflow URL too many times will cause the sign-on restrictions. The cookies can be saved to disk and reused between stops/starts of MLBViewer. Also, creating a base64 url cache (keyed off the event and content ID's) would probably help reduce the amount calls to mlb.tv.
Only hit the login/workflow page once at mlbviewer start-up. From that, I keep all the cookie information and re-use it. I'm not sure whether I re-use it from one start to the next. I plan on creating a test tool just to inspect the cookie use and re-use without having to go through the curses interface that I can liberally print to the screen to see just how I'm managing those morsels from one request and one session to the next.
As I said earlier, I requested the same stream at least six times in a row (quitting before it actually started streaming) and was not able to reproduce it.
So it seems that cygwin can't find 'struct timeval'. In linux, you include <sys/time.h> which will include <bits/time.h>. I've updated SVN to implicitly include <sys/time.h>, see if this makes it compile. If not, search through cygwin's include directory and see where they define it, I can add a #ifdef to include it if it's somewhere else.
Thanks for the quick reply folks, i really appreciate it.
I got the latest version, i now get the following error:
Code:
$ make
gcc -O2 mlb.c utils.c output.c -lm -lcrypto -lpthread -lconfig -lcurl -o mlbhls
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lconfig
collect2: ld returned 1 exit status
Makefile:11: recipe for target `mlb' failed
make: *** [mlb] Error 1
I think I need to work out what library I am missing in cygwin based on the -lconfig flag. I am not familiar with this and will have a google on this. Anyone know what cygwin library I would need to fix this?
Thanks for the quick reply folks, i really appreciate it.
I got the latest version, i now get the following error:
Code:
$ make
gcc -O2 mlb.c utils.c output.c -lm -lcrypto -lpthread -lconfig -lcurl -o mlbhls
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lconfig
collect2: ld returned 1 exit status
Makefile:11: recipe for target `mlb' failed
make: *** [mlb] Error 1
I think I need to work out what library I am missing in cygwin based on the -lconfig flag. I am not familiar with this and will have a google on this. Anyone know what cygwin library I would need to fix this?
again thanks for help, I think i installed this correct, I downloaded extracted to location of my choice (/usr/src/libconfig-0.2.6) then installed as per INSTALL doc:
Code:
./configure
make
make install
Installed ok no error. Im not sure if I have to copy any dll or .h files from this location elsewhere? Anyhow when I try to compile mlbhls again, it gives different errors which indicate to me that mlb.c cant find a particular #include .h file or some other library that contains definitions for these structs/variables?
Code:
$ make
gcc -O2 mlb.c utils.c output.c -lm -lcrypto -lpthread -lconfig -lcurl -o mlbhls
mlb.c: In function ‘get_opts’:
mlb.c:1284:6: error: ‘config_t’ undeclared (first use in this function)
mlb.c:1284:6: note: each undeclared identifier is reported only once for each function it appears in
mlb.c:1284:15: error: expected ‘;’ before ‘cfg’
mlb.c:1285:6: error: ‘config_setting_t’ undeclared (first use in this function)
mlb.c:1285:24: error: ‘setting’ undeclared (first use in this function)
mlb.c:1286:19: error: ‘cfg’ undeclared (first use in this function)
Makefile:11: recipe for target `mlb' failed
make: *** [mlb] Error 1
again thanks for help, I think i installed this correct, I downloaded extracted to location of my choice (/usr/src/libconfig-0.2.6) then installed as per INSTALL doc:
Code:
./configure
make
make install
Installed ok no error. Im not sure if I have to copy any dll or .h files from this location elsewhere? Anyhow when I try to compile mlbhls again, it gives different errors which indicate to me that mlb.c cant find a particular #include .h file or some other library that contains definitions for these structs/variables?
Code:
$ make
gcc -O2 mlb.c utils.c output.c -lm -lcrypto -lpthread -lconfig -lcurl -o mlbhls
mlb.c: In function ‘get_opts’:
mlb.c:1284:6: error: ‘config_t’ undeclared (first use in this function)
mlb.c:1284:6: note: each undeclared identifier is reported only once for each function it appears in
mlb.c:1284:15: error: expected ‘;’ before ‘cfg’
mlb.c:1285:6: error: ‘config_setting_t’ undeclared (first use in this function)
mlb.c:1285:24: error: ‘setting’ undeclared (first use in this function)
mlb.c:1286:19: error: ‘cfg’ undeclared (first use in this function)
Makefile:11: recipe for target `mlb' failed
make: *** [mlb] Error 1
My mistake. Looks like there's (at least) two (three?) different packages called libconfig. I had two but found the one that had config_setting_t defined in it.
See if you can just build this and install it over the wrong one I gave you. Otherwise, we might have to do some surgery on your cygwin to repair my mistake. Sorry about that. Looks like I have a README-cygwin to write.
My mistake. Looks like there's (at least) two (three?) different packages called libconfig. I had two but found the one that had config_setting_t defined in it.
See if you can just build this and install it over the wrong one I gave you. Otherwise, we might have to do some surgery on your cygwin to repair my mistake. Sorry about that. Looks like I have a README-cygwin to write.
nah no mistake from you, it wasnt working in the first place, i am grateful for the help.
I didnt realise that I installed to a different directory, the install was successful but now I get this error:
Code:
Josh@JOSHUA /usr/src/mlbhls
$ make clean
rm -f *.o mlbhls
Josh@JOSHUA /usr/src/mlbhls
$ make
gcc -O2 mlb.c utils.c output.c -lm -lcrypto -lpthread -lconfig -lcurl -o mlbhls
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lconfig
collect2: ld returned 1 exit status
Makefile:11: recipe for target `mlb' failed
make: *** [mlb] Error 1
I removed the directory where i installed the first incorrect lbconfig but still get the same error as above?
You're back to square one. The linker can't find libconfig. I gave you a link to the wrong libconfig the first time. It found "libconfig" (-lconfig) but none of the symbols in that library made sense (e.g. couldn't find config_setting_t for example and so it threw different errors.) Make sure you download and build and install the 1.3.2-2 libconfig from above.
One question for the both of you: are you also logging in via the website? e.g. trying out the flash player when mlbviewer doesn't do what you want?
No, I haven't used the flashplayer for about two weeks. It's gpu acceleration is poor compared with what mplayer or vlc provide, and I don't watch much pre-season anyway.
It looks as if MLB.TV has some additional heuristics on how it detects an excessive number of accesses to its streams. However your new login works much better than the old one. mlbviewer is set up to work really well this season, for which many thanks.
You're back to square one. The linker can't find libconfig. I gave you a link to the wrong libconfig the first time. It found "libconfig" (-lconfig) but none of the symbols in that library made sense (e.g. couldn't find config_setting_t for example and so it threw different errors.) Make sure you download and build and install the 1.3.2-2 libconfig from above.
I recommended the version I did because I know that is one I already have working on my cygwin system. Unfortunately, I forgot that I had already made the wrong "libconfig" error before and posted before I checked what actually works. Looking at the C API on hyperrealm, this looks like the correct libconfig.
Revision 350: possible fix for sign-on restrictions
I noticed that although I retrieve all the cookie information I need in the MLBSession class and pass all the morsels necessary to the GameStream class, I may not actually be making media requests with the cookies present in the request. I modified the code to pass the cookie_jar along with the cookies to the GameStream class and the GameStream class installs the cookie_jar so that it presumably passes the cookie to the server as part of all media requests.
Again, since I am having trouble reproducing sign-on restriction errors, this fix may or may not do anything helpful. When I get home tonight, I'll check it with a sniffer to see if it makes any difference in the requests being sent.
In the meantime, I've checked it in and the two of you receiving sign-on restriction errors can test it out to see if it helps any.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.