mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-19 06:28:06 +00:00
Added #1893 Experimental playback of DefineVideoStream tags with VLC player
This commit is contained in:
@@ -132,6 +132,7 @@ import com.jpexs.decompiler.flash.tags.DefineButtonTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineShape2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineSoundTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineSpriteTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineVideoStreamTag;
|
||||
import com.jpexs.decompiler.flash.tags.DoActionTag;
|
||||
import com.jpexs.decompiler.flash.tags.DoInitActionTag;
|
||||
import com.jpexs.decompiler.flash.tags.EndTag;
|
||||
@@ -4608,6 +4609,9 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
return;
|
||||
}
|
||||
boolean internalViewer = !isAdobeFlashPlayerEnabled();
|
||||
|
||||
boolean isVideoButNotDrawable = (treeItem instanceof DefineVideoStreamTag) && (!Configuration.vlcPlayerLocation.hasValue() || !new File(Configuration.vlcPlayerLocation.get()).exists());
|
||||
|
||||
if (treeItem instanceof SWF) {
|
||||
SWF swf = (SWF) treeItem;
|
||||
if (internalViewer) {
|
||||
@@ -4640,7 +4644,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
SWF imageSWF = makeTimelinedImage(imageTag);
|
||||
previewPanel.showImagePanel(imageSWF, imageSWF, 0, false, true, true, true);
|
||||
|
||||
} else if ((treeItem instanceof DrawableTag) && (!(treeItem instanceof TextTag)) && (!(treeItem instanceof FontTag)) && internalViewer) {
|
||||
} else if (!isVideoButNotDrawable && (treeItem instanceof DrawableTag) && (!(treeItem instanceof TextTag)) && (!(treeItem instanceof FontTag)) && internalViewer) {
|
||||
final Tag tag = (Tag) treeItem;
|
||||
DrawableTag d = (DrawableTag) tag;
|
||||
Timelined timelined;
|
||||
|
||||
@@ -623,3 +623,8 @@ config.description.flattenASPackages = Make one item per package instead of pack
|
||||
|
||||
config.name.gui.scale = UI scale factor
|
||||
config.description.gui.scale = Scaling factor of graphics interface. Set this to 2.0 on Mac retina displays. Application true exit (not just restart after asking) is required.
|
||||
|
||||
|
||||
config.name.vlcPlayerLocation = 7) VLC Player directory location
|
||||
config.description.vlcPlayerLocation = VLC player directory location. It is used for video tags playback.
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ public abstract class Advapi32Util {
|
||||
ArrayList<String> result = new ArrayList<>();
|
||||
int offset = 0;
|
||||
while (offset < data.size()) {
|
||||
String s = data.getString(offset, true);
|
||||
String s = data.getString(offset); //FIXME, true);
|
||||
offset += s.length() * Native.WCHAR_SIZE;
|
||||
offset += Native.WCHAR_SIZE;
|
||||
result.add(s);
|
||||
@@ -533,7 +533,7 @@ public abstract class Advapi32Util {
|
||||
int offset = 0;
|
||||
Memory data = new Memory(size);
|
||||
for (String s : arr) {
|
||||
data.setString(offset, s, true);
|
||||
data.setString(offset, s);//FIXME, true);
|
||||
offset += s.length() * Native.WCHAR_SIZE;
|
||||
offset += Native.WCHAR_SIZE;
|
||||
}
|
||||
@@ -771,7 +771,7 @@ public abstract class Advapi32Util {
|
||||
}
|
||||
case WinNT.REG_SZ:
|
||||
case WinNT.REG_EXPAND_SZ: {
|
||||
keyValues.put(nameString, byteData.getString(0, true));
|
||||
keyValues.put(nameString, byteData.getString(0)); //FIXME, true);
|
||||
break;
|
||||
}
|
||||
case WinNT.REG_BINARY: {
|
||||
@@ -784,7 +784,7 @@ public abstract class Advapi32Util {
|
||||
ArrayList<String> result = new ArrayList<>();
|
||||
int offset = 0;
|
||||
while (offset < stringData.size()) {
|
||||
String s = stringData.getString(offset, true);
|
||||
String s = stringData.getString(offset); //FIXME, true);
|
||||
offset += s.length() * Native.WCHAR_SIZE;
|
||||
offset += Native.WCHAR_SIZE;
|
||||
result.add(s);
|
||||
@@ -965,7 +965,7 @@ public abstract class Advapi32Util {
|
||||
|
||||
public EventLogRecord(Pointer pevlr) {
|
||||
_record = new EVENTLOGRECORD(pevlr);
|
||||
_source = pevlr.getString(_record.size(), true);
|
||||
_source = pevlr.getString(_record.size()); //, true); FIXME
|
||||
// data
|
||||
if (_record.DataLength.intValue() > 0) {
|
||||
_data = pevlr.getByteArray(_record.DataOffset.intValue(),
|
||||
@@ -977,7 +977,7 @@ public abstract class Advapi32Util {
|
||||
int count = _record.NumStrings.intValue();
|
||||
long offset = _record.StringOffset.intValue();
|
||||
while (count > 0) {
|
||||
String s = pevlr.getString(offset, true);
|
||||
String s = pevlr.getString(offset); //FIXME, true);
|
||||
strings.add(s);
|
||||
offset += s.length() * Native.WCHAR_SIZE;
|
||||
offset += Native.WCHAR_SIZE;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.sun.jna.platform.win32;
|
||||
|
||||
import com.sun.jna.IntegerType;
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.ptr.ByReference;
|
||||
import com.sun.jna.win32.StdCallLibrary;
|
||||
@@ -40,7 +41,7 @@ public interface BaseTSD extends StdCallLibrary {
|
||||
}
|
||||
|
||||
public LONG_PTR(long value) {
|
||||
super(Pointer.SIZE, value);
|
||||
super(Native.POINTER_SIZE, value);
|
||||
}
|
||||
|
||||
public Pointer toPointer() {
|
||||
@@ -72,7 +73,7 @@ public interface BaseTSD extends StdCallLibrary {
|
||||
}
|
||||
|
||||
public ULONG_PTR(long value) {
|
||||
super(Pointer.SIZE, value, true);
|
||||
super(Native.POINTER_SIZE, value, true);
|
||||
}
|
||||
|
||||
public Pointer toPointer() {
|
||||
@@ -90,12 +91,12 @@ public interface BaseTSD extends StdCallLibrary {
|
||||
}
|
||||
|
||||
public ULONG_PTRByReference(ULONG_PTR value) {
|
||||
super(Pointer.SIZE);
|
||||
super(Native.POINTER_SIZE);
|
||||
setValue(value);
|
||||
}
|
||||
|
||||
public void setValue(ULONG_PTR value) {
|
||||
if (Pointer.SIZE == 4) {
|
||||
if (Native.POINTER_SIZE == 4) {
|
||||
getPointer().setInt(0, value.intValue());
|
||||
} else {
|
||||
getPointer().setLong(0, value.longValue());
|
||||
@@ -103,7 +104,7 @@ public interface BaseTSD extends StdCallLibrary {
|
||||
}
|
||||
|
||||
public ULONG_PTR getValue() {
|
||||
return new ULONG_PTR(Pointer.SIZE == 4
|
||||
return new ULONG_PTR(Native.POINTER_SIZE == 4
|
||||
? getPointer().getInt(0)
|
||||
: getPointer().getLong(0));
|
||||
}
|
||||
@@ -119,7 +120,7 @@ public interface BaseTSD extends StdCallLibrary {
|
||||
}
|
||||
|
||||
public DWORD_PTR(long value) {
|
||||
super(Pointer.SIZE, value);
|
||||
super(Native.POINTER_SIZE, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.sun.jna.platform.win32;
|
||||
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Platform;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.Structure;
|
||||
@@ -39,7 +40,7 @@ public interface WinBase extends StdCallLibrary, WinDef, BaseTSD {
|
||||
* Constant value representing an invalid HANDLE.
|
||||
*/
|
||||
HANDLE INVALID_HANDLE_VALUE
|
||||
= new HANDLE(Pointer.createConstant(Pointer.SIZE == 8
|
||||
= new HANDLE(Pointer.createConstant(Native.POINTER_SIZE == 8
|
||||
? -1 : 0xFFFFFFFFL));
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.sun.jna.platform.win32;
|
||||
|
||||
import com.sun.jna.IntegerType;
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.Structure;
|
||||
import com.sun.jna.platform.win32.BaseTSD.LONG_PTR;
|
||||
@@ -510,7 +511,7 @@ public interface WinDef extends StdCallLibrary {
|
||||
* Instantiates a new int ptr.
|
||||
*/
|
||||
public INT_PTR() {
|
||||
super(Pointer.SIZE);
|
||||
super(Native.POINTER_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -519,7 +520,7 @@ public interface WinDef extends StdCallLibrary {
|
||||
* @param value the value
|
||||
*/
|
||||
public INT_PTR(long value) {
|
||||
super(Pointer.SIZE, value);
|
||||
super(Native.POINTER_SIZE, value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -541,7 +542,7 @@ public interface WinDef extends StdCallLibrary {
|
||||
* Instantiates a new uint ptr.
|
||||
*/
|
||||
public UINT_PTR() {
|
||||
super(Pointer.SIZE);
|
||||
super(Native.POINTER_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -550,7 +551,7 @@ public interface WinDef extends StdCallLibrary {
|
||||
* @param value the value
|
||||
*/
|
||||
public UINT_PTR(long value) {
|
||||
super(Pointer.SIZE, value, true);
|
||||
super(Native.POINTER_SIZE, value, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.sun.jna.platform.win32;
|
||||
|
||||
import com.sun.jna.FromNativeContext;
|
||||
import com.sun.jna.Memory;
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.NativeLong;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.PointerType;
|
||||
@@ -1070,7 +1071,7 @@ public interface WinNT extends WinError, WinDef, WinBase, BaseTSD {
|
||||
}
|
||||
|
||||
public HANDLEByReference(HANDLE h) {
|
||||
super(Pointer.SIZE);
|
||||
super(Native.POINTER_SIZE);
|
||||
setValue(h);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.sun.jna.platform.win32;
|
||||
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.WinNT.HANDLE;
|
||||
import com.sun.jna.ptr.ByReference;
|
||||
@@ -51,7 +52,7 @@ public interface WinReg extends StdCallLibrary {
|
||||
}
|
||||
|
||||
public HKEYByReference(HKEY h) {
|
||||
super(Pointer.SIZE);
|
||||
super(Native.POINTER_SIZE);
|
||||
setValue(h);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user