No JNI_OnLoad found in /data/app-lib/ + Fatal signal 11 (SIGSEGV) at 0x2d000005 (code=1)












0















i'm struggling since a month to add buils mpegts isomedia compliant audio file on android without succees . i took this library in c++ on github and adapted the main method to use it with java via shared lib.



extern "C" JNIEXPORT jint JNICALL Java_com_isomedia_cmd_mpegtscmd_executecopy(JNIEnv *env, jclass cls, std::string *in_file, std::string *out_file )


{



const char* in_file_name = in_file->c_str();
const char* out_file_name = out_file->c_str();

std::cout << "input ts: " << in_file_name << std::endl;
std::cout << "output ts: " << out_file_name << std::endl;

std::ifstream ifile(in_file_name, std::ios::binary | std::ios::in); // declare un flux permettant de lire dans input file
std::ofstream outts(out_file_name, std::ios::binary); // declare un flux pour ecrire dans output file

std::tr1::shared_ptr<MpegTsMuxer> muxer(new MpegTsMuxer);

MpegTsDemuxer demuxer;
char packet[188] = { 0 };

SimpleBuffer in;
SimpleBuffer out;

while (!ifile.eof()) {
ifile.read(packet, 188);
in.append(packet, 188);

TsFrame *frame = 0; //nullptr; You can only use nullptr in Visual Studio 2010 and newer, it is a C++11 feature.
demuxer.decode(&in, frame);

write_file(frame);
if (frame) {
muxer->encode(frame, demuxer.stream_pid_map, &out);
outts.write(out.data(), out.size());
out.erase(out.size());
}
}

ifile.close();
for (auto it = file_map.begin(); it != file_map.end(); it++) {
it->second->close();
}

return 0;


}



after load library in java i call the method like this



mpegtscmd.executecopy(f_in.getAbsolutePath(),f_out.getAbsolutePath());


the both files is created in the same directory but no data fill the program crash with error



No JNI_OnLoad found in /data/app-lib/ +  Fatal signal 11 (SIGSEGV) at 0x2d000005 (code=1)


what i try to do is to read AAC_ADTS_data in the f_in file to add TS packet and put in f_out . i precise that when i record f_in solely data are writting in f_in without problem. thanks for any expected support.










share|improve this question























  • So, have you tried implementing JNI_OnLoad?

    – Michael
    Nov 15 '18 at 12:49











  • thakns @Michael you have put me on the right way to solve this issue i realise that there are another methode to link native to java soi will try stuff base on this two link cnblogs.com/keis/archive/2011/04/12/2013174.html and christina404.com/2018/03/04/Android-JNI gracias senior

    – Sandy
    Nov 16 '18 at 2:32
















0















i'm struggling since a month to add buils mpegts isomedia compliant audio file on android without succees . i took this library in c++ on github and adapted the main method to use it with java via shared lib.



extern "C" JNIEXPORT jint JNICALL Java_com_isomedia_cmd_mpegtscmd_executecopy(JNIEnv *env, jclass cls, std::string *in_file, std::string *out_file )


{



const char* in_file_name = in_file->c_str();
const char* out_file_name = out_file->c_str();

std::cout << "input ts: " << in_file_name << std::endl;
std::cout << "output ts: " << out_file_name << std::endl;

std::ifstream ifile(in_file_name, std::ios::binary | std::ios::in); // declare un flux permettant de lire dans input file
std::ofstream outts(out_file_name, std::ios::binary); // declare un flux pour ecrire dans output file

std::tr1::shared_ptr<MpegTsMuxer> muxer(new MpegTsMuxer);

MpegTsDemuxer demuxer;
char packet[188] = { 0 };

SimpleBuffer in;
SimpleBuffer out;

while (!ifile.eof()) {
ifile.read(packet, 188);
in.append(packet, 188);

TsFrame *frame = 0; //nullptr; You can only use nullptr in Visual Studio 2010 and newer, it is a C++11 feature.
demuxer.decode(&in, frame);

write_file(frame);
if (frame) {
muxer->encode(frame, demuxer.stream_pid_map, &out);
outts.write(out.data(), out.size());
out.erase(out.size());
}
}

ifile.close();
for (auto it = file_map.begin(); it != file_map.end(); it++) {
it->second->close();
}

return 0;


}



after load library in java i call the method like this



mpegtscmd.executecopy(f_in.getAbsolutePath(),f_out.getAbsolutePath());


the both files is created in the same directory but no data fill the program crash with error



No JNI_OnLoad found in /data/app-lib/ +  Fatal signal 11 (SIGSEGV) at 0x2d000005 (code=1)


what i try to do is to read AAC_ADTS_data in the f_in file to add TS packet and put in f_out . i precise that when i record f_in solely data are writting in f_in without problem. thanks for any expected support.










share|improve this question























  • So, have you tried implementing JNI_OnLoad?

    – Michael
    Nov 15 '18 at 12:49











  • thakns @Michael you have put me on the right way to solve this issue i realise that there are another methode to link native to java soi will try stuff base on this two link cnblogs.com/keis/archive/2011/04/12/2013174.html and christina404.com/2018/03/04/Android-JNI gracias senior

    – Sandy
    Nov 16 '18 at 2:32














0












0








0








i'm struggling since a month to add buils mpegts isomedia compliant audio file on android without succees . i took this library in c++ on github and adapted the main method to use it with java via shared lib.



extern "C" JNIEXPORT jint JNICALL Java_com_isomedia_cmd_mpegtscmd_executecopy(JNIEnv *env, jclass cls, std::string *in_file, std::string *out_file )


