gstreamer from 2.x

This commit is contained in:
Siana Gearz
2010-12-25 01:41:09 +01:00
parent 5e01f8a0e6
commit 4d860094d6
12 changed files with 704 additions and 1019 deletions

View File

@@ -1,504 +1,68 @@
http://www.gnu.org/copyleft/lgpl.html
GStreamer GNU LESSER GENERAL PUBLIC LICENSE
Copyright (C) 1999-2008 GStreamer authors
This library is free software; you can redistribute it and/or Version 3, 29 June 2007
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
0. Additional Definitions.
---------------------------------------------------------------------- As used herein, .this License. refers to version 3 of the GNU Lesser General Public License, and the .GNU GPL. refers to version 3 of the GNU General Public License.
.The Library. refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
GNU LIBRARY GENERAL PUBLIC LICENSE An .Application. is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc. A .Combined Work. is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the .Linked Version..
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is The .Minimal Corresponding Source. for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble The .Corresponding Application Code. for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
The licenses for most software are designed to take away your You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
freedom to share and change it. By contrast, the GNU General Public 2. Conveying Modified Versions.
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not * a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
price. Our General Public Licenses are designed to make sure that you * b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid 3. Object Code Incorporating Material from Library Header Files.
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright * a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
the library, and (2) offer you this license which gives you legal * b) Accompany the object code with a copy of the GNU GPL and this license document.
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain 4. Combined Works.
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that * a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
they blur the distinction we usually make between modifying or adding to a * b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
program and simply using it. Linking a program with a library, without * c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
changing the library, is in some sense simply using the library, and is * d) Do one of the following:
analogous to running a utility program or application program. However, in o 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
a textual and legal sense, the linked executable is a combined work, a o 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
derivative of the original library, and the ordinary General Public License * e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
treats it as such.
Because of this blurred distinction, using the ordinary General 5. Combined Libraries.
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and * a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
modification follow. Pay close attention to the difference between a * b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary 6. Revised Versions of the GNU Lesser General Public License.
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License .or any later version. applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@@ -30,13 +30,23 @@ include_directories(
### media_plugin_gstreamer010 ### media_plugin_gstreamer010
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif(NOT WORD_SIZE EQUAL 32)
set(media_plugin_gstreamer010_SOURCE_FILES set(media_plugin_gstreamer010_SOURCE_FILES
media_plugin_gstreamer010.cpp media_plugin_gstreamer010.cpp
llmediaimplgstreamer_syms.cpp
llmediaimplgstreamervidplug.cpp llmediaimplgstreamervidplug.cpp
) )
set(media_plugin_gstreamer010_HEADER_FILES set(media_plugin_gstreamer010_HEADER_FILES
llmediaimplgstreamervidplug.h llmediaimplgstreamervidplug.h
llmediaimplgstreamer_syms.h
llmediaimplgstreamertriviallogging.h llmediaimplgstreamertriviallogging.h
) )

37
indra/media_plugins/gstreamer010/llmediaimplgstreamer.h Executable file → Normal file
View File

@@ -4,33 +4,26 @@
* @brief implementation that supports media playback via GStreamer. * @brief implementation that supports media playback via GStreamer.
* *
* @cond * @cond
* $LicenseInfo:firstyear=2007&license=viewergpl$ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
*
* Copyright (c) 2007-2010, Linden Research, Inc.
*
* Second Life Viewer Source Code * Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab * Copyright (C) 2010, Linden Research, Inc.
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlife.com/developers/opensource/gplv2
* *
* There are special exceptions to the terms and conditions of the GPL as * This library is free software; you can redistribute it and/or
* it is applied to this Source Code. View the full text of the exception * modify it under the terms of the GNU Lesser General Public
* in the file doc/FLOSS-exception.txt in this software distribution, or * License as published by the Free Software Foundation;
* online at * version 2.1 of the License only.
* http://secondlife.com/developers/opensource/flossexception
* *
* By copying, modifying or distributing this software, you acknowledge * This library is distributed in the hope that it will be useful,
* that you have read and understood your obligations described above, * but WITHOUT ANY WARRANTY; without even the implied warranty of
* and agree to abide by those obligations. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * You should have received a copy of the GNU Lesser General Public
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * License along with this library; if not, write to the Free Software
* COMPLETENESS OR PERFORMANCE. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$ * $/LicenseInfo$
*
* @endcond * @endcond
*/ */

View File

@@ -0,0 +1,167 @@
/**
* @file llmediaimplgstreamer_syms.cpp
* @brief dynamic GStreamer symbol-grabbing code
*
* @cond
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
* @endcond
*/
#if LL_GSTREAMER010_ENABLED
#include <string>
extern "C" {
#include <gst/gst.h>
#include "apr_pools.h"
#include "apr_dso.h"
}
#include "llmediaimplgstreamertriviallogging.h"
#define LL_GST_SYM(REQ, GSTSYM, RTN, ...) RTN (*ll##GSTSYM)(__VA_ARGS__) = NULL
#include "llmediaimplgstreamer_syms_raw.inc"
#include "llmediaimplgstreamer_syms_rawv.inc"
#undef LL_GST_SYM
// a couple of stubs for disgusting reasons
GstDebugCategory*
ll_gst_debug_category_new(gchar *name, guint color, gchar *description)
{
static GstDebugCategory dummy;
return &dummy;
}
void ll_gst_debug_register_funcptr(GstDebugFuncPtr func, gchar* ptrname)
{
}
static bool sSymsGrabbed = false;
static apr_pool_t *sSymGSTDSOMemoryPool = NULL;
static apr_dso_handle_t *sSymGSTDSOHandleG = NULL;
static apr_dso_handle_t *sSymGSTDSOHandleV = NULL;
bool grab_gst_syms(std::string gst_dso_name,
std::string gst_dso_name_vid)
{
if (sSymsGrabbed)
{
// already have grabbed good syms
return TRUE;
}
bool sym_error = false;
bool rtn = false;
apr_status_t rv;
apr_dso_handle_t *sSymGSTDSOHandle = NULL;
#define LL_GST_SYM(REQ, GSTSYM, RTN, ...) do{rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll##GSTSYM, sSymGSTDSOHandle, #GSTSYM); if (rv != APR_SUCCESS) {INFOMSG("Failed to grab symbol: %s", #GSTSYM); if (REQ) sym_error = true;} else DEBUGMSG("grabbed symbol: %s from %p", #GSTSYM, (void*)ll##GSTSYM);}while(0)
//attempt to load the shared libraries
apr_pool_create(&sSymGSTDSOMemoryPool, NULL);
if ( APR_SUCCESS == (rv = apr_dso_load(&sSymGSTDSOHandle,
gst_dso_name.c_str(),
sSymGSTDSOMemoryPool) ))
{
INFOMSG("Found DSO: %s", gst_dso_name.c_str());
#include "llmediaimplgstreamer_syms_raw.inc"
if ( sSymGSTDSOHandle )
{
sSymGSTDSOHandleG = sSymGSTDSOHandle;
sSymGSTDSOHandle = NULL;
}
if ( APR_SUCCESS ==
(rv = apr_dso_load(&sSymGSTDSOHandle,
gst_dso_name_vid.c_str(),
sSymGSTDSOMemoryPool) ))
{
INFOMSG("Found DSO: %s", gst_dso_name_vid.c_str());
#include "llmediaimplgstreamer_syms_rawv.inc"
rtn = !sym_error;
}
else
{
INFOMSG("Couldn't load DSO: %s", gst_dso_name_vid.c_str());
rtn = false; // failure
}
}
else
{
INFOMSG("Couldn't load DSO: %s", gst_dso_name.c_str());
rtn = false; // failure
}
if (sym_error)
{
WARNMSG("Failed to find necessary symbols in GStreamer libraries.");
}
if ( sSymGSTDSOHandle )
{
sSymGSTDSOHandleV = sSymGSTDSOHandle;
sSymGSTDSOHandle = NULL;
}
#undef LL_GST_SYM
sSymsGrabbed = !!rtn;
return rtn;
}
void ungrab_gst_syms()
{
// should be safe to call regardless of whether we've
// actually grabbed syms.
if ( sSymGSTDSOHandleG )
{
apr_dso_unload(sSymGSTDSOHandleG);
sSymGSTDSOHandleG = NULL;
}
if ( sSymGSTDSOHandleV )
{
apr_dso_unload(sSymGSTDSOHandleV);
sSymGSTDSOHandleV = NULL;
}
if ( sSymGSTDSOMemoryPool )
{
apr_pool_destroy(sSymGSTDSOMemoryPool);
sSymGSTDSOMemoryPool = NULL;
}
// NULL-out all of the symbols we'd grabbed
#define LL_GST_SYM(REQ, GSTSYM, RTN, ...) do{ll##GSTSYM = NULL;}while(0)
#include "llmediaimplgstreamer_syms_raw.inc"
#include "llmediaimplgstreamer_syms_rawv.inc"
#undef LL_GST_SYM
sSymsGrabbed = false;
}
#endif // LL_GSTREAMER010_ENABLED

View File

@@ -0,0 +1,74 @@
/**
* @file llmediaimplgstreamer_syms.h
* @brief dynamic GStreamer symbol-grabbing code
*
* @cond
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
* @endcond
*/
#include "linden_common.h"
#if LL_GSTREAMER010_ENABLED
extern "C" {
#include <gst/gst.h>
}
bool grab_gst_syms(std::string gst_dso_name,
std::string gst_dso_name_vid);
void ungrab_gst_syms();
#define LL_GST_SYM(REQ, GSTSYM, RTN, ...) extern RTN (*ll##GSTSYM)(__VA_ARGS__)
#include "llmediaimplgstreamer_syms_raw.inc"
#include "llmediaimplgstreamer_syms_rawv.inc"
#undef LL_GST_SYM
// regrettable hacks to give us better runtime compatibility with older systems
#define llg_return_if_fail(COND) do{if (!(COND)) return;}while(0)
#define llg_return_val_if_fail(COND,V) do{if (!(COND)) return V;}while(0)
// regrettable hacks because GStreamer was not designed for runtime loading
#undef GST_TYPE_MESSAGE
#define GST_TYPE_MESSAGE (llgst_message_get_type())
#undef GST_TYPE_OBJECT
#define GST_TYPE_OBJECT (llgst_object_get_type())
#undef GST_TYPE_PIPELINE
#define GST_TYPE_PIPELINE (llgst_pipeline_get_type())
#undef GST_TYPE_ELEMENT
#define GST_TYPE_ELEMENT (llgst_element_get_type())
#undef GST_TYPE_VIDEO_SINK
#define GST_TYPE_VIDEO_SINK (llgst_video_sink_get_type())
// more regrettable hacks to stub-out these .h-exposed GStreamer internals
void ll_gst_debug_register_funcptr(GstDebugFuncPtr func, gchar* ptrname);
#undef _gst_debug_register_funcptr
#define _gst_debug_register_funcptr ll_gst_debug_register_funcptr
GstDebugCategory* ll_gst_debug_category_new(gchar *name, guint color, gchar *description);
#undef _gst_debug_category_new
#define _gst_debug_category_new ll_gst_debug_category_new
#undef __gst_debug_enabled
#define __gst_debug_enabled (0)
// more hacks
#define LLGST_MESSAGE_TYPE_NAME(M) (llgst_message_type_get_name(GST_MESSAGE_TYPE(M)))
#endif // LL_GSTREAMER010_ENABLED

View File

@@ -0,0 +1,51 @@
// required symbols to grab
LL_GST_SYM(true, gst_pad_peer_accept_caps, gboolean, GstPad *pad, GstCaps *caps);
LL_GST_SYM(true, gst_buffer_new, GstBuffer*, void);
LL_GST_SYM(true, gst_buffer_set_caps, void, GstBuffer*, GstCaps *);
LL_GST_SYM(true, gst_structure_set_value, void, GstStructure *, const gchar *, const GValue*);
LL_GST_SYM(true, gst_init_check, gboolean, int *argc, char **argv[], GError ** err);
LL_GST_SYM(true, gst_message_get_type, GType, void);
LL_GST_SYM(true, gst_message_type_get_name, const gchar*, GstMessageType type);
LL_GST_SYM(true, gst_message_parse_error, void, GstMessage *message, GError **gerror, gchar **debug);
LL_GST_SYM(true, gst_message_parse_warning, void, GstMessage *message, GError **gerror, gchar **debug);
LL_GST_SYM(true, gst_message_parse_state_changed, void, GstMessage *message, GstState *oldstate, GstState *newstate, GstState *pending);
LL_GST_SYM(true, gst_element_set_state, GstStateChangeReturn, GstElement *element, GstState state);
LL_GST_SYM(true, gst_object_unref, void, gpointer object);
LL_GST_SYM(true, gst_object_get_type, GType, void);
LL_GST_SYM(true, gst_pipeline_get_type, GType, void);
LL_GST_SYM(true, gst_pipeline_get_bus, GstBus*, GstPipeline *pipeline);
LL_GST_SYM(true, gst_bus_add_watch, guint, GstBus * bus, GstBusFunc func, gpointer user_data);
LL_GST_SYM(true, gst_element_factory_make, GstElement*, const gchar *factoryname, const gchar *name);
LL_GST_SYM(true, gst_element_get_type, GType, void);
LL_GST_SYM(true, gst_static_pad_template_get, GstPadTemplate*, GstStaticPadTemplate *pad_template);
LL_GST_SYM(true, gst_element_class_add_pad_template, void, GstElementClass *klass, GstPadTemplate *temp);
LL_GST_SYM(true, gst_element_class_set_details, void, GstElementClass *klass, const GstElementDetails *details);
LL_GST_SYM(true, gst_caps_unref, void, GstCaps* caps);
LL_GST_SYM(true, gst_caps_ref, GstCaps *, GstCaps* caps);
//LL_GST_SYM(true, gst_caps_is_empty, gboolean, const GstCaps *caps);
LL_GST_SYM(true, gst_caps_from_string, GstCaps *, const gchar *string);
LL_GST_SYM(true, gst_caps_replace, void, GstCaps **caps, GstCaps *newcaps);
LL_GST_SYM(true, gst_caps_get_structure, GstStructure *, const GstCaps *caps, guint index);
LL_GST_SYM(true, gst_caps_copy, GstCaps *, const GstCaps * caps);
//LL_GST_SYM(true, gst_caps_intersect, GstCaps *, const GstCaps *caps1, const GstCaps *caps2);
LL_GST_SYM(true, gst_element_register, gboolean, GstPlugin *plugin, const gchar *name, guint rank, GType type);
LL_GST_SYM(true, _gst_plugin_register_static, void, GstPluginDesc *desc);
LL_GST_SYM(true, gst_structure_get_int, gboolean, const GstStructure *structure, const gchar *fieldname, gint *value);
LL_GST_SYM(true, gst_structure_get_value, G_CONST_RETURN GValue *, const GstStructure *structure, const gchar *fieldname);
LL_GST_SYM(true, gst_value_get_fraction_numerator, gint, const GValue *value);
LL_GST_SYM(true, gst_value_get_fraction_denominator, gint, const GValue *value);
LL_GST_SYM(true, gst_structure_get_name, G_CONST_RETURN gchar *, const GstStructure *structure);
LL_GST_SYM(true, gst_element_seek, bool, GstElement *, gdouble, GstFormat, GstSeekFlags, GstSeekType, gint64, GstSeekType, gint64);
// optional symbols to grab
LL_GST_SYM(false, gst_registry_fork_set_enabled, void, gboolean enabled);
LL_GST_SYM(false, gst_segtrap_set_enabled, void, gboolean enabled);
LL_GST_SYM(false, gst_message_parse_buffering, void, GstMessage *message, gint *percent);
LL_GST_SYM(false, gst_message_parse_info, void, GstMessage *message, GError **gerror, gchar **debug);
LL_GST_SYM(false, gst_element_query_position, gboolean, GstElement *element, GstFormat *format, gint64 *cur);
LL_GST_SYM(false, gst_version, void, guint *major, guint *minor, guint *micro, guint *nano);
// GStreamer 'internal' symbols which may not be visible in some runtimes but are still used in expanded GStreamer header macros - yuck! We'll substitute our own stubs for these.
//LL_GST_SYM(true, _gst_debug_register_funcptr, void, GstDebugFuncPtr func, gchar* ptrname);
//LL_GST_SYM(true, _gst_debug_category_new, GstDebugCategory *, gchar *name, guint color, gchar *description);

View File

@@ -0,0 +1,5 @@
// required symbols to grab
LL_GST_SYM(true, gst_video_sink_get_type, GType, void);
// optional symbols to grab

View File

@@ -3,33 +3,26 @@
* @brief minimal logging utilities. * @brief minimal logging utilities.
* *
* @cond * @cond
* $LicenseInfo:firstyear=2009&license=viewergpl$ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
*
* Copyright (c) 2009-2010, Linden Research, Inc.
*
* Second Life Viewer Source Code * Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab * Copyright (C) 2010, Linden Research, Inc.
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlife.com/developers/opensource/gplv2
* *
* There are special exceptions to the terms and conditions of the GPL as * This library is free software; you can redistribute it and/or
* it is applied to this Source Code. View the full text of the exception * modify it under the terms of the GNU Lesser General Public
* in the file doc/FLOSS-exception.txt in this software distribution, or * License as published by the Free Software Foundation;
* online at * version 2.1 of the License only.
* http://secondlife.com/developers/opensource/flossexception
* *
* By copying, modifying or distributing this software, you acknowledge * This library is distributed in the hope that it will be useful,
* that you have read and understood your obligations described above, * but WITHOUT ANY WARRANTY; without even the implied warranty of
* and agree to abide by those obligations. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * You should have received a copy of the GNU Lesser General Public
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * License along with this library; if not, write to the Free Software
* COMPLETENESS OR PERFORMANCE. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$ * $/LicenseInfo$
*
* @endcond * @endcond
*/ */
@@ -38,19 +31,16 @@
#include <cstdio> #include <cstdio>
///////////////////////////////////////////////////////////////////////// extern "C" {
// Debug/Info/Warning macros.
#if LL_WINDOWS
#include <process.h>
#define LL_GETPID GetCurrentProcessId
#else
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#define LL_GETPID getpid }
#endif
/////////////////////////////////////////////////////////////////////////
// Debug/Info/Warning macros.
#define MSGMODULEFOO "(media plugin)" #define MSGMODULEFOO "(media plugin)"
#define STDERRMSG(...) do{\ #define STDERRMSG(...) do{\
fprintf(stderr, " pid:%d: ", (int)LL_GETPID());\ fprintf(stderr, " pid:%d: ", (int)getpid());\
fprintf(stderr, MSGMODULEFOO " %s:%d: ", __FUNCTION__, __LINE__);\ fprintf(stderr, MSGMODULEFOO " %s:%d: ", __FUNCTION__, __LINE__);\
fprintf(stderr, __VA_ARGS__);\ fprintf(stderr, __VA_ARGS__);\
fputc('\n',stderr);\ fputc('\n',stderr);\

View File

@@ -3,33 +3,26 @@
* @brief Video-consuming static GStreamer plugin for gst-to-LLMediaImpl * @brief Video-consuming static GStreamer plugin for gst-to-LLMediaImpl
* *
* @cond * @cond
* $LicenseInfo:firstyear=2007&license=viewergpl$ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
*
* Copyright (c) 2007-2010, Linden Research, Inc.
*
* Second Life Viewer Source Code * Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab * Copyright (C) 2010, Linden Research, Inc.
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlife.com/developers/opensource/gplv2
* *
* There are special exceptions to the terms and conditions of the GPL as * This library is free software; you can redistribute it and/or
* it is applied to this Source Code. View the full text of the exception * modify it under the terms of the GNU Lesser General Public
* in the file doc/FLOSS-exception.txt in this software distribution, or * License as published by the Free Software Foundation;
* online at * version 2.1 of the License only.
* http://secondlife.com/developers/opensource/flossexception
* *
* By copying, modifying or distributing this software, you acknowledge * This library is distributed in the hope that it will be useful,
* that you have read and understood your obligations described above, * but WITHOUT ANY WARRANTY; without even the implied warranty of
* and agree to abide by those obligations. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * You should have received a copy of the GNU Lesser General Public
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * License along with this library; if not, write to the Free Software
* COMPLETENESS OR PERFORMANCE. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$ * $/LicenseInfo$
*
* @endcond * @endcond
*/ */
@@ -41,29 +34,15 @@
#include <gst/video/video.h> #include <gst/video/video.h>
#include <gst/video/gstvideosink.h> #include <gst/video/gstvideosink.h>
#include "llmediaimplgstreamer_syms.h"
#include "llmediaimplgstreamertriviallogging.h" #include "llmediaimplgstreamertriviallogging.h"
// #include "llthread.h"
#include "llmediaimplgstreamervidplug.h" #include "llmediaimplgstreamervidplug.h"
GST_DEBUG_CATEGORY_STATIC (gst_slvideo_debug); GST_DEBUG_CATEGORY_STATIC (gst_slvideo_debug);
#define GST_CAT_DEFAULT gst_slvideo_debug #define GST_CAT_DEFAULT gst_slvideo_debug
/* Filter signals and args *//*
enum
{
*//* FILL ME *//*
LAST_SIGNAL
};
enum
{
ARG_0
};
#define SLV_SIZECAPS ", width=(int){1,2,4,8,16,32,64,128,256,512,1024}, height=(int){1,2,4,8,16,32,64,128,256,512,1024} "
#define SLV_ALLCAPS GST_VIDEO_CAPS_RGBx SLV_SIZECAPS ";" GST_VIDEO_CAPS_BGRx SLV_SIZECAPS
*/
#define SLV_SIZECAPS ", width=(int)[1,2048], height=(int)[1,2048] " #define SLV_SIZECAPS ", width=(int)[1,2048], height=(int)[1,2048] "
#define SLV_ALLCAPS GST_VIDEO_CAPS_RGBx SLV_SIZECAPS #define SLV_ALLCAPS GST_VIDEO_CAPS_RGBx SLV_SIZECAPS
@@ -95,9 +74,9 @@ gst_slvideo_base_init (gpointer gclass)
}; };
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
gst_element_class_add_pad_template (element_class, llgst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_factory)); llgst_static_pad_template_get (&sink_factory));
gst_element_class_set_details (element_class, &element_details); llgst_element_class_set_details (element_class, &element_details);
} }
@@ -108,7 +87,7 @@ gst_slvideo_finalize (GObject * object)
slvideo = GST_SLVIDEO (object); slvideo = GST_SLVIDEO (object);
if (slvideo->caps) if (slvideo->caps)
{ {
gst_caps_unref(slvideo->caps); llgst_caps_unref(slvideo->caps);
} }
G_OBJECT_CLASS(parent_class)->finalize (object); G_OBJECT_CLASS(parent_class)->finalize (object);
@@ -119,7 +98,7 @@ static GstFlowReturn
gst_slvideo_show_frame (GstBaseSink * bsink, GstBuffer * buf) gst_slvideo_show_frame (GstBaseSink * bsink, GstBuffer * buf)
{ {
GstSLVideo *slvideo; GstSLVideo *slvideo;
g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR); llg_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);
slvideo = GST_SLVIDEO(bsink); slvideo = GST_SLVIDEO(bsink);
@@ -211,7 +190,7 @@ gst_slvideo_get_caps (GstBaseSink * bsink)
GstSLVideo *slvideo; GstSLVideo *slvideo;
slvideo = GST_SLVIDEO(bsink); slvideo = GST_SLVIDEO(bsink);
return gst_caps_ref (slvideo->caps); return llgst_caps_ref (slvideo->caps);
} }
@@ -221,32 +200,21 @@ gst_slvideo_set_caps (GstBaseSink * bsink, GstCaps * caps)
{ {
GstSLVideo *filter; GstSLVideo *filter;
GstStructure *structure; GstStructure *structure;
// GstCaps *intersection;
GST_DEBUG ("set caps with %" GST_PTR_FORMAT, caps); GST_DEBUG ("set caps with %" GST_PTR_FORMAT, caps);
filter = GST_SLVIDEO(bsink); filter = GST_SLVIDEO(bsink);
/* int width, height;
intersection = gst_caps_intersect (filter->caps, caps);
if (gst_caps_is_empty (intersection))
{
// no overlap between our caps and requested caps
return FALSE;
}
gst_caps_unref(intersection);
*/
int width = 0;
int height = 0;
gboolean ret; gboolean ret;
const GValue *fps; const GValue *fps;
const GValue *par; const GValue *par;
structure = gst_caps_get_structure (caps, 0); structure = llgst_caps_get_structure (caps, 0);
ret = gst_structure_get_int (structure, "width", &width); ret = llgst_structure_get_int (structure, "width", &width);
ret = ret && gst_structure_get_int (structure, "height", &height); ret = ret && llgst_structure_get_int (structure, "height", &height);
fps = gst_structure_get_value (structure, "framerate"); fps = llgst_structure_get_value (structure, "framerate");
ret = ret && (fps != NULL); ret = ret && (fps != NULL);
par = gst_structure_get_value (structure, "pixel-aspect-ratio"); par = llgst_structure_get_value (structure, "pixel-aspect-ratio");
if (!ret) if (!ret)
return FALSE; return FALSE;
@@ -256,35 +224,34 @@ gst_slvideo_set_caps (GstBaseSink * bsink, GstCaps * caps)
filter->width = width; filter->width = width;
filter->height = height; filter->height = height;
filter->fps_n = gst_value_get_fraction_numerator(fps);
filter->fps_d = gst_value_get_fraction_denominator(fps); filter->fps_n = llgst_value_get_fraction_numerator(fps);
filter->fps_d = llgst_value_get_fraction_denominator(fps);
if (par) if (par)
{ {
filter->par_n = gst_value_get_fraction_numerator(par); filter->par_n = llgst_value_get_fraction_numerator(par);
filter->par_d = gst_value_get_fraction_denominator(par); filter->par_d = llgst_value_get_fraction_denominator(par);
} }
else else
{ {
filter->par_n = 1; filter->par_n = 1;
filter->par_d = 1; filter->par_d = 1;
} }
GST_VIDEO_SINK_WIDTH(filter) = width; GST_VIDEO_SINK_WIDTH(filter) = width;
GST_VIDEO_SINK_HEIGHT(filter) = height; GST_VIDEO_SINK_HEIGHT(filter) = height;
// crufty lump - we *always* accept *only* RGBX now. // crufty lump - we *always* accept *only* RGBX now.
/* /*
filter->format = SLV_PF_UNKNOWN; filter->format = SLV_PF_UNKNOWN;
if (0 == strcmp(gst_structure_get_name(structure), if (0 == strcmp(llgst_structure_get_name(structure),
"video/x-raw-rgb")) "video/x-raw-rgb"))
{ {
int red_mask; int red_mask;
int green_mask; int green_mask;
int blue_mask; int blue_mask;
gst_structure_get_int(structure, "red_mask", &red_mask); llgst_structure_get_int(structure, "red_mask", &red_mask);
gst_structure_get_int(structure, "green_mask", &green_mask); llgst_structure_get_int(structure, "green_mask", &green_mask);
gst_structure_get_int(structure, "blue_mask", &blue_mask); llgst_structure_get_int(structure, "blue_mask", &blue_mask);
if ((unsigned int)red_mask == 0xFF000000 && if ((unsigned int)red_mask == 0xFF000000 &&
(unsigned int)green_mask == 0x00FF0000 && (unsigned int)green_mask == 0x00FF0000 &&
(unsigned int)blue_mask == 0x0000FF00) (unsigned int)blue_mask == 0x0000FF00)
@@ -298,13 +265,12 @@ gst_slvideo_set_caps (GstBaseSink * bsink, GstCaps * caps)
filter->format = SLV_PF_BGRX; filter->format = SLV_PF_BGRX;
//fprintf(stderr, "\n\nPIXEL FORMAT BGR\n\n"); //fprintf(stderr, "\n\nPIXEL FORMAT BGR\n\n");
} }
}*/
}*/
filter->format = SLV_PF_RGBX; filter->format = SLV_PF_RGBX;
GST_OBJECT_UNLOCK(filter); GST_OBJECT_UNLOCK(filter);
return TRUE; return TRUE;
} }
@@ -351,15 +317,15 @@ gst_slvideo_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
// we can ignore these and reverse-negotiate our preferred dimensions with // we can ignore these and reverse-negotiate our preferred dimensions with
// the peer if we like - we need to do this to obey dynamic resize requests // the peer if we like - we need to do this to obey dynamic resize requests
// flowing in from the app. // flowing in from the app.
structure = gst_caps_get_structure (caps, 0); structure = llgst_caps_get_structure (caps, 0);
if (!gst_structure_get_int(structure, "width", &width) || if (!llgst_structure_get_int(structure, "width", &width) ||
!gst_structure_get_int(structure, "height", &height)) !llgst_structure_get_int(structure, "height", &height))
{ {
GST_WARNING_OBJECT (slvideo, "no width/height in caps %" GST_PTR_FORMAT, caps); GST_WARNING_OBJECT (slvideo, "no width/height in caps %" GST_PTR_FORMAT, caps);
return GST_FLOW_NOT_NEGOTIATED; return GST_FLOW_NOT_NEGOTIATED;
} }
GstBuffer *newbuf = gst_buffer_new(); GstBuffer *newbuf = llgst_buffer_new();
bool made_bufferdata_ptr = false; bool made_bufferdata_ptr = false;
#define MAXDEPTHHACK 4 #define MAXDEPTHHACK 4
@@ -379,19 +345,19 @@ gst_slvideo_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
GstCaps *desired_caps; GstCaps *desired_caps;
GstStructure *desired_struct; GstStructure *desired_struct;
desired_caps = gst_caps_copy (caps); desired_caps = llgst_caps_copy (caps);
desired_struct = gst_caps_get_structure (desired_caps, 0); desired_struct = llgst_caps_get_structure (desired_caps, 0);
GValue value = {0}; GValue value = {0};
g_value_init(&value, G_TYPE_INT); g_value_init(&value, G_TYPE_INT);
g_value_set_int(&value, slwantwidth); g_value_set_int(&value, slwantwidth);
gst_structure_set_value (desired_struct, "width", &value); llgst_structure_set_value (desired_struct, "width", &value);
g_value_unset(&value); g_value_unset(&value);
g_value_init(&value, G_TYPE_INT); g_value_init(&value, G_TYPE_INT);
g_value_set_int(&value, slwantheight); g_value_set_int(&value, slwantheight);
gst_structure_set_value (desired_struct, "height", &value); llgst_structure_set_value (desired_struct, "height", &value);
if (gst_pad_peer_accept_caps (GST_VIDEO_SINK_PAD (slvideo), if (llgst_pad_peer_accept_caps (GST_VIDEO_SINK_PAD (slvideo),
desired_caps)) desired_caps))
{ {
// todo: re-use buffers from a pool? // todo: re-use buffers from a pool?
@@ -402,13 +368,13 @@ gst_slvideo_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
GST_BUFFER_SIZE(newbuf) = slwantwidth * slwantheight * MAXDEPTHHACK; GST_BUFFER_SIZE(newbuf) = slwantwidth * slwantheight * MAXDEPTHHACK;
GST_BUFFER_MALLOCDATA(newbuf) = (guint8*)g_malloc(GST_BUFFER_SIZE(newbuf)); GST_BUFFER_MALLOCDATA(newbuf) = (guint8*)g_malloc(GST_BUFFER_SIZE(newbuf));
GST_BUFFER_DATA(newbuf) = GST_BUFFER_MALLOCDATA(newbuf); GST_BUFFER_DATA(newbuf) = GST_BUFFER_MALLOCDATA(newbuf);
gst_buffer_set_caps (GST_BUFFER_CAST(newbuf), desired_caps); llgst_buffer_set_caps (GST_BUFFER_CAST(newbuf), desired_caps);
made_bufferdata_ptr = true; made_bufferdata_ptr = true;
} else { } else {
// peer hates our cap suggestion // peer hates our cap suggestion
INFOMSG("peer hates us :("); INFOMSG("peer hates us :(");
gst_caps_unref(desired_caps); llgst_caps_unref(desired_caps);
} }
} }
} }
@@ -420,7 +386,7 @@ gst_slvideo_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
GST_BUFFER_SIZE(newbuf) = width * height * MAXDEPTHHACK; GST_BUFFER_SIZE(newbuf) = width * height * MAXDEPTHHACK;
GST_BUFFER_MALLOCDATA(newbuf) = (guint8*)g_malloc(GST_BUFFER_SIZE(newbuf)); GST_BUFFER_MALLOCDATA(newbuf) = (guint8*)g_malloc(GST_BUFFER_SIZE(newbuf));
GST_BUFFER_DATA(newbuf) = GST_BUFFER_MALLOCDATA(newbuf); GST_BUFFER_DATA(newbuf) = GST_BUFFER_MALLOCDATA(newbuf);
gst_buffer_set_caps (GST_BUFFER_CAST(newbuf), caps); llgst_buffer_set_caps (GST_BUFFER_CAST(newbuf), caps);
} }
*buf = GST_BUFFER_CAST(newbuf); *buf = GST_BUFFER_CAST(newbuf);
@@ -462,20 +428,6 @@ gst_slvideo_class_init (GstSLVideoClass * klass)
#undef LLGST_DEBUG_FUNCPTR #undef LLGST_DEBUG_FUNCPTR
} }
/*
static void
gst_slvideo_update_caps (GstSLVideo * slvideo)
{
GstCaps *caps;
// GStreamer will automatically convert colourspace if necessary.
// GStreamer will automatically resize media to one of these enumerated
// powers-of-two that we ask for (yay GStreamer!)
caps = gst_caps_from_string (SLV_ALLCAPS);
gst_caps_replace (&slvideo->caps, caps);
}
*/
/* initialize the new element /* initialize the new element
* instantiate pads and add them to element * instantiate pads and add them to element
@@ -498,24 +450,24 @@ gst_slvideo_init (GstSLVideo * filter,
filter->retained_frame_width = filter->width; filter->retained_frame_width = filter->width;
filter->retained_frame_height = filter->height; filter->retained_frame_height = filter->height;
filter->retained_frame_format = SLV_PF_UNKNOWN; filter->retained_frame_format = SLV_PF_UNKNOWN;
GstCaps *caps = gst_caps_from_string (SLV_ALLCAPS); GstCaps *caps = llgst_caps_from_string (SLV_ALLCAPS);
gst_caps_replace (&filter->caps, caps); llgst_caps_replace (&filter->caps, caps);
filter->resize_forced_always = false; filter->resize_forced_always = false;
filter->resize_try_width = -1; filter->resize_try_width = -1;
filter->resize_try_height = -1; filter->resize_try_height = -1;
GST_OBJECT_UNLOCK(filter); GST_OBJECT_UNLOCK(filter);
//gst_slvideo_update_caps(filter);
} }
static void static void
gst_slvideo_set_property (GObject * object, guint prop_id, gst_slvideo_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec) const GValue * value, GParamSpec * pspec)
{ {
g_return_if_fail (GST_IS_SLVIDEO (object)); llg_return_if_fail (GST_IS_SLVIDEO (object));
if (prop_id) { switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
} }
} }
@@ -523,10 +475,12 @@ static void
gst_slvideo_get_property (GObject * object, guint prop_id, gst_slvideo_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec) GValue * value, GParamSpec * pspec)
{ {
g_return_if_fail (GST_IS_SLVIDEO (object)); llg_return_if_fail (GST_IS_SLVIDEO (object));
if (prop_id) { switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
} }
} }
@@ -544,7 +498,7 @@ plugin_init (GstPlugin * plugin)
GST_DEBUG_CATEGORY_INIT (gst_slvideo_debug, (gchar*)"private-slvideo-plugin", GST_DEBUG_CATEGORY_INIT (gst_slvideo_debug, (gchar*)"private-slvideo-plugin",
0, (gchar*)"Second Life Video Sink"); 0, (gchar*)"Second Life Video Sink");
return gst_element_register (plugin, "private-slvideo", return llgst_element_register (plugin, "private-slvideo",
GST_RANK_NONE, GST_TYPE_SLVIDEO); GST_RANK_NONE, GST_TYPE_SLVIDEO);
} }
@@ -554,19 +508,20 @@ plugin_init (GstPlugin * plugin)
some g++ versions buggily avoid __attribute__((constructor)) functions - some g++ versions buggily avoid __attribute__((constructor)) functions -
so we provide an explicit plugin init function. so we provide an explicit plugin init function.
*/ */
#define PACKAGE (gchar*)"packagehack"
// this macro quietly refers to PACKAGE internally
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
(gchar*)"private-slvideoplugin",
(gchar*)"SL Video sink plugin",
plugin_init, (gchar*)"1.0", (gchar*)"LGPL",
(gchar*)"Second Life",
(gchar*)"http://www.secondlife.com/");
#undef PACKAGE
void gst_slvideo_init_class (void) void gst_slvideo_init_class (void)
{ {
gst_plugin_register_static( GST_VERSION_MAJOR, ll_gst_plugin_register_static (&gst_plugin_desc);
GST_VERSION_MINOR, DEBUGMSG("CLASS INIT");
(const gchar *)"private-slvideoplugin",
(gchar *)"SL Video sink plugin",
plugin_init,
(const gchar *)"0.1",
GST_LICENSE_UNKNOWN,
(const gchar *)"Second Life",
(const gchar *)"Second Life",
(const gchar *)"http://www.secondlife.com/" );
} }
#endif // LL_GSTREAMER010_ENABLED #endif // LL_GSTREAMER010_ENABLED

View File

@@ -3,33 +3,26 @@
* @brief Video-consuming static GStreamer plugin for gst-to-LLMediaImpl * @brief Video-consuming static GStreamer plugin for gst-to-LLMediaImpl
* *
* @cond * @cond
* $LicenseInfo:firstyear=2007&license=viewergpl$ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
*
* Copyright (c) 2007-2010, Linden Research, Inc.
*
* Second Life Viewer Source Code * Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab * Copyright (C) 2010, Linden Research, Inc.
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlife.com/developers/opensource/gplv2
* *
* There are special exceptions to the terms and conditions of the GPL as * This library is free software; you can redistribute it and/or
* it is applied to this Source Code. View the full text of the exception * modify it under the terms of the GNU Lesser General Public
* in the file doc/FLOSS-exception.txt in this software distribution, or * License as published by the Free Software Foundation;
* online at * version 2.1 of the License only.
* http://secondlife.com/developers/opensource/flossexception
* *
* By copying, modifying or distributing this software, you acknowledge * This library is distributed in the hope that it will be useful,
* that you have read and understood your obligations described above, * but WITHOUT ANY WARRANTY; without even the implied warranty of
* and agree to abide by those obligations. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * You should have received a copy of the GNU Lesser General Public
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * License along with this library; if not, write to the Free Software
* COMPLETENESS OR PERFORMANCE. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$ * $/LicenseInfo$
*
* @endcond * @endcond
*/ */
@@ -42,7 +35,6 @@ extern "C" {
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include <gst/video/gstvideosink.h> #include <gst/video/gstvideosink.h>
// #include <glib/gthread.h>
} }
G_BEGIN_DECLS G_BEGIN_DECLS

