Merge pull request #2244 from pengyanhai/master
Merge back the changes of v1.5.2 to master and generate PDB file on Windows
This commit is contained in:
commit
148f86f3b0
8
RELEASES
8
RELEASES
@ -1,6 +1,14 @@
|
||||
|
||||
Releases
|
||||
-----------
|
||||
v1.5.2
|
||||
------
|
||||
- Fix GMP Plugin causing the Browser crash on Android
|
||||
|
||||
v1.5.1
|
||||
------
|
||||
- Bug fixes for GMP Plugin
|
||||
|
||||
v1.5.0
|
||||
------
|
||||
- Correct a typo in codec return value (github issue#2046, cmUnkonwReason -> cmUnknownReason)
|
||||
|
@ -22,7 +22,7 @@ CXX_O=-Fo$@
|
||||
# it unconditionally. The same issue can also be worked around by adding
|
||||
# -DGTEST_HAS_TR1_TUPLE=0 instead, but we prefer this version since it
|
||||
# matches what gtest itself does.
|
||||
CFLAGS += -nologo -Fd$(PROJECT_NAME).pdb -W3 -EHsc -fp:precise -Zc:wchar_t -Zc:forScope -D_VARIADIC_MAX=10
|
||||
CFLAGS += -nologo -W3 -EHsc -fp:precise -Zc:wchar_t -Zc:forScope -D_VARIADIC_MAX=10
|
||||
CXX_LINK_O=-nologo -Fe$@
|
||||
AR_OPTS=-nologo -out:$@
|
||||
CFLAGS_OPT=-O2 -Ob1 -Oy- -Zi -GF -Gm- -GS -Gy -DNDEBUG
|
||||
@ -41,7 +41,7 @@ SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX)
|
||||
SHARED=-LD
|
||||
EXTRA_LIBRARY=$(PROJECT_NAME)_dll.lib
|
||||
LDFLAGS += -link
|
||||
SHLDFLAGS=-pdb:$(PROJECT_NAME).pdb -def:$(SRC_PATH)openh264.def -implib:$(EXTRA_LIBRARY)
|
||||
SHLDFLAGS=-debug -opt:ref -opt:icf -def:$(SRC_PATH)openh264.def -implib:$(EXTRA_LIBRARY)
|
||||
STATIC_LDFLAGS=
|
||||
CODEC_UNITTEST_CFLAGS=-D_CRT_SECURE_NO_WARNINGS
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Name: gmpopenh264
|
||||
Description: GMP Plugin for OpenH264.
|
||||
Version: 1.5
|
||||
Version: 1.5.2
|
||||
APIs: encode-video[h264], decode-video[h264]
|
||||
|
@ -361,14 +361,17 @@ class OpenH264VideoEncoder : public GMPVideoEncoder, public RefCounted {
|
||||
}
|
||||
|
||||
virtual void EncodingComplete() {
|
||||
// Release the reference to the callback, because it is no longer safe to call it
|
||||
// Release the reference to the external objects, because it is no longer safe to call them
|
||||
host_ = nullptr;
|
||||
callback_ = nullptr;
|
||||
TearDownEncoder();
|
||||
|
||||
Release();
|
||||
}
|
||||
|
||||
private:
|
||||
virtual ~OpenH264VideoEncoder() {
|
||||
// Tear down the internal encoder
|
||||
// Tear down the internal encoder in case of EncodingComplete() not being called
|
||||
TearDownEncoder();
|
||||
}
|
||||
|
||||
@ -481,12 +484,18 @@ class OpenH264VideoEncoder : public GMPVideoEncoder, public RefCounted {
|
||||
|
||||
void Encode_m (GMPVideoi420Frame* frame, SFrameBSInfo* encoded,
|
||||
GMPVideoFrameType frame_type) {
|
||||
// Attach a self-destructor so that this dies on return.
|
||||
SelfDestruct<GMPVideoi420Frame> ifd (frame);
|
||||
|
||||
if (!host_) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Now return the encoded data back to the parent.
|
||||
GMPVideoFrame* ftmp;
|
||||
GMPErr err = host_->CreateFrame (kGMPEncodedVideoFrame, &ftmp);
|
||||
if (err != GMPNoErr) {
|
||||
GMPLOG (GL_ERROR, "Error creating encoded frame");
|
||||
frame->Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -513,7 +522,6 @@ class OpenH264VideoEncoder : public GMPVideoEncoder, public RefCounted {
|
||||
if (err != GMPNoErr) {
|
||||
GMPLOG (GL_ERROR, "Error allocating frame data");
|
||||
f->Destroy();
|
||||
frame->Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -539,9 +547,6 @@ class OpenH264VideoEncoder : public GMPVideoEncoder, public RefCounted {
|
||||
<< " timestamp="
|
||||
<< f->TimeStamp());
|
||||
|
||||
// Destroy the frame.
|
||||
frame->Destroy();
|
||||
|
||||
// Return the encoded frame.
|
||||
GMPCodecSpecificInfo info;
|
||||
memset (&info, 0, sizeof (info)); // shouldn't be needed, we init everything
|
||||
@ -735,14 +740,17 @@ class OpenH264VideoDecoder : public GMPVideoDecoder, public RefCounted {
|
||||
}
|
||||
|
||||
virtual void DecodingComplete() {
|
||||
// Release the reference to the callback, because it is no longer safe to call it
|
||||
// Release the reference to the external objects, because it is no longer safe to call them
|
||||
host_ = nullptr;
|
||||
callback_ = nullptr;
|
||||
TearDownDecoder();
|
||||
|
||||
Release();
|
||||
}
|
||||
|
||||
private:
|
||||
virtual ~OpenH264VideoDecoder() {
|
||||
// Tear down the internal decoder
|
||||
// Tear down the internal decoder in case of DecodingComplete() not being called
|
||||
TearDownDecoder();
|
||||
}
|
||||
|
||||
@ -836,6 +844,10 @@ class OpenH264VideoDecoder : public GMPVideoDecoder, public RefCounted {
|
||||
|
||||
GMPVideoFrame* ftmp = nullptr;
|
||||
|
||||
if (!host_) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Translate the image.
|
||||
GMPErr err = host_->CreateFrame (kGMPI420VideoFrame, &ftmp);
|
||||
if (err != GMPNoErr) {
|
||||
|
Loading…
Reference in New Issue
Block a user