{



const char* in_file_name = in_file->c_str();
const char* out_file_name = out_file->c_str();

std::cout << "input ts: " << in_file_name << std::endl;
std::cout << "output ts: " << out_file_name << std::endl;

std::ifstream ifile(in_file_name, std::ios::binary | std::ios::in); // declare un flux permettant de lire dans input file
std::ofstream outts(out_file_name, std::ios::binary); // declare un flux pour ecrire dans output file

std::tr1::shared_ptr<MpegTsMuxer> muxer(new MpegTsMuxer);

MpegTsDemuxer demuxer;
char packet[188] = { 0 };

SimpleBuffer in;
SimpleBuffer out;

while (!ifile.eof()) {
ifile.read(packet, 188);
in.append(packet, 188);

TsFrame *frame = 0; //nullptr; You can only use nullptr in Visual Studio 2010 and newer, it is a C++11 feature.
demuxer.decode(&in, frame);

write_file(frame);
if (frame) {
muxer->encode(frame, demuxer.stream_pid_map, &out);
outts.write(out.data(), out.size());
out.erase(out.size());
}
}

ifile.close();
for (auto it = file_map.begin(); it != file_map.end(); it++) {
it->second->close();
}

return 0;


}



after load library in java i call the method like this



mpegtscmd.executecopy(f_in.getAbsolutePath(),f_out.getAbsolutePath());


the both files is created in the same directory but no data fill the program crash with error



No JNI_OnLoad found in /data/app-lib/ +  Fatal signal 11 (SIGSEGV) at 0x2d000005 (code=1)


what i try to do is to read AAC_ADTS_data in the f_in file to add TS packet and put in f_out . i precise that when i record f_in solely data are writting in f_in without problem. thanks for any expected support.










share|improve this question














i'm struggling since a month to add buils mpegts isomedia compliant audio file on android without succees . i took this library in c++ on github and adapted the main method to use it with java via shared lib.



extern "C" JNIEXPORT jint JNICALL Java_com_isomedia_cmd_mpegtscmd_executecopy(JNIEnv *env, jclass cls, std::string *in_file, std::string *out_file )


{



const char* in_file_name = in_file->c_str();
const char* out_file_name = out_file->c_str();

std::cout << "input ts: " << in_file_name << std::endl;
std::cout << "output ts: " << out_file_name << std::endl;

std::ifstream ifile(in_file_name, std::ios::binary | std::ios::in); // declare un flux permettant de lire dans input file
std::ofstream outts(out_file_name, std::ios::binary); // declare un flux pour ecrire dans output file

std::tr1::shared_ptr<MpegTsMuxer> muxer(new MpegTsMuxer);

MpegTsDemuxer demuxer;
char packet[188] = { 0 };

SimpleBuffer in;
SimpleBuffer out;

while (!ifile.eof()) {
ifile.read(packet, 188);
in.append(packet, 188);

TsFrame *frame = 0; //nullptr; You can only use nullptr in Visual Studio 2010 and newer, it is a C++11 feature.
demuxer.decode(&in, frame);

write_file(frame);
if (frame) {
muxer->encode(frame, demuxer.stream_pid_map, &out);
outts.write(out.data(), out.size());
out.erase(out.size());
}
}

ifile.close();
for (auto it = file_map.begin(); it != file_map.end(); it++) {
it->second->close();
}

return 0;


}



after load library in java i call the method like this



mpegtscmd.executecopy(f_in.getAbsolutePath(),f_out.getAbsolutePath());


the both files is created in the same directory but no data fill the program crash with error



No JNI_OnLoad found in /data/app-lib/ +  Fatal signal 11 (SIGSEGV) at 0x2d000005 (code=1)


what i try to do is to read AAC_ADTS_data in the f_in file to add TS packet and put in f_out . i precise that when i record f_in solely data are writting in f_in without problem. thanks for any expected support.







android streaming live






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '18 at 12:14









Sandy Sandy

13




13













  • So, have you tried implementing JNI_OnLoad?

    – Michael
    Nov 15 '18 at 12:49











  • thakns @Michael you have put me on the right way to solve this issue i realise that there are another methode to link native to java soi will try stuff base on this two link cnblogs.com/keis/archive/2011/04/12/2013174.html and christina404.com/2018/03/04/Android-JNI gracias senior

    – Sandy
    Nov 16 '18 at 2:32



















  • So, have you tried implementing JNI_OnLoad?

    – Michael
    Nov 15 '18 at 12:49











  • thakns @Michael you have put me on the right way to solve this issue i realise that there are another methode to link native to java soi will try stuff base on this two link cnblogs.com/keis/archive/2011/04/12/2013174.html and christina404.com/2018/03/04/Android-JNI gracias senior

    – Sandy
    Nov 16 '18 at 2:32

















So, have you tried implementing JNI_OnLoad?

– Michael
Nov 15 '18 at 12:49





So, have you tried implementing JNI_OnLoad?

– Michael
Nov 15 '18 at 12:49













thakns @Michael you have put me on the right way to solve this issue i realise that there are another methode to link native to java soi will try stuff base on this two link cnblogs.com/keis/archive/2011/04/12/2013174.html and christina404.com/2018/03/04/Android-JNI gracias senior

– Sandy
Nov 16 '18 at 2:32





thakns @Michael you have put me on the right way to solve this issue i realise that there are another methode to link native to java soi will try stuff base on this two link cnblogs.com/keis/archive/2011/04/12/2013174.html and christina404.com/2018/03/04/Android-JNI gracias senior

– Sandy
Nov 16 '18 at 2:32












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53319281%2fno-jni-onload-found-in-data-app-lib-fatal-signal-11-sigsegv-at-0x2d000005%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53319281%2fno-jni-onload-found-in-data-app-lib-fatal-signal-11-sigsegv-at-0x2d000005%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Guess what letter conforming each word

Port of Spain

Run scheduled task as local user group (not BUILTIN)