LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 02-10-2017, 01:35 PM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Rep: Reputation: 213Reputation: 213Reputation: 213
quvi playlist (tubes) possible ?


Hello,

I run this file:

Code:


// quvi dump -s best --exec 'mplayer %u' "$URL" 
// on stretch 
void nquviplus( char *theurl )
{
       printf( "URL: %s>\n" , theurl ) ; 
       char cmdi[PATH_MAX];
       strncpy( cmdi , "  " , PATH_MAX );
       strncat( cmdi , " quvi dump -s best --exec 'mplayer %u'  \"" , PATH_MAX - strlen( cmdi ) -1 );
       strncat( cmdi , theurl  , PATH_MAX - strlen( cmdi ) -1 );
       strncat( cmdi , "\" " , PATH_MAX - strlen( cmdi ) -1 );
       printf( "<CMD: %s>\n" , cmdi ) ; 
       system( cmdi );
}





int main( int argc, char *argv[])
{
  char mychoice[PATH_MAX] ; 
  char urlsite[PATH_MAX] ; 
  int menu_gameover = 0; 
  int menu_player = 1; 
  int i ; 
  int imax ; 
  

    ////////////////////////////////////////////////////////
    if ( argc == 3)
      if ( strcmp( argv[1] , "--play" ) ==  0 ) 
      if ( strcmp( argv[2] , "" ) !=  0 ) 
      {
         nquviplus(  argv[2] );
         return 0;
      }

    ////////////////////////////////////////////////////////
    if ( argc == 3)
      if ( strcmp( argv[1] , "--playlist" ) ==  0 ) 
      if ( fexist( argv[2] ) ==  1 ) 
      {
         imax = filelinecount( argv[ 2 ] );
         for ( i = 1 ; i <=  imax; i++)
         {
            strncpy( urlsite , filefetch( argv[ 2 ] , i ), PATH_MAX );
            nquviplus( urlsite );
         }
         return 0;
      }

 return 0;
}
how can quvi NOT start all videos, but wait that mplayer played once, to continue to next videos?


thank you
 
Old 02-16-2017, 04:02 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
If you put a return in the function nquviplus

void nquviplus( char *theurl ) => int nquviplus( char *theurl )

and insert a conditional check in your for loop to validate a clean exit i.e. 0 (not required but a good practice non-the-less),
Quote:
for ( i = 1 ; i <= imax; i++)
{
strncpy( urlsite , filefetch( argv[ 2 ] , i ), PATH_MAX );

// erp = nquviplus( urlsite );
// if(erp == 0) {
// do-it-again
// else
// raise-a-comprehensible-error;
// go-to-the-next-one;
// }
}
the loop should pause until the exit code is returned which will make the instances of nquviplus run one at a time.

Last edited by dijetlo; 02-16-2017 at 04:08 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve an MP3 from Youtube video using quvi? Xeratul Linux - General 7 11-18-2020 04:06 AM
QUVI to record the soccer FIFA finale 2014-07-13 Xeratul General 0 07-13-2014 02:18 PM
LXer: Hackable media-streaming speaker does HiFi with tubes LXer Syndicated Linux News 0 04-24-2014 02:51 AM
Upgrade Ubuntu, 'Module is unknown' on login. Windows 7 down tubes? lugoteehalt Ubuntu 3 05-18-2011 09:41 AM
VLC loading default playlist or any other playlist from command line r00tb33r Linux - Software 0 12-29-2008 10:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration