Jump to content


Photo

GStreamer 1.0

gstreamer 1.0 openpli

  • Please log in to reply
2520 replies to this topic

Re: GStreamer 1.0 #521 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 8 February 2015 - 13:12

There is reason I changed this, try it out with $GST_MAJORMINOR having different values. Or read how "test" works ;)


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: GStreamer 1.0 #522 theparasol

  • Senior Member
  • 4,157 posts

+198
Excellent

Posted 8 February 2015 - 13:42

I have no specific knowledge on this "test" and "x1"  but Christophecvr's patch worked and your adopted one doesnt.

As said I changed this specific code with a patch and a .bbappend and compiling with gstreamer1.0 works again.

I seem unable to change the if test line to something else, perhaps some things get parsed and replaced while compiling before the bbappend kicks in and therefore my patch cant be applied.

But I'm sure over time someone that has a little more knowledge than me can change this part for the better till then I'll have to use my patch to let gstreamer1.0 compiling succeed.


@Camping: ZGemma H.2S, Technisat Multytenne 4-in-1 @Home: Edision Mini 4K, Wave Frontier T55, EMP Centauri EMP DiSEqC 8/1 switch, 4x Inverto Ultra Black single LNB


Re: GStreamer 1.0 #523 MiLo

  • PLi® Core member
  • 14,055 posts

+298
Excellent

Posted 8 February 2015 - 20:17

version 0.x sorts before 1.x in ASCII ordering, so in this particular case "<" should be okay for all future versions.
Real musicians never die - they just decompose

Re: GStreamer 1.0 #524 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 9 February 2015 - 15:25

Parasol, it works if the variable is "1.*" but it also tests as true on "0.10", which is of course unacceptable for our main building environment.

 

Also test can't use < or >, these are file redirection operator for the shell. You should use ==, !=, -gt or -lt.


Edited by Erik Slagter, 9 February 2015 - 15:26.

* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: GStreamer 1.0 #525 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 10 February 2015 - 10:18

Parasol, it works if the variable is "1.*" but it also tests as true on "0.10", which is of course unacceptable for our main building environment.

 

Also test can't use < or >, these are file redirection operator for the shell. You should use ==, !=, -gt or -lt.

 

Yes it should have been.

if test "x$GST_MAJORMINOR" -lt "x1"  And it work's then.



Re: GStreamer 1.0 #526 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 10 February 2015 - 10:37

But the test is only trough for gst smaller the 1.xxx. Means yes it's trough for 0.1 not for any 1.xxxx

 

Which means it's 100 % correct.

 

But You could have done it like by you with.

 

if test "x$GST_MAJORMINOR" ==  "x1"  # then it would have been ok as well. With != You just do the oposed and will use 0.1 by 1.0 or 1.0 by 0.1.



Re: GStreamer 1.0 #527 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 10 February 2015 - 10:52

abou the fact that in a configure file -lt and -gt must be used still not shure as it is used with uitils and make command and there can be a difference with shell commands.

 

Further even what I've written above was wrong but what well should work is this

 

if test "x$GST_MAJORMINOR" "0.10"



Re: GStreamer 1.0 #528 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 10 February 2015 - 10:58

sorry typo

 

if test "x$GST_MAJORMINOR" ==  "0.10"


Edited by christophecvr, 10 February 2015 - 10:58.


Re: GStreamer 1.0 #529 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 10 February 2015 - 12:08

I searched for it .

 

Those both way's are ok in this case and are correct

if test "$GST_MAJORMINOR" == "0.10"

# or 

if test "x$GST_MAJORMINOR" -lt "x1"




Re: GStreamer 1.0 #530 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 10 February 2015 - 12:43

I don't think the test is correct, still.

 

The test should be done on GST > 0.x or GST < 0.x. So the only thing we want to test for, is the MAJOR version.

 

So imho the test should be if test $GST_MAJOR == 0, provided such a variable exists.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: GStreamer 1.0 #531 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 10 February 2015 - 12:59

Look at the test :

 

    AS_HELP_STRING([--with-gstversion],[use gstreamer version (major.minor)]),
    [GST_MAJORMINOR=$withval],[GST_MAJORMINOR=0.10])

 

 

GST_MAJORMINOR   = the real version used.  major = 0 or 1.

 

So the test like it was was 100 % correct.

 

if test "x$GST_MAJORMINOR" -lt "x1"  all version with major below 1.  and about the use of < or -lt  I'm not shure , but gues that -lt is better.



Re: GStreamer 1.0 #532 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 10 February 2015 - 13:32

Then the test should be

 

if [ $GST_MAJORMINOR == 0.10 ]

