-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
advice on fixing https://gitlab.com/Mis012/flashplayer-standalone to make it work with freshplayer #387
Comments
hmm, it seems I'm able to change the rendered "bgcolor"... |
probably an issue with |
Ok, got it to work to a point where the last needed hack is this: diff --git a/src/ppb_url_loader.c b/src/ppb_url_loader.c
index 9690d83..8f930f9 100644
--- a/src/ppb_url_loader.c
+++ b/src/ppb_url_loader.c
@@ -241,10 +241,12 @@ open_temporary_file(void)
{
char *tmpfname;
// TODO: make temp path configurable
- tmpfname = g_strdup_printf("/tmp/FreshStreamXXXXXX");
- int fd = mkstemp(tmpfname);
- unlink(tmpfname);
- g_free(tmpfname);
+// tmpfname = g_strdup_printf("/tmp/FreshStreamXXXXXX");
+// int fd = mkstemp(tmpfname);
+
+ int fd = open("/path/to/actual/file.swf", O_RDONLY);
+// unlink(tmpfname);
+// g_free(tmpfname);
return fd;
}
but as I understand it, freshplayer should try to capture the first unrequested stream and use that in order to behave just like NPAPI flash? |
Yes, as far as I remember. When NPAPI Flash instance is created, browser itself initiates a flash movie download. So the first stream plugin gets is the |
ok, I have figured out the issue there is a race condition, if the NPAPI "browser" doesn't stream the file fast enough (ideally in one call to Write), it seems either freshplayer or flash will give up |
if I stream the file in one go like this: FILE *pp;
char buffer[1977354];
pp = fopen(filename,"rb");
int len;
while((len=fread(buffer, 1, sizeof(buffer), pp)) != 0) {
pluginFuncs.writeready(instance, stream);
pluginFuncs.write(instance, stream, 0, len, buffer);
}
fclose(pp); where 1977354 is the file size, everything works with zero modifications to freshplayer |
Speaking of file sizes. |
no difference unfortunately :( |
Try this patch: diff --git a/player.c b/player.c
old mode 100755
new mode 100644
index 4925ec0..8690aa4
--- a/player.c
+++ b/player.c
@@ -226,7 +226,7 @@ switch (variable) {
*((int*)ret_value)= NPNVGtk2;
break;
case NPNVnetscapeWindow:
- *((int*)ret_value)= PR_TRUE;
+ *((int*)ret_value)= None;
break;
default:
*((int*)ret_value)=PR_FALSE;
@@ -360,9 +360,9 @@ static NPWindow * npwindow_construct (GtkWidget *widget) {
static NPStream * npstream_construct() {
NPStream *stream = (NPStream *) malloc(sizeof(NPStream));
- stream->url=strdup(URL);
+ stream->url=strdup("http://127.0.0.1/movie.swf");
stream->ndata = 0;
- stream->end = 99782;
+ stream->end = 0;
stream->lastmodified= 1201822722;
stream->notifyData = 0x00000000;
stream->headers = NULL;
@@ -908,9 +908,11 @@ int main(int argc, char **argv)
char buffer[8192];
pp = fopen(argv[1],"rb");
int len;
+ int offset = 0;
while((len=fread(buffer, 1, sizeof(buffer), pp)) != 0) {
pluginFuncs.writeready(instance, stream);
- pluginFuncs.write(instance, stream, 0, len, buffer);
+ pluginFuncs.write(instance, stream, offset, len, buffer);
+ offset += len;
}
fclose(pp);
The only essential part are:
|
Hi,
I have found https://github.com/idaunis/simple-linux-flash-embed and to my surprise, it works perfectly - but only with the native NPAPI flash plugin :(
I however plan to use this on armhf, so pepperflash is the only option
I have fixed the straight up crash, but now I am getting an all-white screen with working right-click menu that says "Movie not loaded".
Notably, I wasn't able to get the placeholder image to show up either (though looking at the code I don't see how it would do that).
Is there any chance that you might be able to help?
The text was updated successfully, but these errors were encountered: