Search Results

Search found 758 results on 31 pages for 'decode'.

Page 22/31 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • C++: FFMPEG and SDL resources

    - by advs89
    I'm looking for resources (preferably books, but websites are fine too) for using FFMPEG and/or SDL with C++. Stuff I'd like to be able to do (eventually): Decode and play videos in realtime to a QT widget (the QT part isn't a problem) Overlay text and images on the video (in realtime) Loop video Cross-fade from one video to another (in realtime) Some kind of DVD functionality LIVE sources? (i.e. webcam, stream, etc.) So far I've looked at (and consider helpful) the following resources: FFMPEG and SDL Tutorial by Dranger (extremely helpful) StackOverflow: ffmpeg C API documentation/tutorial (not a duplicate, btw) Sample code bundled with FFMPEG libraries (I'll try and update this list with anything helpful below) Thanks for any help... Also: Operating System is Windows (but maybe one day cross-platform) Also 2: Resources using alternatives are welcome too... i.e. DirectShow, VFW, etc.

    Read the article

  • Convert c++ argument to int

    - by happyCoding25
    Hello, I have a small c++ program that needs to get and argument and convert it to an int. Here is my code so far: #include <iostream> using namespace std; int main(int argc,int argvx[]) { int i=1; int answer = 23; int temp; // decode arguments if(argc < 2) { printf("You must provide at least one argument\n"); exit(0); } // Convert it to an int here }

    Read the article

  • How to use Crypto++ to extract the textual information in a file?

    - by JL
    I have a file that is signed with a certificate located here. CrytoAPI has not worked out for me because of server differences in 2003 / 2008+, and different file inputs. I am now considering using Crypto++ to get the job done. Essentially, all I would like to do is extract the text information from this file, and others like it, and save it as XML. There are some bits in the XML that are marked as < encoded data but those sections are just base64 encoded, so before I can get to the XML envelope, I need to deal with the certificate thats obfuscating the plain text. Anyone with experience in Crypto++ know how this is done? With CrytoAPI, I was doing something like this : byte[] fileContents = File.ReadAllBytes(outFileName); var contentInfo = new ContentInfo(fileContents); var signedCms = new SignedCms(contentInfo); signedCms.Decode(fileContents); signedCms.RemoveSignature(0); byte[] outfileContent = signedCms.ContentInfo.Content;

    Read the article

  • Display streaming video in desktop app.

    - by Roddy
    I have a Windows native desktop app (C++/Delphi), and I'm successfully using Directshow to display live video in it from a 'local' video capture device. The next thing I want to do is display video from a 'remote' capture device, streamed over the LAN. To stream the video, I guess I can use something like Expression Encoder or VLC, but I'm not sure what's the easiest way to receive/decode the streamed video. Inserting an ActiveX VLC or Flash player might be one option (although the licensing may be an issue then), but I was wondering if there's any way to achieve this with Directshow... Application needs to run on XP, and the video decoding should ideally be royalty free. Suggestions, please!

    Read the article

  • Get Python 2.7's 'json' to not throw an exception when it encounters random byte strings

    - by Chris Dutrow
    Trying to encode a a dict object into json using Python 2.7's json (ie: import json). The object has some byte strings in it that are "pickled" data using cPickle, so for json's purposes, they are basically random byte strings. I was using django.utils's simplejson and this worked fine. But I recently switched to Python 2.7 on google app engine and they don't seem to have simplejson available anymore. Now that I am using json, it throws an exception when it encounters bytes that aren't part of UTF-8. The error that I'm getting is: UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0: invalid start byte It would be nice if it printed out a string of the character codes like the debugging might do, ie: \u0002]q\u0000U\u001201. But I really don't much care how it handles this data just as long as it doesn't throw an exception and continues serializing the information that it does recognize. How can I make this happen? Thanks!

    Read the article

  • C++ calculation evaluated to 0

    - by Alexander Stolz
    I'm parsing a file and trying to decode coordinates to the right unit. What happens is that this code is evaluated to 0. If I type it into gdb the result is correct. int pLat = (int)( (argv[6].data() == "plus" ? 1 : -1) * ( atoi(argv[7].data()) + atoi(argv[8].data()) / 60. + atoi(argv[9].data()) / 36000.) * 2.145767 * 0.0001); P.s. If someone knows a better title for this question, please change it

    Read the article

  • URLEncode Error

    - by user2949519
    I have an Android app. Basically what it does is that user can search a car reference no. in EditText for example:- 270/30 and retrieve all the details of the particular car with the same column value in the database. I'm encoding this editext value in Android using URLEncoder and decoding it back in php webservice code. But the decoded value im getting is 027/13 ....instead of 270/30. To make it clear more im here by pasting my java Encoding part EditText SearchField=(EditText)findViewById(R.id.editText1); String SearchValue= SearchField.getText().toString(); Now the encoding code in Asynctask is data +="&" + URLEncoder.encode("data", "UTF-8") + "="+SearchValue; Now the PHP part where i decoded this code $data = urldecode($_POST['data']); Please help me how to encode/decode this given format ... Thanks in Advance

    Read the article

  • Suggest encoding which removes slashes which I can use as the format for REST-style URL-paramteters

    - by Binary255
    Given a path to a REST style URL: http://site.com/rest/customer/foo/robot/bar/1 When you GET it, it returns a PDF to the foo-customer containing page 1 of the bar-URL. While foo is the name of the customer bar is an URL. The URL usually contains slashes and might look something like this: http://anothersite.com/interestingarticle.html As REST URL's separate arguments by slashes I can't just put it into the REST URL above. Which encoding should I use? I can't use Base 64 as it utilizes the slash as well. As a technical note I will encode the URL in a .NET-application and decode it in PHP.

    Read the article

  • Forcing a mixed ISO-8859-1 and UTF-8 multi-line string into UTF-8 in Perl

    - by knorv
    Consider the following problem: A multi-line string $junk contains some lines which are encoded in UTF-8 and some in ISO-8859-1. I don't know a priori which lines are in which encoding, so heuristics will be needed. I want to turn $junk into pure UTF-8 with proper re-encoding of the ISO-8859-1 lines. Also, in the event of errors in the processing I want to provide a "best effort result" rather than throwing an error. My current attempt looks like this: $junk = &force_utf8($junk); sub force_utf8 { my $input = shift; my $output = ''; foreach my $line (split(/\n/, $input)) { if (utf8::valid($line)) { utf8::decode($line); } $output .= "$line\n"; } return $output; } While this appears to work I'm certain this is not the optimal solution. How would you improve the force_utf8(...) sub?

    Read the article

  • How do I turn a PDF email attachment to an image (jpg) in a PHP page?

    - by user351630
    Hi guys. Long time viewer, first time question asker. I'm trying to have my personal website parse through my mail box for attachments from a certain subscription list, and then be able to view the PDF attachments as images, preferably jpg. With the help of this: http://www.linuxscope.net/articles/mailAttachmentsPHP.html I'm currently using imap_base64() to decode the MIME data and create the PDF. However, I hate using PDF readers in general and I thought it would be a lot more streamlined if I could just view it as an image instead. I've heard for convert with ImageMagick, but would I need to actually write the PDF to a directory before using this, or can I convert somehow directly from the MIME data in the email? Thanks in advanced!

    Read the article

  • Is catching NumberFormatException a bad practice?

    - by integeruser
    I have to parse a String that can assume hex values or other non-hex values 0xff, 0x31 or A, PC, label, and so on. I use this code to divide the two cases: String input = readInput(); try { int hex = Integer.decode(input); // use hex ... } catch (NumberFormatException e) { // input is not a hex, continue parsing } Can this code be considered "ugly" or difficult to read? Are there other (maybe more elegant) solutions? EDIT : I want to clarify that (in my case) a wrong input doesn't exist: i just need to distinguish if it is a hex number, or not. And just for completeness, i'm making a simple assebler for DCPU-16.

    Read the article

  • select columns by a conact text as columnname in oracle

    - by glaudiston
    I have a table with columns named with the number of hour of day like this: col00 NUMBER(5) col01 NUMBER(5) col02 NUMBER(5) ... col23 NUMBER(5) ...and I have another query that returns a count by hour. I want to recover the colXX value by hour.... then I can recover with "decode" or "case when..." but I want know if exists any way to recover the column by a text like this: select "col"||hour from table; in the hypothetical above example if hour is 13 then would be translated like: select col13 from table; there is any way to do this ?

    Read the article

  • Replace special characters in python

    - by Marcos Placona
    Hi, I have some text coming from the web as such: £6.49 Obviously I would like this to be displayed as: £6.49 I have tried the following so far: s = url['title'] s = s.encode('utf8') s = s.replace(u'Â','') And a few variants on this (after finding it on this very same forum) But still no luck as I keep getting: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 100: ordinal not in range(128) Could anyone help me getting this right? UPDATE: Adding the reppr examples and content type u'Star Trek XI &#xA3;3.99' u'Oscar Winners Best Pictures Box Set \xc2\xa36.49' Content-Type: text/html; charset=utf-8 Thanks in advance

    Read the article

  • Tie destruction of an object (sealed) to destruction of an unmanaged buffer

    - by testtestSO
    I'll explain my situation first: I'm interested of using the Bitmap constructor that takes scan0, stride and format, because I'm decoding tiled images and I'd like to choose my own stride so I can decode the tiles without caring about the bounds in the decoder part. Anyway, the problem is that the documentation says: The caller is responsible for allocating and freeing the block of memory specified by the scan0 parameter. However, the memory should not be released until the related Bitmap is released. I can't release the buffer easily, because the Bitmap is then passed to another class that will eventually destroy it and I don't have control over it. Is there some way (hacky, I know) to tell the GC to also release my buffer when the Bitmap is destroyed? (Also, any alternative solution is welcome).

    Read the article

  • select columns by a concat text as columnname in oracle

    - by glaudiston
    I have a table with columns named with the number of hour of day like this: col00 NUMBER(5) col01 NUMBER(5) col02 NUMBER(5) ... col23 NUMBER(5) ...and I have another query that returns a count by hour. I want to recover the colXX value by hour.... then I can recover with "decode" or "case when..." but I want know if exists any way to recover the column by a text like this: select "col"||hour from table; in the hypothetical above example if hour is 13 then would be translated like: select col13 from table; there is any way to do this ?

    Read the article

  • UnicodeDecodeError from a GET-parameter in webapp2

    - by Aneon
    I'm getting a UnicodeDecodeError when recieving a GET-parameter from webapp2 that contains unicode characters, and then using it to do a NDB query. I get the same error message when manually running a unicode() on the parameter in the handler, so there either seems to be a problem in webapp2's URL routing or I've missed something. Preferably, all GET-parameters should be converted to unicode before getting passed into the handler so I don't need to do manual conversions in all of my handlers. I actually think it's worked before in an earlier version. The full error message read: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) The GET-parameter contains the following string: göteborg. It looks fine when I raise an Exception on it, but gives me an error when I (or NDB) use unicode() on it. EDIT: In NDB, it fails on the following code: File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\datastore_types.py", line 1562, in PackString pbvalue.set_stringvalue(unicode(value).encode('utf-8')) Thanks.

    Read the article

  • How Can I Determine if HTTP Requests/Responses are compressed in IE7?

    - by DTS
    I'm trying to use Fiddler (v2.2.2.0) to see if HTTP traffic through IE7 is being compressed. I'm not seeing Accept-Encoding or Content-Encoding request/response headers being sent/returned and I do not need to decode the response data once it's arrived, which leads me to believe that the responses are NOT coming back compressed. However, when making the same requests using FireFox 3.5.7, I could see through FireBug that FF was sending Accept-Encoding and YSlow at least thought my data was coming back compressed. A comment in this question: http://stackoverflow.com/questions/897989/using-fiddler-to-check-iis-compression suggested that a proxy server may be to blame for stripping out headers and decompressing the content for security reasons. I am using Verizon FIOS for my broadband at home and am now wondering if Verizon is proxying my HTTP traffic? In short, how can I positively confirm/deny that responses are coming back compressed through IE? Thanks.

    Read the article

  • URL decoding Japanese characters etc. in Java

    - by DanieL
    I have a servlet that receives some POST data. Because this data is x-www-form-urlencoded, a string such as ???? would be encoded to &#12469;&#12508;&#12486;&#12531;. How would I unencode this string back to the correct characters? I have tried using URLDecoder.decode("encoded string", "UTF-8"); but it doesn't make a difference. The reason I would like to unencode them, is because, before I display this data on a webpage, I escape & to &amp; and at the moment, it is escaping the &s in the encoded string so the characters are not showing up properly.

    Read the article

  • Trying to send XML via EMail and the XML includes a byte[]

    - by barbary
    Hello All, I want to send an email that has a machine readable part you cut and paste into an asp.net page and you get the information. I have stored all the information in an object and then used an XMLSerizer to create some xml. It all worked fine until I added some Images as byte[] to the object. If I dump the resulting string to disk then I can recreate the object fine but after it appears in the email client and I try to cut and paste it it never works. Clearly there are non standard characters coming out that email clients don't like. Is there some encoding I could apply to my XML that would make it display correctly in an email client? Then I could cut, paste, decode and deserilize to get my object back. Please an example of how to encode the string in c# would be great.

    Read the article

  • How to encode content to send them via jquery to a php file?

    - by phpheini
    I am trying to send a form to a php file via jquery. The problem is, that the content, which has to be sent to the php file, contains slashes (/) since there is bb code inside. So I tried the following: $.ajax( { type: "POST", url: "create.php", data: "content=" + encodeURIComponent(content), cache: false, success: function(message) { $("#somediv").html(message); } }); In the php file I use rawurldecode to decode the content and get my bb codes back which I can then transform into html. The problem is as soon as I put the encodeURIComponent() it will ouput: [object HTMLTextAreaElement] What does that mean, where is my mistake? Thanks for your help! phpheini

    Read the article

  • Error reading file with accented vowels

    - by Daniel Dcs
    The following statement to fill a list from a file : action = [] with open (os.getcwd() + "/files/" + "actions.txt") as temp:          action = list (temp) gives me the following error: (result, consumed) = self._buffer_decode (data, self.errors, end) UnicodeDecodeError: 'utf-8' codec can not decode byte 0xf1 in position 67: invalid continuation byte if I add errors = 'ignore': action = [] with open (os.getcwd () + "/ files /" + "actions.txt", errors = 'ignore') as temp:          action = list (temp) Is read the file but not the ñ and vowels accented á-é-í-ó-ú being that python 3 works, as I have understood, default to 'utf-8' I'm looking for a solution for two or more days, and I'm getting more confused. In advance thank you very much for any suggestions.

    Read the article

  • VLC (Server) re-stream Security Camera Feed

    - by Aaron
    I purchased a Swann Home Security DVR system and was hoping for some help on how to duplicate the streaming video on my server. In order to get their web view (streaming video in the browser) to work, I had to install the following plugins: HiDvrPlugin.dmg for mac. Hidvrocx.cab for Windows. I was originally thinking it was a sign of some form of DRM? Maybe. Maybe not. HTML wise, the following code is in the source of the safari version of the web view: <embed pluginspage="SurveilClient.dmg" width="10px" height="10px" type="application/x-scplugin" id="MacDiv" style="height: 592px; width: 720px; left: 278px; top: 61px; "> It seems to be the main display area. Using wireshark, I am able to see that the video stream is on port 9000. However, I have no idea what type of stream it is. I've tried opening it in VLC with no such luck. http://dvr_ip:9000 tcp://dvr_ip:9000 My hope was to do the following to redistribute the feed vlc dvr_ip:9000 --sout h264-version-on-localhost:3000 TLDR; Trying to re-distribute a stream from a security camera (can't tell the format) using vlc (re-distribute via h.264 / HTML5). Not sure how to accomplish this. Is it possible that the software has some type of DRM that only the plugins can decode?

    Read the article

  • On a dual-GPU laptop, is using the discrete GPU ever more power efficient?

    - by Mahmoud Al-Qudsi
    Given a laptop with a dual integrated/discrete GPU configuration, is it ever more power efficient to use the discrete GPU instead of the integrated? Obviously when writing an email or working on a spreadsheet, the integrated GPU will always use less power. But let's say you're doing something graphics-medium but not graphics-intensive/heavy - is there a point where it actually makes sense to fire up the discrete GPU, not for performance but for power-saving reasons? Off the top of my head, I can think of a scenario where the external GPU supports hardware decoding of a particular video codec - I'd imagine there is a "price point" where using the GPU saves more energy than decoding that fully in software would. But I think most GPUs, integrated or discrete, pretty much decode just the plain-Jane h264. But maybe there is something more complicated, perhaps if you're doing something like desktop/windowing animations or a flash animation on a website (not an embedded flash video) - maybe the discrete GPU will use enough less power to make up for switching to it? I guess this question can be summed up as to whether or not you can say beyond doubt that if you don't care for performance on a laptop with two GPUs, always use the integrated GPU for maximum battery life.

    Read the article

  • KVM Guest with NAT + Bridged networking

    - by Daniel
    I currently have a few KVM Guests on a dedicated server with bridged networking (this works) and i can successfully ping the outside ips i assign via ifconfig (in the guest). However, due to the fact i only have 5 public ipv4 ip addresses, i would like to port forward services like so: hostip:port - kvm_guest:port UPDATE I found out KVM comes with a "default" NAT interface, so added the virtual NIC to the Guest virsh configuration then configured it in the Guest, it has the ip address: 192.168.122.112 I can successfully ping 192.168.122.112 and access all ports on 192.168.122.112 from the KVM Host, so i tried to port forward like so: iptables -t nat -I PREROUTING -p tcp --dport 5222 -j DNAT --to-destination 192.168.122.112:2521 iptables -I FORWARD -m state -d 192.168.122.0/24 --state NEW,RELATED,ESTABLISHED -j ACCEPT telnet KVM_HOST_IP 5222 just hangs on "trying" telnet 192.168.122.112 2521 works [root@node1 ~]# tcpdump port 5222 tcpdump: WARNING: eth0: no IPv4 address assigned tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes 23:43:47.216181 IP 1.152.245.247.51183 > null.xmpp-client: Flags [S], seq 1183303931, win 65535, options [mss 1400,nop,wscale 3,nop,nop,TS val 445777813 ecr 0,sackOK,eol], length 0 23:43:48.315747 IP 1.152.245.247.51183 > null.xmpp-client: Flags [S], seq 1183303931, win 65535, options [mss 1400,nop,wscale 3,nop,nop,TS val 445778912 ecr 0,sackOK,eol], length 0 23:43:49.415606 IP 1.152.245.247.51183 > null.xmpp-client: Flags [S], seq 1183303931, win 65535, options [mss 1400,nop,wscale 3,nop,nop,TS val 445780010 ecr 0,sackOK,eol], length 0 7 packets received by filter 0 packets dropped by kernel [root@node1 ~]# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere 192.168.122.0/24 state NEW,RELATED,ESTABLISHED Chain OUTPUT (policy ACCEPT) target prot opt source destination All help is appreciated. Thanks.

    Read the article

  • How install ImageMagic 6.6.2 on Ubuntu 10.04 (lucid)

    - by Svyatoslavik
    How install ImageMagic 6.6.2 on Ubuntu 10.04 (lucid) Problem that lucid have old ImageMagic version(6.5.2) Its very important because me need work with SVG grafics, In my local pc I have ubuntu 11.04 and ImageMagic 6.6.2 and all work fine, In server I have 6.5... and I have problem. Reinstall ubuntu to 11.* this is no solution. I tried change /etc/apt/source.list from ubuntu 10.04 (lucid) to list from ubuntu 11.04 (natty) and update ImageMagic. After this action I have ImageMagic 6.6.2 (I looked phpinfo()) but ImageMagick is not work now. If I try do any action I get error: [error] 8996#0: *19983 FastCGI sent in stderr: "PHP Fatal error: Uncaught exception 'ImagickException' with message 'no decode delegate for this image format `/tmp/magick-XXnYKWKC' @ error/constitute.c/ReadImage/532' How it fix? Or how return to old version imagemagick? Problem if I try install from sources: /tmp/image/ImageMagick-6.7.2-7# ./configure configuring ImageMagick 6.7.2-7 checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking whether build environment is sane... yes checking for a BSD-compatible install... /usr/bin/install -c checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/tmp/image/ImageMagick-6.7.2-7': configure: error: C compiler cannot create executables See `config.log' for more details /tmp/image/ImageMagick-6.7.2-7#

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >