decoder

Splitting by a semicolon not surrounded by quote signs

旧城冷巷雨未停 提交于 2019-12-20 05:25:15
问题 Well, hello community. I'm workin' on a CSV decoder in PHP (yeah, I know there's already one, but as a challenge for me, since I'm learning it in my free time). Now the problem: Well, the rows are split up by PHP_EOL . In this line: foreach(explode($sep, $str) as $line) { where sep is the variable which splits up the rows and str the string I wanna decode. But if I wanna split up the columns by a semicolon there might be a situation where a semicolon is content of one column. And as I

How do I decode a DER encoded string in Java?

限于喜欢 提交于 2019-12-17 16:08:02
问题 I'm trying to read a custom extension from a digital certificate. I know the value is a GeneralString encoded in DER. Is there an easy way to correctly decode it and get a Java String? I tried the following, but 's' includes some of the encoding metadata as junk characters at the start of the string. byte[] ext = cert.getExtensionValue("1.2.3.4"); String s= new String(ext); System.out.println(s); Is there a quick and easy way to do this? Or do I really need to use some full fledged ASN.1

H264 with multiple PPS and SPS

孤者浪人 提交于 2019-12-17 15:35:44
问题 I have a card that produces a H264 stream with a SPS (Sequence Parameter Set) and a PPS (Picture Parameter Set), in that order, directly before each I-Frame. I see that most H264 streams contain a PPS and SPS at the first I-Frame. Is this recommended? Do decoders/muxers typically support multiple PPS and SRS? 回答1: H.264 comes in a variety of stream formats. One variation is called "Annex B". (AUD)(SPS)(PPS)(I-Slice)(PPS)(P-Slice)(PPS)(P-Slice) ... (AUD)(SPS)(PPS)(I-Slice). Typically you see

How to convert a FLAC file to WAV file using java?

醉酒当歌 提交于 2019-12-13 07:54:44
问题 I want to convert a given flac file to a wav file. Most of the questions on StackOverflow are the opposite of my question. Have anyone an idea how to solve this problem ? I heard something about JavaFlacEncoder link but I could not find a method to convert flac to wave. 回答1: Use flac -d to (from the man page) Decode (the default behavior is to encode) Another option would be the JustFLAC library, again you need to decode from FLAC. WAV is uncompressed audio. 来源: https://stackoverflow.com

FFMPEG: Explain parameters of any codecs function pointers

假如想象 提交于 2019-12-13 02:48:54
问题 I'm going through the article, How to integrate a codec in FFMPEG multimedia framework. According to it, every codec needs to have 3 basic functions to be defined and these functions are assigned to function pointers of the structure AVCodec . The 3 function pointers specified in the above article are: .init -> takes care of allocations and other initializations .close -> freeing the allocated memory and de-initializations .decode -> frame by frame decoding. For the function pointer .decode ,

Decoding a url-encoded windows-1251 (cp1251) string with JavaScript

你说的曾经没有我的故事 提交于 2019-12-13 00:09:27
问题 I have faced a problem, unfortunately, I have not found a correct solution: I need to decode url-slice that is encoded with windows-1251 (cp1251). I know there are theese methods - decodeURI() and decodeURIComponent() , but they work for UTF-8 only (as I have understood). A solution that I found uses deprecated methods escape() and unescape(). For example, there is sequence: %EF%F0%EE%E3%F0%E0%EC%EC%E8%F0%EE%E2%E0%ED%E8%E5 (программирование) The methods decodeURI() and decodeURIComponent()

Why am I getting decoder errors when turning my JSON array into a Python list using json.loads?

徘徊边缘 提交于 2019-12-12 03:24:33
问题 Below is the error code I received on my Terminal call of "python lastYearArray.py". (I'm on a MacBook Pro running OSX 10.9.5, editing my Python program in jEdit). According to this link: TypeError: expected string or buffer it appears that the function I am using doesn't take lists either. I would just be working with the JSON file instead of converting it, but this particular JSON data has no headers or element tags, such as "fruits: apple, banana, orange"; it only has a long string of

How to get the timestamp of each video frame in iOS while decoding a video.mp4

孤者浪人 提交于 2019-12-11 06:02:01
问题 Scenario: I am writing an iOS app to try decode a videoFile.mp4 . I am using AVAssetReaderTrackOutput with AVAssetReader to decode frames from the video file. This works very well. I get each & every frame from videoFile.mp4 basically using the following logic at the core. Code: AVAssetReader * videoFileReader; AVAssetReaderTrackOutput * assetReaderOutput = [videoFileReader.outputs objectAtIndex:0]; CMSampleBufferRef sampleBuffer = [assetReaderOutput copyNextSampleBuffer]; sampleBuffer is the

JSON Decoder Type Mismatch Error

孤人 提交于 2019-12-11 05:06:27
问题 I want to parse JSON using decodable, but I get an error type mismatch like: Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode Array but found a dictionary instead." My JSON : { "code": 0, "data": { "_id": "string", "title": "string", "images": [ "string" ], "shortDesc": "string", "desc": "string", "price": 0, "discountPrice": 0, "quantity": 0, "category": { "name": "string", "val": "string" }, "brand": { "name": "string", "val": "string" }, "variants": [ {

Iso8583 message encoding and decoding [closed]

纵然是瞬间 提交于 2019-12-09 18:50:21
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . My question is based on ISO8583 Transaction message standard. My problem statement is to develop an app which will decode the ISO8583 message which is provided as a input in HEX format. for ex : my input = 0200B2200000001000000000000000800000201234000000010000011072218012345606A5DFGR021ABCDEFGHIJ 1234567890