Permalink
Browse files

Do not to hack with OmxPortStructure

  • Loading branch information...
1 parent 88454cb commit d917ff4b987281d18290dcc3b7e884fb585ad8ef @tigrux committed Mar 12, 2010
Showing with 5 additions and 29 deletions.
  1. +0 −18 gomx.vala
  2. +5 −4 gstgomx.vala
  3. +0 −7 omx.h
View
@@ -1131,24 +1131,6 @@ namespace GOmx {
}
- public void get_parameter(
- uint32 param_index, Omx.PortStructure param)
- throws Error requires(component !=null) {
- param.port_index = index;
- GOmx.try_run(
- _component.handle.get_parameter(param_index, param));
- }
-
-
- public void set_parameter(
- uint32 param_index, Omx.PortStructure param)
- throws Error requires(component !=null) {
- param.port_index = index;
- GOmx.try_run(
- _component.handle.get_parameter(param_index, param));
- }
-
-
public void allocate_buffers()
throws Error requires(_buffers == null) {
_buffers = new BufferArray(n_buffers);
View
@@ -253,18 +253,19 @@ namespace GstGOmx {
void configure_input() throws Error {
var mp3_param = Omx.Audio.Param.Mp3();
mp3_param.init();
- input_port.get_parameter(Omx.Index.ParamAudioMp3, mp3_param);
+ mp3_param.port_index = input_port.index;
+ component.handle.get_parameter(Omx.Index.ParamAudioMp3, mp3_param);
mp3_param.channels = channels;
mp3_param.sample_rate = rate;
- input_port.set_parameter(Omx.Index.ParamAudioMp3, mp3_param);
+ component.handle.set_parameter(Omx.Index.ParamAudioMp3, mp3_param);
}
void configure_output() throws Error {
var pcm_param = Omx.Audio.Param.PcmMode();
pcm_param.init();
- output_port.get_parameter(Omx.Index.ParamAudioPcm, pcm_param);
-
+ pcm_param.port_index = output_port.index;
+ component.handle.get_parameter(Omx.Index.ParamAudioPcm, pcm_param);
src_pad.set_caps(
new Gst.Caps.simple(
"audio/x-raw-int",
View
7 omx.h
@@ -15,11 +15,4 @@
}
-typedef struct {
- OMX_U32 nSize;
- OMX_VERSIONTYPE nVersion;
- OMX_U32 nPortIndex;
-} OmxPortStructure;
-
-
#endif

0 comments on commit d917ff4

Please sign in to comment.