hornetseye-ffmpeg 1.1.7 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/ext/avoutput.cc +8 -4
- metadata +2 -2
data/Rakefile
CHANGED
data/ext/avoutput.cc
CHANGED
@@ -56,7 +56,7 @@ AVOutput::AVOutput( const string &mrl, int videoBitRate, int width, int height,
|
|
56
56
|
snprintf( m_oc->filename, sizeof( m_oc->filename ), "%s", mrl.c_str() );
|
57
57
|
ERRORMACRO( format->video_codec != CODEC_ID_NONE, Error, ,
|
58
58
|
"Output format does not support video" );
|
59
|
-
m_videoStream =
|
59
|
+
m_videoStream = avformat_new_stream( m_oc, NULL );
|
60
60
|
ERRORMACRO( m_videoStream != NULL, Error, , "Could not allocate video stream" );
|
61
61
|
m_videoStream->sample_aspect_ratio.num = aspectRatioNum;
|
62
62
|
m_videoStream->sample_aspect_ratio.den = aspectRatioDen;
|
@@ -75,7 +75,7 @@ AVOutput::AVOutput( const string &mrl, int videoBitRate, int width, int height,
|
|
75
75
|
if ( m_oc->oformat->flags & AVFMT_GLOBALHEADER )
|
76
76
|
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
77
77
|
if ( channels > 0 ) {
|
78
|
-
m_audioStream =
|
78
|
+
m_audioStream = avformat_new_stream( m_oc, NULL );
|
79
79
|
ERRORMACRO( m_audioStream != NULL, Error, , "Could not allocate audio stream" );
|
80
80
|
AVCodecContext *c = m_audioStream->codec;
|
81
81
|
c->codec_id = audioCodec != CODEC_ID_NONE ? audioCodec : format->audio_codec;
|
@@ -91,7 +91,7 @@ AVOutput::AVOutput( const string &mrl, int videoBitRate, int width, int height,
|
|
91
91
|
AVCodec *codec = avcodec_find_encoder( c->codec_id );
|
92
92
|
ERRORMACRO( codec != NULL, Error, , "Could not find video codec "
|
93
93
|
<< c->codec_id );
|
94
|
-
ERRORMACRO(
|
94
|
+
ERRORMACRO( avcodec_open2( c, codec, NULL ) >= 0, Error, ,
|
95
95
|
"Error opening video codec \"" << codec->name << "\": "
|
96
96
|
<< strerror( errno ) );
|
97
97
|
m_videoCodecOpen = true;
|
@@ -105,7 +105,7 @@ AVOutput::AVOutput( const string &mrl, int videoBitRate, int width, int height,
|
|
105
105
|
AVCodec *codec = avcodec_find_encoder( c->codec_id );
|
106
106
|
ERRORMACRO( codec != NULL, Error, , "Could not find audio codec "
|
107
107
|
<< c->codec_id );
|
108
|
-
ERRORMACRO(
|
108
|
+
ERRORMACRO( avcodec_open2( c, codec, NULL ) >= 0, Error, ,
|
109
109
|
"Error opening audio codec \"" << codec->name << "\": "
|
110
110
|
<< strerror( errno ) );
|
111
111
|
m_audioCodecOpen = true;
|
@@ -716,10 +716,14 @@ VALUE AVOutput::registerRubyClass( VALUE rbModule )
|
|
716
716
|
INT2FIX( CODEC_ID_MACE6 ) );
|
717
717
|
rb_define_const( cRubyClass, "CODEC_ID_VMDAUDIO",
|
718
718
|
INT2FIX( CODEC_ID_VMDAUDIO ) );
|
719
|
+
#ifdef CODEC_ID_SONIC
|
719
720
|
rb_define_const( cRubyClass, "CODEC_ID_SONIC",
|
720
721
|
INT2FIX( CODEC_ID_SONIC ) );
|
722
|
+
#endif
|
723
|
+
#ifdef CODEC_ID_SONIC_LS
|
721
724
|
rb_define_const( cRubyClass, "CODEC_ID_SONIC_LS",
|
722
725
|
INT2FIX( CODEC_ID_SONIC_LS ) );
|
726
|
+
#endif
|
723
727
|
rb_define_const( cRubyClass, "CODEC_ID_FLAC",
|
724
728
|
INT2FIX( CODEC_ID_FLAC ) );
|
725
729
|
rb_define_const( cRubyClass, "CODEC_ID_MP3ADU",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hornetseye-ffmpeg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: malloc
|