then

    # 0.10 specific code

else

    # >= 1.0 specific code

fi

 

In "configure" style code that would be

 

if test "x$GST_MAJORMINOR" == "x0.10"

then

    # 0.10 specific code

else

    # >= 1.0 specific code

fi


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: GStreamer 1.0 #533 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 10 February 2015 - 13:42

Well yes whatever :)

 

if test "x$GST_MAJORMINOR" == "x0.10"  or if test "x$GST_MAJORMINOR" -lt "x1" both have the same goal  here ;)



Re: GStreamer 1.0 #534 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 10 February 2015 - 13:45

Yes I agree, but your approach simply does not work, that's the point. You're going to compare either

 

x0.10 with x1

or

x1.40 with x1

 

using a numeric compare function.

 

So simply don't use numeric comparation test but string equality test, that's always safe.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: GStreamer 1.0 #535 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 10 February 2015 - 14:16

Well actually it was the goal to compare nummerci on not a string and here it work's read what Milio's said

 

version 0.x sorts before 1.x in ASCII ordering, so in this particular case "<" should be okay for all future versions

 

Now why like this.

 

First if the user does configure whitout --with-gstversion=1.0  there is in some case well a version and this can be 0.10.26  or so I 'm not shure what will happen the with == "0.10" it should compile for 0.10 but due to version off 0.10.26 it could give weird results.

 

With

if test "x$GST_MAJORMINOR" < "x1"  it will set all gst version beginning with 0.xxx as  0.10 version. and all with 1.xxx will be set as 1.0 versions.



Re: GStreamer 1.0 #536 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 10 February 2015 - 14:29

p.s.

 

if test "x$GST_MAJORMINOR" < "x1"  (does not work in standard linux scripting that x is specific to autoconfig or one off the tools)



Re: GStreamer 1.0 #537 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 10 February 2015 - 14:58

but I think You're right , it has been taken from another patch that .

 

perhaps better add

++AC_ARG_WITH(gstversion,
++    AS_HELP_STRING([--with-gstversion],[use gstreamer version (major)]),
++    [GST_MAJOR=$withval],[GST_MAJOR=0])

and then change test in 

++if test "$GST_MAJOR" -lt "1"; then
++    PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10 gstreamer-pbutils-0.10)
++else
++    PKG_CHECK_MODULES(GSTREAMER, gstreamer-1.0 gstreamer-pbutils-1.0)
++fi


Re: GStreamer 1.0 #538 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 10 February 2015 - 15:24

@theparasol

 

can You try in patch by just changing this (can be done by editing patch only)

 

 

++#dnl versions of gstreamer and plugins-base
++AC_ARG_WITH(gstversion,
++    AS_HELP_STRING([--with-gstversion],[use gstreamer version (major.minor)]),
++    [GST_MAJORMINOR=$withval],[GST_MAJORMINOR=0.10])
++

##### into #####

++#dnl versions of gstreamer and plugins-base
++AC_ARG_WITH(gstversion,
++    AS_HELP_STRING([--with-gstversion],[use gstreamer version (major)]),
++    [GST_MAJOR=$withval],[GST_MAJOR=0])
++

# and those from ###

++if test "x$GST_MAJORMINOR" < "x1"; then
++    PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10 gstreamer-pbutils-0.10)
++else
++    PKG_CHECK_MODULES(GSTREAMER, gstreamer-1.0 gstreamer-pbutils-1.0)
++fi
++

### into ##

++if test "$GST_MAJOR" -lt  "1"; then
++    PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10 gstreamer-pbutils-0.10)
++else
++    PKG_CHECK_MODULES(GSTREAMER, gstreamer-1.0 gstreamer-pbutils-1.0)
++fi
++



Re: GStreamer 1.0 #539 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 10 February 2015 - 16:00

I think it's better to make an option like "use-gstreamer-1", that way you never have to compare by number. It's also easier for the user, as gstreamer options will go up at some time. The user then doesn't have to decide whether to use "1.0" "1.4" or "1.9" etc.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: GStreamer 1.0 #540 theparasol

  • Senior Member
  • 4,157 posts

+198
Excellent

Posted 10 February 2015 - 16:11

@christophecvr: doesnt work either.

I think Erik's suggestion is better and wont mixup the user, right now with 1.0 users might think: I'm using gstreamer 1.0.... its not, using the latest gstreamer 1.x.x


@Camping: ZGemma H.2S, Technisat Multytenne 4-in-1 @Home: Edision Mini 4K, Wave Frontier T55, EMP Centauri EMP DiSEqC 8/1 switch, 4x Inverto Ultra Black single LNB




4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users