View File

@@ -3,45 +3,31 @@
* @brief GStreamer-0.10 plugin for LLMedia API plugin system * @brief GStreamer-0.10 plugin for LLMedia API plugin system
* *
* @cond * @cond
* $LicenseInfo:firstyear=2007&license=viewergpl$ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
*
* Copyright (c) 2007-2010, Linden Research, Inc.
*
* Second Life Viewer Source Code * Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab * Copyright (C) 2010, Linden Research, Inc.
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlife.com/developers/opensource/gplv2
* *
* There are special exceptions to the terms and conditions of the GPL as * This library is free software; you can redistribute it and/or
* it is applied to this Source Code. View the full text of the exception * modify it under the terms of the GNU Lesser General Public
* in the file doc/FLOSS-exception.txt in this software distribution, or * License as published by the Free Software Foundation;
* online at * version 2.1 of the License only.
* http://secondlife.com/developers/opensource/flossexception
* *
* By copying, modifying or distributing this software, you acknowledge * This library is distributed in the hope that it will be useful,
* that you have read and understood your obligations described above, * but WITHOUT ANY WARRANTY; without even the implied warranty of
* and agree to abide by those obligations. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * You should have received a copy of the GNU Lesser General Public
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * License along with this library; if not, write to the Free Software
* COMPLETENESS OR PERFORMANCE. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$ * $/LicenseInfo$
*
* @endcond * @endcond
*/ */
#include "linden_common.h" #include "linden_common.h"
// Needed for _getcwd() RC
#ifdef LL_WINDOWS
#include <direct.h>
#include <stdlib.h>
#include <stdio.h>
#endif
#include "llgl.h" #include "llgl.h"
#include "llplugininstance.h" #include "llplugininstance.h"
@@ -53,7 +39,6 @@
extern "C" { extern "C" {
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/gstelement.h>
} }
#include "llmediaimplgstreamer.h" #include "llmediaimplgstreamer.h"
@@ -61,6 +46,8 @@ extern "C" {
#include "llmediaimplgstreamervidplug.h" #include "llmediaimplgstreamervidplug.h"
#include "llmediaimplgstreamer_syms.h"
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// //
class MediaPluginGStreamer010 : public MediaPluginBase class MediaPluginGStreamer010 : public MediaPluginBase
@@ -74,8 +61,6 @@ public:
static bool startup(); static bool startup();
static bool closedown(); static bool closedown();
static void set_gst_plugin_path();
gboolean processGSTEvents(GstBus *bus, gboolean processGSTEvents(GstBus *bus,
GstMessage *message); GstMessage *message);
@@ -91,7 +76,7 @@ private:
bool play(double rate); bool play(double rate);
bool getTimePos(double &sec_out); bool getTimePos(double &sec_out);
#define MIN_LOOP_SEC 1.0F static const double MIN_LOOP_SEC = 1.0F;
bool mIsLooping; bool mIsLooping;
@@ -147,12 +132,11 @@ private:
bool mSeekWanted; bool mSeekWanted;
double mSeekDestination; double mSeekDestination;
std::string mLastTitle;
// Very GStreamer-specific // Very GStreamer-specific
GMainLoop *mPump; // event pump for this media GMainLoop *mPump; // event pump for this media
GstElement *mPlaybin; GstElement *mPlaybin;
GstElement *mVisualizer;
GstSLVideo *mVideoSink; GstSLVideo *mVideoSink;
}; };
@@ -171,11 +155,12 @@ MediaPluginGStreamer010::MediaPluginGStreamer010(
mSeekDestination(0.0), mSeekDestination(0.0),
mPump ( NULL ), mPump ( NULL ),
mPlaybin ( NULL ), mPlaybin ( NULL ),
mVisualizer ( NULL ),
mVideoSink ( NULL ), mVideoSink ( NULL ),
mCommand ( COMMAND_NONE ) mCommand ( COMMAND_NONE )
{ {
std::ostringstream str; std::ostringstream str;
INFOMSG("MediaPluginGStreamer010 constructor - my PID=%u", U32(LL_GETPID())); INFOMSG("MediaPluginGStreamer010 constructor - my PID=%u", U32(getpid()));
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@@ -206,179 +191,149 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus,
GST_MESSAGE_TYPE(message) != GST_MESSAGE_BUFFERING) GST_MESSAGE_TYPE(message) != GST_MESSAGE_BUFFERING)
{ {
DEBUGMSG("Got GST message type: %s", DEBUGMSG("Got GST message type: %s",
GST_MESSAGE_TYPE_NAME (message)); LLGST_MESSAGE_TYPE_NAME (message));
} }
else else
{ {
// TODO: grok 'duration' message type // TODO: grok 'duration' message type
DEBUGMSG("Got GST message type: %s", DEBUGMSG("Got GST message type: %s",
GST_MESSAGE_TYPE_NAME (message)); LLGST_MESSAGE_TYPE_NAME (message));
} }
switch (GST_MESSAGE_TYPE (message)) switch (GST_MESSAGE_TYPE (message)) {
{ case GST_MESSAGE_BUFFERING: {
case GST_MESSAGE_BUFFERING: // NEEDS GST 0.10.11+
if (llgst_message_parse_buffering)
{ {
// NEEDS GST 0.10.11+ and America discovered by C.Columbus
gint percent = 0; gint percent = 0;
gst_message_parse_buffering(message, &percent); llgst_message_parse_buffering(message, &percent);
DEBUGMSG("GST buffering: %d%%", percent); DEBUGMSG("GST buffering: %d%%", percent);
}
break;
}
case GST_MESSAGE_STATE_CHANGED: {
GstState old_state;
GstState new_state;
GstState pending_state;
llgst_message_parse_state_changed(message,
&old_state,
&new_state,
&pending_state);
#ifdef LL_GST_REPORT_STATE_CHANGES
// not generally very useful, and rather spammy.
DEBUGMSG("state change (old,<new>,pending): %s,<%s>,%s",
get_gst_state_name(old_state),
get_gst_state_name(new_state),
get_gst_state_name(pending_state));
#endif // LL_GST_REPORT_STATE_CHANGES
switch (new_state) {
case GST_STATE_VOID_PENDING:
break;
case GST_STATE_NULL:
break;
case GST_STATE_READY:
setStatus(STATUS_LOADED);
break;
case GST_STATE_PAUSED:
setStatus(STATUS_PAUSED);
break;
case GST_STATE_PLAYING:
setStatus(STATUS_PLAYING);
break; break;
} }
case GST_MESSAGE_STATE_CHANGED: { break;
GstState old_state; }
GstState new_state; case GST_MESSAGE_ERROR: {
GstState pending_state; GError *err = NULL;
gst_message_parse_state_changed(message, gchar *debug = NULL;
&old_state,
&new_state,
&pending_state);
#ifdef LL_GST_REPORT_STATE_CHANGES
// not generally very useful, and rather spammy.
DEBUGMSG("state change (old,<new>,pending): %s,<%s>,%s",
get_gst_state_name(old_state),
get_gst_state_name(new_state),
get_gst_state_name(pending_state));
#endif // LL_GST_REPORT_STATE_CHANGES
switch (new_state) llgst_message_parse_error (message, &err, &debug);
{ WARNMSG("GST error: %s", err?err->message:"(unknown)");
case GST_STATE_VOID_PENDING: if (err)
break; g_error_free (err);
case GST_STATE_NULL: g_free (debug);
break;
case GST_STATE_READY: mCommand = COMMAND_STOP;
setStatus(STATUS_LOADED);
break; setStatus(STATUS_ERROR);
case GST_STATE_PAUSED:
setStatus(STATUS_PAUSED); break;
break; }
case GST_STATE_PLAYING: case GST_MESSAGE_INFO: {
setStatus(STATUS_PLAYING); if (llgst_message_parse_info)
break;
}
break;
}
case GST_MESSAGE_ERROR:
{
GError *err = NULL;
gchar *debug = NULL;
gst_message_parse_error (message, &err, &debug);
WARNMSG("GST error: %s", err?err->message:"(unknown)");
if (err)
g_error_free (err);
g_free (debug);
mCommand = COMMAND_STOP;
setStatus(STATUS_ERROR);
break;
}
case GST_MESSAGE_INFO:
{ {
GError *err = NULL; GError *err = NULL;
gchar *debug = NULL; gchar *debug = NULL;
gst_message_parse_info (message, &err, &debug); llgst_message_parse_info (message, &err, &debug);
INFOMSG("GST info: %s", err?err->message:"(unknown)"); INFOMSG("GST info: %s", err?err->message:"(unknown)");
if (err) if (err)
g_error_free (err); g_error_free (err);
g_free (debug); g_free (debug);
break;
} }
case GST_MESSAGE_WARNING: break;
}
case GST_MESSAGE_WARNING: {
GError *err = NULL;
gchar *debug = NULL;
llgst_message_parse_warning (message, &err, &debug);
WARNMSG("GST warning: %s", err?err->message:"(unknown)");
if (err)
g_error_free (err);
g_free (debug);
break;
}
case GST_MESSAGE_EOS:
/* end-of-stream */
DEBUGMSG("GST end-of-stream.");
if (mIsLooping)
{ {
GError *err = NULL; DEBUGMSG("looping media...");
gchar *debug = NULL; double eos_pos_sec = 0.0F;
bool got_eos_position = getTimePos(eos_pos_sec);
gst_message_parse_warning (message, &err, &debug);
WARNMSG("GST warning: %s", err?err->message:"(unknown)");
if (err)
g_error_free (err);
g_free (debug);
break;
}
case GST_MESSAGE_TAG:
{
GstTagList *new_tags;
gst_message_parse_tag( message, &new_tags ); if (got_eos_position && eos_pos_sec < MIN_LOOP_SEC)
gchar *title = NULL;
if ( gst_tag_list_get_string(new_tags, GST_TAG_TITLE, &title) )
{ {
//WARMING("Title: %s", title); // if we know that the movie is really short, don't
std::string newtitle(title); // loop it else it can easily become a time-hog
gst_tag_list_free(new_tags); // because of GStreamer spin-up overhead
DEBUGMSG("really short movie (%0.3fsec) - not gonna loop this, pausing instead.", eos_pos_sec);
if ( newtitle != mLastTitle && !newtitle.empty() ) // inject a COMMAND_PAUSE
{ mCommand = COMMAND_PAUSE;
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text");
message.setValue("name", newtitle );
sendMessage( message );
mLastTitle = newtitle;
}
g_free(title);
} }
else
break;
}
case GST_MESSAGE_EOS:
{
/* end-of-stream */
DEBUGMSG("GST end-of-stream.");
if (mIsLooping)
{ {
DEBUGMSG("looping media..."); #undef LLGST_LOOP_BY_SEEKING
double eos_pos_sec = 0.0F; // loop with a stop-start instead of a seek, because it actually seems rather
bool got_eos_position = getTimePos(eos_pos_sec); // faster than seeking on remote streams.
#ifdef LLGST_LOOP_BY_SEEKING
if (got_eos_position && eos_pos_sec < MIN_LOOP_SEC) // first, try looping by an explicit rewind
bool seeksuccess = seek(0.0);
if (seeksuccess)
{ {
// if we know that the movie is really short, don't play(1.0);
// loop it else it can easily become a time-hog
// because of GStreamer spin-up overhead
DEBUGMSG("really short movie (%0.3fsec) - not gonna loop this, pausing instead.", eos_pos_sec);
// inject a COMMAND_PAUSE
mCommand = COMMAND_PAUSE;
} }
else else
{ #endif // LLGST_LOOP_BY_SEEKING
#undef LLGST_LOOP_BY_SEEKING { // use clumsy stop-start to loop
// loop with a stop-start instead of a seek, because it actually seems rather DEBUGMSG("didn't loop by rewinding - stopping and starting instead...");
// faster than seeking on remote streams. stop();
#ifdef LLGST_LOOP_BY_SEEKING play(1.0);
// first, try looping by an explicit rewind
bool seeksuccess = seek(0.0);
if (seeksuccess)
{
play(1.0);
}
else
#endif // LLGST_LOOP_BY_SEEKING
{ // use clumsy stop-start to loop
DEBUGMSG("didn't loop by rewinding - stopping and starting instead...");
stop();
play(1.0);
}
} }
} }
else // not a looping media }
{ else // not a looping media
// inject a COMMAND_STOP {
mCommand = COMMAND_STOP; // inject a COMMAND_STOP
} mCommand = COMMAND_STOP;
} break; }
break;
default: default:
/* unhandled message */ /* unhandled message */
break; break;
} }
/* we want to be notified again the next time there is a message /* we want to be notified again the next time there is a message
@@ -584,8 +539,12 @@ MediaPluginGStreamer010::pause()
{ {
DEBUGMSG("pausing media..."); DEBUGMSG("pausing media...");
// todo: error-check this? // todo: error-check this?
gst_element_set_state(mPlaybin, GST_STATE_PAUSED); if (mDoneInit && mPlaybin)
return true; {
llgst_element_set_state(mPlaybin, GST_STATE_PAUSED);
return true;
}
return false;
} }
bool bool
@@ -593,8 +552,12 @@ MediaPluginGStreamer010::stop()
{ {
DEBUGMSG("stopping media..."); DEBUGMSG("stopping media...");
// todo: error-check this? // todo: error-check this?
gst_element_set_state(mPlaybin, GST_STATE_READY); if (mDoneInit && mPlaybin)
return true; {
llgst_element_set_state(mPlaybin, GST_STATE_READY);
return true;
}
return false;
} }
bool bool
@@ -604,8 +567,12 @@ MediaPluginGStreamer010::play(double rate)
DEBUGMSG("playing media... rate=%f", rate); DEBUGMSG("playing media... rate=%f", rate);
// todo: error-check this? // todo: error-check this?
gst_element_set_state(mPlaybin, GST_STATE_PLAYING); if (mDoneInit && mPlaybin)
return true; {
llgst_element_set_state(mPlaybin, GST_STATE_PLAYING);
return true;
}
return false;
} }
bool bool
@@ -633,7 +600,7 @@ MediaPluginGStreamer010::seek(double time_sec)
bool success = false; bool success = false;
if (mDoneInit && mPlaybin) if (mDoneInit && mPlaybin)
{ {
success = gst_element_seek(mPlaybin, 1.0F, GST_FORMAT_TIME, success = llgst_element_seek(mPlaybin, 1.0F, GST_FORMAT_TIME,
GstSeekFlags(GST_SEEK_FLAG_FLUSH | GstSeekFlags(GST_SEEK_FLAG_FLUSH |
GST_SEEK_FLAG_KEY_UNIT), GST_SEEK_FLAG_KEY_UNIT),
GST_SEEK_TYPE_SET, gint64(time_sec*GST_SECOND), GST_SEEK_TYPE_SET, gint64(time_sec*GST_SECOND),
@@ -648,13 +615,15 @@ bool
MediaPluginGStreamer010::getTimePos(double &sec_out) MediaPluginGStreamer010::getTimePos(double &sec_out)
{ {
bool got_position = false; bool got_position = false;
if (mPlaybin) if (mDoneInit && mPlaybin)
{ {
gint64 pos; gint64 pos;
GstFormat timefmt = GST_FORMAT_TIME; GstFormat timefmt = GST_FORMAT_TIME;
got_position = gst_element_query_position(mPlaybin, got_position =
&timefmt, llgst_element_query_position &&
&pos); llgst_element_query_position(mPlaybin,
&timefmt,
&pos);
got_position = got_position got_position = got_position
&& (timefmt == GST_FORMAT_TIME); && (timefmt == GST_FORMAT_TIME);
// GStreamer may have other ideas, but we consider the current position // GStreamer may have other ideas, but we consider the current position
@@ -696,7 +665,7 @@ MediaPluginGStreamer010::load()
DEBUGMSG("setting up media..."); DEBUGMSG("setting up media...");
mIsLooping = false; mIsLooping = false;
mVolume = (float) 0.1234567; // minor hack to force an initial volume update mVolume = 0.1234567; // minor hack to force an initial volume update
// Create a pumpable main-loop for this media // Create a pumpable main-loop for this media
mPump = g_main_loop_new (NULL, FALSE); mPump = g_main_loop_new (NULL, FALSE);
@@ -707,7 +676,7 @@ MediaPluginGStreamer010::load()
} }
// instantiate a playbin element to do the hard work // instantiate a playbin element to do the hard work
mPlaybin = gst_element_factory_make ("playbin", "play"); mPlaybin = llgst_element_factory_make ("playbin", "play");
if (!mPlaybin) if (!mPlaybin)
{ {
setStatus(STATUS_ERROR); setStatus(STATUS_ERROR);
@@ -715,21 +684,50 @@ MediaPluginGStreamer010::load()
} }
// get playbin's bus // get playbin's bus
GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (mPlaybin)); GstBus *bus = llgst_pipeline_get_bus (GST_PIPELINE (mPlaybin));
if (!bus) if (!bus)
{ {
setStatus(STATUS_ERROR); setStatus(STATUS_ERROR);
return false; // error return false; // error
} }
mBusWatchID = gst_bus_add_watch (bus, mBusWatchID = llgst_bus_add_watch (bus,
llmediaimplgstreamer_bus_callback, llmediaimplgstreamer_bus_callback,
this); this);
gst_object_unref (bus); llgst_object_unref (bus);
#if 0 // not quite stable/correct yet
// get a visualizer element (bonus feature!)
char* vis_name = getenv("LL_GST_VIS_NAME");
if (!vis_name ||
(vis_name && std::string(vis_name)!="none"))
{
if (vis_name)
{
mVisualizer = llgst_element_factory_make (vis_name, "vis");
}
if (!mVisualizer)
{
mVisualizer = llgst_element_factory_make ("libvisual_jess", "vis");
if (!mVisualizer)
{
mVisualizer = llgst_element_factory_make ("goom", "vis");
if (!mVisualizer)
{
mVisualizer = llgst_element_factory_make ("libvisual_lv_scope", "vis");
if (!mVisualizer)
{
// That's okay, we don't NEED this.
}
}
}
}
}
#endif
if (NULL == getenv("LL_GSTREAMER_EXTERNAL")) { if (NULL == getenv("LL_GSTREAMER_EXTERNAL")) {
// instantiate a custom video sink // instantiate a custom video sink
mVideoSink = mVideoSink =
GST_SLVIDEO(gst_element_factory_make ("private-slvideo", "slvideo")); GST_SLVIDEO(llgst_element_factory_make ("private-slvideo", "slvideo"));
if (!mVideoSink) if (!mVideoSink)
{ {
WARNMSG("Could not instantiate private-slvideo element."); WARNMSG("Could not instantiate private-slvideo element.");
@@ -742,6 +740,11 @@ MediaPluginGStreamer010::load()
g_object_set(mPlaybin, "video-sink", mVideoSink, NULL); g_object_set(mPlaybin, "video-sink", mVideoSink, NULL);
} }
if (mVisualizer)
{
g_object_set(mPlaybin, "vis-plugin", mVisualizer, NULL);
}
return true; return true;
} }
@@ -759,11 +762,17 @@ MediaPluginGStreamer010::unload ()
if (mPlaybin) if (mPlaybin)
{ {
gst_element_set_state (mPlaybin, GST_STATE_NULL); llgst_element_set_state (mPlaybin, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (mPlaybin)); llgst_object_unref (GST_OBJECT (mPlaybin));
mPlaybin = NULL; mPlaybin = NULL;
} }
if (mVisualizer)
{
llgst_object_unref (GST_OBJECT (mVisualizer));
mVisualizer = NULL;
}
if (mPump) if (mPump)
{ {
g_main_loop_quit(mPump); g_main_loop_quit(mPump);
@@ -793,10 +802,7 @@ MediaPluginGStreamer010::startup()
// Init the glib type system - we need it. // Init the glib type system - we need it.
g_type_init(); g_type_init();
set_gst_plugin_path();
/*
// Get symbols! // Get symbols!
#if LL_DARWIN #if LL_DARWIN
if (! grab_gst_syms("libgstreamer-0.10.dylib", if (! grab_gst_syms("libgstreamer-0.10.dylib",
@@ -812,24 +818,24 @@ MediaPluginGStreamer010::startup()
WARNMSG("Couldn't find suitable GStreamer 0.10 support on this system - video playback disabled."); WARNMSG("Couldn't find suitable GStreamer 0.10 support on this system - video playback disabled.");
return false; return false;
} }
*/
// if (gst_segtrap_set_enabled) if (llgst_segtrap_set_enabled)
// { {
gst_segtrap_set_enabled(FALSE); llgst_segtrap_set_enabled(FALSE);
// } }
// else else
// { {
// WARNMSG("gst_segtrap_set_enabled() is not available; plugin crashes won't be caught."); WARNMSG("gst_segtrap_set_enabled() is not available; plugin crashes won't be caught.");
// } }
/*
#if LL_LINUX #if LL_LINUX
// Gstreamer tries a fork during init, waitpid-ing on it, // Gstreamer tries a fork during init, waitpid-ing on it,
// which conflicts with any installed SIGCHLD handler... // which conflicts with any installed SIGCHLD handler...
struct sigaction tmpact, oldact; struct sigaction tmpact, oldact;
if (gst_registry_fork_set_enabled) { if (llgst_registry_fork_set_enabled) {
// if we can disable SIGCHLD-using forking behaviour, // if we can disable SIGCHLD-using forking behaviour,
// do it. // do it.
gst_registry_fork_set_enabled(false); llgst_registry_fork_set_enabled(false);
} }
else { else {
// else temporarily install default SIGCHLD handler // else temporarily install default SIGCHLD handler
@@ -840,24 +846,24 @@ MediaPluginGStreamer010::startup()
sigaction(SIGCHLD, &tmpact, &oldact); sigaction(SIGCHLD, &tmpact, &oldact);
} }
#endif // LL_LINUX #endif // LL_LINUX
*/
// Protect against GStreamer resetting the locale, yuck. // Protect against GStreamer resetting the locale, yuck.
static std::string saved_locale; static std::string saved_locale;
saved_locale = setlocale(LC_ALL, NULL); saved_locale = setlocale(LC_ALL, NULL);
// finally, try to initialize GStreamer! // finally, try to initialize GStreamer!
GError *err = NULL; GError *err = NULL;
gboolean init_gst_success = gst_init_check(NULL, NULL, &err); gboolean init_gst_success = llgst_init_check(NULL, NULL, &err);
// restore old locale // restore old locale
setlocale(LC_ALL, saved_locale.c_str() ); setlocale(LC_ALL, saved_locale.c_str() );
/*
#if LL_LINUX #if LL_LINUX
// restore old SIGCHLD handler // restore old SIGCHLD handler
if (!gst_registry_fork_set_enabled) if (!llgst_registry_fork_set_enabled)
sigaction(SIGCHLD, &oldact, NULL); sigaction(SIGCHLD, &oldact, NULL);
#endif // LL_LINUX #endif // LL_LINUX
*/
if (!init_gst_success) // fail if (!init_gst_success) // fail
{ {
if (err) if (err)
@@ -871,139 +877,16 @@ MediaPluginGStreamer010::startup()
} }
return false; return false;
} }
// Set up logging facilities
gst_debug_remove_log_function( gst_debug_log_default );
// gst_debug_add_log_function( gstreamer_log, NULL );
// Init our custom plugins - only really need do this once. // Init our custom plugins - only really need do this once.
gst_slvideo_init_class(); gst_slvideo_init_class();
/*
// List the plugins GStreamer can find
LL_DEBUGS("MediaImpl") << "Found GStreamer plugins:" << LL_ENDL;
GList *list;
GstRegistry *registry = gst_registry_get_default();
std::string loaded = "";
for (list = gst_registry_get_plugin_list(registry);
list != NULL;
list = g_list_next(list))
{
GstPlugin *list_plugin = (GstPlugin *)list->data;
(bool)gst_plugin_is_loaded(list_plugin) ? loaded = "Yes" : loaded = "No";
LL_DEBUGS("MediaImpl") << gst_plugin_get_name(list_plugin) << ", loaded? " << loaded << LL_ENDL;
}
gst_plugin_list_free(list);
*/
mDoneInit = true; mDoneInit = true;
} }
return true; return true;
} }
void MediaPluginGStreamer010::set_gst_plugin_path()
{
// Linux sets GST_PLUGIN_PATH in wrapper.sh, not here.
#if LL_WINDOWS || LL_DARWIN
std::string imp_dir = "";
// Get the current working directory:
#if LL_WINDOWS
char* raw_dir;
raw_dir = _getcwd(NULL,0);
if( raw_dir != NULL )
{
imp_dir = std::string( raw_dir );
}
#elif LL_DARWIN
CFBundleRef main_bundle = CFBundleGetMainBundle();
if( main_bundle != NULL )
{
CFURLRef bundle_url = CFBundleCopyBundleURL( main_bundle );
if( bundle_url != NULL )
{
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
char raw_dir[MAXPATHLEN];
if( CFURLGetFileSystemRepresentation( bundle_url, true, (UInt8 *)raw_dir, MAXPATHLEN) )
{
imp_dir = std::string( raw_dir ) + "/Contents/MacOS/";
}
CFRelease(bundle_url);
}
}
#endif
if( imp_dir == "" )
{
WARNMSG("Could not get application directory, not setting GST_PLUGIN_PATH.");
return;
}
DEBUGMSG("Imprudence is installed at %s", imp_dir);
// ":" on Mac and 'Nix, ";" on Windows
std::string separator = G_SEARCHPATH_SEPARATOR_S;
// Grab the current path, if it's set.
std::string old_plugin_path = "";
char *old_path = getenv("GST_PLUGIN_PATH");
if(old_path == NULL)
{
DEBUGMSG("Did not find user-set GST_PLUGIN_PATH.");
}
else
{
old_plugin_path = separator + std::string( old_path );
}
// Search both Imprudence and Imprudence\lib\gstreamer-plugins.
// But we also want to search the path the user has set, if any.
std::string plugin_path =
"GST_PLUGIN_PATH=" +
#if LL_WINDOWS
imp_dir + "\\lib\\gstreamer-plugins" +
#elif LL_DARWIN
imp_dir + separator +
imp_dir + "/../Resources/lib/gstreamer-plugins" +
#endif
old_plugin_path;
int put_result;
// Place GST_PLUGIN_PATH in the environment settings
#if LL_WINDOWS
put_result = _putenv( (char*)plugin_path.c_str() );
#elif LL_DARWIN
put_result = putenv( (char*)plugin_path.c_str() );
#endif
if( put_result == -1 )
{
WARNMSG("Setting GST_PLUGIN_PATH failed!");
}
else
{
DEBUGMSG("GST_PLUGIN_PATH set to %s", getenv("GST_PLUGIN_PATH"));
}
// Don't load system plugins. We only want to use ours, to avoid conflicts.
#if LL_WINDOWS
put_result = _putenv( "GST_PLUGIN_SYSTEM_PATH=\"\"" );
#elif LL_DARWIN
put_result = putenv( "GST_PLUGIN_SYSTEM_PATH=\"\"" );
#endif
if( put_result == -1 )
{
WARNMSG("Setting GST_PLUGIN_SYSTEM_PATH=\"\" failed!");
}
#endif // LL_WINDOWS || LL_DARWIN
}
void void
MediaPluginGStreamer010::sizeChanged() MediaPluginGStreamer010::sizeChanged()
@@ -1045,7 +928,7 @@ MediaPluginGStreamer010::closedown()
if (!mDoneInit) if (!mDoneInit)
return false; // error return false; // error
// ungrab_gst_syms(); ungrab_gst_syms();
mDoneInit = false; mDoneInit = false;
@@ -1066,10 +949,11 @@ std::string
MediaPluginGStreamer010::getVersion() MediaPluginGStreamer010::getVersion()
{ {
std::string plugin_version = "GStreamer010 media plugin, GStreamer version "; std::string plugin_version = "GStreamer010 media plugin, GStreamer version ";
if (mDoneInit) // && gst_version) if (mDoneInit &&
llgst_version)
{ {
guint major, minor, micro, nano; guint major, minor, micro, nano;
gst_version(&major, &minor, &micro, &nano); llgst_version(&major, &minor, &micro, &nano);
plugin_version += llformat("%u.%u.%u.%u (runtime), %u.%u.%u.%u (headers)", (unsigned int)major, (unsigned int)minor, (unsigned int)micro, (unsigned int)nano, (unsigned int)GST_VERSION_MAJOR, (unsigned int)GST_VERSION_MINOR, (unsigned int)GST_VERSION_MICRO, (unsigned int)GST_VERSION_NANO); plugin_version += llformat("%u.%u.%u.%u (runtime), %u.%u.%u.%u (headers)", (unsigned int)major, (unsigned int)minor, (unsigned int)micro, (unsigned int)nano, (unsigned int)GST_VERSION_MAJOR, (unsigned int)GST_VERSION_MINOR, (unsigned int)GST_VERSION_MICRO, (unsigned int)GST_VERSION_NANO);
} }
else else

View File

@@ -580,9 +580,9 @@
<key>linux</key> <key>linux</key>
<map> <map>
<key>md5sum</key> <key>md5sum</key>
<string>2cd3f6499f8444f1d119d097e4047252</string> <string>c829b638b6eef71ca63418cb9aea46a2</string>
<key>url</key> <key>url</key>
<uri>http://imprudenceviewer.org/download/libs/gstreamer-0.10.24-linux-20091125.tar.bz2</uri> <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/gstreamer-linux-20080613.tar.bz2</uri>
</map> </map>
<key>linux64</key> <key>linux64</key>
<map> <map>