Skip to content

Instantly share code, notes, and snippets.

View FlyingJester's full-sized avatar

Martin McDonough FlyingJester

View GitHub Profile
@FlyingJester
FlyingJester / decodertraits.log
Created June 13, 2014 21:30
Call Trace for DecoderTraits.cpp
Connecting to youtube.com/HTML5:
adb| ANDROID_INFO: /Users/mozilla/ff/gd2/gecko-dev/content/media/DecoderTraits.cpp static mozilla::CanPlayStatus mozilla::DecoderTraits::CanHandleMediaType(const char*, bool, const nsAString_internal&)
adb| ANDROID_INFO: /Users/mozilla/ff/gd2/gecko-dev/content/media/DecoderTraits.cpp bool mozilla::CodecListContains(const char* const*, const String&) [with String = nsACString_internal]
adb| ANDROID_INFO: /Users/mozilla/ff/gd2/gecko-dev/content/media/DecoderTraits.cpp bool mozilla::CodecListContains(const char* const*, const String&) [with String = nsACString_internal]
adb| ANDROID_INFO: /Users/mozilla/ff/gd2/gecko-dev/content/media/DecoderTraits.cpp bool mozilla::CodecListContains(const char* const*, const String&) [with String = nsACString_internal]
adb| ANDROID_INFO: /Users/mozilla/ff/gd2/gecko-dev/content/media/DecoderTraits.cpp bool mozilla::CodecListContains(const char* const*, const String&) [with String = nsACString_internal]
adb| handleMessage: Tab:ViewportMetadata
adb
#include "drawingOperation.hpp"
#include "initGL.h"
#include <atomic>
#include <OpenGL/gl3.h>
#include "concurrent_queue.hpp"
#include <stdio.h>
#define F(x) ((float)x)
@FlyingJester
FlyingJester / RefPexample.cpp
Created June 17, 2014 23:41
Example of using a reference to a pointer.
#include <cstdio>
using namespace std;
typedef int *ip_t;
/////
// A class that holds a reference to a pointer.
class PointerHolder {
ip_t &m;
{
class MediaCodecData : public MediaData {
mcdecode::Decoder *mDecoder;
int mBuffer;
MediaData::Type mType;
public:
MediaCodecData(MediaData::Type aType,int64_t aOffset,int64_t aTimestamp,
warning: Could not load shared library symbols for libstagefright_soft_aacdec.so.
Do you need "set solib-search-path" or "set sysroot"?
adb| Media Codec: For future reference, the Input buffer is 0x1da00005 and the Output buffer is 0x1d800009.
adb| Media Codec: Taking input for media of type audio/mp4a-latm.
adb| Media Codec: Run is starting!
adb| Media Codec: DequeueInputBuffer has completed.
adb| Media Codec: Asking for JNI environment.
adb| Media Codec: Got JNI environment.
adb| Media Codec: Inside the input loader, the Input buffer is 0x1d500001 and the Output buffer is 0x1d500005.
adb| Media Codec: The input buffer array is 4 buffers long.
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AndroidDecoderModule.h"
#include "AndroidDecoderUtils.h"
#include "PlatformDecoderModule.h"
#include "GeneratedJNIWrappers_2.h"
#include "AndroidBridge.h"
#include "MediaTaskQueue.h"
#include <stdlib.h>
struct LOL {
int a;
};
LOL *LOLa = new LOL();
LOLa->a = 1; // Error: Cannot use arrow operator on a type; Error: Unknown typename LOLa
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
#include <stdio.h>
using namespace std;
using namespace cv;
const unsigned gWidth = 3;
const unsigned gHeight = 3;
for(unsigned y = 0; y<gHeight; y++){
for(unsigned x = 0; x<gWidth; x++){
// Stuff in here is done once for each x.
// But, it's done gHeight number of times, since this loop is performed inside
// the outer loop!
// So, stuff in here is done gHeight*gWidth times. x and y look like this:
/*
Use: Bits: Starts At: Ends At: Mask:
syncword 12 0 12 0xFF F0 00 00 00 00 00
MpegVersion 1 12 13 0x00 08 00 00 00 00 00
reserved 3 13 16 0x00 07 00 00 00 00 00
profile 2 16 18 0x00 00 C0 00 00 00 00
Freq. 4 18 22 0x00 00 3C 00 00 00 00
reserved 1 22 23 0x00 00 02 00 00 00 00
Channels 3 23 26 0x00 00 01 C0 00 00 00