File tree Expand file tree Collapse file tree 4 files changed +52
-0
lines changed Expand file tree Collapse file tree 4 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,28 @@ InputStream& InputFile::getStream( size_t index )
116
116
}
117
117
}
118
118
119
+
120
+ std::string InputFile::getFormatName () const
121
+ {
122
+ if ( _formatContext.getAVInputFormat ().name == NULL )
123
+ return " unknown" ;
124
+ return std::string (_formatContext.getAVInputFormat ().name );
125
+ }
126
+
127
+ std::string InputFile::getFormatLongName () const
128
+ {
129
+ if ( _formatContext.getAVInputFormat ().long_name == NULL )
130
+ return " unknown" ;
131
+ return std::string (_formatContext.getAVInputFormat ().long_name );
132
+ }
133
+
134
+ std::string InputFile::getFormatMimeType () const
135
+ {
136
+ if ( _formatContext.getAVInputFormat ().mime_type == NULL )
137
+ return " unknown" ;
138
+ return std::string (_formatContext.getAVInputFormat ().mime_type );
139
+ }
140
+
119
141
double InputFile::getFps ()
120
142
{
121
143
double fps = 1 ;
Original file line number Diff line number Diff line change @@ -80,6 +80,10 @@ class AvExport InputFile
80
80
**/
81
81
InputStream& getStream ( size_t index );
82
82
83
+ std::string getFormatName () const ;
84
+ std::string getFormatLongName () const ;
85
+ std::string getFormatMimeType () const ;
86
+
83
87
FormatContext& getFormatContext () { return _formatContext; }
84
88
85
89
/* *
Original file line number Diff line number Diff line change @@ -85,6 +85,27 @@ IOutputStream& OutputFile::getStream( const size_t streamId )
85
85
return *_outputStreams.at ( streamId );
86
86
}
87
87
88
+ std::string OutputFile::getFormatName () const
89
+ {
90
+ if ( _formatContext.getAVOutputFormat ().name == NULL )
91
+ return " unknown" ;
92
+ return std::string (_formatContext.getAVOutputFormat ().name );
93
+ }
94
+
95
+ std::string OutputFile::getFormatLongName () const
96
+ {
97
+ if ( _formatContext.getAVOutputFormat ().long_name == NULL )
98
+ return " unknown" ;
99
+ return std::string (_formatContext.getAVOutputFormat ().long_name );
100
+ }
101
+
102
+ std::string OutputFile::getFormatMimeType () const
103
+ {
104
+ if ( _formatContext.getAVOutputFormat ().mime_type == NULL )
105
+ return " unknown" ;
106
+ return std::string (_formatContext.getAVOutputFormat ().mime_type );
107
+ }
108
+
88
109
bool OutputFile::beginWrap ( )
89
110
{
90
111
LOG_DEBUG ( " Begin wrap of OutputFile" )
Original file line number Diff line number Diff line change @@ -53,6 +53,11 @@ class AvExport OutputFile : public IOutputFile
53
53
void addMetadata ( const std::string& key, const std::string& value );
54
54
55
55
IOutputStream& getStream ( const size_t streamId );
56
+
57
+ std::string getFormatName () const ;
58
+ std::string getFormatLongName () const ;
59
+ std::string getFormatMimeType () const ;
60
+
56
61
FormatContext& getFormatContext () { return _formatContext; }
57
62
58
63
/* *
You can’t perform that action at this time.
0 commit comments