Merge branch 'TASEmulators:master' into master
This commit is contained in:
commit
4ff0bc2a3b
|
@ -1,3 +1,4 @@
|
|||
include(GNUInstallDirs)
|
||||
|
||||
set( APP_NAME fceux)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
@ -631,7 +632,7 @@ install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/auxlib.lua DESTINA
|
|||
install( DIRECTORY ${CMAKE_SOURCE_DIR}/output/. DESTINATION share/fceux )
|
||||
install( FILES ${CMAKE_SOURCE_DIR}/fceux1.png DESTINATION share/pixmaps )
|
||||
install( FILES ${CMAKE_SOURCE_DIR}/fceux.desktop DESTINATION share/applications )
|
||||
install( FILES ${CMAKE_SOURCE_DIR}/documentation/fceux.6 DESTINATION share/man/man6 )
|
||||
install( FILES ${CMAKE_SOURCE_DIR}/documentation/fceux-net-server.6 DESTINATION share/man/man6 )
|
||||
install( FILES ${CMAKE_SOURCE_DIR}/documentation/fceux.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6 )
|
||||
install( FILES ${CMAKE_SOURCE_DIR}/documentation/fceux-net-server.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6 )
|
||||
|
||||
endif(APPLE)
|
||||
|
|
|
@ -756,6 +756,7 @@ struct OutputStream
|
|||
AVCodecContext *enc;
|
||||
AVFrame *frame;
|
||||
AVFrame *tmp_frame;
|
||||
AVPacket *pkt;
|
||||
struct SwsContext *sws_ctx;
|
||||
struct SwrContext *swr_ctx;
|
||||
int64_t next_pts;
|
||||
|
@ -774,6 +775,7 @@ struct OutputStream
|
|||
st = NULL;
|
||||
enc = NULL;
|
||||
frame = tmp_frame = NULL;
|
||||
pkt = NULL;
|
||||
sws_ctx = NULL;
|
||||
swr_ctx = NULL;
|
||||
bytesPerSample = 0;
|
||||
|
@ -800,6 +802,10 @@ struct OutputStream
|
|||
{
|
||||
avcodec_free_context(&enc); enc = NULL;
|
||||
}
|
||||
if ( pkt != NULL )
|
||||
{
|
||||
av_packet_free(&pkt); pkt = NULL;
|
||||
}
|
||||
if ( frame != NULL )
|
||||
{
|
||||
av_frame_free(&frame); frame = NULL;
|
||||
|
@ -1223,6 +1229,14 @@ static int initVideoStream( const char *codec_name, OutputStream *ost )
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* packet for holding encoded output */
|
||||
ost->pkt = av_packet_alloc();
|
||||
if (ost->pkt == NULL)
|
||||
{
|
||||
fprintf( avLogFp, "Could not allocate the video packet\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Allocate the encoded raw picture. */
|
||||
ost->frame = alloc_picture(c->pix_fmt, c->width, c->height);
|
||||
|
||||
|
@ -1456,6 +1470,14 @@ static int initAudioStream( const char *codec_name, OutputStream *ost )
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* packet for holding encoded output */
|
||||
ost->pkt = av_packet_alloc();
|
||||
if (ost->pkt == NULL)
|
||||
{
|
||||
fprintf( avLogFp, "Could not allocate the audio packet\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (c->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE)
|
||||
{
|
||||
nb_samples = audioSampleRate / 4;
|
||||
|
@ -1722,9 +1744,11 @@ static int write_audio_frame( AVFrame *frame )
|
|||
}
|
||||
while (ret >= 0)
|
||||
{
|
||||
AVPacket pkt = { 0 }; // data and size must be 0;
|
||||
av_init_packet(&pkt);
|
||||
ret = avcodec_receive_packet(ost->enc, &pkt);
|
||||
//AVPacket pkt = { 0 }; // data and size must be 0;
|
||||
//#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 59, 0, 0 )
|
||||
// av_init_packet(&pkt);
|
||||
//#endif
|
||||
ret = avcodec_receive_packet(ost->enc, ost->pkt);
|
||||
if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF)
|
||||
{
|
||||
fprintf( avLogFp, "Error encoding audio frame\n");
|
||||
|
@ -1733,16 +1757,17 @@ static int write_audio_frame( AVFrame *frame )
|
|||
}
|
||||
else if (ret >= 0)
|
||||
{
|
||||
av_packet_rescale_ts(&pkt, ost->enc->time_base, ost->st->time_base);
|
||||
pkt.stream_index = ost->st->index;
|
||||
av_packet_rescale_ts(ost->pkt, ost->enc->time_base, ost->st->time_base);
|
||||
ost->pkt->stream_index = ost->st->index;
|
||||
/* Write the compressed frame to the media file. */
|
||||
ret = av_interleaved_write_frame(oc, &pkt);
|
||||
ret = av_interleaved_write_frame(oc, ost->pkt);
|
||||
if (ret < 0)
|
||||
{
|
||||
fprintf( avLogFp, "Error while writing audio frame\n");
|
||||
ost->writeError = true;
|
||||
return -1;
|
||||
}
|
||||
av_packet_unref(ost->pkt);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -1916,11 +1941,12 @@ static int encode_video_frame( unsigned char *inBuf )
|
|||
|
||||
while (ret >= 0)
|
||||
{
|
||||
AVPacket pkt = { 0 };
|
||||
//AVPacket pkt = { 0 };
|
||||
|
||||
av_init_packet(&pkt);
|
||||
|
||||
ret = avcodec_receive_packet(c, &pkt);
|
||||
//#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 59, 0, 0 )
|
||||
// av_init_packet(&pkt);
|
||||
//#endif
|
||||
ret = avcodec_receive_packet(c, ost->pkt);
|
||||
|
||||
if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF)
|
||||
{
|
||||
|
@ -1930,16 +1956,17 @@ static int encode_video_frame( unsigned char *inBuf )
|
|||
}
|
||||
else if (ret >= 0)
|
||||
{
|
||||
av_packet_rescale_ts(&pkt, c->time_base, video_st.st->time_base);
|
||||
pkt.stream_index = video_st.st->index;
|
||||
av_packet_rescale_ts(ost->pkt, c->time_base, video_st.st->time_base);
|
||||
ost->pkt->stream_index = video_st.st->index;
|
||||
/* Write the compressed frame to the media file. */
|
||||
ret = av_interleaved_write_frame(oc, &pkt);
|
||||
ret = av_interleaved_write_frame(oc, ost->pkt);
|
||||
if (ret < 0)
|
||||
{
|
||||
fprintf( avLogFp, "Error while writing video frame\n");
|
||||
ost->writeError = true;
|
||||
return -1;
|
||||
}
|
||||
av_packet_unref(ost->pkt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,12 +40,14 @@
|
|||
</div>
|
||||
<div id="page_content">
|
||||
<h1>Downloads</h1>
|
||||
<p>The FCEUX team maintains two ports: SDL and Win32.
|
||||
The Win32 port has an extensive set of native gui amenities and tools.
|
||||
The SDL port supports most of the features of the Win32 build (debug tools, Lua scripting, movie recording),
|
||||
but some of the Win32 features (TAS Editor) are exclusive to Windows.
|
||||
The SDL port should run in any UNIX-like OS (Linux/Solaris/BSD/OSX) as well as Windows.
|
||||
</p>
|
||||
<p>The FCEUX team maintains two ports: Qt/SDL and Win32.<br><br>
|
||||
The Win32 port offers the classic extensive set of native gui amenities and tools.<br><br>
|
||||
The newer Qt/SDL port supports all of the features of the Win32 build (debug tools, Lua scripting, movie recording),
|
||||
with the exception of the TAS Editor which will be added at a later date. Many of the tools in the Qt/SDL port have
|
||||
taken on a new look and feel. There are also a few new tools exclusive to the Qt/SDL port such as the sprite viewer,
|
||||
NES Palette Editor, AVI RIFF Tree viewer, and frame timing tool.
|
||||
The Qt/SDL port is 100% cross platform and should run on any UNIX-like OS (Linux/Solaris/BSD/OSX) as well as Windows.
|
||||
</p>
|
||||
|
||||
<p>Network play in both the Win32 and SDL ports is not presently functional. There are no plans to fix it at this time.</p>
|
||||
|
||||
|
|
Loading…
Reference in New Issue