I've written a source plugin, and I want to do multi-stream with it, say, I want to create 3 srcpads inside my plugin. However, GstBaseSrcClass defines that there could be only ONE srcpad in the subclass, which is not what I expected. Therefore I decided to overide GstBaseSrc and GstPushSrc. For your information, is it possible to achieve? I would be obliged to take your advice! Thanks!!
Have you checked for example implementation of souphttpsrc? it has one src pad but when decoded you get two streams out of that, I wonder if there is at least one source element which has more than one pad.. I think I never used anything like that..
Even in case of rtspsrc which say in docs you can have multiple src pads (with template stream_%u) its really a Bin comprised of multiple udpsrc or so..
So you can make your plugin a bin exactly as in rtspsrc case and make another class (internal) - say MySingleSrc - which will produce the one src stream.. and you will have multiple instances of the MySingleSrc..
Internaly you can have one data object from which you will duplicate (memcpy) content to the multiple instances of MySingleSrc.
struct _GstRTSPSrcClass {
GstBinClass parent_class;
};
UPDATE - what is the diagram:
The diagram shows the beginnning of the pipeline scheme - each box is an element - the red ones are UDP src's I just wanted to show you that there is no signe src with multiple src pads but rather the rspsrc is a bin which contains multiple signle-padded src elements in it.. and I propose you do the same - you can check the code of the rtspsrc in cgit.
This is about dot graphs and how to generate them - its very helpfull when debugging something: https://developer.ridgerun.com/wiki/index.php/How_to_generate_a_Gstreamer_pipeline_diagram_(graph)
But please take advice also from IRC of GStreamer.. I may be wrong.
HTH
Related
I am trying to add multiple jetty bases to jetty server. Documentation says it is possible without providing the information on how to do it.
So in /etc/default/jetty file with single jetty base is which works is
JETTY_HOME=/opt/jetty
JETTY_BASE=/opt/jetty/my_base
JETTY_USER=jetty
JETTY_HOST=jetty
JETTY_ARGS=jetty.http.port=8989
JETTY_LOGS=/opt/jetty/logs/
i have tried combinations
JETTY_HOME=/opt/jetty
JETTY_BASE=/opt/jetty/my_base
JETTY_BASE=/var/www/domain1
JETTY_BASE=/var/www/domain2
...
i have also tried ',' comma separated does not work
JETTY_HOME=/opt/jetty
JETTY_BASE=/opt/jetty/my_base, /var/www/domain1, /var/www/domain2
....
Has anyone managed to get this working, can you let know how to achieve this. Thanks
Create more /etc/default/<name> entries.
Say you want 3 bases.
Lets call them tau, upsilon, and phi.
You'll create ...
/etc/default/tau
/etc/default/upsilon
/etc/default/phi
each of which is a standalone instance of Jetty, with their own ${jetty.base} directory and a common ${jetty.home} directory.
The jetty.sh you (likely) copied into place for your service entry also needs the same name.
So, cp jetty.sh /path/to/service.d/tau.sh becomes how /etc/default/tau is used/searched for.
(Note: depending on your chosen shell, a symlink will probably work too)
I've a VOD HLS playlist source to use in MediaTailor where I would like to replace 2 segments (segment1.ts, segment2.ts) with creatives returned using a VAST tag.
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-CUE-OUT:0
#EXTINF:4.004000,
segment1.ts
#EXT-X-CUE-IN
#EXT-X-CUE-OUT:0
#EXTINF:4.004000,
segment2.ts
#EXT-X-CUE-IN
#EXTINF:1.835167,
segment3.ts
#EXT-X-ENDLIST
I'm passing pod=[avail.index] as an additional parameter to my VAST tag and have setup 2 files (creative1.mp4 and creative2.mp4) in Ad Server that are targeted to values pod=1 and pod=2 respectively
As expected, creative1.mp4 gets stitched (replaces segment1.ts) without any issues. However, creative2.mp4 never gets stitched at all and instead segment2.ts is always played. What am I doing wrong?
Based upon the parameter you are sending, there is no issue there. It would be recommended to verify that the Ad Server is properly configured so that pod=2 is equal to creative2.mp4. If that configuration is correct, then it is possible that creative2.mp4 may have an issue with transcoding through MediaTailor. To check on transcode issues for creative2.mp4, you will want to open CloudWatch and go into the Log Insights and then search the MediaTailor/TranscodeService log for the creative2.mp4 file.
We have an image which has a predictably-positioned number in the filename. I handle the display of the image in a template based on whether or not the number is within multiple different ranges. If it is in any of those ranges, the image does not (and should not) exist.
Everything works fine, but I find that Special:WantedFiles still includes a listing for the intentionally 'missing' images. The sole link for each 'missing' file is from the page that is using that template. It seems that, even though the page correctly isn't trying to display the image, the wiki still is also interpreting the [[File:foobar]] bit as if the #if test were resolving the other way, creating an unused link to a non-existant file.
The following is a simplified version of the problem part of the template. ImageRangeTest is the range check template; it works fine, returning either a 0 or a 1 depending on if the {{{1}}} number is in any of the matching ranges.
{{#ifeq: {{ImageRangeTest | {{{1}}} }} | 1 | This image does not exist. | [[File:{{{1}}}.png]] }}
So why, when ImageRangeTest returns 1, does "This image does not exist." properly get displayed, but File:{{{1}}}.png still get a hidden link from that same page, causing File:{{{1}}}.png to show up on Special:WantedFiles?
What you want do is not possible currently. It's a 'hidden' link to you, but a normal link to the database. The table storing file inclusions does not differentiate on whether the image exists or not. Special:WantedFiles generates its content by querying that table among others.
Various requests to change this were declined as per back as 2006, such as this and this. Not the request were mostly about general links generated from templates but the underlying problem/issue is the samae as yours.
The only way to stop it from showing in that special page is to delink the name, that's to remove the square brackets, and I doubt if you'd like that.
I want to try django-jqgrid but the steps given as an example in the README.md file are not clear enough. In particular step 4, which reads Configure jgrid to use the defined urls., is too vague.
In what file the javascript code snippet given in the instruction should be put? Is an HTML template needed? More detailed steps would help.
django-jqgrid-demo is a small demo application for django-jqgrid I am writing. The initial goal is to present data from a model in a tabular format, with sorting and filtering. So I defined the model class, the grid class, the viewer functions and the urls by following the steps in the django-jqgrid documentation (except for step 4). What is missing is a template for presenting the data. Any help on how to complete it is welcome.
I use Owasp Anti samy with Ebay policy file to prevent XSS attacks on my website.
I also use Hibernate search to index my objects.
When I use this code:
String html = "special word: été";
// use the Ebay configuration file
Policy policy = Policy.getInstance(xssPolicyFile.getInputStream());
AntiSamy as = new AntiSamy();
CleanResults cr = as.scan(html, policy);
// result is now : "special word: été"
result = cr.getCleanHTML();
As you can see all chars "é" has been transformed to their html entity equivalent "é"
My page is on UTF-8, so I don't need this transformation. Moreover, when I index this text with Hibernate Search, it indexes the word with html entities, so I can't find word "été" on my index.
How can I force antisamy to not transform special chars to their html entity equivalent ?
thanks
PS: an issue has been opened : http://code.google.com/p/owaspantisamy/issues/detail?id=99
I ran into the same problem this morning.
I have encapsulated antisamy in a class and I use apache StringEscapeUtil from apache common-lang to restore special characters.
CleanResults cleanResults = antiSamy.scan(taintedHtml);
cleanedHtml = cleanResults.getCleanHTML();
return StringEscapeUtils.unescapeHtml(cleanedHtml)
The result is a cleaned up HTML without the HTML escaping of special characters.
Hope this helps.
Like Mohamad said it in a comment, Antisamy has just released a new directive named : entityEncodeIntlChars
here is the detail : http://code.google.com/p/owaspantisamy/source/detail?r=240
It seems that this directive solves the problem.
After scouring the AntiSamy source code, I found no way of changing this behavior apart from modifying AntiSamy.
Check out this one: http://code.google.com/p/owaspantisamy/source/browse/#svn/trunk/dotNet/current/source/owaspantisamy/html/scan
Grab the source and notice that key classes (AntiSamyDOMScanner, CleanResults) use standard framework objects (like XmlDocument). Compile and run with the binary you compiled - so that you can see everything in a debugger - as in which of the major classes actually corrupts your data. With that in hand you'll be able to either change a few properties on major objects to make it stop or inject your own post-processing to revert the wrongdoing (say with a regexp). Latter you can expose that as additional top-level property, say one named NoMess :-)
Chances are that behavior in that respect is different between languages (there's 3 in that trunk) but the same tactics will work no matter which one you have to deal with.