├── .gitattributes
├── .gitignore
├── .indent.pro
├── AGPL-3.0.txt
├── ChangeLog
├── Makefile
├── README.txt
├── Todo
├── audio.c
├── audio.h
├── codec.c
├── codec.h
├── iatomic.h
├── misc.h
├── openglosd.cpp
├── openglosd.h
├── po
├── .gitignore
├── de_DE.po
├── it_IT.po
└── ru_RU.po
├── ringbuffer.c
├── ringbuffer.h
├── shaders.h
├── softhddev.c
├── softhddev.h
├── softhddevice.cpp
├── softhddevice.h
├── softhddevice_service.h
├── vdr-softhddevice-9999.ebuild
├── video.c
└── video.h
/.gitattributes:
--------------------------------------------------------------------------------
1 | # gitattributes(5) file
2 | *.[15] ident
3 | *.[ch] ident
4 | *.cpp ident
5 | *.txt ident
6 | Makefile ident
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # gitignore(5) file
2 | *.[oa]
3 | *~
4 | .*.swp
5 | .gdb_history
6 | # work directory
7 | .chaos
8 | # generated files
9 | .dependencies
10 | libvdr-softhddevice.so*
11 |
--------------------------------------------------------------------------------
/.indent.pro:
--------------------------------------------------------------------------------
1 | --blank-lines-before-block-comments
2 | --blank-lines-after-declarations
3 | --blank-lines-after-procedures
4 | --no-blank-lines-after-commas
5 | --braces-on-if-line
6 | --no-blank-before-sizeof
7 | --comment-indentation41
8 | --declaration-comment-column41
9 | --no-comment-delimiters-on-blank-lines
10 | --swallow-optional-blank-lines
11 | --dont-format-comments
12 | --parameter-indentation4
13 | --indent-level4
14 | --line-comments-indentation0
15 | --cuddle-else
16 | --cuddle-do-while
17 | --brace-indent0
18 | --case-brace-indentation0
19 | //--start-left-side-of-comments
20 | --leave-preprocessor-space
21 | //--continuation-indentation8
22 | --case-indentation4
23 | --else-endif-column0
24 | --no-space-after-casts
25 | --declaration-indentation1
26 | --dont-line-up-parentheses
27 | --no-space-after-function-call-names
28 | --space-special-semicolon
29 | --tab-size8
30 | --use-tabs
31 | --line-length79
32 | --comment-line-length79
33 | --honour-newlines
34 | --dont-break-procedure-type
35 | --break-before-boolean-operator
36 | --continuation-indentation4
37 | --ignore-newlines
38 |
--------------------------------------------------------------------------------
/AGPL-3.0.txt:
--------------------------------------------------------------------------------
1 | GNU AFFERO GENERAL PUBLIC LICENSE
2 | Version 3, 19 November 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU Affero General Public License is a free, copyleft license
11 | for software and other kinds of works, specifically designed to ensure
12 | cooperation with the community in the case of network server software.
13 |
14 | The licenses for most software and other practical works are
15 | designed to take away your freedom to share and change the works. By
16 | contrast, our General Public Licenses are intended to guarantee your
17 | freedom to share and change all versions of a program--to make sure it
18 | remains free software for all its users.
19 |
20 | When we speak of free software, we are referring to freedom, not
21 | price. Our General Public Licenses are designed to make sure that you
22 | have the freedom to distribute copies of free software (and charge for
23 | them if you wish), that you receive source code or can get it if you
24 | want it, that you can change the software or use pieces of it in new
25 | free programs, and that you know you can do these things.
26 |
27 | Developers that use our General Public Licenses protect your rights
28 | with two steps: (1) assert copyright on the software, and (2) offer
29 | you this License which gives you legal permission to copy, distribute
30 | and/or modify the software.
31 |
32 | A secondary benefit of defending all users' freedom is that
33 | improvements made in alternate versions of the program, if they
34 | receive widespread use, become available for other developers to
35 | incorporate. Many developers of free software are heartened and
36 | encouraged by the resulting cooperation. However, in the case of
37 | software used on network servers, this result may fail to come about.
38 | The GNU General Public License permits making a modified version and
39 | letting the public access it on a server without ever releasing its
40 | source code to the public.
41 |
42 | The GNU Affero General Public License is designed specifically to
43 | ensure that, in such cases, the modified source code becomes available
44 | to the community. It requires the operator of a network server to
45 | provide the source code of the modified version running there to the
46 | users of that server. Therefore, public use of a modified version, on
47 | a publicly accessible server, gives the public access to the source
48 | code of the modified version.
49 |
50 | An older license, called the Affero General Public License and
51 | published by Affero, was designed to accomplish similar goals. This is
52 | a different license, not a version of the Affero GPL, but Affero has
53 | released a new version of the Affero GPL which permits relicensing under
54 | this license.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | TERMS AND CONDITIONS
60 |
61 | 0. Definitions.
62 |
63 | "This License" refers to version 3 of the GNU Affero General Public
64 | License.
65 |
66 | "Copyright" also means copyright-like laws that apply to other kinds
67 | of works, such as semiconductor masks.
68 |
69 | "The Program" refers to any copyrightable work licensed under this
70 | License. Each licensee is addressed as "you". "Licensees" and
71 | "recipients" may be individuals or organizations.
72 |
73 | To "modify" a work means to copy from or adapt all or part of the work
74 | in a fashion requiring copyright permission, other than the making of an
75 | exact copy. The resulting work is called a "modified version" of the
76 | earlier work or a work "based on" the earlier work.
77 |
78 | A "covered work" means either the unmodified Program or a work based
79 | on the Program.
80 |
81 | To "propagate" a work means to do anything with it that, without
82 | permission, would make you directly or secondarily liable for
83 | infringement under applicable copyright law, except executing it on a
84 | computer or modifying a private copy. Propagation includes copying,
85 | distribution (with or without modification), making available to the
86 | public, and in some countries other activities as well.
87 |
88 | To "convey" a work means any kind of propagation that enables other
89 | parties to make or receive copies. Mere interaction with a user through
90 | a computer network, with no transfer of a copy, is not conveying.
91 |
92 | An interactive user interface displays "Appropriate Legal Notices"
93 | to the extent that it includes a convenient and prominently visible
94 | feature that (1) displays an appropriate copyright notice, and (2)
95 | tells the user that there is no warranty for the work (except to the
96 | extent that warranties are provided), that licensees may convey the
97 | work under this License, and how to view a copy of this License. If
98 | the interface presents a list of user commands or options, such as a
99 | menu, a prominent item in the list meets this criterion.
100 |
101 | 1. Source Code.
102 |
103 | The "source code" for a work means the preferred form of the work
104 | for making modifications to it. "Object code" means any non-source
105 | form of a work.
106 |
107 | A "Standard Interface" means an interface that either is an official
108 | standard defined by a recognized standards body, or, in the case of
109 | interfaces specified for a particular programming language, one that
110 | is widely used among developers working in that language.
111 |
112 | The "System Libraries" of an executable work include anything, other
113 | than the work as a whole, that (a) is included in the normal form of
114 | packaging a Major Component, but which is not part of that Major
115 | Component, and (b) serves only to enable use of the work with that
116 | Major Component, or to implement a Standard Interface for which an
117 | implementation is available to the public in source code form. A
118 | "Major Component", in this context, means a major essential component
119 | (kernel, window system, and so on) of the specific operating system
120 | (if any) on which the executable work runs, or a compiler used to
121 | produce the work, or an object code interpreter used to run it.
122 |
123 | The "Corresponding Source" for a work in object code form means all
124 | the source code needed to generate, install, and (for an executable
125 | work) run the object code and to modify the work, including scripts to
126 | control those activities. However, it does not include the work's
127 | System Libraries, or general-purpose tools or generally available free
128 | programs which are used unmodified in performing those activities but
129 | which are not part of the work. For example, Corresponding Source
130 | includes interface definition files associated with source files for
131 | the work, and the source code for shared libraries and dynamically
132 | linked subprograms that the work is specifically designed to require,
133 | such as by intimate data communication or control flow between those
134 | subprograms and other parts of the work.
135 |
136 | The Corresponding Source need not include anything that users
137 | can regenerate automatically from other parts of the Corresponding
138 | Source.
139 |
140 | The Corresponding Source for a work in source code form is that
141 | same work.
142 |
143 | 2. Basic Permissions.
144 |
145 | All rights granted under this License are granted for the term of
146 | copyright on the Program, and are irrevocable provided the stated
147 | conditions are met. This License explicitly affirms your unlimited
148 | permission to run the unmodified Program. The output from running a
149 | covered work is covered by this License only if the output, given its
150 | content, constitutes a covered work. This License acknowledges your
151 | rights of fair use or other equivalent, as provided by copyright law.
152 |
153 | You may make, run and propagate covered works that you do not
154 | convey, without conditions so long as your license otherwise remains
155 | in force. You may convey covered works to others for the sole purpose
156 | of having them make modifications exclusively for you, or provide you
157 | with facilities for running those works, provided that you comply with
158 | the terms of this License in conveying all material for which you do
159 | not control copyright. Those thus making or running the covered works
160 | for you must do so exclusively on your behalf, under your direction
161 | and control, on terms that prohibit them from making any copies of
162 | your copyrighted material outside their relationship with you.
163 |
164 | Conveying under any other circumstances is permitted solely under
165 | the conditions stated below. Sublicensing is not allowed; section 10
166 | makes it unnecessary.
167 |
168 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
169 |
170 | No covered work shall be deemed part of an effective technological
171 | measure under any applicable law fulfilling obligations under article
172 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
173 | similar laws prohibiting or restricting circumvention of such
174 | measures.
175 |
176 | When you convey a covered work, you waive any legal power to forbid
177 | circumvention of technological measures to the extent such circumvention
178 | is effected by exercising rights under this License with respect to
179 | the covered work, and you disclaim any intention to limit operation or
180 | modification of the work as a means of enforcing, against the work's
181 | users, your or third parties' legal rights to forbid circumvention of
182 | technological measures.
183 |
184 | 4. Conveying Verbatim Copies.
185 |
186 | You may convey verbatim copies of the Program's source code as you
187 | receive it, in any medium, provided that you conspicuously and
188 | appropriately publish on each copy an appropriate copyright notice;
189 | keep intact all notices stating that this License and any
190 | non-permissive terms added in accord with section 7 apply to the code;
191 | keep intact all notices of the absence of any warranty; and give all
192 | recipients a copy of this License along with the Program.
193 |
194 | You may charge any price or no price for each copy that you convey,
195 | and you may offer support or warranty protection for a fee.
196 |
197 | 5. Conveying Modified Source Versions.
198 |
199 | You may convey a work based on the Program, or the modifications to
200 | produce it from the Program, in the form of source code under the
201 | terms of section 4, provided that you also meet all of these conditions:
202 |
203 | a) The work must carry prominent notices stating that you modified
204 | it, and giving a relevant date.
205 |
206 | b) The work must carry prominent notices stating that it is
207 | released under this License and any conditions added under section
208 | 7. This requirement modifies the requirement in section 4 to
209 | "keep intact all notices".
210 |
211 | c) You must license the entire work, as a whole, under this
212 | License to anyone who comes into possession of a copy. This
213 | License will therefore apply, along with any applicable section 7
214 | additional terms, to the whole of the work, and all its parts,
215 | regardless of how they are packaged. This License gives no
216 | permission to license the work in any other way, but it does not
217 | invalidate such permission if you have separately received it.
218 |
219 | d) If the work has interactive user interfaces, each must display
220 | Appropriate Legal Notices; however, if the Program has interactive
221 | interfaces that do not display Appropriate Legal Notices, your
222 | work need not make them do so.
223 |
224 | A compilation of a covered work with other separate and independent
225 | works, which are not by their nature extensions of the covered work,
226 | and which are not combined with it such as to form a larger program,
227 | in or on a volume of a storage or distribution medium, is called an
228 | "aggregate" if the compilation and its resulting copyright are not
229 | used to limit the access or legal rights of the compilation's users
230 | beyond what the individual works permit. Inclusion of a covered work
231 | in an aggregate does not cause this License to apply to the other
232 | parts of the aggregate.
233 |
234 | 6. Conveying Non-Source Forms.
235 |
236 | You may convey a covered work in object code form under the terms
237 | of sections 4 and 5, provided that you also convey the
238 | machine-readable Corresponding Source under the terms of this License,
239 | in one of these ways:
240 |
241 | a) Convey the object code in, or embodied in, a physical product
242 | (including a physical distribution medium), accompanied by the
243 | Corresponding Source fixed on a durable physical medium
244 | customarily used for software interchange.
245 |
246 | b) Convey the object code in, or embodied in, a physical product
247 | (including a physical distribution medium), accompanied by a
248 | written offer, valid for at least three years and valid for as
249 | long as you offer spare parts or customer support for that product
250 | model, to give anyone who possesses the object code either (1) a
251 | copy of the Corresponding Source for all the software in the
252 | product that is covered by this License, on a durable physical
253 | medium customarily used for software interchange, for a price no
254 | more than your reasonable cost of physically performing this
255 | conveying of source, or (2) access to copy the
256 | Corresponding Source from a network server at no charge.
257 |
258 | c) Convey individual copies of the object code with a copy of the
259 | written offer to provide the Corresponding Source. This
260 | alternative is allowed only occasionally and noncommercially, and
261 | only if you received the object code with such an offer, in accord
262 | with subsection 6b.
263 |
264 | d) Convey the object code by offering access from a designated
265 | place (gratis or for a charge), and offer equivalent access to the
266 | Corresponding Source in the same way through the same place at no
267 | further charge. You need not require recipients to copy the
268 | Corresponding Source along with the object code. If the place to
269 | copy the object code is a network server, the Corresponding Source
270 | may be on a different server (operated by you or a third party)
271 | that supports equivalent copying facilities, provided you maintain
272 | clear directions next to the object code saying where to find the
273 | Corresponding Source. Regardless of what server hosts the
274 | Corresponding Source, you remain obligated to ensure that it is
275 | available for as long as needed to satisfy these requirements.
276 |
277 | e) Convey the object code using peer-to-peer transmission, provided
278 | you inform other peers where the object code and Corresponding
279 | Source of the work are being offered to the general public at no
280 | charge under subsection 6d.
281 |
282 | A separable portion of the object code, whose source code is excluded
283 | from the Corresponding Source as a System Library, need not be
284 | included in conveying the object code work.
285 |
286 | A "User Product" is either (1) a "consumer product", which means any
287 | tangible personal property which is normally used for personal, family,
288 | or household purposes, or (2) anything designed or sold for incorporation
289 | into a dwelling. In determining whether a product is a consumer product,
290 | doubtful cases shall be resolved in favor of coverage. For a particular
291 | product received by a particular user, "normally used" refers to a
292 | typical or common use of that class of product, regardless of the status
293 | of the particular user or of the way in which the particular user
294 | actually uses, or expects or is expected to use, the product. A product
295 | is a consumer product regardless of whether the product has substantial
296 | commercial, industrial or non-consumer uses, unless such uses represent
297 | the only significant mode of use of the product.
298 |
299 | "Installation Information" for a User Product means any methods,
300 | procedures, authorization keys, or other information required to install
301 | and execute modified versions of a covered work in that User Product from
302 | a modified version of its Corresponding Source. The information must
303 | suffice to ensure that the continued functioning of the modified object
304 | code is in no case prevented or interfered with solely because
305 | modification has been made.
306 |
307 | If you convey an object code work under this section in, or with, or
308 | specifically for use in, a User Product, and the conveying occurs as
309 | part of a transaction in which the right of possession and use of the
310 | User Product is transferred to the recipient in perpetuity or for a
311 | fixed term (regardless of how the transaction is characterized), the
312 | Corresponding Source conveyed under this section must be accompanied
313 | by the Installation Information. But this requirement does not apply
314 | if neither you nor any third party retains the ability to install
315 | modified object code on the User Product (for example, the work has
316 | been installed in ROM).
317 |
318 | The requirement to provide Installation Information does not include a
319 | requirement to continue to provide support service, warranty, or updates
320 | for a work that has been modified or installed by the recipient, or for
321 | the User Product in which it has been modified or installed. Access to a
322 | network may be denied when the modification itself materially and
323 | adversely affects the operation of the network or violates the rules and
324 | protocols for communication across the network.
325 |
326 | Corresponding Source conveyed, and Installation Information provided,
327 | in accord with this section must be in a format that is publicly
328 | documented (and with an implementation available to the public in
329 | source code form), and must require no special password or key for
330 | unpacking, reading or copying.
331 |
332 | 7. Additional Terms.
333 |
334 | "Additional permissions" are terms that supplement the terms of this
335 | License by making exceptions from one or more of its conditions.
336 | Additional permissions that are applicable to the entire Program shall
337 | be treated as though they were included in this License, to the extent
338 | that they are valid under applicable law. If additional permissions
339 | apply only to part of the Program, that part may be used separately
340 | under those permissions, but the entire Program remains governed by
341 | this License without regard to the additional permissions.
342 |
343 | When you convey a copy of a covered work, you may at your option
344 | remove any additional permissions from that copy, or from any part of
345 | it. (Additional permissions may be written to require their own
346 | removal in certain cases when you modify the work.) You may place
347 | additional permissions on material, added by you to a covered work,
348 | for which you have or can give appropriate copyright permission.
349 |
350 | Notwithstanding any other provision of this License, for material you
351 | add to a covered work, you may (if authorized by the copyright holders of
352 | that material) supplement the terms of this License with terms:
353 |
354 | a) Disclaiming warranty or limiting liability differently from the
355 | terms of sections 15 and 16 of this License; or
356 |
357 | b) Requiring preservation of specified reasonable legal notices or
358 | author attributions in that material or in the Appropriate Legal
359 | Notices displayed by works containing it; or
360 |
361 | c) Prohibiting misrepresentation of the origin of that material, or
362 | requiring that modified versions of such material be marked in
363 | reasonable ways as different from the original version; or
364 |
365 | d) Limiting the use for publicity purposes of names of licensors or
366 | authors of the material; or
367 |
368 | e) Declining to grant rights under trademark law for use of some
369 | trade names, trademarks, or service marks; or
370 |
371 | f) Requiring indemnification of licensors and authors of that
372 | material by anyone who conveys the material (or modified versions of
373 | it) with contractual assumptions of liability to the recipient, for
374 | any liability that these contractual assumptions directly impose on
375 | those licensors and authors.
376 |
377 | All other non-permissive additional terms are considered "further
378 | restrictions" within the meaning of section 10. If the Program as you
379 | received it, or any part of it, contains a notice stating that it is
380 | governed by this License along with a term that is a further restriction,
381 | you may remove that term. If a license document contains a further
382 | restriction but permits relicensing or conveying under this License, you
383 | may add to a covered work material governed by the terms of that license
384 | document, provided that the further restriction does not survive such
385 | relicensing or conveying.
386 |
387 | If you add terms to a covered work in accord with this section, you
388 | must place, in the relevant source files, a statement of the
389 | additional terms that apply to those files, or a notice indicating
390 | where to find the applicable terms.
391 |
392 | Additional terms, permissive or non-permissive, may be stated in the
393 | form of a separately written license, or stated as exceptions;
394 | the above requirements apply either way.
395 |
396 | 8. Termination.
397 |
398 | You may not propagate or modify a covered work except as expressly
399 | provided under this License. Any attempt otherwise to propagate or
400 | modify it is void, and will automatically terminate your rights under
401 | this License (including any patent licenses granted under the third
402 | paragraph of section 11).
403 |
404 | However, if you cease all violation of this License, then your
405 | license from a particular copyright holder is reinstated (a)
406 | provisionally, unless and until the copyright holder explicitly and
407 | finally terminates your license, and (b) permanently, if the copyright
408 | holder fails to notify you of the violation by some reasonable means
409 | prior to 60 days after the cessation.
410 |
411 | Moreover, your license from a particular copyright holder is
412 | reinstated permanently if the copyright holder notifies you of the
413 | violation by some reasonable means, this is the first time you have
414 | received notice of violation of this License (for any work) from that
415 | copyright holder, and you cure the violation prior to 30 days after
416 | your receipt of the notice.
417 |
418 | Termination of your rights under this section does not terminate the
419 | licenses of parties who have received copies or rights from you under
420 | this License. If your rights have been terminated and not permanently
421 | reinstated, you do not qualify to receive new licenses for the same
422 | material under section 10.
423 |
424 | 9. Acceptance Not Required for Having Copies.
425 |
426 | You are not required to accept this License in order to receive or
427 | run a copy of the Program. Ancillary propagation of a covered work
428 | occurring solely as a consequence of using peer-to-peer transmission
429 | to receive a copy likewise does not require acceptance. However,
430 | nothing other than this License grants you permission to propagate or
431 | modify any covered work. These actions infringe copyright if you do
432 | not accept this License. Therefore, by modifying or propagating a
433 | covered work, you indicate your acceptance of this License to do so.
434 |
435 | 10. Automatic Licensing of Downstream Recipients.
436 |
437 | Each time you convey a covered work, the recipient automatically
438 | receives a license from the original licensors, to run, modify and
439 | propagate that work, subject to this License. You are not responsible
440 | for enforcing compliance by third parties with this License.
441 |
442 | An "entity transaction" is a transaction transferring control of an
443 | organization, or substantially all assets of one, or subdividing an
444 | organization, or merging organizations. If propagation of a covered
445 | work results from an entity transaction, each party to that
446 | transaction who receives a copy of the work also receives whatever
447 | licenses to the work the party's predecessor in interest had or could
448 | give under the previous paragraph, plus a right to possession of the
449 | Corresponding Source of the work from the predecessor in interest, if
450 | the predecessor has it or can get it with reasonable efforts.
451 |
452 | You may not impose any further restrictions on the exercise of the
453 | rights granted or affirmed under this License. For example, you may
454 | not impose a license fee, royalty, or other charge for exercise of
455 | rights granted under this License, and you may not initiate litigation
456 | (including a cross-claim or counterclaim in a lawsuit) alleging that
457 | any patent claim is infringed by making, using, selling, offering for
458 | sale, or importing the Program or any portion of it.
459 |
460 | 11. Patents.
461 |
462 | A "contributor" is a copyright holder who authorizes use under this
463 | License of the Program or a work on which the Program is based. The
464 | work thus licensed is called the contributor's "contributor version".
465 |
466 | A contributor's "essential patent claims" are all patent claims
467 | owned or controlled by the contributor, whether already acquired or
468 | hereafter acquired, that would be infringed by some manner, permitted
469 | by this License, of making, using, or selling its contributor version,
470 | but do not include claims that would be infringed only as a
471 | consequence of further modification of the contributor version. For
472 | purposes of this definition, "control" includes the right to grant
473 | patent sublicenses in a manner consistent with the requirements of
474 | this License.
475 |
476 | Each contributor grants you a non-exclusive, worldwide, royalty-free
477 | patent license under the contributor's essential patent claims, to
478 | make, use, sell, offer for sale, import and otherwise run, modify and
479 | propagate the contents of its contributor version.
480 |
481 | In the following three paragraphs, a "patent license" is any express
482 | agreement or commitment, however denominated, not to enforce a patent
483 | (such as an express permission to practice a patent or covenant not to
484 | sue for patent infringement). To "grant" such a patent license to a
485 | party means to make such an agreement or commitment not to enforce a
486 | patent against the party.
487 |
488 | If you convey a covered work, knowingly relying on a patent license,
489 | and the Corresponding Source of the work is not available for anyone
490 | to copy, free of charge and under the terms of this License, through a
491 | publicly available network server or other readily accessible means,
492 | then you must either (1) cause the Corresponding Source to be so
493 | available, or (2) arrange to deprive yourself of the benefit of the
494 | patent license for this particular work, or (3) arrange, in a manner
495 | consistent with the requirements of this License, to extend the patent
496 | license to downstream recipients. "Knowingly relying" means you have
497 | actual knowledge that, but for the patent license, your conveying the
498 | covered work in a country, or your recipient's use of the covered work
499 | in a country, would infringe one or more identifiable patents in that
500 | country that you have reason to believe are valid.
501 |
502 | If, pursuant to or in connection with a single transaction or
503 | arrangement, you convey, or propagate by procuring conveyance of, a
504 | covered work, and grant a patent license to some of the parties
505 | receiving the covered work authorizing them to use, propagate, modify
506 | or convey a specific copy of the covered work, then the patent license
507 | you grant is automatically extended to all recipients of the covered
508 | work and works based on it.
509 |
510 | A patent license is "discriminatory" if it does not include within
511 | the scope of its coverage, prohibits the exercise of, or is
512 | conditioned on the non-exercise of one or more of the rights that are
513 | specifically granted under this License. You may not convey a covered
514 | work if you are a party to an arrangement with a third party that is
515 | in the business of distributing software, under which you make payment
516 | to the third party based on the extent of your activity of conveying
517 | the work, and under which the third party grants, to any of the
518 | parties who would receive the covered work from you, a discriminatory
519 | patent license (a) in connection with copies of the covered work
520 | conveyed by you (or copies made from those copies), or (b) primarily
521 | for and in connection with specific products or compilations that
522 | contain the covered work, unless you entered into that arrangement,
523 | or that patent license was granted, prior to 28 March 2007.
524 |
525 | Nothing in this License shall be construed as excluding or limiting
526 | any implied license or other defenses to infringement that may
527 | otherwise be available to you under applicable patent law.
528 |
529 | 12. No Surrender of Others' Freedom.
530 |
531 | If conditions are imposed on you (whether by court order, agreement or
532 | otherwise) that contradict the conditions of this License, they do not
533 | excuse you from the conditions of this License. If you cannot convey a
534 | covered work so as to satisfy simultaneously your obligations under this
535 | License and any other pertinent obligations, then as a consequence you may
536 | not convey it at all. For example, if you agree to terms that obligate you
537 | to collect a royalty for further conveying from those to whom you convey
538 | the Program, the only way you could satisfy both those terms and this
539 | License would be to refrain entirely from conveying the Program.
540 |
541 | 13. Remote Network Interaction; Use with the GNU General Public License.
542 |
543 | Notwithstanding any other provision of this License, if you modify the
544 | Program, your modified version must prominently offer all users
545 | interacting with it remotely through a computer network (if your version
546 | supports such interaction) an opportunity to receive the Corresponding
547 | Source of your version by providing access to the Corresponding Source
548 | from a network server at no charge, through some standard or customary
549 | means of facilitating copying of software. This Corresponding Source
550 | shall include the Corresponding Source for any work covered by version 3
551 | of the GNU General Public License that is incorporated pursuant to the
552 | following paragraph.
553 |
554 | Notwithstanding any other provision of this License, you have permission
555 | to link or combine any covered work with a work licensed under version 3
556 | of the GNU General Public License into a single combined work, and to
557 | convey the resulting work. The terms of this License will continue to
558 | apply to the part which is the covered work, but the work with which it is
559 | combined will remain governed by version 3 of the GNU General Public
560 | License.
561 |
562 | 14. Revised Versions of this License.
563 |
564 | The Free Software Foundation may publish revised and/or new versions of
565 | the GNU Affero General Public License from time to time. Such new
566 | versions will be similar in spirit to the present version, but may differ
567 | in detail to address new problems or concerns.
568 |
569 | Each version is given a distinguishing version number. If the
570 | Program specifies that a certain numbered version of the GNU Affero
571 | General Public License "or any later version" applies to it, you have
572 | the option of following the terms and conditions either of that
573 | numbered version or of any later version published by the Free
574 | Software Foundation. If the Program does not specify a version number
575 | of the GNU Affero General Public License, you may choose any version
576 | ever published by the Free Software Foundation.
577 |
578 | If the Program specifies that a proxy can decide which future
579 | versions of the GNU Affero General Public License can be used, that
580 | proxy's public statement of acceptance of a version permanently
581 | authorizes you to choose that version for the Program.
582 |
583 | Later license versions may give you additional or different
584 | permissions. However, no additional obligations are imposed on any
585 | author or copyright holder as a result of your choosing to follow a
586 | later version.
587 |
588 | 15. Disclaimer of Warranty.
589 |
590 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
591 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
592 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
593 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
594 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
595 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
596 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
597 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
598 |
599 | 16. Limitation of Liability.
600 |
601 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
602 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
603 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
604 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
605 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
606 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
607 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
608 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
609 | SUCH DAMAGES.
610 |
611 | 17. Interpretation of Sections 15 and 16.
612 |
613 | If the disclaimer of warranty and limitation of liability provided
614 | above cannot be given local legal effect according to their terms,
615 | reviewing courts shall apply local law that most closely approximates
616 | an absolute waiver of all civil liability in connection with the
617 | Program, unless a warranty or assumption of liability accompanies a
618 | copy of the Program in return for a fee.
619 |
620 | END OF TERMS AND CONDITIONS
621 |
622 | How to Apply These Terms to Your New Programs
623 |
624 | If you develop a new program, and you want it to be of the greatest
625 | possible use to the public, the best way to achieve this is to make it
626 | free software which everyone can redistribute and change under these terms.
627 |
628 | To do so, attach the following notices to the program. It is safest
629 | to attach them to the start of each source file to most effectively
630 | state the exclusion of warranty; and each file should have at least
631 | the "copyright" line and a pointer to where the full notice is found.
632 |
633 |
634 | Copyright (C)
635 |
636 | This program is free software: you can redistribute it and/or modify
637 | it under the terms of the GNU Affero General Public License as
638 | published by the Free Software Foundation, either version 3 of the
639 | License, or (at your option) any later version.
640 |
641 | This program is distributed in the hope that it will be useful,
642 | but WITHOUT ANY WARRANTY; without even the implied warranty of
643 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
644 | GNU Affero General Public License for more details.
645 |
646 | You should have received a copy of the GNU Affero General Public License
647 | along with this program. If not, see .
648 |
649 | Also add information on how to contact you by electronic and paper mail.
650 |
651 | If your software can interact with users remotely through a computer
652 | network, you should also make sure that it provides a way for users to
653 | get its source. For example, if your program is a web application, its
654 | interface could display a "Source" link that leads users to an archive
655 | of the code. There are many ways you could offer source, and different
656 | solutions will be better for different programs; see section 13 for the
657 | specific requirements.
658 |
659 | You should also get your employer (if you work as a programmer) or school,
660 | if any, to sign a "copyright disclaimer" for the program, if necessary.
661 | For more information on this, and how to apply and follow the GNU AGPL, see
662 | .
663 |
--------------------------------------------------------------------------------
/ChangeLog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ua0lnj/vdr-plugin-softhddevice/ee28c923327ddd7da53f165747f37662fe7d0569/ChangeLog
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | #
2 | # Makefile for a Video Disk Recorder plugin
3 | #
4 | # $Id: 4b60cb3b9f133f6fff295472b01213f95accd751 $
5 |
6 | # The official name of this plugin.
7 | # This name will be used in the '-P...' option of VDR to load the plugin.
8 | # By default the main source file also carries this name.
9 |
10 | PLUGIN = softhddevice
11 |
12 | ### Configuration (edit this for your needs)
13 |
14 | # support alsa audio output module
15 | ALSA ?= $(shell pkg-config --exists alsa && echo 1)
16 | # support OSS audio output module
17 | OSS ?= 1
18 | # support VDPAU video output module
19 | VDPAU ?= $(shell pkg-config --exists vdpau && echo 1)
20 | # support VA-API video output module (deprecated)
21 | VAAPI ?= $(shell pkg-config --exists libva && echo 1)
22 | # disable glx suppotr for VA-API
23 | VAAPI_NO_GLX = 0
24 | # support glx output
25 | OPENGL ?= $(shell pkg-config --exists gl glu && echo 1)
26 | # support egl output
27 | EGL ?= $(shell pkg-config --exists egl && echo 1)
28 | # screensaver disable/enable
29 | SCREENSAVER ?= 1
30 | # use ffmpeg libswscale
31 | SWSCALE ?= $(shell pkg-config --exists libswscale && echo 1)
32 | # use ffmpeg libswresample
33 | SWRESAMPLE ?= $(shell pkg-config --exists libswresample && echo 1)
34 | # use libav libavresample
35 | AVRESAMPLE ?= $(shell pkg-config --exists libavresample && echo 1)
36 | ifeq ($(SWRESAMPLE),1)
37 | ifeq ($(AVRESAMPLE),1)
38 | $(info WARNING, you have libavresample and libswresample together!!!)
39 | # if you got a segfault, try changing the comment in following lines
40 | #SWRESAMPLE = 0
41 | #avresample is deprecated
42 | AVRESAMPLE = 0
43 | endif
44 | endif
45 | # support CUVID video decoder
46 | CUVID ?= $(shell ffmpeg -loglevel quiet -decoders | grep -c cuvid)
47 | FFNVCODEC ?= $(shell pkg-config --exists ffnvcodec && echo 1)
48 | # use opengl for OSD
49 | OPENGLOSD ?= $(shell pkg-config --exists glew glu freetype2 && echo 1)
50 | # support ffmpeg deinterlacing
51 | AVFILTER ?= $(shell pkg-config --exists libavfilter && echo 1)
52 |
53 | #CONFIG += -DDEBUG
54 | #CONFIG += -DOSD_DEBUG # enable debug output+functions
55 | #CONFIG += -DSTILL_DEBUG=2 # still picture debug verbose level
56 |
57 | CONFIG += -DAV_INFO -DAV_INFO_TIME=3000 # info/debug a/v sync
58 | CONFIG += -DUSE_PIP # PIP support
59 | CONFIG += -DHAVE_PTHREAD_NAME # supports new pthread_setname_np
60 | CONFIG += -DUSE_TS # build ts parser
61 | CONFIG += -DUSE_MPEG_COMPLETE # support only complete mpeg packets
62 | CONFIG += -DH264_EOS_TRICKSPEED # insert seq end packets for trickspeed
63 | #CONDIF += -DDUMP_TRICKSPEED # dump trickspeed packets
64 | #CONFIG += -DUSE_BITMAP # VDPAU, use bitmap surface for OSD
65 | CONFIG += -DUSE_VDR_SPU # use VDR SPU decoder.
66 | #CONFIG += -DUSE_SOFTLIMIT # (tobe removed) limit the buffer fill
67 |
68 | ### The version number of this plugin (taken from the main source file):
69 |
70 | VERSION = $(shell grep 'static const char \*const VERSION *=' $(PLUGIN).cpp | awk '{ print $$7 }' | sed -e 's/[";]//g')
71 | GIT_REV = $(shell git describe --always 2>/dev/null)
72 |
73 | ### The directory environment:
74 |
75 | # Use package data if installed...otherwise assume we're under the VDR source directory:
76 | PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:../../.." pkg-config --variable=$(1) vdr))
77 | LIBDIR = $(call PKGCFG,libdir)
78 | LOCDIR = $(call PKGCFG,locdir)
79 | PLGCFG = $(call PKGCFG,plgcfg)
80 | #
81 | TMPDIR ?= /tmp
82 |
83 | ### The compiler options:
84 |
85 | export CFLAGS = $(call PKGCFG,cflags)
86 | export CXXFLAGS = $(call PKGCFG,cxxflags)
87 |
88 | ifeq ($(CFLAGS),)
89 | $(warning CFLAGS not set)
90 | endif
91 | ifeq ($(CXXFLAGS),)
92 | $(warning CXXFLAGS not set)
93 | endif
94 |
95 | ### The version number of VDR's plugin API:
96 |
97 | APIVERSION = $(call PKGCFG,apiversion)
98 |
99 | ### Allow user defined options to overwrite defaults:
100 |
101 | -include $(PLGCFG)
102 |
103 | ### The name of the distribution archive:
104 |
105 | ARCHIVE = $(PLUGIN)-$(VERSION)
106 | PACKAGE = vdr-$(ARCHIVE)
107 |
108 | ### The name of the shared object file:
109 |
110 | SOFILE = libvdr-$(PLUGIN).so
111 |
112 | ### Parse softhddevice config
113 |
114 | ifeq ($(ALSA),1)
115 | CONFIG += -DUSE_ALSA
116 | _CFLAGS += $(shell pkg-config --cflags alsa)
117 | LIBS += $(shell pkg-config --libs alsa)
118 | endif
119 | ifeq ($(OSS),1)
120 | CONFIG += -DUSE_OSS
121 | endif
122 | ifeq ($(VDPAU),1)
123 | CONFIG += -DUSE_VDPAU
124 | _CFLAGS += $(shell pkg-config --cflags vdpau)
125 | LIBS += $(shell pkg-config --libs vdpau)
126 | endif
127 | ifeq ($(VAAPI),1)
128 | CONFIG += -DUSE_VAAPI
129 | _CFLAGS += $(shell pkg-config --cflags libva-x11 libva)
130 | LIBS += $(shell pkg-config --libs libva-x11 libva)
131 | ifeq ($(VAAPI_NO_GLX),1)
132 | CONFIG += -DVAAPI_NO_GLX
133 | else
134 | ifeq ($(OPENGL),1)
135 | _CFLAGS += $(shell pkg-config --cflags libva-glx)
136 | LIBS += $(shell pkg-config --libs libva-glx)
137 | endif
138 | endif
139 | endif
140 | ifeq ($(OPENGL),1)
141 | CONFIG += -DUSE_GLX
142 | _CFLAGS += $(shell pkg-config --cflags gl glu)
143 | LIBS += $(shell pkg-config --libs gl glu)
144 | endif
145 | ifeq ($(EGL),1)
146 | CONFIG += -DUSE_EGL
147 | _CFLAGS += $(shell pkg-config --cflags egl)
148 | LIBS += -lEGL
149 | endif
150 | ifeq ($(SCREENSAVER),1)
151 | CONFIG += -DUSE_SCREENSAVER
152 | _CFLAGS += $(shell pkg-config --cflags xcb-screensaver xcb-dpms)
153 | LIBS += $(shell pkg-config --libs xcb-screensaver xcb-dpms)
154 | endif
155 | ifeq ($(SWSCALE),1)
156 | CONFIG += -DUSE_SWSCALE
157 | _CFLAGS += $(shell pkg-config --cflags libswscale)
158 | LIBS += $(shell pkg-config --libs libswscale)
159 | endif
160 | ifeq ($(SWRESAMPLE),1)
161 | CONFIG += -DUSE_SWRESAMPLE
162 | _CFLAGS += $(shell pkg-config --cflags libswresample)
163 | LIBS += $(shell pkg-config --libs libswresample)
164 | endif
165 | ifeq ($(AVRESAMPLE),1)
166 | CONFIG += -DUSE_AVRESAMPLE
167 | _CFLAGS += $(shell pkg-config --cflags libavresample)
168 | LIBS += $(shell pkg-config --libs libavresample)
169 | endif
170 | ifeq ($(AVFILTER),1)
171 | CONFIG += -DUSE_AVFILTER
172 | _CFLAGS += $(shell pkg-config --cflags libavfilter)
173 | LIBS += $(shell pkg-config --libs libavfilter)
174 | endif
175 | ifneq ($(CUVID),0)
176 | ifeq ($(FFNVCODEC),1)
177 | ifeq ($(OPENGL),1)
178 | CONFIG += -DUSE_CUVID
179 | endif
180 | endif
181 | endif
182 |
183 | ifeq ($(OPENGLOSD),1)
184 | CONFIG += -DUSE_OPENGLOSD
185 | _CFLAGS += $(shell pkg-config --cflags glew)
186 | LIBS += $(shell pkg-config --libs glew) -lglut
187 | _CFLAGS += $(shell pkg-config --cflags freetype2)
188 | LIBS += $(shell pkg-config --libs freetype2)
189 | endif
190 |
191 | _CFLAGS += $(shell pkg-config --cflags libavcodec x11 x11-xcb xcb xcb-icccm xcb-randr)
192 | LIBS += -lrt $(shell pkg-config --libs libavcodec x11 x11-xcb xcb xcb-icccm xcb-randr)
193 |
194 | ### Includes and Defines (add further entries here):
195 |
196 | INCLUDES +=
197 |
198 | DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -D_GNU_SOURCE $(CONFIG) \
199 | $(if $(GIT_REV), -DGIT_REV='"$(GIT_REV)"')
200 |
201 | ### Make it standard
202 |
203 | override CXXFLAGS += $(_CFLAGS) $(DEFINES) $(INCLUDES) \
204 | -g -W -Wall -Wextra -Winit-self -Werror=overloaded-virtual -Wno-unused-parameter
205 | override CFLAGS += $(_CFLAGS) $(DEFINES) $(INCLUDES) \
206 | -g -W -Wall -Wextra -Winit-self -Wdeclaration-after-statement
207 |
208 | ### The object files (add further files here):
209 |
210 | OBJS = $(PLUGIN).o softhddev.o video.o audio.o codec.o ringbuffer.o
211 |
212 | ifeq ($(OPENGLOSD),1)
213 | OBJS += openglosd.o
214 | endif
215 |
216 | SRCS = $(wildcard $(OBJS:.o=.c)) $(PLUGIN).cpp
217 |
218 | ### The main target:
219 |
220 | all: $(SOFILE) i18n
221 |
222 | ### Implicit rules:
223 |
224 | %.o: %.cpp
225 | @echo CXX $@
226 | $(Q)$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
227 |
228 | %.o: %.c
229 | @echo CC $@
230 | $(Q)$(CC) $(CFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
231 |
232 | ### Dependencies:
233 |
234 | MAKEDEP = $(CXX) -MM -MG
235 | DEPFILE = .dependencies
236 | $(DEPFILE): Makefile
237 | @$(MAKEDEP) $(CXXFLAGS) $(SRCS) > $@
238 |
239 | -include $(DEPFILE)
240 |
241 | ### Internationalization (I18N):
242 |
243 | PODIR = po
244 | I18Npo = $(wildcard $(PODIR)/*.po)
245 | I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
246 | I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
247 | I18Npot = $(PODIR)/$(PLUGIN).pot
248 |
249 | %.mo: %.po
250 | @echo MO $@
251 | $(Q)msgfmt -c -o $@ $<
252 |
253 | $(I18Npot): $(SRCS)
254 | @echo GT $@
255 | $(Q)xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP \
256 | -k_ -k_N --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) \
257 | --msgid-bugs-address='' -o $@ `ls $^`
258 |
259 | %.po: $(I18Npot)
260 | @echo PO $@
261 | $(Q)msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
262 | @touch $@
263 |
264 | $(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
265 | install -D -m644 $< $@
266 |
267 | .PHONY: i18n
268 | i18n: $(I18Nmo) $(I18Npot)
269 |
270 | install-i18n: $(I18Nmsgs)
271 |
272 | ### Targets:
273 |
274 | $(OBJS): Makefile
275 |
276 | $(SOFILE): $(OBJS)
277 | @echo LD $@
278 | $(Q)$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
279 |
280 | install-lib: $(SOFILE)
281 | install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
282 |
283 | install: install-lib install-i18n
284 |
285 | dist: $(I18Npo) clean
286 | @-rm -rf $(TMPDIR)/$(ARCHIVE)
287 | @mkdir $(TMPDIR)/$(ARCHIVE)
288 | @cp -a * $(TMPDIR)/$(ARCHIVE)
289 | @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
290 | @-rm -rf $(TMPDIR)/$(ARCHIVE)
291 | @echo Distribution package created as $(PACKAGE).tgz
292 |
293 | clean:
294 | @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
295 | @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
296 |
297 | ## Private Targets:
298 |
299 | HDRS= $(wildcard *.h)
300 |
301 | indent:
302 | for i in $(SRCS) $(HDRS); do \
303 | indent $$i; \
304 | unexpand -a $$i | sed -e s/constconst/const/ > $$i.up; \
305 | mv $$i.up $$i; \
306 | done
307 |
308 | video_test: video.c Makefile
309 | $(CC) -DVIDEO_TEST -DVERSION='"$(VERSION)"' $(CFLAGS) $(LDFLAGS) $< \
310 | $(LIBS) -o $@
311 |
--------------------------------------------------------------------------------
/README.txt:
--------------------------------------------------------------------------------
1 | @file README.txt @brief A software HD output device for VDR
2 |
3 | Copyright (c) 2011 - 2013 by Johns. All Rights Reserved.
4 |
5 | Contributor(s): 2019 - 2023 ua0lnj
6 |
7 | License: AGPLv3
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Affero General Public License as
11 | published by the Free Software Foundation, either version 3 of the
12 | License.
13 |
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | $Id: 6bb43d99a59dfc51655d90db28cc5aacc25de5d0 $
20 |
21 | A software and GPU emulated UHD output device plugin for VDR.
22 | Only 8-bit output now.
23 |
24 | o Video decoder CPU / VA-API / VDPAU / CUVID / NVDEC
25 | o Video output VA-API / VDPAU / GLX (VA-API / VDPAU / CUVID / NVDEC / CPU) / EGL (VA-API / CUVID / NVDEC / CPU)
26 | o OSD accelerated by GPU VDPAU / CUVID / NVDEC / VA-API-GLX/EGL / CPU-GLX/EGL
27 | o Audio FFMpeg / Alsa / Analog
28 | o Audio FFMpeg / Alsa / Digital
29 | o Audio FFMpeg / OSS / Analog
30 | o HDMI/SPDIF pass-through
31 | o Software volume, compression, normalize and channel resample
32 | o VDR ScaleVideo API
33 | o Software deinterlacer Bob (VA-API only)
34 | o Autocrop
35 | o Grab image (VA-API / VDPAU / CUVID / NVDEC / CPU)
36 | o Suspend / Dettach
37 | o Letterbox, Stretch and Center cut-out video display modes
38 | o atmo light support with plugin http://github.com/durchflieger/DFAtmo
39 | o PIP (Picture-in-Picture) (VDPAU / CUVID / NVDEC / VA-API-GLX/EGL / CPU-GLX/EGL)
40 | o ScreenSaver/DPMS control
41 |
42 | To compile you must have the 'requires' installed.
43 |
44 | Good luck
45 |
46 | Quickstart:
47 | -----------
48 |
49 | Just type make and use.
50 |
51 | Install:
52 | --------
53 | 1a) git
54 | original git
55 | git clone https://github.com/vdr-projects/vdr-plugin-softhddevice.git
56 | latest git
57 | git clone https://github.com/ua0lnj/vdr-plugin-softhddevice.git
58 | cd vdr-plugin-softhddevice
59 | make
60 | make install
61 |
62 | 2a) tarball
63 |
64 | Download original version from:
65 | https://github.com/vdr-projects/vdr-plugin-softhddevice
66 | Download latest version from:
67 | https://github.com/ua0lnj/vdr-plugin-softhddevice/releases
68 |
69 | tar vxf *-softhddevice-*.tar.*
70 | cd softhddevice-*
71 | or
72 | cd vdr-plugin-softhddevice-*
73 | make
74 | make install
75 |
76 | You can edit Makefile to enable/disable VDPAU / VA-API / CUVID / Alsa / OSS / OPENGL OSD
77 | support. The default is to autodetect as much as possible.
78 | You can also disable GLX for VA-API.
79 |
80 | Setup: environment
81 | ------
82 | For GLX and VA-API (va-api-glx) need:
83 | export allow_rgb10_configs=false
84 |
85 | For libva >= 2.20.0 and va-api and va-api-glx use:
86 | export LIBVA_DRI3_DISABLE=1
87 |
88 | Following is supported:
89 |
90 | DISPLAY=:0.0
91 | x11 display name
92 | NO_HW=1
93 | if set don't use the hardware decoders
94 | NO_MPEG_HW=1
95 | if set don't use the hardware decoder for mpeg1/2
96 |
97 | only if alsa is configured
98 | ALSA_DEVICE=default
99 | alsa PCM device name
100 | ALSA_PASSTHROUGH_DEVICE=
101 | alsa pass-though (AC-3,E-AC-3,DTS,...) device name
102 | ALSA_MIXER=default
103 | alsa control device name
104 | ALSA_MIXER_CHANNEL=PCM
105 | alsa control channel name
106 |
107 | only if oss is configured
108 | OSS_AUDIODEV=/dev/dsp
109 | oss dsp device name
110 | OSS_PASSTHROUGHDEV=
111 | oss pass-though (AC-3,E-AC-3,DTS,...) device name
112 | OSS_MIXERDEV=/dev/mixer
113 | oss mixer device name
114 | OSS_MIXER_CHANNEL=pcm
115 | oss mixer channel name
116 |
117 | Setup: /etc/vdr/setup.conf
118 | ------
119 | Following is supported:
120 |
121 | softhddevice.MakePrimary = 0
122 | 0 = no change, 1 make softhddevice primary at start
123 |
124 | softhddevice.HideMainMenuEntry = 0
125 | 0 = show softhddevice main menu entry, 1 = hide entry
126 |
127 | softhddevice.Osd.Width = 0
128 | 0 = auto (=display, unscaled) n = fixed osd size scaled for display
129 | softhddevice.Osd.Height = 0
130 | 0 = auto (=display, unscaled) n = fixed osd size scaled for display
131 |
132 | of the next parameters is 576i, 720p, 1080i_fake or 1080i.
133 | 1080i_fake is 1280x1080 or 1440x1080
134 | 1080i is "real" 1920x1080
135 |
136 | softhddevice..Scaling = 0
137 | 0 = normal, 1 = fast, 2 = HQ, 3 = anamorphic
138 |
139 | softhddevice..Deinterlace = 0
140 | 0 = bob, 1 = weave, 2 = temporal, 3 = temporal_spatial, 4 = software
141 | (only 0, 1, 4 supported with VA-API)
142 |
143 | softhddevice..SkipChromaDeinterlace = 0
144 | 0 = disabled, 1 = enabled (for slower cards, poor quality)
145 |
146 | softhddevice..InverseTelecine = 0
147 | 0 = disabled, 1 = enabled
148 |
149 | softhddevice..Denoise = 0
150 | 0 .. 1000 noise reduction level (0 off, 1000 max)
151 |
152 | softhddevice..Sharpness = 0
153 | -1000 .. 1000 noise reduction level (0 off, -1000 max blur,
154 | 1000 max sharp)
155 |
156 | softhddevice..CutTopBottom = 0
157 | Cut 'n' pixels at at top and bottom of the video picture.
158 |
159 | softhddevice..CutLeftRight = 0
160 | Cut 'n' pixels at at left and right of the video picture.
161 |
162 | softhddevice.AudioDelay = 0
163 | +n or -n ms
164 | delay audio or delay video
165 |
166 | softhddevice.AudioPassthrough = 0
167 | 0 = none, 1 = PCM, 2 = MPA, 4 = AC-3, 8 = EAC-3, 16 = DTS -X disable
168 |
169 | for PCM/AC-3/EAC-3/DTS the pass-through device is used and the audio
170 | stream is passed undecoded to the output device.
171 | z.b. 12 = AC-3+EAC-3, 13 = PCM+AC-3+EAC-3, 29 = PCM+AC-3+EAC-3+DTS
172 | note: MPA/TrueHD/... aren't supported yet
173 | negative values disable passthrough
174 |
175 | softhddevice.AudioDownmix = 0
176 | 0 = none, 1 = downmix
177 | Use ffmpeg/libav downmix of AC-3/EAC-3/DTS audio to stereo.
178 |
179 | softhddevice.AudioSoftvol = 0
180 | 0 = off, use hardware volume control
181 | 1 = on, use software volume control
182 |
183 | softhddevice.AudioNormalize = 0
184 | 0 = off, 1 = enable audio normalize
185 |
186 | softhddevice.AudioMaxNormalize = 0
187 | maximal volume factor/1000 of the normalize filter
188 |
189 | softhddevice.AudioCompression = 0
190 | 0 = off, 1 = enable audio compression
191 |
192 | softhddevice.AudioMaxCompression = 0
193 | maximal volume factor/1000 of the compression filter
194 |
195 | softhddevice.AudioStereoDescent = 0
196 | reduce volume level (/1000) for stereo sources
197 |
198 | softhddevice.AudioBufferTime = 0
199 | 0 = default (128 ms)
200 | 1 - 1000 = size of the buffer in ms
201 |
202 | softhddevice.AutoCrop.Interval = 0
203 | 0 disables auto-crop
204 | n each 'n' frames auto-crop is checked.
205 |
206 | softhddevice.AutoCrop.Delay = 0
207 | if auto-crop is over 'n' intervals the same, the cropping is
208 | used.
209 |
210 | softhddevice.AutoCrop.Tolerance = 0
211 | if detected crop area is too small, cut max 'n' pixels at top and
212 | bottom.
213 |
214 | softhddevice.Background = 0
215 | 32bit RGBA background color
216 | (Red * 16777216 + Green * 65536 + Blue * 256 + Alpha)
217 | or hex RRGGBBAA
218 | grey 127 * 16777216 + 127 * 65536 + 127 * 256 => 2139062016
219 | in the setup menu this is entered as (24bit RGB and 8bit Alpha)
220 | (Red * 65536 + Green * 256 + Blue)
221 |
222 | softhddevice.StudioLevels = 0
223 | 0 use PC levels (0-255) with vdpau.
224 | 1 use studio levels (16-235) with vdpau.
225 |
226 | softhddevice.Suspend.Close = 0
227 | 1 suspend closes x11 window, connection and audio device.
228 | (use svdrpsend plug softhddevice RESU to resume, if you have no lirc)
229 |
230 | softhddevice.Suspend.X11 = 0
231 | 1 suspend stops X11 server (not working yet)
232 |
233 | softhddevice.60HzMode = 0
234 | 0 disable 60Hz display mode
235 | 1 enable 60Hz display mode
236 |
237 | softhddevice.SoftStartSync = 0
238 | 0 early audio + fast SD (was disable soft start)
239 | 1 early audio + fast SD + soft start of audio/video sync (was enable soft start)
240 | 2 early audio/video sync + fast switch
241 | 3 early audio/video sync + accurate swicth
242 |
243 | softhddevice.BlackPicture = 0
244 | 0 disable black picture during channel switch
245 | 1 enable black picture during channel switch
246 |
247 | softhddevice.ClearOnSwitch = 0
248 | 0 keep video und audio buffers during channel switch
249 | 1 clear video and audio buffers on channel switch
250 |
251 | softhddevice.Video4to3DisplayFormat = 1
252 | 0 pan and scan
253 | 1 letter box
254 | 2 center cut-out
255 |
256 | softhddevice.VideoOtherDisplayFormat = 1
257 | 0 pan and scan
258 | 1 pillar box
259 | 2 center cut-out
260 |
261 | softhddevice.pip.X = 79
262 | softhddevice.pip.Y = 78
263 | softhddevice.pip.Width = 18
264 | softhddevice.pip.Height = 18
265 | PIP pip window position and size in percent.
266 |
267 | softhddevice.pip.VideoX = 0
268 | softhddevice.pip.VideoY = 0
269 | softhddevice.pip.VideoWidth = 0
270 | softhddevice.pip.VideoHeight = 0
271 | PIP video window position and size in percent.
272 |
273 | softhddevice.pip.Alt.X = 0
274 | softhddevice.pip.Alt.Y = 50
275 | softhddevice.pip.Alt.Width = 0
276 | softhddevice.pip.Alt.Height = 50
277 | PIP alternative pip window position and size in percent.
278 |
279 | softhddevice.pip.Alt.VideoX = 0
280 | softhddevice.pip.Alt.VideoY = 0
281 | softhddevice.pip.Alt.VideoWidth = 0
282 | softhddevice.pip.Alt.VideoHeight = 50
283 | PIP alternative video window position and size in percent.
284 |
285 |
286 | Setup: /etc/vdr/remote.conf
287 | ------
288 |
289 | Add "XKeySym." definitions to /etc/vdr/remote.conf to control
290 | the vdr and plugin with the connected input device.
291 |
292 | fe.
293 | XKeySym.Up Up
294 | XKeySym.Down Down
295 | ...
296 |
297 | Additional to the x11 input sends the window close button "Close".
298 |
299 | fe.
300 | XKeySym.Power Close
301 |
302 | Commandline:
303 | ------------
304 |
305 | Use vdr -h to see the command line arguments supported by the plugin.
306 |
307 | -a audio_device Selects audio output module and device.
308 | "" to disable audio output
309 | /... to use oss audio module (if compiled with oss
310 | support)
311 | other to use alsa audio module (if compiled with alsa
312 | support)
313 |
314 | -p device audio device for pass-through (hw:0,1 or /dev/dsp1)
315 | -c channel audio mixer channel name (fe. PCM)
316 | -d display display of x11 server (fe. :0.0)
317 | -f start with fullscreen window (only with window manager)
318 | -g geometry x11 window geometry wxh+x+y
319 | -l loglevel set the log level (0=none, 1=errors, 2=info, 3=debug)
320 | -v device video driver device (va-api, va-api-glx, va-api-egl, vdpau, vdpau-glx,
321 | cuvid, cuvid-egl, nvdec, nvdec-egl, cpu-glx, cpu-egl, noop)
322 | -s start in suspended mode
323 | -x start x11 server, with -xx try to connect, if this fails
324 | -X args X11 server arguments (f.e. -nocursor)
325 |
326 | -w workaround enable/disable workarounds:
327 | no-hw-decoder disable hw decoder, use software decoder only
328 | no-mpeg-hw-decoder disable hw decoder for mpeg2 only
329 | still-hw-decoder enable hardware decoder for still-pictures
330 | still-h264-hw-decoder enable h264 hw decoder for still-pictures
331 | alsa-driver-broken disable broken alsa driver message
332 | alsa-no-close-open disable close open to fix alsa no sound bug
333 | alsa-close-open-delay enable close open delay to fix no sound bug
334 | ignore-repeat-pict disable repeat pict message
335 | use-possible-defect-frames prefer faster channel switch
336 | disable-ogl-osd disable openGL accelerated osd
337 |
338 | -D start in detached mode
339 |
340 |
341 | SVDRP:
342 | ------
343 |
344 | Use 'svdrpsend.pl plug softhddevice HELP'
345 | or 'svdrpsend plug softhddevice HELP' to see the SVDRP commands help
346 | and which are supported by the plugin.
347 |
348 | Keymacros:
349 | ----------
350 |
351 | See keymacros.conf how to setup the macros.
352 |
353 | This are the supported key sequences:
354 |
355 | @softhddevice Blue 1 0 disable pass-through
356 | @softhddevice Blue 1 1 enable pass-through
357 | @softhddevice Blue 1 2 toggle pass-through
358 | @softhddevice Blue 1 3 decrease audio delay by 10ms
359 | @softhddevice Blue 1 4 increase audio delay by 10ms
360 | @softhddevice Blue 1 5 toggle ac3 mixdown
361 | @softhddevice Blue 2 0 disable fullscreen
362 | @softhddevice Blue 2 1 enable fullscreen
363 | @softhddevice Blue 2 2 toggle fullscreen
364 | @softhddevice Blue 2 3 disable auto-crop
365 | @softhddevice Blue 2 4 enable auto-crop
366 | @softhddevice Blue 2 5 toggle auto-crop
367 | @softhddevice Blue 2 6 suspend
368 | @softhddevice Blue 2 7 resume
369 | @softhddevice Blue 3 0 stretch 4:3 to 16:9
370 | @softhddevice Blue 3 1 letter box 4:3 in 16:9
371 | @softhddevice Blue 3 2 center cut-out 4:3 to 16:9
372 | @softhddevice Blue 3 9 rotate 4:3 to 16:9 zoom mode
373 |
374 | Running:
375 | --------
376 |
377 | Click into video window to toggle fullscreen/window mode, only if you
378 | have a window manager running.
379 |
380 | Warning:
381 | --------
382 | libav is not supported, expect many bugs with it.
383 |
384 | Known Bugs:
385 | -----------
386 | VA-API doesn't v-sync h264 interlaced streams
387 | VDPAU crash with hevc 10 bit
388 | 4:2:2 video works with sotfware decoding
389 |
390 | Requires:
391 | ---------
392 | media-video/vdr (version >=1.7.xx)
393 | Video Disk Recorder - turns a pc into a powerful set top box
394 | for DVB.
395 | http://www.tvdr.de/
396 |
397 | media-video/ffmpeg (version >=0.7)
398 | Complete solution to record, convert and stream audio and
399 | video. Includes libavcodec and libswresample.
400 | http://ffmpeg.org
401 | media-libs/alsa-lib
402 | Advanced Linux Sound Architecture Library
403 | http://www.alsa-project.org
404 | or
405 | kernel support for oss/oss4 or alsa oss emulation
406 |
407 | x11-libs/libva (deprecated)
408 | Video Acceleration (VA) API for Linux
409 | http://www.freedesktop.org/wiki/Software/vaapi
410 | x11-libs/libva-intel-driver
411 | HW video decode support for Intel integrated graphics
412 | http://www.freedesktop.org/wiki/Software/vaapi
413 | or
414 | x11-libs/vdpau-video
415 | VDPAU Backend for Video Acceleration (VA) API
416 | http://www.freedesktop.org/wiki/Software/vaapi
417 | or
418 | x11-libs/xvba-video
419 | XVBA Backend for Video Acceleration (VA) API
420 | http://www.freedesktop.org/wiki/Software/vaapi
421 |
422 | x11-libs/libvdpau
423 | VDPAU wrapper and trace libraries
424 | http://www.freedesktop.org/wiki/Software/VDPAU
425 | or
426 | cuvid libs
427 | ffnvcodec and ffmpeg with cuvid support
428 | libs gl glu
429 |
430 | x11-libs/libxcb,
431 | X C-language Bindings library
432 | http://xcb.freedesktop.org
433 | x11-libs/xcb-util,
434 | x11-libs/xcb-util-wm,
435 | x11-libs/xcb-util-keysyms
436 | X C-language Bindings library
437 | http://xcb.freedesktop.org
438 | Only versions >= 0.3.8 are good supported
439 |
440 | x11-libs/libX11
441 | X.Org X11 library
442 | http://xorg.freedesktop.org
443 |
444 | GNU Make 3.xx
445 | http://www.gnu.org/software/make/make.html
446 |
447 | Optional:
448 | for openGL accelerated OSD need
449 | libs gl glu glew freetype2
450 |
451 | Note:
452 | Xorg X11
453 | For old Intel video use va-api and va-api-glx.
454 | For newest Intel video use va-api-egl.
455 | For old Nvidia video use vdpau and vdpau-glx.
456 | For old hybrid video use vdpau-glx or va-api and va-api-glx.
457 | For newest Nvidia video use cuvid and cuvid-egl or nvdec and nvdec-egl.
458 | For all system with openGL you can use cpu-glx or cpu-egl.
459 |
460 | Wayland Xwayland (tested with Fedora 40)
461 | For Intel video use va-api-egl.
462 | For old Nvidia video use vdpau and vdpau-glx.
463 | For newest Nvidia video use cuvid or nvdec.
464 | For all system with openGL you can use cpu-glx or cpu-egl.
465 |
--------------------------------------------------------------------------------
/Todo:
--------------------------------------------------------------------------------
1 | @file Todo @brief A software HD output device for VDR
2 |
3 | Copyright (c) 2011 - 2013 by Johns. All Rights Reserved.
4 |
5 | Contributor(s): 2019 - 2023 ua0lnj
6 |
7 | License: AGPLv3
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Affero General Public License as
11 | published by the Free Software Foundation, either version 3 of the
12 | License.
13 |
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | $Id: $
20 |
21 | missing:
22 | documentation of the PIP hotkeys.
23 | svdrp help page missing PIP hotkeys.
24 | svdrp stat: add X11 crashed status.
25 | more software deinterlace (yadif, ...)
26 | more software decoder with software deinterlace
27 | suspend output / energie saver: stop and restart X11
28 | suspend plugin didn't restore full-screen (is this wanted?)
29 | Option deinterlace off / deinterlace force!
30 | ColorSpace aren't configurable with the gui.
31 | works for me: restart vdr not working, when started x11 was killed.
32 |
33 | video:
34 | subtitle not cleared
35 | subtitle could be asyncron
36 | grab image with hardware and better scaling support
37 | yaepghd changed position is lost on channel switch
38 | pause (live tv) has sometime problems with SAT1 HD Pro7 HD
39 | radio no need to wait on video buffers
40 | starting with radio and own X11 server, shows no video
41 | some low-bandwidth tv channels have hiccups.
42 | check start with 24Hz display rate
43 | still-picture of PES recordings should use VideoMpegEnqueue.
44 | atmo service support 3D grab
45 | no warnings during still picture
46 |
47 | vdpau:
48 | software deinterlace path not working.
49 | OSD looses transparency, during channel switch.
50 | OSD looses transparency, while moving cut marks.
51 | ffmpeg >=1.2 supports same API like VA-API.
52 |
53 | libva:
54 | yaepghd (VaapiSetOutputPosition) support
55 | can associate only displayed part of osd
56 | remove stderr output of libva init
57 | still many: (workaround export NO_MPEG_HW=1)
58 | [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung
59 | [drm:i915_wait_request] *ERROR* i915_wait_request returns -11 ...
60 | missing OSD support for 3d SBS / Top-Bottom streams, like VPDAU.
61 | PIP support / multistream handling
62 | VA-AP VaapiCleanup crash after channel without video.
63 |
64 | x11:
65 | skip multiple configure-notify, handle only the last one.
66 | support embedded mode
67 |
68 | audio:
69 | Make alsa thread/polled and oss thread/polled output module runtime
70 | selectable.
71 | Mute should do a real mute and not only set volume to zero.
72 | Starting suspended and muted, didn't register the mute.
73 | Relaxed audio sync checks at end of packet and already in sync
74 | samplerate problem resume/suspend.
75 | only wait for video start, if video is running.
76 | Not primary device, don't use and block audio/video.
77 | multiple open of audio device, reduce them.
78 | Not all channel conversions are written (f.e. 2->3 ... 5->6 ...)
79 |
80 | audio/alsa:
81 | remix support of unsupported sample rates
82 |
83 | audio/oss:
84 | alsa oss emulation mixer "pcm" not working
85 | oss4 mixer channel not working
86 | ring buffer overflow with alsa oss emulation
87 |
88 | setup:
89 | Setup of decoder type.
90 | Setup of output type.
91 | Some setup parameters are not used until restart.
92 | Can a notice be added to the setup menu?
93 |
94 | unsorted:
95 | stoping vdr while plugin is suspended opens and closes a window.
96 | svdrp prim: support plugin names for device numbers.
97 | Workaround exists: hangup PipVideoStream -> Vdpau_get_format -> xcb -> poll
98 | + lock DecoderLockMutex
99 | check compiletime and runtime ffmpeg/libav version during init.
100 |
101 | future features
102 |
103 | correct display P-frame video
104 | save and use auto-crop with channel zapping
105 |
106 | upmix stereo to AC-3 (supported by alsa plugin)
107 |
--------------------------------------------------------------------------------
/audio.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// @file audio.h @brief Audio module headerfile
3 | ///
4 | /// Copyright (c) 2009 - 2014 by Johns. All Rights Reserved.
5 | ///
6 | /// Contributor(s):
7 | ///
8 | /// License: AGPLv3
9 | ///
10 | /// This program is free software: you can redistribute it and/or modify
11 | /// it under the terms of the GNU Affero General Public License as
12 | /// published by the Free Software Foundation, either version 3 of the
13 | /// License.
14 | ///
15 | /// This program is distributed in the hope that it will be useful,
16 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | /// GNU Affero General Public License for more details.
19 | ///
20 | /// $Id: f0386d79fa17802ccb4be0cba393ab22ae9a665e $
21 | //////////////////////////////////////////////////////////////////////////////
22 |
23 | /// @addtogroup Audio
24 | /// @{
25 |
26 | //----------------------------------------------------------------------------
27 | // Prototypes
28 | //----------------------------------------------------------------------------
29 |
30 | extern void AudioEnqueue(const void *, int); ///< buffer audio samples
31 | extern void AudioFlushBuffers(void); ///< flush audio buffers
32 | extern void AudioPoller(void); ///< poll audio events/handling
33 | extern int AudioFreeBytes(void); ///< free bytes in audio output
34 | extern int AudioUsedBytes(void); ///< used bytes in audio output
35 | extern int64_t AudioGetDelay(void); ///< get current audio delay
36 | extern void AudioSetClock(int64_t); ///< set audio clock base
37 | extern int64_t AudioGetClock(); ///< get current audio clock
38 | extern void AudioSetVolume(int); ///< set volume
39 | extern int AudioSetup(int *, int *, int); ///< setup audio output
40 |
41 | extern void AudioPlay(void); ///< play audio
42 | extern void AudioPause(void); ///< pause audio
43 |
44 | extern void AudioSetBufferTime(int); ///< set audio buffer time
45 | extern void AudioSetSoftvol(int); ///< enable/disable softvol
46 | extern void AudioSetNormalize(int, int); ///< set normalize parameters
47 | extern void AudioSetCompression(int, int); ///< set compression parameters
48 | extern void AudioSetStereoDescent(int); ///< set stereo loudness descent
49 |
50 | extern void AudioSetDevice(const char *); ///< set PCM audio device
51 |
52 | extern void SetAudioSkip(int); ///< set AudioSkip
53 |
54 | /// set pass-through device
55 | extern void AudioSetPassthroughDevice(const char *);
56 | extern void AudioSetChannel(const char *); ///< set mixer channel
57 | extern void AudioSetAutoAES(int); ///< set automatic AES flag handling
58 | extern void AudioInit(void); ///< setup audio module
59 | extern void AudioExit(void); ///< cleanup and exit audio module
60 |
61 | //----------------------------------------------------------------------------
62 | // Variables
63 | //----------------------------------------------------------------------------
64 |
65 | extern char AudioAlsaDriverBroken; ///< disable broken driver message
66 | extern char AudioAlsaNoCloseOpen; ///< disable alsa close/open fix
67 | extern char AudioAlsaCloseOpenDelay; ///< enable alsa close/open delay fix
68 |
69 | /// @}
70 |
--------------------------------------------------------------------------------
/codec.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// @file codec.h @brief Codec module headerfile
3 | ///
4 | /// Copyright (c) 2009 - 2013, 2015 by Johns. All Rights Reserved.
5 | ///
6 | /// Contributor(s):
7 | ///
8 | /// License: AGPLv3
9 | ///
10 | /// This program is free software: you can redistribute it and/or modify
11 | /// it under the terms of the GNU Affero General Public License as
12 | /// published by the Free Software Foundation, either version 3 of the
13 | /// License.
14 | ///
15 | /// This program is distributed in the hope that it will be useful,
16 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | /// GNU Affero General Public License for more details.
19 | ///
20 | /// $Id: 312c20227a0c3573182f76320190e02cf933a027 $
21 | //////////////////////////////////////////////////////////////////////////////
22 |
23 | /// @addtogroup Codec
24 | /// @{
25 |
26 | //----------------------------------------------------------------------------
27 | // Defines
28 | //----------------------------------------------------------------------------
29 |
30 | #define CodecPCM 0x01 ///< PCM bit mask
31 | #define CodecMPA 0x02 ///< MPA bit mask (planned)
32 | #define CodecAC3 0x04 ///< AC-3 bit mask
33 | #define CodecEAC3 0x08 ///< E-AC-3 bit mask
34 | #define CodecDTS 0x10 ///< DTS bit mask (planned)
35 |
36 | #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
37 |
38 | #ifndef FF_INPUT_BUFFER_PADDING_SIZE
39 | #define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE
40 | #endif
41 |
42 | enum HWAccelID {
43 | HWACCEL_NONE = 0,
44 | HWACCEL_AUTO,
45 | HWACCEL_VDPAU,
46 | HWACCEL_DXVA2,
47 | HWACCEL_VDA,
48 | HWACCEL_VIDEOTOOLBOX,
49 | HWACCEL_QSV,
50 | HWACCEL_VAAPI,
51 | HWACCEL_CUVID,
52 | HWACCEL_NVDEC,
53 | };
54 |
55 | ///
56 | /// Video decoder structure.
57 | ///
58 | struct _video_decoder_
59 | {
60 | VideoHwDecoder *HwDecoder; ///< video hardware decoder
61 |
62 | int GetFormatDone; ///< flag get format called!
63 | #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
64 | AVCodec *VideoCodec; ///< video codec
65 | #else
66 | const AVCodec *VideoCodec; ///< video codec
67 | #endif
68 | #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58,10,100)
69 | AVCodecParserContext *parser;
70 | #endif
71 | AVCodecContext *VideoCtx; ///< video codec context
72 | int FirstKeyFrame; ///< flag first frame
73 | AVFrame *Frame; ///< decoded video frame
74 | #ifdef USE_AVFILTER
75 | /* deinterlace filter */
76 | AVFilterContext *buffersink_ctx;
77 | AVFilterContext *buffersrc_ctx;
78 | AVFilterGraph *filter_graph;
79 | AVFrame *Filt_Frame; ///< filtered video frame
80 | #endif
81 | /* hwaccel options */
82 | enum HWAccelID hwaccel_id;
83 | char *hwaccel_device;
84 | enum AVPixelFormat hwaccel_output_format;
85 |
86 | /* hwaccel context */
87 | enum HWAccelID active_hwaccel_id;
88 | void *hwaccel_ctx;
89 | void (*hwaccel_uninit)(AVCodecContext *s);
90 | int (*hwaccel_get_buffer)(AVCodecContext *s, AVFrame *frame, int flags);
91 | int (*hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame);
92 | enum AVPixelFormat hwaccel_pix_fmt;
93 | enum AVPixelFormat hwaccel_retrieved_pix_fmt;
94 | AVBufferRef *hw_frames_ctx;
95 |
96 | void *hwdec_priv;
97 | // For HDR side-data caching
98 | double cached_hdr_peak;
99 | // From VO
100 | struct mp_hwdec_devices *hwdec_devs;
101 | };
102 |
103 | //----------------------------------------------------------------------------
104 | // Typedefs
105 | //----------------------------------------------------------------------------
106 |
107 | /// Video decoder typedef.
108 | typedef struct _video_decoder_ VideoDecoder;
109 |
110 | /// Audio decoder typedef.
111 | typedef struct _audio_decoder_ AudioDecoder;
112 |
113 | //----------------------------------------------------------------------------
114 | // Variables
115 | //----------------------------------------------------------------------------
116 |
117 | /// Flag prefer fast xhannel switch
118 | extern char CodecUsePossibleDefectFrames;
119 |
120 | //----------------------------------------------------------------------------
121 | // Prototypes
122 | //----------------------------------------------------------------------------
123 |
124 | /// Allocate a new video decoder context.
125 | extern VideoDecoder *CodecVideoNewDecoder(VideoHwDecoder *);
126 |
127 | /// Deallocate a video decoder context.
128 | extern void CodecVideoDelDecoder(VideoDecoder *);
129 | #ifdef USE_AVFILTER
130 | /// Init video filter for deinterlacing
131 | extern int CodecVideoInitFilter(VideoDecoder *, const char *);
132 | #endif
133 | /// Open video codec.
134 | extern int CodecVideoOpen(VideoDecoder *, int);
135 |
136 | /// Close video codec.
137 | extern void CodecVideoClose(VideoDecoder *);
138 |
139 | /// Decode a video packet.
140 | extern int CodecVideoDecode(VideoDecoder *, const AVPacket *);
141 |
142 | /// Flush video buffers.
143 | extern void CodecVideoFlushBuffers(VideoDecoder *);
144 |
145 | /// Allocate a new audio decoder context.
146 | extern AudioDecoder *CodecAudioNewDecoder(void);
147 |
148 | /// Deallocate an audio decoder context.
149 | extern void CodecAudioDelDecoder(AudioDecoder *);
150 |
151 | /// Open audio codec.
152 | extern void CodecAudioOpen(AudioDecoder *, int);
153 |
154 | /// Close audio codec.
155 | extern void CodecAudioClose(AudioDecoder *);
156 |
157 | /// Set audio drift correction.
158 | extern void CodecSetAudioDrift(int);
159 |
160 | /// Set audio pass-through.
161 | extern void CodecSetAudioPassthrough(int);
162 | extern void CodecSetAudioPassthroughHBR(int);
163 |
164 | /// Set audio downmix.
165 | extern void CodecSetAudioDownmix(int);
166 |
167 | /// Decode an audio packet.
168 | extern void CodecAudioDecode(AudioDecoder *, const AVPacket *);
169 |
170 | /// Flush audio buffers.
171 | extern void CodecAudioFlushBuffers(AudioDecoder *);
172 |
173 | /// Setup and initialize codec module.
174 | extern void CodecInit(void);
175 |
176 | /// Cleanup and exit codec module.
177 | extern void CodecExit(void);
178 |
179 | /// @}
180 |
--------------------------------------------------------------------------------
/iatomic.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// @file iatomic.h @brief Misc function header file
3 | ///
4 | /// Copyright (c) 2014 by Johns. All Rights Reserved.
5 | ///
6 | /// Contributor(s):
7 | ///
8 | /// License: AGPLv3
9 | ///
10 | /// This program is free software: you can redistribute it and/or modify
11 | /// it under the terms of the GNU Affero General Public License as
12 | /// published by the Free Software Foundation, either version 3 of the
13 | /// License.
14 | ///
15 | /// This program is distributed in the hope that it will be useful,
16 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | /// GNU Affero General Public License for more details.
19 | ///
20 | /// $Id: 59e1684aaa6678ecdebb6ce0df6ce5b5f461dd6e $
21 | //////////////////////////////////////////////////////////////////////////////
22 |
23 | /// @addtogroup iatomic
24 | /// @{
25 |
26 | #define GCC_VERSION (__GNUC__ * 10000 \
27 | + __GNUC_MINOR__ * 100 \
28 | + __GNUC_PATCHLEVEL__)
29 |
30 | // gcc before 4.7 didn't support atomic builtins,
31 | // use alsa atomic functions.
32 | #if GCC_VERSION < 40700
33 |
34 | #include
35 |
36 | #else
37 |
38 | //////////////////////////////////////////////////////////////////////////////
39 | // Defines
40 | //////////////////////////////////////////////////////////////////////////////
41 |
42 | //////////////////////////////////////////////////////////////////////////////
43 | // Declares
44 | //////////////////////////////////////////////////////////////////////////////
45 |
46 | ///
47 | /// atomic type, 24 bit useable,
48 | ///
49 | typedef volatile int atomic_t;
50 |
51 | //////////////////////////////////////////////////////////////////////////////
52 | // Prototypes
53 | //////////////////////////////////////////////////////////////////////////////
54 |
55 | //////////////////////////////////////////////////////////////////////////////
56 | // Inlines
57 | //////////////////////////////////////////////////////////////////////////////
58 |
59 | ///
60 | /// Set atomic value.
61 | ///
62 | #define atomic_set(ptr, val) \
63 | __atomic_store_n(ptr, val, __ATOMIC_SEQ_CST)
64 |
65 | ///
66 | /// Read atomic value.
67 | ///
68 | #define atomic_read(ptr) \
69 | __atomic_load_n(ptr, __ATOMIC_SEQ_CST)
70 |
71 | ///
72 | /// Increment atomic value.
73 | ///
74 | #define atomic_inc(ptr) \
75 | __atomic_add_fetch(ptr, 1, __ATOMIC_SEQ_CST)
76 |
77 | ///
78 | /// Decrement atomic value.
79 | ///
80 | #define atomic_dec(ptr) \
81 | __atomic_sub_fetch(ptr, 1, __ATOMIC_SEQ_CST)
82 |
83 | ///
84 | /// Add to atomic value.
85 | ///
86 | #define atomic_add(val, ptr) \
87 | __atomic_add_fetch(ptr, val, __ATOMIC_SEQ_CST)
88 |
89 | ///
90 | /// Subtract from atomic value.
91 | ///
92 | #define atomic_sub(val, ptr) \
93 | __atomic_sub_fetch(ptr, val, __ATOMIC_SEQ_CST)
94 |
95 | #endif
96 |
97 | /// @}
98 |
--------------------------------------------------------------------------------
/misc.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// @file misc.h @brief Misc function header file
3 | ///
4 | /// Copyright (c) 2009 - 2012 by Lutz Sammer. All Rights Reserved.
5 | ///
6 | /// Contributor(s):
7 | /// Copied from uwm.
8 | ///
9 | /// License: AGPLv3
10 | ///
11 | /// This program is free software: you can redistribute it and/or modify
12 | /// it under the terms of the GNU Affero General Public License as
13 | /// published by the Free Software Foundation, either version 3 of the
14 | /// License.
15 | ///
16 | /// This program is distributed in the hope that it will be useful,
17 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of
18 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 | /// GNU Affero General Public License for more details.
20 | ///
21 | /// $Id: ec330435425f8f46fc906279bf48b7516343df6d $
22 | //////////////////////////////////////////////////////////////////////////////
23 |
24 | /// @addtogroup misc
25 | /// @{
26 |
27 | #include
28 | #include
29 | #include // clock_gettime
30 |
31 | //////////////////////////////////////////////////////////////////////////////
32 | // Defines
33 | //////////////////////////////////////////////////////////////////////////////
34 |
35 | //////////////////////////////////////////////////////////////////////////////
36 | // Declares
37 | //////////////////////////////////////////////////////////////////////////////
38 |
39 | //////////////////////////////////////////////////////////////////////////////
40 | // Variables
41 | //////////////////////////////////////////////////////////////////////////////
42 |
43 | extern int LogLevel; ///< how much information wanted
44 |
45 | //////////////////////////////////////////////////////////////////////////////
46 | // Prototypes
47 | //////////////////////////////////////////////////////////////////////////////
48 |
49 | static inline void Syslog(const int, const char *format, ...)
50 | __attribute__ ((format(printf, 2, 3)));
51 |
52 | //////////////////////////////////////////////////////////////////////////////
53 | // Inlines
54 | //////////////////////////////////////////////////////////////////////////////
55 |
56 | #ifdef DEBUG
57 | #define DebugLevel 4 /// private debug level
58 | #else
59 | #define DebugLevel 0 /// private debug level
60 | #endif
61 |
62 | /**
63 | ** Syslog output function.
64 | **
65 | ** - 0 fatal errors and errors
66 | ** - 1 warnings
67 | ** - 2 info
68 | ** - 3 important debug and fixme's
69 | */
70 | static inline void Syslog(const int level, const char *format, ...)
71 | {
72 | if (LogLevel > level || DebugLevel > level) {
73 | va_list ap;
74 | int priority = LOG_DEBUG;
75 | switch (level) {
76 | case 0: priority = LOG_ERR; break;
77 | case 1: priority = LOG_WARNING; break;
78 | case 2: priority = LOG_INFO; break;
79 | default: priority = LOG_DEBUG; break;
80 | }
81 |
82 | va_start(ap, format);
83 | vsyslog(priority, format, ap);
84 | va_end(ap);
85 | }
86 | }
87 |
88 | /**
89 | ** Show error.
90 | */
91 | #define Error(fmt...) Syslog(0, fmt)
92 |
93 | /**
94 | ** Show fatal error.
95 | */
96 | #define Fatal(fmt...) do { Error(fmt); abort(); } while (0)
97 |
98 | /**
99 | ** Show warning.
100 | */
101 | #define Warning(fmt...) Syslog(1, fmt)
102 |
103 | /**
104 | ** Show info.
105 | */
106 | #define Info(fmt...) Syslog(2, fmt)
107 |
108 | /**
109 | ** Show debug.
110 | */
111 | #ifdef DEBUG
112 | #define Debug(level, fmt...) Syslog(level, fmt)
113 | #else
114 | #define Debug(level, fmt...) /* disabled */
115 | #endif
116 |
117 | #ifndef AV_NOPTS_VALUE
118 | #define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
119 | #endif
120 |
121 | /**
122 | ** Nice time-stamp string.
123 | **
124 | ** @param ts dvb time stamp
125 | */
126 | static inline const char *Timestamp2String(int64_t ts)
127 | {
128 | static char buf[4][16];
129 | static int idx;
130 |
131 | if (ts == (int64_t) AV_NOPTS_VALUE) {
132 | return "--:--:--.---";
133 | }
134 | idx = (idx + 1) % 3;
135 | snprintf(buf[idx], sizeof(buf[idx]), "%2d:%02d:%02d.%03d",
136 | (int)(ts / (90 * 3600000)), (int)((ts / (90 * 60000)) % 60),
137 | (int)((ts / (90 * 1000)) % 60), (int)((ts / 90) % 1000));
138 |
139 | return buf[idx];
140 | }
141 |
142 | /**
143 | ** Get ticks in us.
144 | **
145 | ** @returns ticks in us,
146 | */
147 | static inline uint32_t GetUsTicks(void)
148 | {
149 | #ifdef CLOCK_MONOTONIC
150 | struct timespec tspec;
151 |
152 | clock_gettime(CLOCK_MONOTONIC, &tspec);
153 | return (tspec.tv_sec * 1000 * 1000) + (tspec.tv_nsec / (1000));
154 | #else
155 | struct timeval tval;
156 |
157 | if (gettimeofday(&tval, NULL) < 0) {
158 | return 0;
159 | }
160 | return (tval.tv_sec * 1000 * 1000) + (tval.tv_usec);
161 | #endif
162 | }
163 |
164 | /**
165 | ** Get ticks in ms.
166 | **
167 | ** @returns ticks in ms,
168 | */
169 | static inline uint32_t GetMsTicks(void)
170 | {
171 | return GetUsTicks() / 1000;
172 | }
173 |
174 | /// @}
175 |
--------------------------------------------------------------------------------
/openglosd.h:
--------------------------------------------------------------------------------
1 | #ifndef __SOFTHDDEVICE_OPENGLOSD_H
2 | #define __SOFTHDDEVICE_OPENGLOSD_H
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 | #include
14 | #include FT_FREETYPE_H
15 | #include FT_LCD_FILTER_H
16 | #include FT_STROKER_H
17 |
18 | #undef __FTERRORS_H__
19 | #define FT_ERRORDEF( e, v, s ) { e, s },
20 | #define FT_ERROR_START_LIST {
21 | #define FT_ERROR_END_LIST { 0, 0 } };
22 | const struct {
23 | int code;
24 | const char* message;
25 | } FT_Errors[] =
26 | #include FT_ERRORS_H
27 |
28 |
29 | #include
30 | #include
31 |
32 | //#include
33 | #include
34 | //#include
35 |
36 | #include "softhddev.h"
37 |
38 | extern "C"
39 | {
40 | #include
41 | #include
42 |
43 | #include "audio.h"
44 | //#include "video.h"
45 | //#include "codec.h"
46 | }
47 |
48 | struct sOglImage {
49 | GLuint texture;
50 | GLint width;
51 | GLint height;
52 | bool used;
53 | };
54 |
55 | /****************************************************************************************
56 | * Helpers
57 | ****************************************************************************************/
58 |
59 | void ConvertColor(const GLint &colARGB, glm::vec4 &col);
60 |
61 | /****************************************************************************************
62 | * cShader
63 | ****************************************************************************************/
64 | enum eShaderType {
65 | stRect,
66 | stTexture,
67 | stText,
68 | stCount
69 | };
70 |
71 | class cShader {
72 | private:
73 | eShaderType type;
74 | GLuint id;
75 | bool Compile(const char *vertexCode, const char *fragmentCode);
76 | bool CheckCompileErrors(GLuint object, bool program = false);
77 | public:
78 | cShader(void) {};
79 | virtual ~cShader(void) {};
80 | bool Load(eShaderType type);
81 | void Use(void);
82 | void SetFloat (const GLchar *name, GLfloat value);
83 | void SetInteger (const GLchar *name, GLint value);
84 | void SetVector2f (const GLchar *name, GLfloat x, GLfloat y);
85 | void SetVector3f (const GLchar *name, GLfloat x, GLfloat y, GLfloat z);
86 | void SetVector4f (const GLchar *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
87 | void SetMatrix4 (const GLchar *name, const glm::mat4 &matrix);
88 | };
89 |
90 | /****************************************************************************************
91 | * cOglGlyph
92 | ****************************************************************************************/
93 | class cOglGlyph : public cListObject {
94 | private:
95 | struct tKerning {
96 | public:
97 | tKerning(uint prevSym, GLfloat kerning = 0.0f) {
98 | this->prevSym = prevSym;
99 | this->kerning = kerning;
100 | }
101 | uint prevSym;
102 | GLfloat kerning;
103 | };
104 | uint charCode;
105 | int bearingLeft;
106 | int bearingTop;
107 | int width;
108 | int height;
109 | int advanceX;
110 | cVector kerningCache;
111 | GLuint texture;
112 | void LoadTexture(FT_BitmapGlyph ftGlyph);
113 | public:
114 | cOglGlyph(uint charCode, FT_BitmapGlyph ftGlyph);
115 | virtual ~cOglGlyph();
116 | uint CharCode(void) { return charCode; }
117 | int AdvanceX(void) { return advanceX; }
118 | int BearingLeft(void) const { return bearingLeft; }
119 | int BearingTop(void) const { return bearingTop; }
120 | int Width(void) const { return width; }
121 | int Height(void) const { return height; }
122 | int GetKerningCache(uint prevSym);
123 | void SetKerningCache(uint prevSym, int kerning);
124 | void BindTexture(void);
125 | };
126 |
127 | /****************************************************************************************
128 | * cOglFont
129 | ****************************************************************************************/
130 | class cOglFont : public cListObject {
131 | private:
132 | static bool initiated;
133 | cString name;
134 | int size;
135 | int height;
136 | int bottom;
137 | static FT_Library ftLib;
138 | FT_Face face;
139 | static cList *fonts;
140 | mutable cList glyphCache;
141 | cOglFont(const char *fontName, int charHeight);
142 | static void Init(void);
143 | public:
144 | virtual ~cOglFont(void);
145 | static cOglFont *Get(const char *name, int charHeight);
146 | static void Cleanup(void);
147 | const char *Name(void) { return *name; };
148 | int Size(void) { return size; };
149 | int Bottom(void) {return bottom; };
150 | int Height(void) {return height; };
151 | cOglGlyph* Glyph(uint charCode) const;
152 | int Kerning(cOglGlyph *glyph, uint prevSym) const;
153 | };
154 |
155 | /****************************************************************************************
156 | * cOglFb
157 | * Framebuffer Object - OpenGL part of a Pixmap
158 | ****************************************************************************************/
159 | class cOglFb {
160 | protected:
161 | bool initiated;
162 | GLuint fb;
163 | GLuint texture;
164 | GLint width, height;
165 | GLint viewPortWidth, viewPortHeight;
166 | bool scrollable;
167 | public:
168 | cOglFb(GLint width, GLint height, GLint viewPortWidth, GLint viewPortHeight);
169 | virtual ~cOglFb(void);
170 | bool Initiated(void) { return initiated; }
171 | virtual bool Init(void);
172 | void Bind(void);
173 | void BindRead(void);
174 | virtual void BindWrite(void);
175 | virtual void Unbind(void);
176 | bool BindTexture(void);
177 | void Blit(GLint destX1, GLint destY1, GLint destX2, GLint destY2);
178 | GLint Width(void) { return width; };
179 | GLint Height(void) { return height; };
180 | bool Scrollable(void) { return scrollable; };
181 | GLint ViewportWidth(void) { return viewPortWidth; };
182 | GLint ViewportHeight(void) { return viewPortHeight; };
183 | };
184 |
185 | /****************************************************************************************
186 | * cOglOutputFb
187 | * Output Framebuffer Object - holds Vdpau Output Surface which is our "output framebuffer"
188 | ****************************************************************************************/
189 | class cOglOutputFb : public cOglFb {
190 | private:
191 | GLvdpauSurfaceNV surface;
192 | bool run;
193 | public:
194 | cOglOutputFb(GLint width, GLint height);
195 | virtual ~cOglOutputFb(void);
196 | virtual bool Init(void);
197 | virtual void BindWrite(void);
198 | virtual void Unbind(void);
199 | virtual bool Run(){return run;}
200 | };
201 |
202 | /****************************************************************************************
203 | * cOglVb
204 | * Vertex Buffer - OpenGl Vertices for the different drawing commands
205 | ****************************************************************************************/
206 | enum eVertexBufferType {
207 | vbRect,
208 | vbEllipse,
209 | vbSlope,
210 | vbTexture,
211 | vbText,
212 | vbCount
213 | };
214 |
215 | class cOglVb {
216 | private:
217 | eVertexBufferType type;
218 | eShaderType shader;
219 | GLuint vao;
220 | GLuint vbo;
221 | int sizeVertex1;
222 | int sizeVertex2;
223 | int numVertices;
224 | GLuint drawMode;
225 | public:
226 | cOglVb(int type);
227 | virtual ~cOglVb(void);
228 | bool Init(void);
229 | void Bind(void);
230 | void Unbind(void);
231 | void ActivateShader(void);
232 | void EnableBlending(void);
233 | void DisableBlending(void);
234 | void SetShaderColor(GLint color);
235 | void SetShaderAlpha(GLint alpha);
236 | void SetShaderProjectionMatrix(GLint width, GLint height);
237 | void SetVertexData(GLfloat *vertices, int count = 0);
238 | void DrawArrays(int count = 0);
239 | };
240 |
241 | /****************************************************************************************
242 | * cOpenGLCmd
243 | ****************************************************************************************/
244 | class cOglCmd {
245 | protected:
246 | cOglFb *fb;
247 | public:
248 | cOglCmd(cOglFb *fb) { this->fb = fb; };
249 | virtual ~cOglCmd(void) {};
250 | virtual const char* Description(void) = 0;
251 | virtual bool Execute(void) = 0;
252 | };
253 |
254 | class cOglCmdInitOutputFb : public cOglCmd {
255 | private:
256 | cOglOutputFb *oFb;
257 | public:
258 | cOglCmdInitOutputFb(cOglOutputFb *oFb);
259 | virtual ~cOglCmdInitOutputFb(void) {};
260 | virtual const char* Description(void) { return "InitOutputFramebuffer"; }
261 | virtual bool Execute(void);
262 | };
263 |
264 | class cOglCmdInitFb : public cOglCmd {
265 | private:
266 | cCondWait *wait;
267 | public:
268 | cOglCmdInitFb(cOglFb *fb, cCondWait *wait = NULL);
269 | virtual ~cOglCmdInitFb(void) {};
270 | virtual const char* Description(void) { return "InitFramebuffer"; }
271 | virtual bool Execute(void);
272 | };
273 |
274 | class cOglCmdDeleteFb : public cOglCmd {
275 | public:
276 | cOglCmdDeleteFb(cOglFb *fb);
277 | virtual ~cOglCmdDeleteFb(void) {};
278 | virtual const char* Description(void) { return "DeleteFramebuffer"; }
279 | virtual bool Execute(void);
280 | };
281 |
282 | class cOglCmdRenderFbToBufferFb : public cOglCmd {
283 | private:
284 | cOglFb *buffer;
285 | GLfloat x, y;
286 | GLfloat drawPortX, drawPortY;
287 | GLint transparency;
288 | public:
289 | cOglCmdRenderFbToBufferFb(cOglFb *fb, cOglFb *buffer, GLint x, GLint y, GLint transparency, GLint drawPortX, GLint drawPortY);
290 | virtual ~cOglCmdRenderFbToBufferFb(void) {};
291 | virtual const char* Description(void) { return "Render Framebuffer to Buffer"; }
292 | virtual bool Execute(void);
293 | };
294 |
295 | class cOglCmdCopyBufferToOutputFb : public cOglCmd {
296 | private:
297 | cOglOutputFb *oFb;
298 | GLint x, y;
299 | public:
300 | cOglCmdCopyBufferToOutputFb(cOglFb *fb, cOglOutputFb *oFb, GLint x, GLint y);
301 | virtual ~cOglCmdCopyBufferToOutputFb(void) {};
302 | virtual const char* Description(void) { return "Copy buffer to OutputFramebuffer"; }
303 | virtual bool Execute(void);
304 | };
305 |
306 | class cOglCmdFill : public cOglCmd {
307 | private:
308 | GLint color;
309 | public:
310 | cOglCmdFill(cOglFb *fb, GLint color);
311 | virtual ~cOglCmdFill(void) {};
312 | virtual const char* Description(void) { return "Fill"; }
313 | virtual bool Execute(void);
314 | };
315 |
316 | class cOglCmdDrawRectangle : public cOglCmd {
317 | private:
318 | GLint x, y;
319 | GLint width, height;
320 | GLint color;
321 | public:
322 | cOglCmdDrawRectangle(cOglFb *fb, GLint x, GLint y, GLint width, GLint height, GLint color);
323 | virtual ~cOglCmdDrawRectangle(void) {};
324 | virtual const char* Description(void) { return "DrawRectangle"; }
325 | virtual bool Execute(void);
326 | };
327 |
328 | class cOglCmdDrawEllipse : public cOglCmd {
329 | private:
330 | GLint x, y;
331 | GLint width, height;
332 | GLint color;
333 | GLint quadrants;
334 | GLfloat *CreateVerticesFull(int &numVertices);
335 | GLfloat *CreateVerticesQuadrant(int &numVertices);
336 | GLfloat *CreateVerticesHalf(int &numVertices);
337 | public:
338 | cOglCmdDrawEllipse(cOglFb *fb, GLint x, GLint y, GLint width, GLint height, GLint color, GLint quadrants);
339 | virtual ~cOglCmdDrawEllipse(void) {};
340 | virtual const char* Description(void) { return "DrawEllipse"; }
341 | virtual bool Execute(void);
342 | };
343 |
344 | class cOglCmdDrawSlope : public cOglCmd {
345 | private:
346 | GLint x, y;
347 | GLint width, height;
348 | GLint color;
349 | GLint type;
350 | public:
351 | cOglCmdDrawSlope(cOglFb *fb, GLint x, GLint y, GLint width, GLint height, GLint color, GLint type);
352 | virtual ~cOglCmdDrawSlope(void) {};
353 | virtual const char* Description(void) { return "DrawSlope"; }
354 | virtual bool Execute(void);
355 | };
356 |
357 | class cOglCmdDrawText : public cOglCmd {
358 | private:
359 | GLint x, y;
360 | GLint limitX;
361 | GLint colorText;
362 | cString fontName;
363 | int fontSize;
364 | unsigned int *symbols;
365 | public:
366 | cOglCmdDrawText(cOglFb *fb, GLint x, GLint y, unsigned int *symbols, GLint limitX, const char *name, int fontSize, tColor colorText);
367 | virtual ~cOglCmdDrawText(void);
368 | virtual const char* Description(void) { return "DrawText"; }
369 | virtual bool Execute(void);
370 | };
371 |
372 | class cOglCmdDrawImage : public cOglCmd {
373 | private:
374 | tColor *argb;
375 | GLint x, y, width, height;
376 | bool overlay;
377 | GLfloat scaleX, scaleY;
378 | public:
379 | cOglCmdDrawImage(cOglFb *fb, tColor *argb, GLint width, GLint height, GLint x, GLint y, bool overlay = true, double scaleX = 1.0f, double scaleY = 1.0f);
380 | virtual ~cOglCmdDrawImage(void);
381 | virtual const char* Description(void) { return "Draw Image"; }
382 | virtual bool Execute(void);
383 | };
384 |
385 | class cOglCmdDrawTexture : public cOglCmd {
386 | private:
387 | sOglImage *imageRef;
388 | GLint x, y;
389 | GLfloat scaleX, scaleY;
390 | public:
391 | cOglCmdDrawTexture(cOglFb *fb, sOglImage *imageRef, GLint x, GLint y, double scaleX = 1.0f, double scaleY = 1.0f);
392 | virtual ~cOglCmdDrawTexture(void) {};
393 | virtual const char* Description(void) { return "Draw Texture"; }
394 | virtual bool Execute(void);
395 | };
396 |
397 | class cOglCmdStoreImage : public cOglCmd {
398 | private:
399 | sOglImage *imageRef;
400 | tColor *data;
401 | public:
402 | cOglCmdStoreImage(sOglImage *imageRef, tColor *argb);
403 | virtual ~cOglCmdStoreImage(void);
404 | virtual const char* Description(void) { return "Store Image"; }
405 | virtual bool Execute(void);
406 | };
407 |
408 | class cOglCmdDropImage : public cOglCmd {
409 | private:
410 | sOglImage *imageRef;
411 | cCondWait *wait;
412 | public:
413 | cOglCmdDropImage(sOglImage *imageRef, cCondWait *wait);
414 | virtual ~cOglCmdDropImage(void) {};
415 | virtual const char* Description(void) { return "Drop Image"; }
416 | virtual bool Execute(void);
417 | };
418 |
419 | /******************************************************************************
420 | * cOglThread
421 | ******************************************************************************/
422 | #define OGL_MAX_OSDIMAGES 256
423 | #define OGL_CMDQUEUE_SIZE 100
424 |
425 | class cOglThread : public cThread {
426 | private:
427 | cCondWait *startWait;
428 | cCondWait *wait;
429 | bool stalled;
430 | std::queue commands;
431 | GLint maxTextureSize;
432 | sOglImage imageCache[OGL_MAX_OSDIMAGES];
433 | long memCached;
434 | long maxCacheSize;
435 | bool InitOpenGL(void);
436 | bool InitShaders(void);
437 | void DeleteShaders(void);
438 | bool InitVdpauInterop(void);
439 | bool InitVertexBuffers(void);
440 | void DeleteVertexBuffers(void);
441 | void Cleanup(void);
442 | int GetFreeSlot(void);
443 | void ClearSlot(int slot);
444 | protected:
445 | virtual void Action(void);
446 | public:
447 | cOglThread(cCondWait *startWait, int maxCacheSize);
448 | virtual ~cOglThread();
449 | void Stop(void);
450 | void DoCmd(cOglCmd* cmd);
451 | int StoreImage(const cImage &image);
452 | void DropImageData(int imageHandle);
453 | sOglImage *GetImageRef(int slot);
454 | int MaxTextureSize(void) { return maxTextureSize; };
455 | };
456 |
457 | /****************************************************************************************
458 | * cOglPixmap
459 | ****************************************************************************************/
460 | class cOglPixmap : public cPixmap {
461 | private:
462 | cOglFb *fb;
463 | std::shared_ptr oglThread;
464 | bool dirty;
465 | public:
466 | cOglPixmap(std::shared_ptr oglThread, int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null);
467 | virtual ~cOglPixmap(void);
468 | cOglFb *Fb(void) { return fb; };
469 | int X(void) { return ViewPort().X(); };
470 | int Y(void) { return ViewPort().Y(); };
471 | virtual bool IsDirty(void) { return dirty; }
472 | virtual void SetDirty(bool dirty = true) { this->dirty = dirty; }
473 | virtual void SetAlpha(int Alpha);
474 | virtual void SetTile(bool Tile);
475 | virtual void SetViewPort(const cRect &Rect);
476 | virtual void SetDrawPortPoint(const cPoint &Point, bool Dirty = true);
477 | virtual void Clear(void);
478 | virtual void Fill(tColor Color);
479 | virtual void DrawImage(const cPoint &Point, const cImage &Image);
480 | virtual void DrawImage(const cPoint &Point, int ImageHandle);
481 | #if VDRVERSNUM >= 20606
482 | virtual void DrawScaledImage(const cPoint &Point, const cImage &Image, double FactorX = 1.0f, double FactorY = 1.0f, bool AntiAlias = false);
483 | virtual void DrawScaledImage(const cPoint &Point, int ImageHandle, double FactorX = 1.0f, double FactorY = 1.0f, bool AntiAlias = false);
484 | #endif
485 | virtual void DrawPixel(const cPoint &Point, tColor Color);
486 | virtual void DrawBitmap(const cPoint &Point, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0, bool Overlay = false);
487 | virtual void DrawText(const cPoint &Point, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width = 0, int Height = 0, int Alignment = taDefault);
488 | virtual void DrawRectangle(const cRect &Rect, tColor Color);
489 | virtual void DrawEllipse(const cRect &Rect, tColor Color, int Quadrants = 0);
490 | virtual void DrawSlope(const cRect &Rect, tColor Color, int Type);
491 | virtual void Render(const cPixmap *Pixmap, const cRect &Source, const cPoint &Dest);
492 | virtual void Copy(const cPixmap *Pixmap, const cRect &Source, const cPoint &Dest);
493 | virtual void Scroll(const cPoint &Dest, const cRect &Source = cRect::Null);
494 | virtual void Pan(const cPoint &Dest, const cRect &Source = cRect::Null);
495 | };
496 |
497 | /******************************************************************************
498 | * cOglOsd
499 | ******************************************************************************/
500 | class cOglOsd : public cOsd {
501 | private:
502 | cOglFb *bFb;
503 | std::shared_ptr oglThread;
504 | cVector oglPixmaps;
505 | bool isSubtitleOsd;
506 | cSize maxPixmapSize;
507 | protected:
508 | public:
509 | cOglOsd(int Left, int Top, uint Level, std::shared_ptr oglThread);
510 | virtual ~cOglOsd();
511 | virtual eOsdError SetAreas(const tArea *Areas, int NumAreas);
512 | virtual cPixmap *CreatePixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null);
513 | virtual void DestroyPixmap(cPixmap *Pixmap);
514 | virtual void Flush(void);
515 | virtual void DrawScaledBitmap(int x, int y, const cBitmap &Bitmap, double FactorX, double FactorY, bool AntiAlias = false);
516 | virtual const cSize &MaxPixmapSize(void) const;
517 | static cOglOutputFb *oFb;
518 | };
519 |
520 | #endif //__SOFTHDDEVICE_OPENGLOSD_H
521 |
--------------------------------------------------------------------------------
/po/.gitignore:
--------------------------------------------------------------------------------
1 | # gitignore(5) file
2 | *.mo
3 | *.pot
4 |
--------------------------------------------------------------------------------
/po/it_IT.po:
--------------------------------------------------------------------------------
1 | msgid ""
2 | msgstr ""
3 | "Project-Id-Version: VDR \n"
4 | "Report-Msgid-Bugs-To: \n"
5 | "POT-Creation-Date: 2025-03-29 19:36+1000\n"
6 | "PO-Revision-Date: \n"
7 | "Last-Translator: fiveten_59\n"
8 | "Language-Team: fiveten_59\n"
9 | "Language: it\n"
10 | "MIME-Version: 1.0\n"
11 | "Content-Type: text/plain; charset=UTF-8\n"
12 | "Content-Transfer-Encoding: 8bit\n"
13 |
14 | #, c-format
15 | msgid "audio: %dHz sample-rate unsupported\n"
16 | msgstr "audio: %dHz tasso di campionamento non supportato\n"
17 |
18 | #, c-format
19 | msgid "audio: %d channels unsupported\n"
20 | msgstr "audio: %d canali non supportati\n"
21 |
22 | msgid "audio: out of ring buffers\n"
23 | msgstr "audio: out of ring buffers\n"
24 |
25 | #, c-format
26 | msgid "audio/alsa: avail underrun error? '%s'\n"
27 | msgstr ""
28 |
29 | #, c-format
30 | msgid "audio/alsa: snd_pcm_avail_update(): %s\n"
31 | msgstr ""
32 |
33 | #, c-format
34 | msgid ""
35 | "audio/alsa: broken driver state '%s', retries: %d, avail: %d\n"
36 | "\n"
37 | msgstr ""
38 |
39 | #, c-format
40 | msgid "audio/alsa: snd_pcm_start(): %s\n"
41 | msgstr ""
42 |
43 | msgid "audio/alsa: bytes lost -> out of sync\n"
44 | msgstr ""
45 |
46 | #, c-format
47 | msgid "audio/alsa: writei underrun error? '%s'\n"
48 | msgstr ""
49 |
50 | #, c-format
51 | msgid "audio/alsa: snd_pcm_writei failed: %s\n"
52 | msgstr ""
53 |
54 | msgid "audio/alsa: not all frames written\n"
55 | msgstr ""
56 |
57 | #, c-format
58 | msgid "audio: snd_pcm_drop(): %s\n"
59 | msgstr ""
60 |
61 | #, c-format
62 | msgid "audio: snd_pcm_prepare(): %s\n"
63 | msgstr ""
64 |
65 | #, c-format
66 | msgid "audio/alsa: wait underrun error? '%s'\n"
67 | msgstr ""
68 |
69 | #, c-format
70 | msgid "audio/alsa: snd_pcm_wait(): %s\n"
71 | msgstr ""
72 |
73 | #, c-format
74 | msgid "audio/alsa: using %sdevice '%s'\n"
75 | msgstr ""
76 |
77 | #, c-format
78 | msgid "audio/alsa: playback open '%s' error: %s\n"
79 | msgstr ""
80 |
81 | #, c-format
82 | msgid "audio/alsa AES: using pass-through device '%s'\n"
83 | msgstr ""
84 |
85 | #, c-format
86 | msgid "audio/alsa: can't set block mode: %s\n"
87 | msgstr ""
88 |
89 | #, c-format
90 | msgid "audio: snd_pcm_hw_params_any: no configurations available: %s\n"
91 | msgstr ""
92 |
93 | #, c-format
94 | msgid "audio/alsa: supports pause: %s\n"
95 | msgstr ""
96 |
97 | #, c-format
98 | msgid "audio/alsa: can't open mixer '%s'\n"
99 | msgstr ""
100 |
101 | #, c-format
102 | msgid "audio/alsa: set params error: %s\n"
103 | msgstr ""
104 |
105 | #, c-format
106 | msgid "audio: snd_pcm_sw_params_current failed: %s\n"
107 | msgstr ""
108 |
109 | #, c-format
110 | msgid "audio: snd_pcm_sw_params_get_boundary failed: %s\n"
111 | msgstr ""
112 |
113 | #, c-format
114 | msgid "audio: snd_pcm_sw_params_set_silence_threshold failed: %s\n"
115 | msgstr ""
116 |
117 | #, c-format
118 | msgid "audio: snd_pcm_sw_params_set_silence_size failed: %s\n"
119 | msgstr ""
120 |
121 | #, c-format
122 | msgid "audio: snd_pcm_sw_params failed: %s\n"
123 | msgstr ""
124 |
125 | #, c-format
126 | msgid "audio/alsa: start delay %ums\n"
127 | msgstr ""
128 |
129 | #, c-format
130 | msgid "audio/alsa: snd_pcm_pause(): %s\n"
131 | msgstr ""
132 |
133 | #, c-format
134 | msgid "audio/alsa: snd_pcm_prepare(): %s\n"
135 | msgstr ""
136 |
137 | msgid "audio/alsa: still paused\n"
138 | msgstr ""
139 |
140 | #, c-format
141 | msgid "snd_pcm_pause(): %s\n"
142 | msgstr ""
143 |
144 | #, c-format
145 | msgid "snd_pcm_drop(): %s\n"
146 | msgstr ""
147 |
148 | #, c-format
149 | msgid "audio/oss: ioctl(SNDCTL_DSP_GETOSPACE): %s\n"
150 | msgstr ""
151 |
152 | #, c-format
153 | msgid "audio/oss: write error: %s\n"
154 | msgstr ""
155 |
156 | msgid "audio/oss: error not all bytes written\n"
157 | msgstr ""
158 |
159 | #, c-format
160 | msgid "audio/oss: ioctl(SNDCTL_DSP_HALT_OUTPUT): %s\n"
161 | msgstr ""
162 |
163 | #, c-format
164 | msgid "audio/oss: error poll %s\n"
165 | msgstr ""
166 |
167 | #, c-format
168 | msgid "audio/oss: using %sdevice '%s'\n"
169 | msgstr ""
170 |
171 | #, c-format
172 | msgid "audio/oss: can't open dsp device '%s': %s\n"
173 | msgstr ""
174 |
175 | #, c-format
176 | msgid "audio/oss: ioctl(MIXER_WRITE): %s\n"
177 | msgstr ""
178 |
179 | #, c-format
180 | msgid "audio/oss: can't open mixer device '%s': %s\n"
181 | msgstr ""
182 |
183 | #, c-format
184 | msgid "audio/oss: ioctl(SOUND_MIXER_READ_DEVMASK): %s\n"
185 | msgstr ""
186 |
187 | #, c-format
188 | msgid "audio/oss: channel '%s' not supported\n"
189 | msgstr ""
190 |
191 | #, c-format
192 | msgid "audio/oss: channel '%s' not found\n"
193 | msgstr ""
194 |
195 | msgid "audio/oss: should not happen\n"
196 | msgstr ""
197 |
198 | #, c-format
199 | msgid "audio/oss: ioctl(SNDCTL_DSP_GETODELAY): %s\n"
200 | msgstr ""
201 |
202 | #, c-format
203 | msgid "audio/oss: ioctl(SNDCTL_DSP_SETFMT): %s\n"
204 | msgstr ""
205 |
206 | msgid "audio/oss: device doesn't support 16 bit sample format.\n"
207 | msgstr ""
208 |
209 | #, c-format
210 | msgid "audio/oss: ioctl(SNDCTL_DSP_CHANNELS): %s\n"
211 | msgstr ""
212 |
213 | #, c-format
214 | msgid "audio/oss: device doesn't support %d channels.\n"
215 | msgstr ""
216 |
217 | #, c-format
218 | msgid "audio/oss: ioctl(SNDCTL_DSP_SPEED): %s\n"
219 | msgstr ""
220 |
221 | #, c-format
222 | msgid "audio/oss: device doesn't support %dHz sample rate.\n"
223 | msgstr ""
224 |
225 | #, c-format
226 | msgid "audio/oss: ioctl(SNDCTL_DSP_POLICY): %s\n"
227 | msgstr ""
228 |
229 | #, c-format
230 | msgid "audio/oss: delay %ums\n"
231 | msgstr ""
232 |
233 | #, c-format
234 | msgid "audio: can't set channels %d sample-rate %dHz\n"
235 | msgstr ""
236 |
237 | msgid "audio: can't cancel play thread\n"
238 | msgstr ""
239 |
240 | #, c-format
241 | msgid "audio: can't place %d samples in ring buffer\n"
242 | msgstr ""
243 |
244 | msgid "audio: flush out of ring buffers\n"
245 | msgstr ""
246 |
247 | #, c-format
248 | msgid "audio: '%s' output module used\n"
249 | msgstr ""
250 |
251 | #, c-format
252 | msgid "audio: '%s' output module isn't supported\n"
253 | msgstr ""
254 |
255 | #, c-format
256 | msgid "audio: %6dHz supports %d %d %d %d %d %d %d %d channels\n"
257 | msgstr ""
258 |
259 | msgid "codec: buggy libav, use ffmpeg\n"
260 | msgstr ""
261 |
262 | msgid "codec: can't allocate vodeo decoder\n"
263 | msgstr ""
264 |
265 | msgid "codec: filter not described, filter disabled\n"
266 | msgstr ""
267 |
268 | #, c-format
269 | msgid "Cannot alloc buffer source %s\n"
270 | msgstr ""
271 |
272 | #, c-format
273 | msgid "Cannot init buffer source %s\n"
274 | msgstr ""
275 |
276 | msgid "codec: cannot create buffer sink\n"
277 | msgstr ""
278 |
279 | msgid "codec: cannot set output pixel format\n"
280 | msgstr ""
281 |
282 | msgid "codec: cannot parse ptr filter graph\n"
283 | msgstr ""
284 |
285 | #, c-format
286 | msgid "codec: cannot config filter graph %d\n"
287 | msgstr ""
288 |
289 | msgid "codec: can't allocate video filter frame buffer\n"
290 | msgstr ""
291 |
292 | msgid "codec: missing close\n"
293 | msgstr ""
294 |
295 | #, c-format
296 | msgid "codec: codec ID %#06x not found\n"
297 | msgstr ""
298 |
299 | msgid "codec: can't init parser\n"
300 | msgstr ""
301 |
302 | msgid "codec: can't allocate video codec context\n"
303 | msgstr ""
304 |
305 | msgid "codec: can't open video codec!\n"
306 | msgstr ""
307 |
308 | msgid "codec: can't allocate video decoder frame buffer\n"
309 | msgstr ""
310 |
311 | msgid "Error while feeding the filtergraph\n"
312 | msgstr ""
313 |
314 | msgid "codec: can't allocate audio decoder\n"
315 | msgstr ""
316 |
317 | msgid "codec: can't allocate audio decoder frame buffer\n"
318 | msgstr ""
319 |
320 | msgid "codec: can't allocate audio codec context\n"
321 | msgstr ""
322 |
323 | msgid "codec: can't open audio codec\n"
324 | msgstr ""
325 |
326 | msgid "codec/audio: decoded data smaller than encoded\n"
327 | msgstr ""
328 |
329 | msgid "codec/audio: resample setup error\n"
330 | msgstr ""
331 |
332 | msgid "codec/audio: overwrite resample\n"
333 | msgstr ""
334 |
335 | msgid "codec/audio: AvResample setup error\n"
336 | msgstr ""
337 |
338 | msgid "codec: latm\n"
339 | msgstr ""
340 |
341 | msgid "codec: error audio data\n"
342 | msgstr ""
343 |
344 | msgid "codec: error more than one frame data\n"
345 | msgstr ""
346 |
347 | msgid "codec/audio: can't setup resample\n"
348 | msgstr ""
349 |
350 | msgid "codec/audio: can't open resample\n"
351 | msgstr ""
352 |
353 | msgid "[softhddev] out of memory\n"
354 | msgstr ""
355 |
356 | msgid "video: no empty slot in packet ringbuffer\n"
357 | msgstr ""
358 |
359 | msgid "[softhddev] too short PES video packet\n"
360 | msgstr ""
361 |
362 | msgid "pesdemux: out of memory\n"
363 | msgstr ""
364 |
365 | msgid "pesdemux: mpeg1 pes packet unsupported\n"
366 | msgstr ""
367 |
368 | #, c-format
369 | msgid "softhddev: LPCM %d bits per sample aren't supported\n"
370 | msgstr ""
371 |
372 | #, c-format
373 | msgid "softhddev: LPCM %d sample-rate is unsupported\n"
374 | msgstr ""
375 |
376 | #, c-format
377 | msgid "softhddev: LPCM %d channels are unsupported\n"
378 | msgstr ""
379 |
380 | msgid "tsdemux: transport stream out of sync\n"
381 | msgstr ""
382 |
383 | msgid "[softhddev] invalid PES audio packet\n"
384 | msgstr ""
385 |
386 | msgid "[softhddev] empty audio packet\n"
387 | msgstr ""
388 |
389 | #, c-format
390 | msgid "[softhddev] invalid audio packet %d bytes\n"
391 | msgstr ""
392 |
393 | msgid "[softhddev] audio buffer too small\n"
394 | msgstr ""
395 |
396 | #, c-format
397 | msgid "[softhddev] invalid LPCM audio packet %d bytes\n"
398 | msgstr ""
399 |
400 | #, c-format
401 | msgid "[softhddev] LPCM %d bits per sample aren't supported\n"
402 | msgstr ""
403 |
404 | #, c-format
405 | msgid "[softhddev] LPCM %d sample-rate is unsupported\n"
406 | msgstr ""
407 |
408 | #, c-format
409 | msgid "[softhddev] LPCM %d channels are unsupported\n"
410 | msgstr ""
411 |
412 | msgid "[softhddev] invalid PES video packet\n"
413 | msgstr ""
414 |
415 | #, c-format
416 | msgid "[softhddev] %d invalid PES video packet(s)\n"
417 | msgstr ""
418 |
419 | msgid "[softhddev] empty video packet\n"
420 | msgstr ""
421 |
422 | #, c-format
423 | msgid "[softhddev] invalid video packet %d/%d bytes\n"
424 | msgstr ""
425 |
426 | #, c-format
427 | msgid "[softhddev] invalid still video packet size %d\n"
428 | msgstr ""
429 |
430 | msgid "[softhddev] no codec known for still picture\n"
431 | msgstr ""
432 |
433 | msgid "[softhddev] invalid still video packet\n"
434 | msgstr ""
435 |
436 | #, c-format
437 | msgid "Bad formated geometry please use: [=][{xX}][{+-}{+-}]\n"
438 | msgstr ""
439 |
440 | #, c-format
441 | msgid "Workaround '%s' unsupported\n"
442 | msgstr ""
443 |
444 | #, c-format
445 | msgid "We need no long options\n"
446 | msgstr ""
447 |
448 | #, c-format
449 | msgid "Missing argument for option '%c'\n"
450 | msgstr ""
451 |
452 | #, c-format
453 | msgid "Unknown option '%c'\n"
454 | msgstr ""
455 |
456 | #, c-format
457 | msgid "Unhandled argument '%s'\n"
458 | msgstr ""
459 |
460 | msgid "x-setup: No X server configured!\n"
461 | msgstr ""
462 |
463 | msgid "x-setup: too many arguments for xserver\n"
464 | msgstr ""
465 |
466 | #, c-format
467 | msgid "x-setup: Failed to start X server '%s'\n"
468 | msgstr ""
469 |
470 | #, c-format
471 | msgid "[softhddev] ready%s\n"
472 | msgstr ""
473 |
474 | msgid "A software and GPU emulated UHD device"
475 | msgstr ""
476 |
477 | msgid "SoftHdDevice"
478 | msgstr "SoftHdDevice"
479 |
480 | msgid "[softhddev]: dirty area too big\n"
481 | msgstr ""
482 |
483 | msgid "show"
484 | msgstr "mostra"
485 |
486 | msgid "hide"
487 | msgstr "nascondi"
488 |
489 | msgid "auto"
490 | msgstr ""
491 |
492 | msgid "custom"
493 | msgstr ""
494 |
495 | msgid "early audio"
496 | msgstr ""
497 |
498 | msgid "early audio + soft sync"
499 | msgstr ""
500 |
501 | msgid "early sync + fast switch"
502 | msgstr ""
503 |
504 | msgid "early sync + accurate switch"
505 | msgstr ""
506 |
507 | msgid "None"
508 | msgstr ""
509 |
510 | msgid "Shutdown VDR"
511 | msgstr ""
512 |
513 | msgid "Suspend SoftHdDevice"
514 | msgstr "Sospendi SoftHdDevice"
515 |
516 | msgid "Detach SoftHdDevice"
517 | msgstr ""
518 |
519 | msgid "Ignore"
520 | msgstr ""
521 |
522 | msgid "Never"
523 | msgstr ""
524 |
525 | msgid "At Black Screen"
526 | msgstr ""
527 |
528 | msgid "Always"
529 | msgstr ""
530 |
531 | msgid "General"
532 | msgstr "Generale"
533 |
534 | msgid "Make primary device"
535 | msgstr "Utilizza come dispositivo primario"
536 |
537 | msgid "Hide main menu entry"
538 | msgstr "Nascondi voce nel menu principale"
539 |
540 | msgid "Store video geometry"
541 | msgstr ""
542 |
543 | msgid "Do on window close"
544 | msgstr ""
545 |
546 | msgid "Osd size"
547 | msgstr "Dimensione OSD"
548 |
549 | msgid "Osd width"
550 | msgstr "Larghezza OSD"
551 |
552 | msgid "Osd height"
553 | msgstr "Altezza OSD"
554 |
555 | msgid "GPU mem used for image caching (MB)"
556 | msgstr ""
557 |
558 | msgid "Suspend"
559 | msgstr "Sospensione"
560 |
561 | msgid "Detach from main menu entry"
562 | msgstr "Scollega dalla voce del menù principale"
563 |
564 | msgid "Suspend closes video+audio"
565 | msgstr "La sospensione disattiva audio+video"
566 |
567 | msgid "Suspend stops x11"
568 | msgstr "La sospensione arresta X11"
569 |
570 | msgid "Video"
571 | msgstr "Video"
572 |
573 | msgid "Disable Screensaver"
574 | msgstr ""
575 |
576 | msgid "Enable Power management (DPMS)"
577 | msgstr ""
578 |
579 | msgid "Video background color (RGB)"
580 | msgstr "Colore di sfondo del video (RGB)"
581 |
582 | msgid "Video background color (Alpha)"
583 | msgstr "Colore di sfondo del video (Alpha)"
584 |
585 | msgid "Use studio levels"
586 | msgstr "Utilizzo livelli studio"
587 |
588 | msgid "60hz display mode"
589 | msgstr "Modalità schermo 60Hz"
590 |
591 | msgid "A/V sync start"
592 | msgstr ""
593 |
594 | msgid "Black during channel switch"
595 | msgstr "Schermo nero durante il cambio canale"
596 |
597 | msgid "Clear decoder on channel switch"
598 | msgstr "Svuota decoder al cambio canale"
599 |
600 | #, c-format
601 | msgid "Brightness (%d..[%d]..%d)"
602 | msgstr "Luminosità (%d..[%d]..%d)"
603 |
604 | #, c-format
605 | msgid "Contrast (%d..[%d]..%d)"
606 | msgstr "Contrasto (%d..[%d]..%d)"
607 |
608 | #, c-format
609 | msgid "Saturation (%d..[%d]..%d)"
610 | msgstr "Saturazione (%d..[%d]..%d)"
611 |
612 | #, c-format
613 | msgid "Hue (%d..[%d]..%d)"
614 | msgstr "Tonalità (%d..[%d]..%d)"
615 |
616 | #, c-format
617 | msgid "Skin Tone Enhancement (%d..[%d]..%d)"
618 | msgstr ""
619 |
620 | msgid "Scaling"
621 | msgstr "Ridimensionamento"
622 |
623 | msgid "Deinterlace"
624 | msgstr "Deinterlacciamento"
625 |
626 | msgid "SkipChromaDeinterlace"
627 | msgstr ""
628 |
629 | msgid "Inverse Telecine"
630 | msgstr ""
631 |
632 | #, c-format
633 | msgid "Denoise (%d..[%d]..%d)"
634 | msgstr ""
635 |
636 | #, c-format
637 | msgid "Sharpen (%d..[%d]..%d)"
638 | msgstr ""
639 |
640 | msgid "Cut top and bottom (pixel)"
641 | msgstr "Riduci sopra e sotto (pixel)"
642 |
643 | msgid "Cut left and right (pixel)"
644 | msgstr "Riduci sinistra e destra (pixel)"
645 |
646 | msgid "First field order (0-2)"
647 | msgstr "Ordine primo campo (0-2)"
648 |
649 | msgid "Second field order (0-2)"
650 | msgstr "Ordine secondo campo (0-2)"
651 |
652 | msgid "Auto-crop"
653 | msgstr "Ritaglio automatico"
654 |
655 | msgid "Autocrop interval (frames)"
656 | msgstr "Intervallo ritaglio automatico (frames)"
657 |
658 | msgid "off"
659 | msgstr "off"
660 |
661 | msgid "Autocrop delay (n * interval)"
662 | msgstr "Ritardo ritaglio automatico (n * interval)"
663 |
664 | msgid "Autocrop tolerance (pixel)"
665 | msgstr "Tolleranza ritaglio automatico (pixel)"
666 |
667 | msgid "Audio"
668 | msgstr "Audio"
669 |
670 | msgid "Audio/Video delay (ms)"
671 | msgstr "Ritaglio Audio/Video (ms)"
672 |
673 | msgid "Audio drift correction"
674 | msgstr "Correzione drift audio"
675 |
676 | msgid "Pass-through default"
677 | msgstr ""
678 |
679 | msgid " PCM pass-through"
680 | msgstr ""
681 |
682 | msgid " AC-3 pass-through"
683 | msgstr ""
684 |
685 | msgid " E-AC-3 pass-through"
686 | msgstr ""
687 |
688 | msgid " Enable HBR"
689 | msgstr ""
690 |
691 | msgid " DTS pass-through"
692 | msgstr ""
693 |
694 | msgid " Enable automatic AES"
695 | msgstr ""
696 |
697 | msgid "Enable multichannel downmix"
698 | msgstr "Abilita Downmix multicanale"
699 |
700 | msgid "Volume control"
701 | msgstr "Controllo volume"
702 |
703 | msgid "Hardware"
704 | msgstr "Hardware"
705 |
706 | msgid "Software"
707 | msgstr "Software"
708 |
709 | msgid "Enable normalize volume"
710 | msgstr "Abilita normalizzazione volume"
711 |
712 | msgid " Max normalize factor (/1000)"
713 | msgstr " Massimo fattore di normalizzazione (/1000)"
714 |
715 | msgid "Enable volume compression"
716 | msgstr "Abilita compressione volume"
717 |
718 | msgid " Max compression factor (/1000)"
719 | msgstr " Massimo fattore di compressione (/1000)"
720 |
721 | msgid "Reduce stereo volume (/1000)"
722 | msgstr "Diminuisci volume stereo (/1000)"
723 |
724 | msgid "Audio buffer size (ms)"
725 | msgstr "Dimensione buffer audio (ms)"
726 |
727 | msgid "Picture-In-Picture"
728 | msgstr ""
729 |
730 | msgid "Pip X (%)"
731 | msgstr ""
732 |
733 | msgid "Pip Y (%)"
734 | msgstr ""
735 |
736 | msgid "Pip Width (%)"
737 | msgstr "Larghezza Pip (%)"
738 |
739 | msgid "Pip Height (%)"
740 | msgstr "Altezza Pip (%)"
741 |
742 | msgid "Video X (%)"
743 | msgstr "Video X (%)"
744 |
745 | msgid "Video Y (%)"
746 | msgstr "Video Y (%)"
747 |
748 | msgid "Video Width (%)"
749 | msgstr "Larghezza video (%)"
750 |
751 | msgid "Video Height (%)"
752 | msgstr "Altezza video (%)"
753 |
754 | msgid "Alternative Pip X (%)"
755 | msgstr "Pip X Alternativo (%)"
756 |
757 | msgid "Alternative Pip Y (%)"
758 | msgstr "Pip Y Alternativo (%)"
759 |
760 | msgid "Alternative Pip Width (%)"
761 | msgstr "larghezza Pip Alternativo (%)"
762 |
763 | msgid "Alternative Pip Height (%)"
764 | msgstr "Altezza Pip Alternativo (%)"
765 |
766 | msgid "Alternative Video X (%)"
767 | msgstr "Video X Alternativo (%)"
768 |
769 | msgid "Alternative Video Y (%)"
770 | msgstr "Video Y Alternativo (%)"
771 |
772 | msgid "Alternative Video Width (%)"
773 | msgstr "Larghezza Video Alternativo (%)"
774 |
775 | msgid "Alternative Video Height (%)"
776 | msgstr "Altezza Video Alternativo (%)"
777 |
778 | #, c-format
779 | msgid "[softhddev]pip: invalid PES packet %d\n"
780 | msgstr ""
781 |
782 | msgid "[softhddev]pip: pes buffer too small\n"
783 | msgstr ""
784 |
785 | msgid "[softhddev]tsdemux: transport stream out of sync\n"
786 | msgstr ""
787 |
788 | msgid "Channel not available!"
789 | msgstr "Canale non disponibile"
790 |
791 | msgid "PIP toggle on/off: off"
792 | msgstr "Disattivare PIP"
793 |
794 | msgid "PIP toggle on/off: on"
795 | msgstr "Attivare PIP"
796 |
797 | msgid "PIP zapmode (not working)"
798 | msgstr ""
799 |
800 | msgid "PIP channel +"
801 | msgstr ""
802 |
803 | msgid "PIP channel -"
804 | msgstr ""
805 |
806 | msgid "PIP on/swap channels: swap"
807 | msgstr ""
808 |
809 | msgid "PIP on/swap channels: on"
810 | msgstr ""
811 |
812 | msgid "PIP swap position: normal"
813 | msgstr ""
814 |
815 | msgid "PIP swap position: alternative"
816 | msgstr ""
817 |
818 | msgid "PIP close"
819 | msgstr "Chiudere PIP"
820 |
821 | #, c-format
822 | msgid " Video Decoder: %s OSD: %s"
823 | msgstr ""
824 |
825 | #, c-format
826 | msgid " Frames missed(%d) duped(%d) dropped(%d) total(%d)"
827 | msgstr " Frames persi(%d) duped(%d) scartati(%d) totali(%d)"
828 |
829 | msgid "pass-through disabled"
830 | msgstr "pass-through disabilitato"
831 |
832 | msgid "pass-through enabled"
833 | msgstr "pass-through abilitato"
834 |
835 | #, c-format
836 | msgid "audio delay changed to %d"
837 | msgstr "ritardo audio cambiato in %d"
838 |
839 | msgid "surround downmix enabled"
840 | msgstr "surround downmix abilitato"
841 |
842 | msgid "surround downmix disabled"
843 | msgstr "surround downmix disabilitato"
844 |
845 | msgid "auto-crop disabled and freezed"
846 | msgstr "ritaglio automatico disabilitato e bloccato"
847 |
848 | msgid "auto-crop enabled"
849 | msgstr "ritaglio automatico abilitato"
850 |
851 | #, c-format
852 | msgid "[softhddev]: hot key %d is not supported\n"
853 | msgstr "[softhddev]: hot key %d non supportata\n"
854 |
855 | msgid "video/glx: can't make glx context current\n"
856 | msgstr ""
857 |
858 | msgid "video/glx: no v-sync\n"
859 | msgstr ""
860 |
861 | msgid "video/glx: no GLX support\n"
862 | msgstr ""
863 |
864 | #, c-format
865 | msgid "video/glx: glx version %d.%d\n"
866 | msgstr ""
867 |
868 | msgid "video/glx: can't get a RGB visual\n"
869 | msgstr ""
870 |
871 | msgid "video/glx: no valid visual found\n"
872 | msgstr ""
873 |
874 | msgid "video/glx: need atleast 8-bits per RGB\n"
875 | msgstr ""
876 |
877 | msgid "video/glx: can't create glx context\n"
878 | msgstr ""
879 |
880 | msgid "video/glx: can't disable v-sync\n"
881 | msgstr ""
882 |
883 | msgid "video/glx: v-sync disabled\n"
884 | msgstr ""
885 |
886 | msgid "video/glx: can't enable v-sync\n"
887 | msgstr ""
888 |
889 | msgid "video/glx: v-sync enabled\n"
890 | msgstr ""
891 |
892 | msgid "video/egl: can't make egl context current\n"
893 | msgstr ""
894 |
895 | msgid "video/egl: can't choose egl config\n"
896 | msgstr ""
897 |
898 | msgid "video/egl: can't create egl surface\n"
899 | msgstr ""
900 |
901 | msgid "video/egl: can't create egl context\n"
902 | msgstr ""
903 |
904 | msgid "video/vaapi: no osd subpicture yet\n"
905 | msgstr ""
906 |
907 | msgid "video/vaapi: can't associate subpicture\n"
908 | msgstr ""
909 |
910 | #, c-format
911 | msgid "video/vaapi: can't deassociate %d surfaces\n"
912 | msgstr ""
913 |
914 | msgid "video/vaapi: surface needed not set\n"
915 | msgstr ""
916 |
917 | #, c-format
918 | msgid "video/vaapi: can't create %d surfaces\n"
919 | msgstr ""
920 |
921 | #, c-format
922 | msgid "video/vaapi: can't create %d posproc surfaces\n"
923 | msgstr ""
924 |
925 | #, c-format
926 | msgid "video/vaapi: can't destroy %d surfaces\n"
927 | msgstr ""
928 |
929 | msgid "video/vaapi: vaQuerySurface failed\n"
930 | msgstr ""
931 |
932 | msgid "video/vaapi: out of surfaces\n"
933 | msgstr ""
934 |
935 | #, c-format
936 | msgid "video/vaapi: release surface %#010x, which is not in use\n"
937 | msgstr ""
938 |
939 | msgid "video/vaapi: out of decoders\n"
940 | msgstr ""
941 |
942 | msgid "video/vaapi: out of memory\n"
943 | msgstr ""
944 |
945 | msgid "video/vaapi: invalid surface in ringbuffer\n"
946 | msgstr ""
947 |
948 | msgid "video/vaapi: vaSyncSurface failed\n"
949 | msgstr ""
950 |
951 | msgid "video/vaapi: can't destroy image!\n"
952 | msgstr ""
953 |
954 | msgid "video/vaapi: can't destroy context!\n"
955 | msgstr ""
956 |
957 | msgid "video/vaapi: can't destroy config!\n"
958 | msgstr ""
959 |
960 | msgid "video/vaapi: can't destroy postproc context!\n"
961 | msgstr ""
962 |
963 | msgid "video/vaapi: can't deassociate black surfaces\n"
964 | msgstr ""
965 |
966 | msgid "video/vaapi: can't destroy a surface\n"
967 | msgstr ""
968 |
969 | msgid "video/vaapi: can't destroy glx surface!\n"
970 | msgstr ""
971 |
972 | msgid "codec: vaQueryConfigProfiles failed"
973 | msgstr ""
974 |
975 | msgid "codec: vaQueryConfigEntrypoints failed"
976 | msgstr ""
977 |
978 | msgid "codec: unsupported: slow path\n"
979 | msgstr ""
980 |
981 | msgid "codec: can't create config"
982 | msgstr ""
983 |
984 | msgid "video/vaapi: can't create surfaces\n"
985 | msgstr ""
986 |
987 | msgid "codec: can't create context"
988 | msgstr ""
989 |
990 | msgid "video/vaapi: vaDeriveImage failed\n"
991 | msgstr ""
992 |
993 | msgid "video/vaapi: vaPutSurface failed\n"
994 | msgstr ""
995 |
996 | msgid "video/vaapi: can't destroy surfaces\n"
997 | msgstr ""
998 |
999 | #, c-format
1000 | msgid "video/vaapi: Can't connect VA-API to X11 server on '%s'\n"
1001 | msgstr ""
1002 |
1003 | #, c-format
1004 | msgid "video/vaapi: Can't inititialize VA-API on '%s'\n"
1005 | msgstr ""
1006 |
1007 | #, c-format
1008 | msgid "video/vaapi: libva %d.%d (%s) initialized\n"
1009 | msgstr ""
1010 |
1011 | msgid "video/vaapi: use vdpau bug workaround\n"
1012 | msgstr ""
1013 |
1014 | msgid "video/vaapi: Can't get background-color attribute\n"
1015 | msgstr ""
1016 |
1017 | #, c-format
1018 | msgid "video/vaapi: background-color is %s\n"
1019 | msgstr ""
1020 |
1021 | msgid "supported"
1022 | msgstr ""
1023 |
1024 | msgid "unsupported"
1025 | msgstr ""
1026 |
1027 | msgid "video/glx: glx error\n"
1028 | msgstr ""
1029 |
1030 | msgid "video/egl: eglx error\n"
1031 | msgstr ""
1032 |
1033 | #, c-format
1034 | msgid "video/vaapi: unsupported pixel format %d\n"
1035 | msgstr ""
1036 |
1037 | msgid "video/vaapi: vaQueryImageFormats failed\n"
1038 | msgstr ""
1039 |
1040 | #, c-format
1041 | msgid ""
1042 | "video/vaapi: Failed to derive image: %s\n"
1043 | " Falling back to GetImage\n"
1044 | msgstr ""
1045 |
1046 | msgid "video/vaapi: Image grabbing not supported by HW\n"
1047 | msgstr ""
1048 |
1049 | msgid "video/vaapi: Image format suitable for grab not supported\n"
1050 | msgstr ""
1051 |
1052 | #, c-format
1053 | msgid "video/vaapi: Failed to create image for grab: %s\n"
1054 | msgstr ""
1055 |
1056 | #, c-format
1057 | msgid "video/vaapi: Failed to capture image: %s\n"
1058 | msgstr ""
1059 |
1060 | #, c-format
1061 | msgid "video/vaapi: Image format mismatch! (fourcc: 0x%x, planes: %d)\n"
1062 | msgstr ""
1063 |
1064 | #, c-format
1065 | msgid "video/vaapi: Could not map grabbed image for access: %s\n"
1066 | msgstr ""
1067 |
1068 | msgid "video/vaapi: Grab failed: Out of memory\n"
1069 | msgstr ""
1070 |
1071 | msgid "video/vaapi: Decoder not available for GRAB\n"
1072 | msgstr ""
1073 |
1074 | #, c-format
1075 | msgid "video/vaapi: can't create scaling surface for grab: %s\n"
1076 | msgstr ""
1077 |
1078 | #, c-format
1079 | msgid "video/vaapi: can't create scaling context for grab: %s\n"
1080 | msgstr ""
1081 |
1082 | msgid "video/vaapi: can't create image!\n"
1083 | msgstr ""
1084 |
1085 | msgid "video/glx: can't create glx surfaces\n"
1086 | msgstr ""
1087 |
1088 | #, c-format
1089 | msgid "video/vaapi: can't create config '%s'\n"
1090 | msgstr ""
1091 |
1092 | #, c-format
1093 | msgid "video/vaapi: can't create context '%s'\n"
1094 | msgstr ""
1095 |
1096 | msgid "codec: can't get attributes"
1097 | msgstr ""
1098 |
1099 | msgid "codec: YUV 420 supported\n"
1100 | msgstr ""
1101 |
1102 | msgid "codec: YUV 420 10 bit supported\n"
1103 | msgstr ""
1104 |
1105 | msgid "codec: YUV 422 supported\n"
1106 | msgstr ""
1107 |
1108 | msgid "codec: YUV 444 supported\n"
1109 | msgstr ""
1110 |
1111 | msgid "codec: YUV 420 not supported\n"
1112 | msgstr ""
1113 |
1114 | msgid "codec: YUV 420 10 bit not supported\n"
1115 | msgstr ""
1116 |
1117 | #, c-format
1118 | msgid "codec: can't create config '%s'\n"
1119 | msgstr ""
1120 |
1121 | #, c-format
1122 | msgid "codec: can't create context '%s'\n"
1123 | msgstr ""
1124 |
1125 | #, c-format
1126 | msgid "video/vaapi: vaSyncSurface failed: %s\n"
1127 | msgstr ""
1128 |
1129 | #, c-format
1130 | msgid "video/vaapi: vaPutSurface failed: %s\n"
1131 | msgstr ""
1132 |
1133 | #, c-format
1134 | msgid "video/vaapi: gpu hung %dms %d\n"
1135 | msgstr ""
1136 |
1137 | #, c-format
1138 | msgid "video/vaapi: surface %#010x not ready: still displayed %d\n"
1139 | msgstr ""
1140 |
1141 | msgid "video/glx: vaCopySurfaceGLX failed\n"
1142 | msgstr ""
1143 |
1144 | msgid "video/egl: vaExportSurfaceHandle failed\n"
1145 | msgstr ""
1146 |
1147 | msgid "video/egl: eglCreateImageKHR failed\n"
1148 | msgstr ""
1149 |
1150 | #, c-format
1151 | msgid "video/vaapi: can't get auto-crop image %d\n"
1152 | msgstr ""
1153 |
1154 | msgid "video/vaapi: can't map auto-crop image!\n"
1155 | msgstr ""
1156 |
1157 | msgid "video/vaapi: can't unmap auto-crop image!\n"
1158 | msgstr ""
1159 |
1160 | #, c-format
1161 | msgid "video: output buffer full, dropping frame (%d/%d)\n"
1162 | msgstr ""
1163 |
1164 | #, c-format
1165 | msgid "video/vaapi: can't create a surface: %s\n"
1166 | msgstr ""
1167 |
1168 | #, c-format
1169 | msgid "video/vaapi: can't associate subpicture: %s\n"
1170 | msgstr ""
1171 |
1172 | #, c-format
1173 | msgid "video/vaapi: can't create image: %s\n"
1174 | msgstr ""
1175 |
1176 | #, c-format
1177 | msgid "video/vaapi: can't map the image: %s\n"
1178 | msgstr ""
1179 |
1180 | msgid "video/vaapi: can't unmap the image!\n"
1181 | msgstr ""
1182 |
1183 | msgid "video/vaapi: can't put image!\n"
1184 | msgstr ""
1185 |
1186 | #, c-format
1187 | msgid "video/vaapi: vaPutSurface failed %d\n"
1188 | msgstr ""
1189 |
1190 | msgid "video/vaapi: can't unmap image buffer\n"
1191 | msgstr ""
1192 |
1193 | msgid "video/vaapi: can't get source image\n"
1194 | msgstr ""
1195 |
1196 | #, c-format
1197 | msgid "video/vaapi: vaDeriveImage failed %d\n"
1198 | msgstr ""
1199 |
1200 | #, c-format
1201 | msgid "video/vaapi: can't put image: %d!\n"
1202 | msgstr ""
1203 |
1204 | msgid "video/vaapi: stream <-> surface size mismatch\n"
1205 | msgstr ""
1206 |
1207 | msgid "video/vaapi: can't map the image!\n"
1208 | msgstr ""
1209 |
1210 | #, c-format
1211 | msgid "video/vaapi: can't put image err:%d!\n"
1212 | msgstr ""
1213 |
1214 | #, c-format
1215 | msgid "video: decoder buffer empty, duping frame (%d/%d) %d v-buf\n"
1216 | msgstr ""
1217 |
1218 | msgid "video/vaapi: FIXME: SetBackground not supported\n"
1219 | msgstr ""
1220 |
1221 | msgid "video/vaapi: can't map osd image buffer\n"
1222 | msgstr ""
1223 |
1224 | msgid "video/vaapi: can't unmap osd image buffer\n"
1225 | msgstr ""
1226 |
1227 | msgid "video/vaapi: can't get subpicture formats"
1228 | msgstr ""
1229 |
1230 | msgid "video/vaapi: can't find a supported subpicture format"
1231 | msgstr ""
1232 |
1233 | msgid "video/vaapi: supports unscaled osd\n"
1234 | msgstr ""
1235 |
1236 | msgid "video/vaapi: can't create osd image\n"
1237 | msgstr ""
1238 |
1239 | msgid "video/vaapi: can't create subpicture\n"
1240 | msgstr ""
1241 |
1242 | msgid "video/vaapi: can't destroy subpicture\n"
1243 | msgstr ""
1244 |
1245 | msgid "video/vdpau: surface needed not set\n"
1246 | msgstr ""
1247 |
1248 | #, c-format
1249 | msgid "video/vdpau: can't create video surface: %s\n"
1250 | msgstr ""
1251 |
1252 | #, c-format
1253 | msgid "video/vdpau: can't destroy video surface: %s\n"
1254 | msgstr ""
1255 |
1256 | msgid "video/vdpau: out of surfaces\n"
1257 | msgstr ""
1258 |
1259 | #, c-format
1260 | msgid "video/vdpau: release surface %#08x, which is not in use\n"
1261 | msgstr ""
1262 |
1263 | #, c-format
1264 | msgid "video/vdpau: can't set mixer feature enables: %s\n"
1265 | msgstr ""
1266 |
1267 | #, c-format
1268 | msgid "video/vdpau: can't generate CSC matrix: %s\n"
1269 | msgstr ""
1270 |
1271 | #, c-format
1272 | msgid "video/vdpau: can't set mixer attribute values: %s\n"
1273 | msgstr ""
1274 |
1275 | #, c-format
1276 | msgid "video/vdpau: can't create video mixer: %s\n"
1277 | msgstr ""
1278 |
1279 | msgid "video/vdpau: out of decoders\n"
1280 | msgstr ""
1281 |
1282 | msgid "video/vdpau: out of memory\n"
1283 | msgstr ""
1284 |
1285 | msgid "video/vdpau: need 1 future, 1 current, 1 back and 1 work surface\n"
1286 | msgstr ""
1287 |
1288 | #, c-format
1289 | msgid "video/vdpau: can't destroy video decoder: %s\n"
1290 | msgstr ""
1291 |
1292 | #, c-format
1293 | msgid "video/vdpau: can't destroy video mixer: %s\n"
1294 | msgstr ""
1295 |
1296 | msgid "video/vdpau: decoder not in decoder list.\n"
1297 | msgstr ""
1298 |
1299 | #, c-format
1300 | msgid "video/vdpau: Can't get function address of '%s': %s\n"
1301 | msgstr ""
1302 |
1303 | #, c-format
1304 | msgid "video/vdpau: can't create presentation queue target: %s\n"
1305 | msgstr ""
1306 |
1307 | #, c-format
1308 | msgid "video/vdpau: can't create presentation queue: %s\n"
1309 | msgstr ""
1310 |
1311 | #, c-format
1312 | msgid "video/vdpau: can't create output surface: %s\n"
1313 | msgstr ""
1314 |
1315 | #, c-format
1316 | msgid "video/vdpau: can't create grab render output surface: %s\n"
1317 | msgstr ""
1318 |
1319 | #, c-format
1320 | msgid "video/vdpau: can't destroy output surface: %s\n"
1321 | msgstr ""
1322 |
1323 | #, c-format
1324 | msgid "video/vdpau: can't destroy grab render output surface: %s\n"
1325 | msgstr ""
1326 |
1327 | msgid "video/vdpau preemption device not our device\n"
1328 | msgstr ""
1329 |
1330 | #, c-format
1331 | msgid "video/vdpau: Can't create vdp device on display '%s'\n"
1332 | msgstr ""
1333 |
1334 | msgid "video/vdpau: Can't get function address of 'GetErrorString'\n"
1335 | msgstr ""
1336 |
1337 | #, c-format
1338 | msgid "video/vdpau: VDPAU API version: %u\n"
1339 | msgstr ""
1340 |
1341 | #, c-format
1342 | msgid "video/vdpau: VDPAU information: %s\n"
1343 | msgstr ""
1344 |
1345 | #, c-format
1346 | msgid "video/vdpau: can't register preemption callback: %s\n"
1347 | msgstr ""
1348 |
1349 | #, c-format
1350 | msgid "video/vdpau: can't query feature '%s': %s\n"
1351 | msgstr ""
1352 |
1353 | #, c-format
1354 | msgid "video/vdpau: highest supported high quality scaling %d\n"
1355 | msgstr ""
1356 |
1357 | msgid "video/vdpau: high quality scaling unsupported\n"
1358 | msgstr ""
1359 |
1360 | #, c-format
1361 | msgid "video/vdpau: feature deinterlace temporal %s\n"
1362 | msgstr ""
1363 |
1364 | #, c-format
1365 | msgid "video/vdpau: feature deinterlace temporal spatial %s\n"
1366 | msgstr ""
1367 |
1368 | #, c-format
1369 | msgid "video/vdpau: attribute skip chroma deinterlace %s\n"
1370 | msgstr ""
1371 |
1372 | #, c-format
1373 | msgid "video/vdpau: can't query video surface: %s\n"
1374 | msgstr ""
1375 |
1376 | #, c-format
1377 | msgid "video/vdpau: 4:2:0 chroma format with %dx%d supported\n"
1378 | msgstr ""
1379 |
1380 | #, c-format
1381 | msgid "video/vdpau: 4:2:2 chroma format with %dx%d supported\n"
1382 | msgstr ""
1383 |
1384 | #, c-format
1385 | msgid "video/vdpau: 4:4:4 chroma format with %dx%d supported\n"
1386 | msgstr ""
1387 |
1388 | msgid "video/vdpau: doesn't support yuvy video surface\n"
1389 | msgstr ""
1390 |
1391 | msgid "video/vdpau: doesn't support yv12 video surface\n"
1392 | msgstr ""
1393 |
1394 | #, c-format
1395 | msgid "video/vdpau: can't query output surface: %s\n"
1396 | msgstr ""
1397 |
1398 | #, c-format
1399 | msgid "video/vdpau: 8bit BGRA format with %dx%d supported\n"
1400 | msgstr ""
1401 |
1402 | #, c-format
1403 | msgid "video/vdpau: 8bit RGBA format with %dx%d supported\n"
1404 | msgstr ""
1405 |
1406 | #, c-format
1407 | msgid "video/vdpau: 10bit RGBA format with %dx%d supported\n"
1408 | msgstr ""
1409 |
1410 | #, c-format
1411 | msgid "video/vdpau: 8bit BRGA format with %dx%d supported\n"
1412 | msgstr ""
1413 |
1414 | #, c-format
1415 | msgid "video/vdpau: can't get video surface parameters: %s\n"
1416 | msgstr ""
1417 |
1418 | msgid "video/vdpau: video surface chroma type mismatch\n"
1419 | msgstr ""
1420 |
1421 | msgid "video/vdpau: video surface size mismatch\n"
1422 | msgstr ""
1423 |
1424 | #, c-format
1425 | msgid "video/vdpau: can't create decoder: %s\n"
1426 | msgstr ""
1427 |
1428 | #, c-format
1429 | msgid "video/vdpau: can't query decoder capabilities: %s\n"
1430 | msgstr ""
1431 |
1432 | msgid "video/vdpau: no valid vdpau pixfmt found\n"
1433 | msgstr ""
1434 |
1435 | msgid "video/vdpau: no valid profile found\n"
1436 | msgstr ""
1437 |
1438 | #, c-format
1439 | msgid "video/vdpau: unsupported chroma type %d\n"
1440 | msgstr ""
1441 |
1442 | #, c-format
1443 | msgid "video/vdpau: can't get video surface bits: %s\n"
1444 | msgstr ""
1445 |
1446 | #, c-format
1447 | msgid "video/vdpau: can't get output surface parameters: %s\n"
1448 | msgstr ""
1449 |
1450 | #, c-format
1451 | msgid "video/vdpau: can't render output surface: %s\n"
1452 | msgstr ""
1453 |
1454 | #, c-format
1455 | msgid "video/vdpau: unsupported rgba format %d\n"
1456 | msgstr ""
1457 |
1458 | #, c-format
1459 | msgid "video/vdpau: can't get video surface bits native: %s\n"
1460 | msgstr ""
1461 |
1462 | #, c-format
1463 | msgid "video/vdpau: output buffer full, dropping frame (%d/%d)\n"
1464 | msgstr ""
1465 |
1466 | #, c-format
1467 | msgid "video/vdpau: pixel format %d not supported\n"
1468 | msgstr ""
1469 |
1470 | msgid "Cannot initialize the conversion context!\n"
1471 | msgstr ""
1472 |
1473 | msgid "No memory for 422->yv12 conversion!\n"
1474 | msgstr ""
1475 |
1476 | #, c-format
1477 | msgid "YV12 video/vdpau: can't put video surface bits: %s\n"
1478 | msgstr ""
1479 |
1480 | msgid "video: get hwaccel context, not supported\n"
1481 | msgstr ""
1482 |
1483 | #, c-format
1484 | msgid "video/vdpau: can't render bitmap surface: %s\n"
1485 | msgstr ""
1486 |
1487 | #, c-format
1488 | msgid "video/vdpau: %d surface deinterlace unsupported\n"
1489 | msgstr ""
1490 |
1491 | #, c-format
1492 | msgid "video/vdpau: can't render mixer: %s\n"
1493 | msgstr ""
1494 |
1495 | #, c-format
1496 | msgid "video/vdpau: can't query status: %s\n"
1497 | msgstr ""
1498 |
1499 | #, c-format
1500 | msgid "video/vdpau: can't block queue: %s\n"
1501 | msgstr ""
1502 |
1503 | #, c-format
1504 | msgid "video/vdpau: missed frame (%d/%d)\n"
1505 | msgstr ""
1506 |
1507 | #, c-format
1508 | msgid "video/vdpau: can't queue display: %s\n"
1509 | msgstr ""
1510 |
1511 | #, c-format
1512 | msgid "video: decoder buffer empty, duping frame (%d/%d) %d v-buf closing %d\n"
1513 | msgstr ""
1514 |
1515 | msgid "video/vdpau: osd too big: unsupported\n"
1516 | msgstr ""
1517 |
1518 | #, c-format
1519 | msgid "video/vdpau: bitmap surface put bits failed: %s\n"
1520 | msgstr ""
1521 |
1522 | #, c-format
1523 | msgid "video/vdpau: output surface put bits failed: %s\n"
1524 | msgstr ""
1525 |
1526 | #, c-format
1527 | msgid "video/vdpau: can't create bitmap surface: %s\n"
1528 | msgstr ""
1529 |
1530 | #, c-format
1531 | msgid "video/vdpau: created osd output surface %dx%d with id 0x%08x\n"
1532 | msgstr ""
1533 |
1534 | #, c-format
1535 | msgid "video/vdpau: can't destroy bitmap surface: %s\n"
1536 | msgstr ""
1537 |
1538 | #, c-format
1539 | msgid "Cuvid Driver API error = %04d"
1540 | msgstr ""
1541 |
1542 | msgid "video/cuvid: cuGraphicsGLRegisterImage failed \n"
1543 | msgstr ""
1544 |
1545 | msgid "video/cuvid: cuGraphicsMapResources failed \n"
1546 | msgstr ""
1547 |
1548 | msgid "video/cuvid: cuGraphicsSubResourceGetMappedArray failed \n"
1549 | msgstr ""
1550 |
1551 | msgid "video/cuvid: cuGraphicsUnmapResources failed \n"
1552 | msgstr ""
1553 |
1554 | msgid "video/cuvid: surface needed not set\n"
1555 | msgstr ""
1556 |
1557 | msgid "video/cuvid: out of surfaces\n"
1558 | msgstr ""
1559 |
1560 | #, c-format
1561 | msgid "video/cuvid: release surface %#08x, which is not in use\n"
1562 | msgstr ""
1563 |
1564 | msgid "Can't set deinterlace mode\n"
1565 | msgstr ""
1566 |
1567 | msgid "Can't set drop second field\n"
1568 | msgstr ""
1569 |
1570 | msgid "video/cuvid: out of decoders\n"
1571 | msgstr ""
1572 |
1573 | msgid "video/cuvid: out of memory\n"
1574 | msgstr ""
1575 |
1576 | msgid "video/cuvid: need 1 future, 1 current, 1 back and 1 work surface\n"
1577 | msgstr ""
1578 |
1579 | msgid "video/cuvid: CUDA context create failed"
1580 | msgstr ""
1581 |
1582 | msgid "video/cuvid: decoder not in decoder list.\n"
1583 | msgstr ""
1584 |
1585 | msgid "video/cuvid: Start CUVID\n"
1586 | msgstr ""
1587 |
1588 | msgid "video/cuvid: GLX error\n"
1589 | msgstr ""
1590 |
1591 | msgid "Could not dynamically load CUDA\n"
1592 | msgstr ""
1593 |
1594 | msgid "Could not init CUDA device\n"
1595 | msgstr ""
1596 |
1597 | msgid "Could not get CUDA device\n"
1598 | msgstr ""
1599 |
1600 | msgid "video/cuvid: Start CUVID ok\n"
1601 | msgstr ""
1602 |
1603 | msgid "video/cuvid: EGL error\n"
1604 | msgstr ""
1605 |
1606 | msgid "video/cuvid: no valid cuvid pixfmt found\n"
1607 | msgstr ""
1608 |
1609 | msgid "video/cuvid: grab out of memory\n"
1610 | msgstr ""
1611 |
1612 | #, c-format
1613 | msgid "video/cuvid: output buffer full, dropping frame (%d/%d)\n"
1614 | msgstr ""
1615 |
1616 | #, c-format
1617 | msgid "video/cuvid: pixel format %d not supported\n"
1618 | msgstr ""
1619 |
1620 | msgid "video/cuvid: render frame error\n"
1621 | msgstr ""
1622 |
1623 | #, c-format
1624 | msgid "video/cuvid: missed frame (%d/%d)\n"
1625 | msgstr ""
1626 |
1627 | msgid "video/nvdec: cuGraphicsGLRegisterImage failed \n"
1628 | msgstr ""
1629 |
1630 | msgid "video/nvdec: cuGraphicsMapResources failed \n"
1631 | msgstr ""
1632 |
1633 | msgid "video/nvdec: cuGraphicsSubResourceGetMappedArray failed \n"
1634 | msgstr ""
1635 |
1636 | msgid "video/nvdec: cuGraphicsUnmapResources failed \n"
1637 | msgstr ""
1638 |
1639 | msgid "video/nvdec: surface needed not set\n"
1640 | msgstr ""
1641 |
1642 | msgid "video/nvdec: out of surfaces\n"
1643 | msgstr ""
1644 |
1645 | #, c-format
1646 | msgid "video/nvdec: release surface %#08x, which is not in use\n"
1647 | msgstr ""
1648 |
1649 | msgid "video/nvdec: out of decoders\n"
1650 | msgstr ""
1651 |
1652 | msgid "video/nvdec: out of memory\n"
1653 | msgstr ""
1654 |
1655 | msgid "video/nvdec: need 1 future, 1 current, 1 back and 1 work surface\n"
1656 | msgstr ""
1657 |
1658 | msgid "video/nvdec: CUDA context create failed"
1659 | msgstr ""
1660 |
1661 | msgid "video/nvdec: decoder not in decoder list.\n"
1662 | msgstr ""
1663 |
1664 | msgid "video/nvdec: Start NVDEC\n"
1665 | msgstr ""
1666 |
1667 | msgid "video/nvdec: GLX error\n"
1668 | msgstr ""
1669 |
1670 | msgid "video/nvdec: Start NVdec ok\n"
1671 | msgstr ""
1672 |
1673 | msgid "video/nvdec: EGL error\n"
1674 | msgstr ""
1675 |
1676 | msgid "video/nvdec: Start NVDEC ok\n"
1677 | msgstr ""
1678 |
1679 | msgid "video/nvdec: no valid nvdec pixfmt found\n"
1680 | msgstr ""
1681 |
1682 | msgid "video/nvdec: grab out of memory\n"
1683 | msgstr ""
1684 |
1685 | #, c-format
1686 | msgid "video/nvdec: output buffer full, dropping frame (%d/%d)\n"
1687 | msgstr ""
1688 |
1689 | #, c-format
1690 | msgid "video/nvdec: pixel format %d not supported\n"
1691 | msgstr ""
1692 |
1693 | msgid "video/nvdec: render frame error\n"
1694 | msgstr ""
1695 |
1696 | msgid "video/ndec: out of memory\n"
1697 | msgstr ""
1698 |
1699 | #, c-format
1700 | msgid "video/nvdec: missed frame (%d/%d)\n"
1701 | msgstr ""
1702 |
1703 | msgid "video/cpu: surface needed not set\n"
1704 | msgstr ""
1705 |
1706 | msgid "video/cpu: out of surfaces\n"
1707 | msgstr ""
1708 |
1709 | #, c-format
1710 | msgid "video/cpu: release surface %#08x, which is not in use\n"
1711 | msgstr ""
1712 |
1713 | msgid "video/cpu: out of decoders\n"
1714 | msgstr ""
1715 |
1716 | msgid "video/cpu: out of memory\n"
1717 | msgstr ""
1718 |
1719 | msgid "video/cpu: need 1 future, 1 current, 1 back and 1 work surface\n"
1720 | msgstr ""
1721 |
1722 | msgid "video/cpu: decoder not in decoder list.\n"
1723 | msgstr ""
1724 |
1725 | msgid "video/cpu: Start CPU\n"
1726 | msgstr ""
1727 |
1728 | msgid "video/cpu: GLX error\n"
1729 | msgstr ""
1730 |
1731 | msgid "video/cpu: Start CPU ok\n"
1732 | msgstr ""
1733 |
1734 | msgid "video/cpu: EGL error\n"
1735 | msgstr ""
1736 |
1737 | msgid "video/cpu: grab out of memory\n"
1738 | msgstr ""
1739 |
1740 | #, c-format
1741 | msgid "video/cpu: output buffer full, dropping frame (%d/%d)\n"
1742 | msgstr ""
1743 |
1744 | #, c-format
1745 | msgid "video/cpu: pixel format %d not supported\n"
1746 | msgstr ""
1747 |
1748 | #, c-format
1749 | msgid "video/cpu: missed frame (%d/%d)\n"
1750 | msgstr ""
1751 |
1752 | msgid "video: fatal i/o error\n"
1753 | msgstr ""
1754 |
1755 | #, c-format
1756 | msgid "video/event: No symbol for %d\n"
1757 | msgstr ""
1758 |
1759 | msgid "video: can't lock thread\n"
1760 | msgstr ""
1761 |
1762 | msgid "video: can't unlock thread\n"
1763 | msgstr ""
1764 |
1765 | msgid "video/egl: can't create egl thread context\n"
1766 | msgstr ""
1767 |
1768 | msgid "video: can't queue cancel video display thread\n"
1769 | msgstr ""
1770 |
1771 | msgid "video: can't cancel video display thread\n"
1772 | msgstr ""
1773 |
1774 | #, c-format
1775 | msgid "video: repeated pict %d found, but not handled\n"
1776 | msgstr ""
1777 |
1778 | #, c-format
1779 | msgid "video/vdpau: decoder rendering failed: %s\n"
1780 | msgstr ""
1781 |
1782 | #, c-format
1783 | msgid "video/vdpau: %s: decoder render too slow %ums\n"
1784 | msgstr ""
1785 |
1786 | msgid "video/vdpau: draw render state, without vdpau enabled\n"
1787 | msgstr ""
1788 |
1789 | msgid "video: out of memory\n"
1790 | msgstr ""
1791 |
1792 | msgid "softhddev: grab unsupported\n"
1793 | msgstr ""
1794 |
1795 | #, c-format
1796 | msgid "video: Can't initialize X11 thread support on '%s'\n"
1797 | msgstr ""
1798 |
1799 | #, c-format
1800 | msgid "video: Can't connect to X11 server on '%s'\n"
1801 | msgstr ""
1802 |
1803 | msgid "video: Can't convert XLIB display to XCB connection\n"
1804 | msgstr ""
1805 |
1806 | #, c-format
1807 | msgid "video: '%s' output module isn't supported\n"
1808 | msgstr ""
1809 |
1810 | msgid "video: error closing display\n"
1811 | msgstr ""
1812 |
1813 | #~ msgid "Enable Screensaver(DPMS) at black screen"
1814 | #~ msgstr "Abilita screensaver (DMPS) a schermo nero"
1815 |
--------------------------------------------------------------------------------
/ringbuffer.c:
--------------------------------------------------------------------------------
1 | ///
2 | /// @file ringbuffer.c @brief Ringbuffer module
3 | ///
4 | /// Copyright (c) 2009, 2011, 2014 by Johns. All Rights Reserved.
5 | ///
6 | /// Contributor(s):
7 | ///
8 | /// License: AGPLv3
9 | ///
10 | /// This program is free software: you can redistribute it and/or modify
11 | /// it under the terms of the GNU Affero General Public License as
12 | /// published by the Free Software Foundation, either version 3 of the
13 | /// License.
14 | ///
15 | /// This program is distributed in the hope that it will be useful,
16 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | /// GNU Affero General Public License for more details.
19 | ///
20 | /// $Id: c9497b197ce7e7a6ba397944edc7ccb161152efd $
21 | //////////////////////////////////////////////////////////////////////////////
22 |
23 | ///
24 | /// @defgroup Ringbuffer The ring buffer module.
25 | ///
26 | /// Lock free ring buffer with only one writer and one reader.
27 | ///
28 |
29 | #include
30 | #include
31 | #include
32 |
33 | #include "iatomic.h"
34 | #include "ringbuffer.h"
35 |
36 | /// ring buffer structure
37 | struct _ring_buffer_
38 | {
39 | char *Buffer; ///< ring buffer data
40 | const char *BufferEnd; ///< end of buffer
41 | size_t Size; ///< bytes in buffer (for faster calc)
42 |
43 | const char *ReadPointer; ///< only used by reader
44 | char *WritePointer; ///< only used by writer
45 |
46 | /// The only thing modified by both
47 | atomic_t Filled; ///< how many of the buffer is used
48 | };
49 |
50 | /**
51 | ** Reset ring buffer pointers.
52 | **
53 | ** @param rb Ring buffer to reset read/write pointers.
54 | */
55 | void RingBufferReset(RingBuffer * rb)
56 | {
57 | rb->ReadPointer = rb->Buffer;
58 | rb->WritePointer = rb->Buffer;
59 | atomic_set(&rb->Filled, 0);
60 | }
61 |
62 | /**
63 | ** Allocate a new ring buffer.
64 | **
65 | ** @param size Size of the ring buffer.
66 | **
67 | ** @returns Allocated ring buffer, must be freed with
68 | ** RingBufferDel(), NULL for out of memory.
69 | */
70 | RingBuffer *RingBufferNew(size_t size)
71 | {
72 | RingBuffer *rb;
73 |
74 | if (!(rb = malloc(sizeof(*rb)))) { // allocate structure
75 | return rb;
76 | }
77 | if (!(rb->Buffer = malloc(size))) { // allocate buffer
78 | free(rb);
79 | return NULL;
80 | }
81 |
82 | rb->Size = size;
83 | rb->BufferEnd = rb->Buffer + size;
84 | RingBufferReset(rb);
85 |
86 | return rb;
87 | }
88 |
89 | /**
90 | ** Free an allocated ring buffer.
91 | */
92 | void RingBufferDel(RingBuffer * rb)
93 | {
94 | free(rb->Buffer);
95 | free(rb);
96 | }
97 |
98 | /**
99 | ** Advance write pointer in ring buffer.
100 | **
101 | ** @param rb Ring buffer to advance write pointer.
102 | ** @param cnt Number of bytes to be adavanced.
103 | **
104 | ** @returns Number of bytes that could be advanced in ring buffer.
105 | */
106 | size_t RingBufferWriteAdvance(RingBuffer * rb, size_t cnt)
107 | {
108 | size_t n;
109 |
110 | n = rb->Size - atomic_read(&rb->Filled);
111 | if (cnt > n) { // not enough space
112 | cnt = n;
113 | }
114 | //
115 | // Hitting end of buffer?
116 | //
117 | n = rb->BufferEnd - rb->WritePointer;
118 | if (n > cnt) { // don't cross the end
119 | rb->WritePointer += cnt;
120 | } else { // reached or cross the end
121 | rb->WritePointer = rb->Buffer;
122 | if (n < cnt) {
123 | n = cnt - n;
124 | rb->WritePointer += n;
125 | }
126 | }
127 |
128 | //
129 | // Only atomic modification!
130 | //
131 | atomic_add(cnt, &rb->Filled);
132 | return cnt;
133 | }
134 |
135 | /**
136 | ** Write to a ring buffer.
137 | **
138 | ** @param rb Ring buffer to write to.
139 | ** @param buf Buffer of @p cnt bytes.
140 | ** @param cnt Number of bytes in buffer.
141 | **
142 | ** @returns The number of bytes that could be placed in the ring
143 | ** buffer.
144 | */
145 | size_t RingBufferWrite(RingBuffer * rb, const void *buf, size_t cnt)
146 | {
147 | size_t n;
148 |
149 | n = rb->Size - atomic_read(&rb->Filled);
150 | if (cnt > n) { // not enough space
151 | cnt = n;
152 | }
153 | //
154 | // Hitting end of buffer?
155 | //
156 | n = rb->BufferEnd - rb->WritePointer;
157 | if (n > cnt) { // don't cross the end
158 | memcpy(rb->WritePointer, buf, cnt);
159 | rb->WritePointer += cnt;
160 | } else { // reached or cross the end
161 | memcpy(rb->WritePointer, buf, n);
162 | rb->WritePointer = rb->Buffer;
163 | if (n < cnt) {
164 | buf += n;
165 | n = cnt - n;
166 | memcpy(rb->WritePointer, buf, n);
167 | rb->WritePointer += n;
168 | }
169 | }
170 |
171 | //
172 | // Only atomic modification!
173 | //
174 | atomic_add(cnt, &rb->Filled);
175 | return cnt;
176 | }
177 |
178 | /**
179 | ** Get write pointer and free bytes at this position of ring buffer.
180 | **
181 | ** @param rb Ring buffer to write to.
182 | ** @param[out] wp Write pointer is placed here
183 | **
184 | ** @returns The number of bytes that could be placed in the ring
185 | ** buffer at the write pointer.
186 | */
187 | size_t RingBufferGetWritePointer(RingBuffer * rb, void **wp)
188 | {
189 | size_t n;
190 | size_t cnt;
191 |
192 | // Total free bytes available in ring buffer
193 | cnt = rb->Size - atomic_read(&rb->Filled);
194 |
195 | *wp = rb->WritePointer;
196 |
197 | //
198 | // Hitting end of buffer?
199 | //
200 | n = rb->BufferEnd - rb->WritePointer;
201 | if (n <= cnt) { // reached or cross the end
202 | return n;
203 | }
204 | return cnt;
205 | }
206 |
207 | /**
208 | ** Advance read pointer in ring buffer.
209 | **
210 | ** @param rb Ring buffer to advance read pointer.
211 | ** @param cnt Number of bytes to be advanced.
212 | **
213 | ** @returns Number of bytes that could be advanced in ring buffer.
214 | */
215 | size_t RingBufferReadAdvance(RingBuffer * rb, size_t cnt)
216 | {
217 | size_t n;
218 |
219 | n = atomic_read(&rb->Filled);
220 | if (cnt > n) { // not enough filled
221 | cnt = n;
222 | }
223 | //
224 | // Hitting end of buffer?
225 | //
226 | n = rb->BufferEnd - rb->ReadPointer;
227 | if (n > cnt) { // don't cross the end
228 | rb->ReadPointer += cnt;
229 | } else { // reached or cross the end
230 | rb->ReadPointer = rb->Buffer;
231 | if (n < cnt) {
232 | n = cnt - n;
233 | rb->ReadPointer += n;
234 | }
235 | }
236 |
237 | //
238 | // Only atomic modification!
239 | //
240 | atomic_sub(cnt, &rb->Filled);
241 | return cnt;
242 | }
243 |
244 | /**
245 | ** Read from a ring buffer.
246 | **
247 | ** @param rb Ring buffer to read from.
248 | ** @param buf Buffer of @p cnt bytes.
249 | ** @param cnt Number of bytes to be read.
250 | **
251 | ** @returns Number of bytes that could be read from ring buffer.
252 | */
253 | size_t RingBufferRead(RingBuffer * rb, void *buf, size_t cnt)
254 | {
255 | size_t n;
256 |
257 | n = atomic_read(&rb->Filled);
258 | if (cnt > n) { // not enough filled
259 | cnt = n;
260 | }
261 | //
262 | // Hitting end of buffer?
263 | //
264 | n = rb->BufferEnd - rb->ReadPointer;
265 | if (n > cnt) { // don't cross the end
266 | memcpy(buf, rb->ReadPointer, cnt);
267 | rb->ReadPointer += cnt;
268 | } else { // reached or cross the end
269 | memcpy(buf, rb->ReadPointer, n);
270 | rb->ReadPointer = rb->Buffer;
271 | if (n < cnt) {
272 | buf += n;
273 | n = cnt - n;
274 | memcpy(buf, rb->ReadPointer, n);
275 | rb->ReadPointer += n;
276 | }
277 | }
278 |
279 | //
280 | // Only atomic modification!
281 | //
282 | atomic_sub(cnt, &rb->Filled);
283 | return cnt;
284 | }
285 |
286 | /**
287 | ** Get read pointer and used bytes at this position of ring buffer.
288 | **
289 | ** @param rb Ring buffer to read from.
290 | ** @param[out] rp Read pointer is placed here
291 | **
292 | ** @returns The number of bytes that could be read from the ring
293 | ** buffer at the read pointer.
294 | */
295 | size_t RingBufferGetReadPointer(RingBuffer * rb, const void **rp)
296 | {
297 | size_t n;
298 | size_t cnt;
299 |
300 | // Total used bytes in ring buffer
301 | cnt = atomic_read(&rb->Filled);
302 |
303 | *rp = rb->ReadPointer;
304 |
305 | //
306 | // Hitting end of buffer?
307 | //
308 | n = rb->BufferEnd - rb->ReadPointer;
309 | if (n <= cnt) { // reached or cross the end
310 | return n;
311 | }
312 | return cnt;
313 | }
314 |
315 | /**
316 | ** Get free bytes in ring buffer.
317 | **
318 | ** @param rb Ring buffer.
319 | **
320 | ** @returns Number of bytes free in buffer.
321 | */
322 | size_t RingBufferFreeBytes(RingBuffer * rb)
323 | {
324 | return rb->Size - atomic_read(&rb->Filled);
325 | }
326 |
327 | /**
328 | ** Get used bytes in ring buffer.
329 | **
330 | ** @param rb Ring buffer.
331 | **
332 | ** @returns Number of bytes used in buffer.
333 | */
334 | size_t RingBufferUsedBytes(RingBuffer * rb)
335 | {
336 | return atomic_read(&rb->Filled);
337 | }
338 |
--------------------------------------------------------------------------------
/ringbuffer.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// @file ringbuffer.h @brief Ringbuffer module header file
3 | ///
4 | /// Copyright (c) 2009, 2011 by Johns. All Rights Reserved.
5 | ///
6 | /// Contributor(s):
7 | ///
8 | /// License: AGPLv3
9 | ///
10 | /// This program is free software: you can redistribute it and/or modify
11 | /// it under the terms of the GNU Affero General Public License as
12 | /// published by the Free Software Foundation, either version 3 of the
13 | /// License.
14 | ///
15 | /// This program is distributed in the hope that it will be useful,
16 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | /// GNU Affero General Public License for more details.
19 | ///
20 | /// $Id: 8a2b4c171f1024afb8b8a7a7add631b7ebe2d45e $
21 | //////////////////////////////////////////////////////////////////////////////
22 |
23 | /// @addtogroup Ringbuffer
24 | /// @{
25 |
26 | /// ring buffer typedef
27 | typedef struct _ring_buffer_ RingBuffer;
28 |
29 | /// reset ring buffer pointers
30 | extern void RingBufferReset(RingBuffer *);
31 |
32 | /// create new ring buffer
33 | extern RingBuffer *RingBufferNew(size_t);
34 |
35 | /// free ring buffer
36 | extern void RingBufferDel(RingBuffer *);
37 |
38 | /// write into ring buffer
39 | extern size_t RingBufferWrite(RingBuffer *, const void *, size_t);
40 |
41 | /// get write pointer of ring buffer
42 | extern size_t RingBufferGetWritePointer(RingBuffer *, void **);
43 |
44 | /// advance write pointer of ring buffer
45 | extern size_t RingBufferWriteAdvance(RingBuffer *, size_t);
46 |
47 | /// read from ring buffer
48 | extern size_t RingBufferRead(RingBuffer *, void *, size_t);
49 |
50 | /// get read pointer of ring buffer
51 | extern size_t RingBufferGetReadPointer(RingBuffer *, const void **);
52 |
53 | /// advance read pointer of ring buffer
54 | extern size_t RingBufferReadAdvance(RingBuffer *, size_t);
55 |
56 | /// free bytes ring buffer
57 | extern size_t RingBufferFreeBytes(RingBuffer *);
58 |
59 | /// used bytes ring buffer
60 | extern size_t RingBufferUsedBytes(RingBuffer *);
61 |
62 | /// @}
63 |
--------------------------------------------------------------------------------
/shaders.h:
--------------------------------------------------------------------------------
1 | #define charsize(args...) snprintf(NULL, 0, args) + sizeof('\0')
2 |
3 | const char *Versions[] = {
4 | "#version 460 core ",
5 | "#version 330 core ",
6 | "#version 320 es ",
7 | "#version 300 es ",
8 | };
9 |
10 | // shader
11 |
12 | char vertex_osd[] = {"\
13 | %s\n\
14 | in vec2 vertex_position;\n\
15 | in vec2 vertex_texcoord0;\n\
16 | out vec2 texcoord0;\n\
17 | void main() {\n\
18 | gl_Position = vec4(vertex_position, 1.0, 1.0);\n\
19 | texcoord0 = vertex_texcoord0;\n\
20 | }\n"};
21 |
22 | char fragment_osd[] = {"\
23 | %s\n\
24 | #define texture1D texture\n\
25 | precision mediump float; \
26 | layout(location = 0) out vec4 out_color;\n\
27 | in vec2 texcoord0;\n\
28 | uniform sampler2D texture0;\n\
29 | void main() {\n\
30 | vec4 color; \n\
31 | color = vec4(texture(texture0, texcoord0));\n\
32 | out_color = color;\n\
33 | }\n"};
34 |
35 | char vertex[] = {"\
36 | %s\n\
37 | in vec2 vertex_position;\n\
38 | in vec2 vertex_texcoord0;\n\
39 | out vec2 texcoord0;\n\
40 | in vec2 vertex_texcoord1;\n\
41 | out vec2 texcoord1;\n\
42 | in vec2 vertex_texcoord2;\n\
43 | out vec2 texcoord2;\n\
44 | in vec2 vertex_texcoord3;\n\
45 | out vec2 texcoord3;\n\
46 | in vec2 vertex_texcoord4;\n\
47 | out vec2 texcoord4;\n\
48 | in vec2 vertex_texcoord5;\n\
49 | out vec2 texcoord5;\n\
50 | void main() {\n\
51 | gl_Position = vec4(vertex_position, 1.0, 1.0);\n\
52 | texcoord0 = vertex_texcoord0;\n\
53 | texcoord1 = vertex_texcoord1;\n\
54 | texcoord2 = vertex_texcoord2;\n\
55 | texcoord3 = vertex_texcoord3;\n\
56 | texcoord4 = vertex_texcoord4;\n\
57 | texcoord5 = vertex_texcoord5;\n\
58 | }\n"};
59 |
60 |
61 | char fragment[] = {"\
62 | %s\n\
63 | #define texture1D texture\n\
64 | #define texture3D texture\n\
65 | precision highp float;\
66 | layout(location = 0) out vec4 out_color;\n\
67 | in vec2 texcoord0;\n\
68 | in vec2 texcoord1;\n\
69 | in vec2 texcoord2;\n\
70 | in vec2 texcoord3;\n\
71 | in vec2 texcoord4;\n\
72 | in vec2 texcoord5;\n\
73 | uniform mat3 colormatrix;\n\
74 | uniform vec3 colormatrix_c;\n\
75 | uniform sampler2D texture0;\n\
76 | //uniform vec2 texture_size0;\n\
77 | //uniform mat2 texture_rot0;\n\
78 | //uniform vec2 pixel_size0;\n\
79 | uniform sampler2D texture1;\n\
80 | //uniform vec2 texture_size1;\n\
81 | //uniform mat2 texture_rot1;\n\
82 | //uniform vec2 pixel_size1;\n\
83 | //#define LUT_POS(x, lut_size) mix(0.5 / (lut_size), 1.0 - 0.5 / (lut_size), (x))\n\
84 | void main() {\n\
85 | vec4 color; // = vec4(0.0, 0.0, 0.0, 1.0);\n\
86 | color.r = 1.000000 * vec4(texture(texture0, texcoord0)).r;\n\
87 | color.gb = 1.000000 * vec4(texture(texture1, texcoord1)).rg;\n\
88 | // color conversion\n\
89 | color.rgb = mat3(colormatrix) * color.rgb + colormatrix_c;\n\
90 | color.a = 1.0;\n\
91 | // color mapping\n\
92 | out_color = color;\n\
93 | }\n"};
94 |
95 | char fragment_bt2100[] = {"\
96 | %s\n\
97 | #define texture1D texture\n\
98 | #define texture3D texture\n\
99 | precision highp float;\
100 | layout(location = 0) out vec4 out_color;\n\
101 | in vec2 texcoord0;\n\
102 | in vec2 texcoord1;\n\
103 | in vec2 texcoord2;\n\
104 | in vec2 texcoord3;\n\
105 | in vec2 texcoord4;\n\
106 | in vec2 texcoord5;\n\
107 | uniform mat3 colormatrix;\n\
108 | uniform vec3 colormatrix_c;\n\
109 | uniform mat3 cms_matrix;\n\
110 | uniform sampler2D texture0;\n\
111 | //uniform vec2 texture_size0;\n\
112 | //uniform mat2 texture_rot0;\n\
113 | //uniform vec2 pixel_size0;\n\
114 | uniform sampler2D texture1;\n\
115 | //uniform vec2 texture_size1;\n\
116 | //uniform mat2 texture_rot1;\n\
117 | //uniform vec2 pixel_size1;\n\
118 | //#define LUT_POS(x, lut_size) mix(0.5 / (lut_size), 1.0 - 0.5 / (lut_size), (x))\n\
119 | void main() {\n\
120 | vec4 color; // = vec4(0.0, 0.0, 0.0, 1.0);\n\
121 | color.r = 1.003906 * vec4(texture(texture0, texcoord0)).r;\n\
122 | color.gb = 1.003906 * vec4(texture(texture1, texcoord1)).rg;\n\
123 | // color conversion\n\
124 | color.rgb = mat3(colormatrix) * color.rgb + colormatrix_c;\n\
125 | color.a = 1.0;\n\
126 | // color mapping\n\
127 | color.rgb = clamp(color.rgb, 0.0, 1.0);\n\
128 | color.rgb = pow(color.rgb, vec3(2.4));\n\
129 | color.rgb = cms_matrix * color.rgb;\n\
130 | color.rgb = clamp(color.rgb, 0.0, 1.0);\n\
131 | color.rgb = pow(color.rgb, vec3(1.0/2.4));\n\
132 | out_color = color;\n\
133 | }\n"};
134 |
135 | /* Color conversion matrix: RGB = m * YUV + c
136 | * m is in row-major matrix, with m[row][col], e.g.:
137 | * [ a11 a12 a13 ] float m[3][3] = { { a11, a12, a13 },
138 | * [ a21 a22 a23 ] { a21, a22, a23 },
139 | * [ a31 a32 a33 ] { a31, a32, a33 } };
140 | * This is accessed as e.g.: m[2-1][1-1] = a21
141 | * In particular, each row contains all the coefficients for one of R, G, B,
142 | * while each column contains all the coefficients for one of Y, U, V:
143 | * m[r,g,b][y,u,v] = ...
144 | * The matrix could also be viewed as group of 3 vectors, e.g. the 1st column
145 | * is the Y vector (1, 1, 1), the 2nd is the U vector, the 3rd the V vector.
146 | * The matrix might also be used for other conversions and colorspaces.
147 | */
148 | struct mp_cmat {
149 | float m[3][3]; // colormatrix
150 | float c[3]; //colormatrix_c
151 | };
152 |
153 | struct mp_mat {
154 | float m[3][3];
155 | };
156 |
157 | // YUV input limited range (16-235 for luma, 16-240 for chroma)
158 | // ITU-R BT.601 (SD)
159 | struct mp_cmat yuv_bt601 = {\
160 | {{ 1.164384, 1.164384, 1.164384 },\
161 | { 0.00000, -0.391762, 2.017232 },\
162 | { 1.596027, -0.812968 , 0.000000 }},\
163 | {-0.874202, 0.531668, -1.085631 } };
164 |
165 | // ITU-R BT.709 (HD)
166 | struct mp_cmat yuv_bt709 = {\
167 | {{ 1.164384, 1.164384, 1.164384 },\
168 | { 0.00000, -0.213249, 2.112402 },\
169 | { 1.792741, -0.532909 , 0.000000 }},\
170 | {-0.972945, 0.301483, -1.133402 } };
171 |
172 | // ITU-R BT.2020 non-constant luminance system
173 | struct mp_cmat yuv_bt2020ncl = {\
174 | {{ 1.164384, 1.164384, 1.164384 },\
175 | { 0.00000, -0.187326, 2.141772 },\
176 | { 1.678674, -0.650424 , 0.000000 }},\
177 | {-0.915688, 0.347459, -1.148145 } };
178 |
179 | // ITU-R BT.2020 constant luminance system
180 | struct mp_cmat yuv_bt2020cl = {\
181 | {{ 0.0000, 1.164384, 0.000000 },\
182 | { 0.00000, 0.000000, 1.138393 },\
183 | { 1.138393, 0.000000 , 0.000000 }},\
184 | {-0.571429, -0.073059, -0.571429 } };
185 |
186 | float cms_matrix[3][3] = \
187 | {{ 1.660497, -0.124547, -0.018154},\
188 | {-0.587657, 1.132895, -0.100597},\
189 | {-0.072840, -0.008348, 1.118751}};
190 |
191 | struct gl_vao_entry {
192 | // used for shader / glBindAttribLocation
193 | const char *name;
194 | // glVertexAttribPointer() arguments
195 | int num_elems; // size (number of elements)
196 | GLenum type;
197 | bool normalized;
198 | int offset;
199 | };
200 |
201 | struct vertex_pt {
202 | float x, y;
203 | };
204 |
205 | struct vertex_pi {
206 | GLint x, y;
207 | };
208 |
209 | #define TEXUNIT_VIDEO_NUM 6
210 |
211 | struct vertex {
212 | struct vertex_pt position;
213 | struct vertex_pt texcoord[TEXUNIT_VIDEO_NUM];
214 | };
215 |
216 | static const struct gl_vao_entry vertex_vao[] = {
217 | {"position", 2, GL_FLOAT, false, offsetof(struct vertex, position)},
218 | {"texcoord0", 2, GL_FLOAT, false, offsetof(struct vertex, texcoord[0])},
219 | {"texcoord1", 2, GL_FLOAT, false, offsetof(struct vertex, texcoord[1])},
220 | {"texcoord2", 2, GL_FLOAT, false, offsetof(struct vertex, texcoord[2])},
221 | {"texcoord3", 2, GL_FLOAT, false, offsetof(struct vertex, texcoord[3])},
222 | {"texcoord4", 2, GL_FLOAT, false, offsetof(struct vertex, texcoord[4])},
223 | {"texcoord5", 2, GL_FLOAT, false, offsetof(struct vertex, texcoord[5])},
224 | {0}
225 | };
226 |
227 |
228 | static bool compile_attach_shader(GLuint program, GLenum type, const char *source)
229 | {
230 | GLuint shader;
231 | GLint status, log_length;
232 | GLchar infoLog[1024];
233 |
234 | shader = glCreateShader(type);
235 | glShaderSource(shader, 1, &source, NULL);
236 | glCompileShader(shader);
237 | status = 0;
238 | glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
239 | log_length = 0;
240 | glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &log_length);
241 | if (!status)
242 | glGetShaderInfoLog(shader, 1024, NULL, infoLog);
243 | Debug(3,"compile Status %d loglen %d %s\n", status, log_length, status ? " " : infoLog);
244 | if (!status) return false;
245 |
246 | GlCheck();
247 | glAttachShader(program, shader);
248 | glDeleteShader(shader);
249 | return true;
250 | }
251 |
252 | static void link_shader(GLuint program)
253 | {
254 | GLint status,log_length;
255 |
256 | glLinkProgram(program);
257 | status = 0;
258 | glGetProgramiv(program, GL_LINK_STATUS, &status);
259 | log_length = 0;
260 | glGetProgramiv(program, GL_INFO_LOG_LENGTH, &log_length);
261 | Debug(3,"Link Status %d loglen %d\n",status,log_length);
262 |
263 | }
264 |
265 | static GLuint sc_generate_osd(GLuint gl_prog) {
266 |
267 | char *frag, *vert;
268 | int n, r;
269 | Debug(3,"vor create osd\n");
270 | gl_prog = glCreateProgram();
271 |
272 | for (n=0;n<4;n++) {
273 | Debug(3,"Try compile vertex osd %s\n", Versions[n]);
274 | vert = malloc(charsize(vertex_osd, Versions[n]));
275 | sprintf(vert, vertex_osd, Versions[n]);
276 | r = compile_attach_shader(gl_prog, GL_VERTEX_SHADER, vert);
277 | free(vert);
278 | if (r) break;
279 | else if (n>2) return 0;
280 | }
281 |
282 | Debug(3,"Try compile fragment osd %s\n", Versions[n]);
283 | frag = malloc(charsize(fragment_osd, Versions[n]));
284 | sprintf(frag, fragment_osd, Versions[n]);
285 | r = compile_attach_shader(gl_prog, GL_FRAGMENT_SHADER, frag);
286 | free(frag);
287 | if (!r) return 0;
288 |
289 | glBindAttribLocation(gl_prog,0,"vertex_position");
290 | glBindAttribLocation(gl_prog,1,"vertex_texcoord0");
291 |
292 | link_shader(gl_prog);
293 | return gl_prog;
294 | }
295 |
296 | static GLuint sc_generate(GLuint gl_prog, enum AVColorSpace colorspace)
297 | {
298 | char vname[80];
299 | int n, r;
300 | GLint cmsLoc;
301 | float *m,*c,*cms;
302 | char *frag, *vert, *Fragment;
303 |
304 | switch (colorspace) {
305 | case AVCOL_SPC_RGB:
306 | m = &yuv_bt601.m[0][0];
307 | c = &yuv_bt601.c[0];
308 | Fragment = fragment;
309 | Debug(3,"BT601 Colorspace used\n");
310 | break;
311 | case AVCOL_SPC_BT709:
312 | case AVCOL_SPC_UNSPECIFIED: // comes with UHD
313 | m = &yuv_bt709.m[0][0];
314 | c = &yuv_bt709.c[0];
315 | Fragment = fragment;
316 | Debug(3,"BT709 Colorspace used\n");
317 | break;
318 | case AVCOL_SPC_BT2020_NCL:
319 | m = &yuv_bt2020ncl.m[0][0];
320 | c = &yuv_bt2020ncl.c[0];
321 | cms = &cms_matrix[0][0];
322 | Fragment = fragment_bt2100;
323 | Debug(3,"BT2020NCL Colorspace used\n");
324 | break;
325 | default: // fallback
326 | m = &yuv_bt709.m[0][0];
327 | c = &yuv_bt709.c[0];
328 | Fragment = fragment;
329 | Debug(3,"default BT709 Colorspace used %d\n",colorspace);
330 | break;
331 | }
332 |
333 | Debug(3,"vor create\n");
334 | gl_prog = glCreateProgram();
335 | for (n=0;n<4;n++) {
336 | Debug(3,"Try compile vertex %s\n", Versions[n]);
337 | vert = malloc(charsize(vertex, Versions[n]));
338 | sprintf(vert, vertex, Versions[n]);
339 | r = (compile_attach_shader(gl_prog, GL_VERTEX_SHADER, vert));
340 | free(vert);
341 | if (r) break;
342 | else if (n>2) return 0;
343 | }
344 |
345 | Debug(3,"Try compile fragment %s\n", Versions[n]);
346 |
347 | frag = malloc(charsize(Fragment, Versions[n]));
348 | sprintf(frag, fragment, Versions[n]);
349 | r = compile_attach_shader(gl_prog, GL_FRAGMENT_SHADER, frag);
350 | free(frag);
351 | if (!r) return 0;
352 |
353 | glBindAttribLocation(gl_prog,0,"vertex_position");
354 |
355 | for (n=0;n<6;n++) {
356 | sprintf(vname,"vertex_texcoord%1d",n);
357 | glBindAttribLocation(gl_prog,n+1,vname);
358 | }
359 |
360 | link_shader(gl_prog);
361 |
362 | gl_colormatrix = glGetUniformLocation(gl_prog,"colormatrix");
363 | Debug(3,"get uniform colormatrix %d \n",gl_colormatrix);
364 | if (gl_colormatrix != -1)
365 | glProgramUniformMatrix3fv(gl_prog,gl_colormatrix,1,0,m);
366 | GlCheck();
367 | //glProgramUniform3fv(gl_prog,gl_colormatrix,3,&yuv_bt709.m[0][0]);
368 | gl_colormatrix_c = glGetUniformLocation(gl_prog,"colormatrix_c");
369 | Debug(3,"get uniform colormatrix_c %d %f\n",gl_colormatrix_c,*c);
370 | if (gl_colormatrix_c != -1)
371 | glProgramUniform3fv(gl_prog,gl_colormatrix_c,1,c);
372 | GlCheck();
373 |
374 | if (colorspace == AVCOL_SPC_BT2020_NCL) {
375 | cmsLoc = glGetUniformLocation(gl_prog,"cms_matrix");
376 | if (cmsLoc != -1)
377 | glProgramUniformMatrix3fv(gl_prog,cmsLoc,1,0,cms);
378 | GlCheck();
379 | }
380 |
381 | return gl_prog;
382 | }
383 |
384 | static void render_pass_quad(int flip, float xcrop, float ycrop)
385 | {
386 | struct vertex va[4];
387 | int n;
388 | const struct gl_vao_entry *e;
389 | // uhhhh what a hack
390 | if (!flip ) {
391 | va[0].position.x = (float) -1.0;
392 | va[0].position.y = (float) 1.0;
393 | va[1].position.x = (float) -1.0;
394 | va[1].position.y = (float) -1.0;
395 | va[2].position.x = (float) 1.0;
396 | va[2].position.y = (float) 1.0;
397 | va[3].position.x = (float) 1.0;
398 | va[3].position.y = (float) -1.0;
399 | } else {
400 | va[0].position.x = (float) -1.0;
401 | va[0].position.y = (float) -1.0;
402 | va[1].position.x = (float) -1.0;
403 | va[1].position.y = (float) 1.0;
404 | va[2].position.x = (float) 1.0;
405 | va[2].position.y = (float) -1.0;
406 | va[3].position.x = (float) 1.0;
407 | va[3].position.y = (float) 1.0;
408 | }
409 |
410 | va[0].texcoord[0].x = (float) 0.0 + xcrop;
411 | va[0].texcoord[0].y = (float) 0.0 + ycrop; // abgeschnitten von links oben
412 | va[0].texcoord[1].x = (float) 0.0 + xcrop;
413 | va[0].texcoord[1].y = (float) 0.0 + ycrop; // abgeschnitten von links oben
414 | va[1].texcoord[0].x = (float) 0.0 + xcrop;
415 | va[1].texcoord[0].y = (float) 1.0 - ycrop; // abgeschnitten links unten 1.0 - Wert
416 | va[1].texcoord[1].x = (float) 0.0 + xcrop;
417 | va[1].texcoord[1].y = (float) 1.0 - ycrop; // abgeschnitten links unten 1.0 - Wert
418 | va[2].texcoord[0].x = (float) 1.0 - xcrop;
419 | va[2].texcoord[0].y = (float) 0.0 + ycrop; // abgeschnitten von rechts oben
420 | va[2].texcoord[1].x = (float) 1.0 - xcrop;
421 | va[2].texcoord[1].y = (float) 0.0 + ycrop; // abgeschnitten von rechts oben
422 | va[3].texcoord[0].x = (float) 1.0 - xcrop;
423 | va[3].texcoord[0].y = (float) 1.0 - ycrop; // abgeschnitten von rechts unten 1.0 - wert
424 | va[3].texcoord[1].x = (float) 1.0 - xcrop;
425 | va[3].texcoord[1].y = (float) 1.0 - ycrop; // abgeschnitten von rechts unten 1.0 - wert
426 |
427 |
428 |
429 | glBindBuffer(GL_ARRAY_BUFFER, vao_buffer);
430 | glBufferData(GL_ARRAY_BUFFER, 4 * sizeof(struct vertex), va, GL_DYNAMIC_DRAW);
431 | glBindBuffer(GL_ARRAY_BUFFER, 0);
432 |
433 | // enable attribs
434 | glBindBuffer(GL_ARRAY_BUFFER, vao_buffer);
435 | for ( n = 0; vertex_vao[n].name; n++) {
436 | e = &vertex_vao[n];
437 | glEnableVertexAttribArray(n);
438 | glVertexAttribPointer(n, e->num_elems, e->type, e->normalized,
439 | sizeof(struct vertex), (void *)(intptr_t)e->offset);
440 | }
441 | glBindBuffer(GL_ARRAY_BUFFER, 0);
442 |
443 | // draw quad
444 | glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
445 | for ( n = 0; vertex_vao[n].name; n++)
446 | glDisableVertexAttribArray(n);
447 | }
448 |
--------------------------------------------------------------------------------
/softhddev.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// @file softhddev.h @brief software HD device plugin header file.
3 | ///
4 | /// Copyright (c) 2011 - 2015 by Johns. All Rights Reserved.
5 | ///
6 | /// Contributor(s):
7 | ///
8 | /// License: AGPLv3
9 | ///
10 | /// This program is free software: you can redistribute it and/or modify
11 | /// it under the terms of the GNU Affero General Public License as
12 | /// published by the Free Software Foundation, either version 3 of the
13 | /// License.
14 | ///
15 | /// This program is distributed in the hope that it will be useful,
16 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | /// GNU Affero General Public License for more details.
19 | ///
20 | /// $Id: c5b586d7ce962a38b3812bf33fcce35599cc9593 $
21 | //////////////////////////////////////////////////////////////////////////////
22 |
23 | #ifdef __cplusplus
24 | extern "C"
25 | {
26 | #endif
27 | /// C callback feed key press
28 | extern void FeedKeyPress(const char *, const char *, int, int,
29 | const char *);
30 |
31 | /// C plugin get osd size and ascpect
32 | extern void GetOsdSize(int *, int *, double *);
33 |
34 | /// C plugin close osd
35 | extern void OsdClose(void);
36 | /// C plugin draw osd pixmap
37 | extern void OsdDrawARGB(int, int, int, int, int, const uint8_t *, int,
38 | int);
39 |
40 | /// C plugin play audio packet
41 | extern int PlayAudio(const uint8_t *, int, uint8_t);
42 | /// C plugin play TS audio packet
43 | extern int PlayTsAudio(const uint8_t *, int);
44 | /// C plugin set audio volume
45 | extern void SetVolumeDevice(int);
46 | /// C plugin reset channel id (restarts audio)
47 | extern void ResetChannelId(void);
48 |
49 | /// C plugin play video packet
50 | extern int PlayVideo(const uint8_t *, int);
51 | /// C plugin play TS video packet
52 | extern int PlayTsVideo(const uint8_t *, int);
53 | /// C plugin grab an image
54 | extern uint8_t *GrabImage(int *, int, int, int, int);
55 |
56 | /// C plugin set play mode
57 | extern int SetPlayMode(int);
58 | /// C plugin get current system time counter
59 | extern int64_t GetSTC(void);
60 | /// C plugin get video stream size and aspect
61 | extern void GetVideoSize(int *, int *, double *);
62 | /// C plugin set trick speed
63 | extern void TrickSpeed(int);
64 | /// C plugin clears all video and audio data from the device
65 | extern void Clear(void);
66 | /// C plugin sets the device into play mode
67 | extern void Play(void);
68 | /// C plugin sets the device into "freeze frame" mode
69 | extern void Freeze(void);
70 | /// C plugin mute audio
71 | extern void Mute(void);
72 | /// C plugin display I-frame as a still picture.
73 | extern void StillPicture(const uint8_t *, int);
74 | /// C plugin poll if ready
75 | extern int Poll(int);
76 | /// C plugin flush output buffers
77 | extern int Flush(int);
78 |
79 | /// C plugin command line help
80 | extern const char *CommandLineHelp(void);
81 | /// C plugin process the command line arguments
82 | extern int ProcessArgs(int, char *const[]);
83 |
84 | /// C plugin exit + cleanup
85 | extern void SoftHdDeviceExit(void);
86 | /// C plugin start code
87 | extern int Start(void);
88 | /// C plugin stop code
89 | extern void Stop(void);
90 | /// C plugin house keeping
91 | extern void Housekeeping(void);
92 | /// C plugin main thread hook
93 | extern void MainThreadHook(void);
94 |
95 | /// Suspend plugin
96 | extern void Suspend(int, int, int);
97 | /// Resume plugin
98 | extern void Resume(void);
99 |
100 | /// Get decoder statistics
101 | extern void GetStats(int *, int *, int *, int *, int *);
102 | /// C plugin scale video
103 | extern void ScaleVideo(int, int, int, int);
104 |
105 | /// Set Pip position
106 | extern void PipSetPosition(int, int, int, int, int, int, int, int);
107 | /// Pip start
108 | extern void PipStart(int, int, int, int, int, int, int, int);
109 | /// Pip stop
110 | extern void PipStop(void);
111 | /// Pip play video packet
112 | extern int PipPlayVideo(const uint8_t *, int);
113 |
114 | extern const char *X11DisplayName; ///< x11 display name
115 | #ifdef __cplusplus
116 | }
117 | #endif
118 |
--------------------------------------------------------------------------------
/softhddevice.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// @file softhddevice.h @brief software HD device plugin header file.
3 | ///
4 | /// Copyright (c) 2011, 2014 by Johns. All Rights Reserved.
5 | ///
6 | /// Contributor(s):
7 | ///
8 | /// License: AGPLv3
9 | ///
10 | /// This program is free software: you can redistribute it and/or modify
11 | /// it under the terms of the GNU Affero General Public License as
12 | /// published by the Free Software Foundation, either version 3 of the
13 | /// License.
14 | ///
15 | /// This program is distributed in the hope that it will be useful,
16 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | /// GNU Affero General Public License for more details.
19 | ///
20 | /// $Id: 3bc44809950ec019529638cad9223a85d4ab5576 $
21 | //////////////////////////////////////////////////////////////////////////////
22 |
--------------------------------------------------------------------------------
/softhddevice_service.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// @file softhddev_service.h @brief software HD device service header file.
3 | ///
4 | /// Copyright (c) 2012 by durchflieger. All Rights Reserved.
5 | ///
6 | /// Contributor(s):
7 | ///
8 | /// License: AGPLv3
9 | ///
10 | /// This program is free software: you can redistribute it and/or modify
11 | /// it under the terms of the GNU Affero General Public License as
12 | /// published by the Free Software Foundation, either version 3 of the
13 | /// License.
14 | ///
15 | /// This program is distributed in the hope that it will be useful,
16 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | /// GNU Affero General Public License for more details.
19 | ///
20 | /// $Id: c7c2d5e8b724515d7c767668aab717b27f4e4068 $
21 | //////////////////////////////////////////////////////////////////////////////
22 |
23 | #pragma once
24 |
25 | #define ATMO_GRAB_SERVICE "SoftHDDevice-AtmoGrabService-v1.0"
26 | #define ATMO1_GRAB_SERVICE "SoftHDDevice-AtmoGrabService-v1.1"
27 | #define OSD_3DMODE_SERVICE "SoftHDDevice-Osd3DModeService-v1.0"
28 |
29 | enum
30 | { GRAB_IMG_RGBA_FORMAT_B8G8R8A8 };
31 |
32 | typedef struct
33 | {
34 | int structSize;
35 |
36 | // request data
37 | int analyseSize;
38 | int clippedOverscan;
39 |
40 | // reply data
41 | int imgType;
42 | int imgSize;
43 | int width;
44 | int height;
45 | void *img;
46 | } SoftHDDevice_AtmoGrabService_v1_0_t;
47 |
48 | typedef struct
49 | {
50 | int Mode;
51 | } SoftHDDevice_Osd3DModeService_v1_0_t;
52 |
53 | typedef struct
54 | {
55 | // request/reply data
56 |
57 | int width;
58 | int height;
59 |
60 | // reply data
61 |
62 | int size;
63 |
64 | void *img;
65 | } SoftHDDevice_AtmoGrabService_v1_1_t;
66 |
--------------------------------------------------------------------------------
/vdr-softhddevice-9999.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2014 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 | # $Header: $
4 |
5 | EAPI="5"
6 |
7 | inherit vdr-plugin-2 git-2
8 |
9 | RESTRICT="test"
10 |
11 | EGIT_REPO_URI="https://github.com/pesintta/vdr-plugin-softhddevice.git"
12 | KEYWORDS=""
13 |
14 | DESCRIPTION="VDR Plugin: Software and GPU emulated HD output device"
15 | HOMEPAGE="http://projects.vdr-developer.org/projects/show/plg-softhddevice"
16 |
17 | LICENSE="AGPL-3"
18 | SLOT="0"
19 | IUSE="alsa +debug opengl oss vaapi vdpau xscreensaver"
20 |
21 | RDEPEND=">=media-video/vdr-2
22 | x11-libs/libX11
23 | >=x11-libs/libxcb-1.8
24 | x11-libs/xcb-util-wm
25 | x11-libs/xcb-util-keysyms
26 | x11-libs/xcb-util-renderutil
27 | alsa? ( media-libs/alsa-lib )
28 | opengl? ( virtual/opengl
29 | virtual/glu )
30 | vaapi? ( x11-libs/libva
31 | virtual/ffmpeg[vaapi] )
32 | vdpau? ( x11-libs/libvdpau
33 | virtual/ffmpeg[vdpau] )"
34 | DEPEND="${RDEPEND}
35 | virtual/pkgconfig
36 | x11-libs/xcb-util"
37 |
38 | REQUIRED_USE="opengl? ( vaapi )
39 | || ( vaapi vdpau )
40 | || ( alsa oss )"
41 |
42 | #VDR_CONFD_FILE="${FILESDIR}/confd-0.6.0"
43 | #VDR_RCADDON_FILE="${FILESDIR}/rc-addon-0.6.0.sh"
44 |
45 | pkg_setup() {
46 | vdr-plugin-2_pkg_setup
47 |
48 | append-cppflags -DHAVE_PTHREAD_NAME
49 |
50 | use debug && append-cppflags -DDEBUG -DOSD_DEBUG
51 | }
52 | src_prepare() {
53 | vdr-plugin-2_src_prepare
54 |
55 | BUILD_PARAMS+=" ALSA=$(usex alsa 1 0)"
56 | BUILD_PARAMS+=" OPENGL=$(usex opengl 1 0)"
57 | BUILD_PARAMS+=" OSS=$(usex oss 1 0)"
58 | BUILD_PARAMS+=" VAAPI=$(usex vaapi 1 0)"
59 | BUILD_PARAMS+=" VDPAU=$(usex vdpau 1 0)"
60 | BUILD_PARAMS+=" SCREENSAVER=$(usex xscreensaver 1 0)"
61 |
62 | if has_version ">=media-video/ffmpeg-0.8"; then
63 | BUILD_PARAMS+=" SWRESAMPLE=1"
64 | fi
65 | if has_version ">=media-video/libav-0.8"; then
66 | BUILD_PARAMS+=" AVRESAMPLE=1"
67 | fi
68 | }
69 |
70 | src_install() {
71 | vdr-plugin-2_src_install
72 |
73 | nonfatal dodoc ChangeLog Todo
74 | }
75 |
--------------------------------------------------------------------------------
/video.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// @file video.h @brief Video module header file
3 | ///
4 | /// Copyright (c) 2009 - 2015 by Johns. All Rights Reserved.
5 | ///
6 | /// Contributor(s):
7 | ///
8 | /// License: AGPLv3
9 | ///
10 | /// This program is free software: you can redistribute it and/or modify
11 | /// it under the terms of the GNU Affero General Public License as
12 | /// published by the Free Software Foundation, either version 3 of the
13 | /// License.
14 | ///
15 | /// This program is distributed in the hope that it will be useful,
16 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | /// GNU Affero General Public License for more details.
19 | ///
20 | /// $Id: 9dd8ab31d2a242a961c84e6911835c2fa60eaff2 $
21 | //////////////////////////////////////////////////////////////////////////////
22 |
23 | /// @addtogroup Video
24 | /// @{
25 |
26 | //----------------------------------------------------------------------------
27 | // Typedefs
28 | //----------------------------------------------------------------------------
29 |
30 | /// Video hardware decoder typedef
31 | typedef struct _video_hw_decoder_ VideoHwDecoder;
32 |
33 | /// Video output stream typedef
34 | typedef struct __video_stream__ VideoStream;
35 |
36 | /// Video resolutions selector
37 | typedef enum _video_resolutions_
38 | {
39 | VideoResolution576i, ///< ...x576 interlaced
40 | VideoResolution720p, ///< ...x720 progressive
41 | VideoResolutionFake1080i, ///< 1280x1080 1440x1080 interlaced
42 | VideoResolution1080i, ///< 1920x1080 interlaced
43 | VideoResolutionUHD, ///< UHD progressive
44 | VideoResolutionMax ///< number of resolution indexs
45 | } VideoResolutions;
46 |
47 | //----------------------------------------------------------------------------
48 | // Variables
49 | //----------------------------------------------------------------------------
50 | enum VideoHardwareDecoderMode {
51 | HWOff = 0,
52 | HWmpeg2Off,
53 | HWhevcOff,
54 | HWOn,
55 | };
56 |
57 | enum VideoOutParameters {
58 | brightness,
59 | contrast,
60 | saturation,
61 | hue,
62 | stde,
63 | };
64 |
65 | extern enum VideoHardwareDecoderMode VideoHardwareDecoder; ///< flag use hardware decoder
66 | extern char VideoIgnoreRepeatPict; ///< disable repeat pict warning
67 | extern int VideoAudioDelay; ///< audio/video delay
68 | extern char ConfigStartX11Server; ///< flag start the x11 server
69 | extern char VideoFullscreen; ///< flag full screen video
70 |
71 | //----------------------------------------------------------------------------
72 | // Prototypes
73 | //----------------------------------------------------------------------------
74 |
75 | /// Allocate new video hardware decoder.
76 | extern VideoHwDecoder *VideoNewHwDecoder(VideoStream *);
77 |
78 | /// Deallocate video hardware decoder.
79 | extern void VideoDelHwDecoder(VideoHwDecoder *);
80 |
81 | #ifdef LIBAVCODEC_VERSION
82 | /// Get and allocate a video hardware surface.
83 | extern unsigned VideoGetSurface(VideoHwDecoder *, const AVCodecContext *);
84 |
85 | /// Release a video hardware surface
86 | extern void VideoReleaseSurface(VideoHwDecoder *, unsigned);
87 |
88 | extern void VideoUnregisterSurface(VideoHwDecoder *);
89 | /// Callback to negotiate the PixelFormat.
90 | extern enum AVPixelFormat Video_get_format(VideoHwDecoder *, AVCodecContext *,
91 | const enum AVPixelFormat *);
92 |
93 | /// Render a ffmpeg frame.
94 | extern void VideoRenderFrame(VideoHwDecoder *, const AVCodecContext *,
95 | const AVFrame *);
96 |
97 | /// Get hwaccel context for ffmpeg.
98 | extern void *VideoGetHwAccelContext(VideoHwDecoder *);
99 |
100 | #if LIBAVUTIL_VERSION_MAJOR < 56
101 | #ifdef AVCODEC_VDPAU_H
102 | /// Draw vdpau render state.
103 | extern void VideoDrawRenderState(VideoHwDecoder *,
104 | struct vdpau_render_state *);
105 | #endif
106 | #endif
107 | #endif
108 |
109 | /// Poll video events.
110 | extern void VideoPollEvent(void);
111 |
112 | /// Wakeup display handler.
113 | extern void VideoDisplayWakeup(void);
114 |
115 | /// Set video device.
116 | extern void VideoSetDevice(const char *);
117 |
118 | /// Get video driver name.
119 | extern const char *VideoGetDriverName(void);
120 |
121 | /// Get used video driver.
122 | extern int VideoIsDriverVdpau(void);
123 | extern int VideoIsDriverVaapi(void);
124 | extern int VideoIsDriverCuvid(void);
125 | extern int VideoIsDriverNVdec(void);
126 | extern int VideoIsDriverCpu(void);
127 |
128 | /// Set video geometry.
129 | extern int VideoSetGeometry(const char *);
130 |
131 | /// Get video geometry.
132 | extern const char *VideoGetGeometry(void);
133 |
134 | /// Set 60Hz display mode.
135 | extern void VideoSet60HzMode(int);
136 |
137 | /// Set soft start audio/video sync.
138 | extern void VideoSetSoftStartSync(int);
139 |
140 | /// Set show black picture during channel switch.
141 | extern void VideoSetBlackPicture(int);
142 |
143 | /// Set brightness adjustment.
144 | extern void VideoSetBrightness(int);
145 |
146 | /// Get brightness configurations.
147 | extern int VideoGetBrightnessConfig(int *minvalue, int *defvalue, int *maxvalue);
148 |
149 | /// Set contrast adjustment.
150 | extern void VideoSetContrast(int);
151 |
152 | /// Get contrast configurations.
153 | extern int VideoGetContrastConfig(int *minvalue, int *defvalue, int *maxvalue);
154 |
155 | /// Set saturation adjustment.
156 | extern void VideoSetSaturation(int);
157 |
158 | /// Get saturation configurations.
159 | extern int VideoGetSaturationConfig(int *minvalue, int *defvalue, int *maxvalue);
160 |
161 | /// Set hue adjustment.
162 | extern void VideoSetHue(int);
163 |
164 | /// Get hue configurations.
165 | extern int VideoGetHueConfig(int *minvalue, int *defvalue, int *maxvalue);
166 |
167 | /// Set skin tone enhancement.
168 | extern void VideoSetSkinToneEnhancement(int);
169 |
170 | /// Get skin tone enhancement configurations.
171 | extern int VideoGetSkinToneEnhancementConfig(int *minvalue, int *defvalue, int *maxvalue);
172 |
173 | /// Set video output position.
174 | extern void VideoSetOutputPosition(VideoHwDecoder *, int, int, int, int);
175 |
176 | /// Set video mode.
177 | extern void VideoSetVideoMode(int, int, int, int);
178 |
179 | /// Set 4:3 display format.
180 | extern void VideoSet4to3DisplayFormat(int);
181 |
182 | /// Set other display format.
183 | extern void VideoSetOtherDisplayFormat(int);
184 |
185 | /// Set video fullscreen mode.
186 | extern void VideoSetFullscreen(int);
187 |
188 | /// Get scaling modes.
189 | extern int VideoGetScalingModes(const char* **long_table, const char* **short_table);
190 |
191 | /// Get deinterlace modes.
192 | extern int VideoGetDeinterlaceModes(const char* **long_table, const char* **short_table);
193 |
194 | /// Set deinterlace.
195 | extern void VideoSetDeinterlace(int[VideoResolutionMax]);
196 |
197 | /// Set skip chroma deinterlace.
198 | extern void VideoSetSkipChromaDeinterlace(int[VideoResolutionMax]);
199 |
200 | /// Set inverse telecine.
201 | extern void VideoSetInverseTelecine(int[VideoResolutionMax]);
202 |
203 | /// Set scaling.
204 | extern void VideoSetScaling(int[VideoResolutionMax]);
205 |
206 | /// Set denoise.
207 | extern void VideoSetDenoise(int[VideoResolutionMax]);
208 |
209 | /// Get denoise configurations.
210 | extern int VideoGetDenoiseConfig(int *minvalue, int *defvalue, int *maxvalue);
211 |
212 | /// Set sharpen.
213 | extern void VideoSetSharpen(int[VideoResolutionMax]);
214 |
215 | /// Get sharpen configurations.
216 | extern int VideoGetSharpenConfig(int *minvalue, int *defvalue, int *maxvalue);
217 |
218 | /// Set cut top and bottom.
219 | extern void VideoSetCutTopBottom(int[VideoResolutionMax]);
220 |
221 | /// Set cut left and right.
222 | extern void VideoSetCutLeftRight(int[VideoResolutionMax]);
223 |
224 | /// Set first & second field ordering.
225 | extern void VideoSetFirstField(int[VideoResolutionMax]);
226 | extern void VideoSetSecondField(int[VideoResolutionMax]);
227 |
228 | /// Set studio levels.
229 | extern void VideoSetStudioLevels(int);
230 |
231 | /// Set background.
232 | extern void VideoSetBackground(uint32_t);
233 |
234 | /// Set audio delay.
235 | extern void VideoSetAudioDelay(int);
236 |
237 | /// Set auto-crop parameters.
238 | extern void VideoSetAutoCrop(int, int, int);
239 |
240 | /// Clear OSD.
241 | extern void VideoOsdClear(void);
242 |
243 | /// Draw an OSD ARGB image.
244 | extern void VideoOsdDrawARGB(int, int, int, int, int, const uint8_t *, int,
245 | int);
246 |
247 | /// Activate displaying OSD
248 | void ActivateOsd(void);
249 | #ifdef USE_VDPAU
250 | /// Get VDPAU DEVICE
251 | extern void *GetVDPAUDevice(void);
252 | /// Get VDPAU GetProcAddress
253 | extern void *GetVDPAUProcAdress(void);
254 | /// Get VDPAU OSD Output Surface
255 | extern void *GetVDPAUOsdOutputSurface(void);
256 | #ifdef USE_GLX
257 | extern void *GetVdpauGlxOsdOutputTexture(unsigned int);
258 | extern int VdpauInitGlx(void);
259 | #endif
260 | #endif
261 | #ifdef USE_CUVID
262 | extern void *GetCuvidOsdOutputTexture(unsigned int);
263 | extern int CuvidInitGlx(void);
264 | extern void *GetNVdecOsdOutputTexture(unsigned int);
265 | extern int NVdecInitGlx(void);
266 | #ifdef USE_EGL
267 | extern void *GetCuvidEglOsdOutputTexture(unsigned int);
268 | extern int CuvidInitEgl(void);
269 | extern void *GetNVdecEglOsdOutputTexture(unsigned int);
270 | extern int NVdecInitEgl(void);
271 | #endif
272 | #endif
273 | #ifdef USE_GLX
274 | extern void *GetCpuGlxOsdOutputTexture(unsigned int);
275 | extern int CpuInitGlx(void);
276 | #endif
277 | #ifdef USE_EGL
278 | extern void *GetCpuEglOsdOutputTexture(unsigned int);
279 | extern int CpuInitEgl(void);
280 | #endif
281 | #ifdef USE_VAAPI
282 | #ifdef USE_GLX
283 | extern void *GetVaapiGlxOsdOutputTexture(unsigned int);
284 | extern int VaapiInitGlx(void);
285 | #endif
286 | #ifdef USE_EGL
287 | extern void *GetVaapiEglOsdOutputTexture(unsigned int);
288 | extern int VaapiInitEgl(void);
289 | #endif
290 | #endif
291 | extern int DisableOglOsd;
292 |
293 | /// Get OSD size.
294 | extern void VideoGetOsdSize(int *, int *);
295 |
296 | /// Set OSD size.
297 | extern void VideoSetOsdSize(int, int);
298 |
299 | /// Set Osd 3D Mode
300 | extern void VideoSetOsd3DMode(int);
301 |
302 |
303 | extern int VideoMaxPixmapSize(void);
304 |
305 | /// Set video clock.
306 | extern void VideoSetClock(VideoHwDecoder *, int64_t);
307 |
308 | /// Get video clock.
309 | extern int64_t VideoGetClock(const VideoHwDecoder *);
310 |
311 | /// Set closing flag.
312 | extern void VideoSetClosing(VideoHwDecoder *);
313 |
314 | /// Reset start of frame counter
315 | extern void VideoResetStart(VideoHwDecoder *);
316 |
317 | /// Set trick play speed.
318 | extern void VideoSetTrickSpeed(VideoHwDecoder *, int);
319 |
320 | /// Grab screen.
321 | extern uint8_t *VideoGrab(int *, int *, int *, int);
322 |
323 | /// Grab screen raw.
324 | extern uint8_t *VideoGrabService(int *, int *, int *);
325 |
326 | /// Get decoder statistics.
327 | extern void VideoGetStats(VideoHwDecoder *, int *, int *, int *, int *, int *);
328 |
329 | /// Get video stream size
330 | extern void VideoGetVideoSize(VideoHwDecoder *, int *, int *, int *, int *);
331 |
332 | extern void VideoOsdInit(void); ///< Setup osd.
333 | extern void VideoOsdExit(void); ///< Cleanup osd.
334 | #ifdef USE_OPENGLOSD
335 | extern int VideoOsdNeedRestart(void);
336 | #endif
337 |
338 | extern void VideoInit(const char *); ///< Setup video module.
339 | extern void VideoExit(void); ///< Cleanup and exit video module.
340 |
341 | /// Poll video input buffers.
342 | extern int VideoPollInput(VideoStream *);
343 |
344 | /// Decode video input buffers.
345 | extern int VideoDecodeInput(VideoStream *);
346 |
347 | /// Get number of input buffers.
348 | extern int VideoGetBuffers(const VideoStream *);
349 |
350 | /// Set DPMS switch
351 | extern void SetDPMS(int);
352 |
353 | /// Set Disable ScreenSaver
354 | extern void SetDisableScreenSaver(int);
355 |
356 | /// Raise the frontend window
357 | extern int VideoRaiseWindow(void);
358 |
359 | /// Shutdown vdr
360 | extern void Shutdown(void);
361 |
362 | /// @}
363 |
--------------------------------------------------------------------------------